/* A station is one work order: identity block, job title, scope, work items,
   method statement, sign-off. Right rail carries the plate and the figures. */

.sheet {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}

/* ---------------- identity block ---------------- */

.band--station .band__inner {
  grid-template-columns: minmax(0, 1fr) 286px;
  align-items: end;
}

.band__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  line-height: 0.84;
  letter-spacing: 0.004em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.band__sub {
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-green-dim);
}

@media (max-width: 780px) {
  .band--station .band__inner {
    grid-template-columns: 1fr;
  }
}

/* ---------------- body grid ---------------- */

.sheet__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  grid-template-areas:
    "head plate"
    "body rail";
  column-gap: clamp(1.4rem, 3vw, 2.8rem);
  row-gap: 0;
  padding-block: clamp(1.2rem, 2.4vw, 1.9rem) clamp(1.6rem, 3vw, 2.6rem);
}

.order-head {
  grid-area: head;
}

.head-plate {
  grid-area: plate;
}

.head-plate .plate {
  aspect-ratio: 16 / 9;
}

.order-body {
  grid-area: body;
}

.rail {
  grid-area: rail;
}

@media (min-width: 981px) {
  /* The rail is shorter than the body. Sticking it keeps the figures and the
     sign-off beside the reader instead of leaving a tall empty column. */
  .rail {
    position: sticky;
    top: calc(var(--runhead-h) + 1.2rem);
    align-self: start;
  }
}

@media (max-width: 980px) {
  .sheet__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "plate"
      "body"
      "rail";
  }
  .head-plate {
    margin-bottom: 1.1rem;
  }
  .rail {
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--ink);
  }
}

/* ---------------- job title ---------------- */

.order-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.2vw, 4.6rem);
  line-height: 0.84;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.order-head .lede {
  max-width: 44ch;
  margin-top: 0.7rem;
}

.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-bottom: 0.7rem;
  font-family: var(--mono);
  font-size: var(--fs-nano);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mute);
}

.order-meta b {
  color: var(--ink);
  font-weight: 500;
}

/* ---------------- scope ---------------- */

.scope {
  margin-top: clamp(1.1rem, 2vw, 1.6rem);
  padding: 0.75rem 0 0.9rem clamp(0.8rem, 1.4vw, 1.1rem);
  border-left: 3px solid var(--green);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.scope__label {
  font-family: var(--mono);
  font-size: var(--fs-nano);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-lit);
}

.scope__line {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.3vw, 1.95rem);
  line-height: 1.08;
  letter-spacing: 0.002em;
  max-width: 40ch;
}

.scope__line .fig {
  font-style: normal;
  color: var(--green-lit);
  border-bottom: 2px solid var(--green-line);
}

/* ---------------- prose ---------------- */

.order-prose {
  margin-top: clamp(1rem, 1.8vw, 1.4rem);
  max-width: 62ch;
  column-gap: 2.2rem;
}

@media (min-width: 1100px) {
  .order-prose {
    column-count: 2;
    max-width: none;
  }
  .order-prose p {
    break-inside: avoid;
  }
}

/* ---------------- work items ---------------- */

.tasks {
  margin-top: clamp(1.2rem, 2.2vw, 1.8rem);
  border-top: 2px solid var(--ink);
}

.tasks__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0 0.45rem;
  border-bottom: 1px solid var(--rule);
}

.tasks__head .eyebrow {
  color: var(--ink);
}

.tasks__count {
  font-family: var(--mono);
  font-size: var(--fs-nano);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--mute);
}

.tasks__count b {
  color: var(--ink);
  font-weight: 500;
}

.task {
  display: grid;
  grid-template-columns: 24px 46px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  width: 100%;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  transition: background 150ms var(--ease);
}

.task:hover {
  background: var(--green-wash);
}

.task__box {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  border: 1px solid var(--rule-strong);
  background: var(--sheet);
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}

.task__box::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--on-green);
  border-bottom: 2px solid var(--on-green);
  transform: rotate(-45deg) scale(0.4);
  opacity: 0;
  transition: opacity 140ms var(--ease), transform 200ms var(--ease-out);
}

.task[aria-pressed="true"] .task__box {
  background: var(--green);
  border-color: var(--green);
}

.task[aria-pressed="true"] .task__box::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.task__code {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  color: var(--mute);
  padding-top: 0.28rem;
}

.task__text {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--ink);
}

.task[aria-pressed="true"] .task__text {
  color: var(--mute);
}

.task__text small {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--green-lit);
  opacity: 0;
  transition: opacity 160ms var(--ease);
}

