/* ============================================================
   BUREAU OF LOST TIMELINES — OPERATIONS & INTAKE SHEET
   Version: 2.0 (Dossier system)

   Two forms of the same Bureau paper live here: the mission board
   (orders issued to an operative) and the submission form (paper an
   operative hands back). Both are record sheets — ink panel, hairline
   rules, a coloured status rail down the left — and both use the same
   vocabulary: amber for "open", phosphor for "logged", red for the one
   action that moves the file forward.
   ============================================================ */

.missions-main {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: var(--s-5) var(--gutter) var(--s-7);
}

/* ---------- the filter rail ---------- */
.missions-filter {
  display: flex;
  gap: var(--s-1);
  flex-wrap: wrap;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}

.mf-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  color: var(--muted-strong);
  padding: 8px var(--s-4);
  min-height: 36px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease);
}

.mf-btn:hover {
  color: var(--paper-bright);
  border-color: var(--alert);
}

.mf-btn.active {
  background: var(--alert);
  border-color: var(--alert);
  color: var(--ink-0);
}

.mf-btn:focus-visible {
  outline: 2px solid var(--alert-bright);
  outline-offset: 2px;
}

/* ---------- the posting stamp ----------
   Shared desk furniture now: the rooms terminal and the mailbox print the same
   stamp, so .posting-stamp and its .ps-* parts live in css/style.css. */

/* ---------- the order sheet ---------- */
.missions-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.mission-card {
  position: relative;
  background: var(--ink-1);
  background-image: var(--fibre);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-inset);
  padding: var(--s-4) var(--s-4) var(--s-3) var(--s-5);
  transition: border-color var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease);
}

/* The status rail: an open order is amber, a logged one is the
   machine green, a locked one is not a colour at all. */
.mission-card::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  width: var(--spine);
  border-radius: var(--r-2) 0 0 var(--r-2);
  background: var(--folklore);
}

.mission-card:hover {
  border-color: var(--line-strong);
  background-color: var(--ink-2);
}

.mission-card.done {
  border-color: var(--phosphor-dim);
  background-image: none;
  background-color: var(--ink-1);
}

.mission-card.done::before {
  background: var(--phosphor-dim);
}

.mission-card.locked {
  border-style: dashed;
  background-image: none;
  box-shadow: none;
}

.mission-card.locked::before {
  background: var(--ink-4);
}

.mission-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  margin-bottom: var(--s-1);
}

.mission-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--paper-bright);
  overflow-wrap: anywhere;
}

.mission-card.locked .mission-title {
  color: var(--muted-strong);
}

/* XP is a number the system pays out, so it reads like an instrument. */
.mission-xp {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-mono);
  color: var(--phosphor);
  white-space: nowrap;
}

.mission-my {
  font-family: var(--font-my);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--paper);
  margin-bottom: var(--s-2);
}

.mission-desc {
  font-size: var(--fs-label);
  line-height: var(--lh-body);
  color: var(--muted-strong);
  margin-bottom: 5px;
}

.mission-desc-my {
  font-family: var(--font-my);
  font-size: var(--fs-label);
  line-height: 1.7;
  color: var(--paper-dim);
  margin-bottom: var(--s-2);
}

.mission-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  flex-wrap: wrap;
  padding-top: var(--s-2);
  border-top: 1px solid var(--line-hair);
}

.mission-role {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--muted);
}

.mission-badge {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-1);
  border: 1px solid transparent;
}

.mission-badge.done {
  background: var(--phosphor-dim);
  color: var(--ink-0);
}

.mission-badge.locked {
  border-color: var(--line-strong);
  color: var(--muted-strong);
}

/* A duty that arrived because of your posting is not a suggestion from the board. */
.mission-badge.posting {
  border-color: var(--cat-timeline);
  color: var(--cat-timeline);
}

.mission-complete-btn {
  background: transparent;
  border: 1px solid var(--alert);
  border-radius: var(--r-1);
  color: var(--alert-bright);
  padding: 8px var(--s-4);
  min-height: 36px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease),
              color var(--dur-1) var(--ease);
}