.task[aria-pressed="true"] .task__text small {
  opacity: 1;
}

/* ---------------- handoff ---------------- */

.handoff {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem 1rem;
  align-items: baseline;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: var(--green-wash);
  border: 1px solid var(--green-line);
}

.handoff .mono {
  color: var(--green-lit);
  white-space: nowrap;
}

.handoff p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------------- rail ---------------- */

.rail__block {
  padding-block: 0.8rem;
  border-top: 1px solid var(--rule);
}

.rail__block:first-child {
  border-top: 0;
  padding-top: 0;
}

.rail__block h2 {
  font-family: var(--mono);
  font-size: var(--fs-nano);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.5rem;
}

.facts {
  display: grid;
  gap: 0.5rem;
}

.fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
}

.fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fact b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 0.95;
  letter-spacing: 0.005em;
}

.fact span {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--mute);
}

.rail__note {
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--mute);
  margin-top: 0.5rem;
}

.signoff {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}

.signoff .stamp {
  width: 84px;
  height: 84px;
  margin-left: 6px;
  font-size: 0.4rem;
}

.signoff__text b {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--ink);
}

.signoff__text span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--mute);
}

/* ---------------- inline plate ---------------- */

.inline-plate {
  max-width: 820px;
  margin-top: clamp(1.2rem, 2.2vw, 1.8rem);
}

.inline-plate .plate {
  aspect-ratio: 3 / 2;
}

/* ---------------- method statement ---------------- */

.method {
  background: var(--green-wash);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--green-line);
  padding-block: clamp(1.4rem, 3vw, 2.4rem);
}

.method__grid {
  display: grid;
  /* The plate column is sized to the plate, so no dead gutter opens between
     artwork and method text on a wide screen. */
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: clamp(1.2rem, 2.6vw, 2.6rem);
  align-items: stretch;
}

.method__figure {
  display: flex;
  flex-direction: column;
  max-width: none;
}

.method-figure {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Grows with the method column so the green band never ends in dead space
   under a fixed-ratio plate. */
.method__figure .plate {
  flex: 1 1 auto;
  aspect-ratio: 4 / 5;
  min-height: 300px;
}

.method__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: var(--fs-nano);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-lit);
}

.method__kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--green);
}

.method h2 {
  margin-top: 0.5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 0.88;
  text-transform: uppercase;
}

.method__line {
  margin-top: 0.6rem;
  max-width: 46ch;
  font-size: var(--fs-lead);
  line-height: 1.45;
  color: var(--ink-2);
}

.method__list {
  margin-top: 1rem;
  border-top: 1px solid var(--green-line);
  counter-reset: method;
}

.method__list li {
  counter-increment: method;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--green-line);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.method__list li::before {
  content: counter(method, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--green-lit);
  padding-top: 0.2rem;
}

.method__note {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.7;
  color: var(--mute);
  max-width: 54ch;
}

@media (max-width: 860px) {
  .method__grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .method__figure {
    max-width: 380px;
  }
  .method__figure .plate {
    flex: 0 0 auto;
    min-height: 0;
  }
}

/* ---------------- previous / next orders ---------------- */

.order-nav {
  margin-top: clamp(1.4rem, 2.6vw, 2.2rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.order-nav a {
  display: block;
  padding: 1rem clamp(0.9rem, 2vw, 1.4rem) 1.1rem;
  transition: background 160ms var(--ease);
}

.order-nav a:hover {
  background: var(--green-wash);
}

.order-nav a + a {
  border-left: 1px solid var(--ink);
  text-align: right;
}

.order-nav b {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1;
  text-transform: uppercase;
}

.order-nav span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--mute);
}

@media (max-width: 600px) {
  .order-nav {
    grid-template-columns: 1fr;
  }
  .order-nav a + a {
    border-left: 0;
    border-top: 1px solid var(--rule);
    text-align: left;
  }
}

/* ---------------- closing band ---------------- */

.close-band {
  border-top: 2px solid var(--ink);
  padding-block: clamp(1.4rem, 2.6vw, 2rem);
}

.close-band__grid {
  display: flex;
  align-items: center;
  gap: 1rem 1.4rem;
  flex-wrap: wrap;
}

.close-band__body {
  flex: 1 1 320px;
  min-width: 0;
}

.close-band__body .mono {
  color: var(--mute);
}

.close-band__body p {
  margin-top: 0.2rem;
  font-size: 0.94rem;
  line-height: 1.45;
  max-width: 56ch;
  color: var(--ink-2);
}

.close-band__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