.mission-complete-btn:hover {
  background: var(--alert);
  color: var(--ink-0);
}

.mission-complete-btn:focus-visible {
  outline: 2px solid var(--alert-bright);
  outline-offset: 2px;
}

/* (.empty-note is shared desk furniture and lives in css/style.css.) */

/* ============================================================
   THE INTAKE FORM (submit.html)
   ============================================================ */
.submit-form {
  position: relative;
  background: var(--ink-1);
  background-image: var(--fibre);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-1), var(--shadow-inset);
  padding: var(--s-5) var(--s-4);
  overflow: hidden;
}

.submit-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--spine);
  background: var(--alert);
}

.form-row {
  margin-bottom: var(--s-3);
}

.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 5px;
}

/* A Burmese label is a different script and must not be shouted: the
   Myanmar face, sentence case, no tracking. */
.form-row label.my {
  font-family: var(--font-my);
  font-size: var(--fs-label);
  letter-spacing: 0;
  text-transform: none;
  color: var(--paper-dim);
}

.form-row input,
.form-row select,
.form-row textarea {
  display: block;
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  color: var(--paper);
  padding: 10px var(--s-2);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  outline: none;
  box-shadow: var(--shadow-inset);
  transition: border-color var(--dur-1) var(--ease),
              box-shadow var(--dur-1) var(--ease);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--alert);
  box-shadow: 0 0 0 3px var(--alert-wash);
}

.form-row textarea {
  resize: vertical;
  line-height: var(--lh-body);
}

.form-row select {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-mono);
  text-transform: uppercase;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted-strong) 50%),
                    linear-gradient(135deg, var(--muted-strong) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: var(--s-6);
}

/* Burmese fields are typed in the Myanmar face, not the Latin body face. */
#subMy,
#subContentMy {
  font-family: var(--font-my);
}

.form-row input[type="file"] {
  margin-top: var(--s-1);
  padding: var(--s-1);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--muted-strong);
}

/* ---------- the rule that governs this form ---------- */
.submit-info {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-mono);
  color: var(--folklore);
  background: var(--folklore-wash);
  border-left: var(--spine) solid var(--folklore);
  padding: var(--s-2) var(--s-3);
  margin: var(--s-4) 0;
}

.submit-info .my {
  font-family: var(--font-my);
  font-size: var(--fs-label);
  letter-spacing: 0;
  color: var(--paper-dim);
  margin-top: 5px;
}

.submit-btn {
  display: block;
  width: 100%;
  background: var(--alert);
  border: 1px solid var(--alert);
  border-radius: var(--r-1);
  color: var(--ink-0);
  padding: 14px var(--s-4);
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease),
              box-shadow var(--dur-1) var(--ease);
}

.submit-btn:hover {
  background: var(--alert-bright);
  border-color: var(--alert-bright);
  box-shadow: 0 8px 24px var(--alert-glow);
}

.submit-btn:focus-visible {
  outline: 2px solid var(--alert-bright);
  outline-offset: 2px;
}

/* ---------- the receipt ---------- */
.submit-result {
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-mono);
  color: var(--alert-bright);
}

.submit-result:not(:empty) {
  background: var(--alert-wash);
  border-left: var(--spine) solid var(--alert);
  padding: var(--s-2) var(--s-3);
}

/* A filing that succeeded is the machine confirming itself. */
.submit-result.ok {
  color: var(--paper-bright);
  background: var(--phosphor-wash);
  border-left-color: var(--phosphor-dim);
}

.submit-result .my {
  display: inline-block;
  font-family: var(--font-my);
  font-size: var(--fs-label);
  letter-spacing: 0;
  color: var(--phosphor-bright);
  margin-top: 4px;
}

/* ---------- narrow screens ---------- */
@media (max-width: 620px) {
  .mission-card {
    padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  }

  .mission-header {
    flex-direction: column;
    gap: 2px;
  }

  .submit-form {
    padding: var(--s-4) var(--s-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mission-card,
  .mf-btn,
  .mission-complete-btn,
  .submit-btn,
  .form-row input,
  .form-row select,
  .form-row textarea {
    transition: none;
  }
}
