/* ------------------------------------------------------------------
   Sedra Software — sedrasoftware.com

   The look is carried over from Sedra Order itself so the site and the
   product read as related: a sage green on a pale sage paper (the owner's
   choice; the product itself uses a bluer glass green), IBM Plex throughout, and the edge stripe — a
   coloured bar down a panel's left side, like the edge of a pane, whose
   colour says whether a person is needed. Amber is used for nothing
   else.

   Headlines are set in Plex Sans Condensed, the same family at a
   narrower width, the way lettering is on a rack label or a job sheet.

   Motion is kept to what explains the product: an order moving through
   its four stages, and things settling into place as they are reached.
   ------------------------------------------------------------------ */

:root {
  color-scheme: light;

  --paper:      #F2F6EF;
  --surface:    #FFFFFF;
  --surface-2:  #E6EEE1;
  --surface-3:  #DAE5D3;

  --ink:        #16262C;
  --ink-soft:   #566A71;
  --ink-faint:  #8598A0;

  --line:       #CEDCC6;
  --line-soft:  #E0EADA;

  /* The accent. Change these four together (and the logo files) to
     re-colour the whole site. --glass-rgb is --glass as numbers, for
     the see-through uses. */
  --glass:      #4D6B4A;
  --glass-rgb:  77, 107, 74;
  --glass-deep: #3A5238;
  --glass-tint: #DDEAD8;

  /* Amber asks for a person. */
  --amber:      #97590A;
  --amber-tint: #FBF0DF;
  --amber-line: #EBD3AC;

  --font-ui:      "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --font-data:    "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --font-hand:    "Caveat", "Bradley Hand", cursive;

  --radius: 7px;
  --shadow: 0 1px 2px rgba(22, 38, 44, 0.05), 0 1px 3px rgba(22, 38, 44, 0.04);
  --shadow-lift: 0 2px 4px rgba(22, 38, 44, 0.05), 0 14px 34px rgba(22, 38, 44, 0.09);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --top-h: 4rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.75rem; }

a { color: var(--glass-deep); }
p { margin: 0 0 1rem; }
strong { font-weight: 600; }

.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

.eyebrow {
  display: block;
  font-family: var(--font-data); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}

:focus-visible { outline: 2px solid var(--glass); outline-offset: 2px; border-radius: 3px; }

.skip {
  position: absolute; left: -999px; top: 0.5rem; z-index: 50;
  background: var(--surface); padding: 0.5rem 0.8rem; border-radius: 6px;
}
.skip:focus { left: 0.5rem; }

/* Things settle into place as they are reached. Only with JavaScript,
   so nothing is ever left invisible without it. */
.js .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* --- masthead ------------------------------------------------------ */

.top {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  transition: box-shadow 0.25s ease;
}
.top.scrolled { box-shadow: 0 6px 20px rgba(22, 38, 44, 0.06); }
.top .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: var(--top-h); }
.brand { display: inline-flex; align-items: center; transition: opacity 0.15s ease; }
.brand:hover { opacity: 0.8; }
.brand img { display: block; height: 1.75rem; width: auto; }

.nav { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; }
.nav a {
  position: relative; font-size: 0.92rem; padding: 0.4rem 0.75rem;
  text-decoration: none; color: var(--ink-soft); transition: color 0.15s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.1rem; height: 2px;
  background: var(--glass); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); }
.nav a.cta {
  margin-left: 0.6rem; padding: 0.45rem 0.95rem; border-radius: 6px;
  background: var(--glass); color: #fff; font-weight: 600;
  transition: background 0.15s ease, transform 0.15s var(--ease);
}
.nav a.cta::after { display: none; }
.nav a.cta:hover { background: var(--glass-deep); color: #fff; transform: translateY(-1px); }

/* --- buttons ------------------------------------------------------- */

.btn {
  font-family: var(--font-ui); font-size: 0.95rem; font-weight: 500;
  padding: 0.6rem 1.1rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.45rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease), box-shadow 0.15s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-faint); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22, 38, 44, 0.08); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.primary { background: var(--glass); border-color: var(--glass); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--glass-deep); border-color: var(--glass-deep); box-shadow: 0 6px 16px rgba(var(--glass-rgb), 0.25); }
.btn.big { font-size: 1.05rem; padding: 0.8rem 1.4rem; }
.btn .arr { display: inline-block; transition: transform 0.2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary:disabled:hover { background: var(--glass); border-color: var(--glass); }

.linkbtn { font: inherit; font-size: 0.86rem; color: var(--glass-deep); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* --- hero ---------------------------------------------------------- */

.hero { padding: 4.25rem 0 4.5rem; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; }
.hero .wrap > div > .eyebrow { margin-bottom: 1.1rem; color: var(--glass); }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.7rem, 5.6vw, 4.6rem);
  line-height: 1; letter-spacing: -0.022em;
  margin: 0 0 1.5rem; max-width: 15ch; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--glass); }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 36rem; margin-bottom: 1.75rem; }
.hero .cta { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* The morning's post: the same order three ways, as it really turns up. */
.pile { position: relative; height: 25rem; }
.pcard {
  position: absolute; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: 0 1px 2px rgba(22, 38, 44, 0.1), 0 10px 26px rgba(22, 38, 44, 0.12);
  padding: 1rem 1.1rem; font-size: 0.78rem; color: var(--ink-soft);
}
.pcard .tag {
  position: absolute; top: -0.7rem; left: 0.9rem;
  font-family: var(--font-data); font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase;
  background: var(--ink); color: #fff; padding: 0.15rem 0.5rem; border-radius: 3px; z-index: 1;
}
.pcard.form { top: 0.75rem; left: 0; width: 66%; transform: rotate(-3.5deg); }
.pcard.form b { display: block; font-family: var(--font-data); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--ink); margin-bottom: 0.1rem; }
.pcard.form table { width: 100%; border-collapse: collapse; margin-top: 0.6rem; font-family: var(--font-data); font-size: 0.68rem; }
.pcard.form td, .pcard.form th { border: 1px solid var(--line); padding: 0.2rem 0.35rem; text-align: left; font-weight: 400; }
.pcard.form th { background: var(--surface-2); color: var(--ink-faint); }
.pcard.mail { top: 4.25rem; right: 0; width: 60%; transform: rotate(2.5deg); line-height: 1.5; }
.pcard.mail .mk { width: 3.2rem; }
.pcard.mail p { margin: 0.5rem 0 0; color: var(--ink); }
.pcard.note { top: 12.25rem; left: 14%; width: 70%; padding: 0; border: 0; background: none; box-shadow: none; transform: rotate(-1.2deg); }
.pcard.note .sheet { transform: none; }
.js .pile .pcard { animation: settle 0.8s var(--ease) both; animation-delay: calc(0.15s + var(--i) * 0.14s); }
@keyframes settle { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }

/* --- the customer's paperwork, used wherever an order is shown ------ */

.mhdr { padding: 0.75rem 1.15rem; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.mhdr > div { margin-bottom: 0.1rem; overflow-wrap: anywhere; }
.mk {
  display: inline-block; width: 4.4rem;
  font-family: var(--font-data); font-size: 0.64rem; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-faint);
}

.photo { position: relative; flex: 1; padding: 1.4rem 1.5rem 1.6rem; overflow: hidden; }
.sheet {
  --row: 1.85rem;
  position: relative; background: #FDFDF9;
  background-image: repeating-linear-gradient(to bottom, transparent 0 var(--row), #DCE6EE var(--row) calc(var(--row) + 1px));
  padding: 0.3rem 1rem 0.9rem 1.2rem;
  font-family: var(--font-hand); font-size: 1.4rem; line-height: var(--row);
  color: #1E2F5A; transform: rotate(-1.1deg);
  box-shadow: 0 1px 2px rgba(22, 38, 44, 0.12), 0 8px 22px rgba(22, 38, 44, 0.14);
}
.sheet p { margin: 0; max-width: none; white-space: nowrap; }
.sheet .hd { font-weight: 700; }

.badge {
  font-family: var(--font-data); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.03em;
  padding: 0.18rem 0.55rem; border-radius: 100px;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface-2); white-space: nowrap;
}
.badge.ready { border-color: var(--glass); color: var(--glass-deep); background: var(--glass-tint); }
.badge.needs { border-color: var(--amber); color: var(--amber); background: var(--amber-tint); }

.units { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.units th {
  font-family: var(--font-data); font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint);
  text-align: left; padding: 0.35rem 0.6rem 0.35rem 0; border-bottom: 1px solid var(--line);
}
.units td { padding: 0.42rem 0.6rem 0.42rem 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.units td.n { font-family: var(--font-data); font-variant-numeric: tabular-nums; white-space: nowrap; }
.units td:first-child { color: var(--ink-faint); }
.units td.blank { color: var(--amber); }
.units select {
  width: 100%; max-width: 15rem; font-family: var(--font-ui); font-size: 0.86rem;
  padding: 0.3rem 0.4rem; border-radius: 5px; color: var(--amber);
  border: 1px solid var(--amber); background: var(--amber-tint); cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.units select:focus { outline: 2px solid var(--amber); outline-offset: 1px; }

.note {
  border: 1px solid var(--line); border-left: 3px solid var(--glass);
  border-radius: var(--radius); background: var(--surface);
  padding: 0.6rem 0.9rem; margin-top: 0.8rem; font-size: 0.86rem;
}
.note .eyebrow { margin-bottom: 0.15rem; font-size: 0.66rem; }
.note.good { background: var(--glass-tint); color: var(--glass-deep); }
.note.good .eyebrow { color: var(--glass); }
.note.warn { border-left-color: var(--amber); background: var(--amber-tint); }
.note.warn .eyebrow { color: var(--amber); }

/* --- from inbox to production ---------------------------------------
   One order followed through four stages. The numbered steps, the
   arrows and (on a tall enough screen) the scroll all drive the same
   thing: which stage is showing.

   Three layouts, chosen in site.js and set as data-mode:
     pinned — desktop, tall window: the section holds still while the
                scroll moves the order through its stages
     tabs   — desktop, short window: steps and arrows only
     swipe  — narrow screens: the stages sit side by side to swipe
   With no JavaScript the four stages are simply stacked.
   ------------------------------------------------------------------- */

.process { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process .pin > .wrap { padding-top: 3.5rem; padding-bottom: 3.5rem; width: 100%; }
.process[data-mode="pinned"] .pin { position: sticky; top: var(--top-h); }
.process[data-mode="pinned"] .pin > .wrap { padding-top: 1.25rem; padding-bottom: 1.25rem; }

.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.1rem; }
.phead .eyebrow { margin-bottom: 0.35rem; }
.phead h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem); line-height: 1.06; letter-spacing: -0.018em; margin: 0;
}
.parrows { display: none; align-items: center; gap: 0.5rem; flex: none; }
.js .parrows { display: flex; }
.parrows .count { font-family: var(--font-data); font-size: 0.78rem; color: var(--ink-faint); margin-right: 0.35rem; font-variant-numeric: tabular-nums; }
.parrows button {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 1rem; line-height: 1; display: grid; place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--ease);
}
.parrows button:hover:not(:disabled) { background: var(--glass); border-color: var(--glass); color: #fff; }
.parrows button:active:not(:disabled) { transform: scale(0.94); }
.parrows button:disabled { opacity: 0.35; cursor: default; }

/* The steps, with the progress line running along their top edge. */
.steps { display: none; position: relative; list-style: none; margin: 0 0 1.1rem; padding: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 1.5rem; }
.js .steps { display: grid; }
.steps::before, .steps .fill { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line); }
.steps .fill { background: var(--glass); transform-origin: left; transform: scaleX(0.25); transition: transform 0.5s var(--ease); }
.process[data-mode="pinned"] .steps .fill { transition: transform 0.12s linear; }
.step {
  display: block; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink-faint); background: none; border: 0;
  padding: 0.8rem 0 0.2rem; transition: color 0.2s ease;
}
.step .n { display: block; font-family: var(--font-data); font-size: 0.68rem; letter-spacing: 0.1em; margin-bottom: 0.15rem; }
.step .t { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink-soft); transition: color 0.2s ease; }
.step .d { display: block; font-size: 0.84rem; line-height: 1.4; color: var(--ink-soft); margin-top: 0.2rem; opacity: 0.75; transition: opacity 0.2s ease; }
.step:hover .t, .step.on .t { color: var(--ink); }
.step.on .n, .step.past .n { color: var(--glass); }
.step.on .d { opacity: 1; }
.step.human .n { color: var(--amber); }

/* The stages. */
.track { display: grid; gap: 2rem; }
.panel { min-width: 0; }
.pcap { margin-bottom: 0.7rem; }
.pcap .n { font-family: var(--font-data); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--glass); }
.pcap.human .n { color: var(--amber); }
.pcap h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0.1rem 0 0.15rem; line-height: 1.15; }
.pcap p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.js .process:not([data-mode="swipe"]) .pcap { display: none; }

.process[data-mode="tabs"] .track,
.process[data-mode="pinned"] .track { gap: 0; }
.process[data-mode="tabs"] .panel,
.process[data-mode="pinned"] .panel {
  grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateX(22px);
  transition: opacity 0.45s ease, transform 0.55s var(--ease), visibility 0s linear 0.45s;
}
.process[data-mode="tabs"] .panel.before,
.process[data-mode="pinned"] .panel.before { transform: translateX(-22px); }
.process[data-mode="tabs"] .panel.on,
.process[data-mode="pinned"] .panel.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* The frame every stage sits in. To use a real screenshot, save it in
   assets/screens/ under the name the <img> in index.html asks for: it
   then shows in place of the mock-up beside it. */
.shot {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-lift); overflow: hidden;
  height: 100%; display: flex; flex-direction: column;
}
.shotbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-family: var(--font-data); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
}
.shotbar .eg { color: var(--ink-faint); }
.view { flex: 1; display: flex; flex-direction: column; min-height: 25.5rem; }
.view .real { display: block; width: 100%; height: 100%; min-height: 25.5rem; object-fit: cover; object-position: top left; }
.view .real ~ .mock { display: none; }
.mock { flex: 1; display: grid; min-height: 0; }

/* Pieces of a stage arrive in order when the stage is shown. */
.panel.on .seq { animation: seq 0.5s var(--ease) both; animation-delay: calc(0.25s + var(--i, 0) * 0.16s); }
@keyframes seq { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 01 — the mailbox */
.m-arrive { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.maillist { list-style: none; margin: 0; padding: 0; border-right: 1px solid var(--line); background: var(--paper); }
.maillist li { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line-soft); border-left: 3px solid transparent; }
.maillist .subj { display: block; font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maillist .meta { display: block; font-family: var(--font-data); font-size: 0.68rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maillist li.new { background: var(--surface); border-left-color: var(--glass); }
.maillist li.new .subj { font-weight: 600; }
.panel.on .maillist li.new { animation: arrive 0.7s var(--ease) both 0.2s; }
@keyframes arrive { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
.letter { display: flex; flex-direction: column; min-width: 0; }
.letter .body { padding: 1rem 1.15rem; font-size: 0.92rem; }
.letter .body p { margin: 0 0 0.6rem; }
.attach {
  display: inline-flex; align-items: center; gap: 0.8rem; margin-top: 0.4rem;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.55rem 0.9rem 0.55rem 0.55rem; background: var(--paper);
}
.attach .thumb {
  width: 3.4rem; height: 4.2rem; border-radius: 3px; background: #FDFDF9; border: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0 0.42rem, #B8C4DA 0.42rem 0.5rem);
  background-size: 70% 100%; background-repeat: no-repeat; background-position: 45% 0.35rem;
  transform: rotate(-2deg);
}
.attach small { display: block; font-size: 0.74rem; color: var(--ink-faint); }

/* 02 and 03 share a layout, so the sheet holds still between them. */
.m-read, .bench { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.doc { background: var(--surface-3); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }

.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 3.5rem;
  background: linear-gradient(to bottom, transparent, rgba(var(--glass-rgb), 0.16) 85%, rgba(var(--glass-rgb), 0.7) 100%);
  transform: translateY(-4rem); pointer-events: none; opacity: 0;
}
.panel.on .scan { animation: scan 2.4s linear both 0.3s; }
@keyframes scan { 0% { opacity: 1; transform: translateY(-4rem); } 92% { opacity: 1; } 100% { opacity: 0; transform: translateY(21rem); } }
.sheet .hit { border-radius: 3px; margin: 0 -0.3rem; padding: 0 0.3rem; }
.panel.on .sheet .hit { animation: hit 0.7s ease both; animation-delay: calc(0.55s + var(--i, 0) * 0.3s); }
@keyframes hit { from { background: transparent; } 40% { background: rgba(var(--glass-rgb), 0.3); } to { background: rgba(var(--glass-rgb), 0.11); } }

.found { padding: 1rem 1.3rem 1.1rem; min-width: 0; }
.panel.on .found .seq { animation-delay: calc(0.6s + var(--i, 0) * 0.3s); }
.frow { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.4rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.88rem; }
.frow .eyebrow { font-size: 0.64rem; }
.frow .data { color: var(--glass-deep); }
.found .units { margin-top: 0.5rem; }

/* 03 — the review, which is the product's own screen in miniature */
.review { padding: 0.95rem 1.3rem 1rem; border-left: 3px solid var(--glass); margin-left: -1px; min-width: 0; transition: border-color 0.3s ease; }
.bench[data-state="needs"] .review { border-left-color: var(--amber); }
.rhead { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.1rem; }
.rhead h4 { font-size: 1.02rem; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.rsub { font-size: 0.8rem; color: var(--ink-soft); margin: 0 0 0.6rem; }
.rsub .data { color: var(--glass-deep); }
.bench[data-state="ready"] .units select,
.bench[data-state="done"] .units select { border-color: var(--line); background: var(--surface); color: var(--ink); opacity: 1; }
.bench[data-state="ready"] .units select:focus { outline-color: var(--glass); }
.ractions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.8rem; }
.ractions .aside { font-size: 0.8rem; color: var(--ink-faint); }
.bench[data-state="ready"] [data-approve] { animation: nudge 1.6s ease 0.2s 2; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--glass-rgb), 0); } 50% { box-shadow: 0 0 0 6px rgba(var(--glass-rgb), 0.18); } }

/* One state shown at a time; "needs" is the resting state. */
.bench [data-when] { display: none; }
.bench[data-state="needs"] [data-when~="needs"],
.bench[data-state="ready"] [data-when~="ready"],
.bench[data-state="done"]  [data-when~="done"] { display: revert; }

/* 04 — the file */
.m-export { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.filepane { padding: 1.2rem 1.3rem; border-right: 1px solid var(--line); background: var(--paper); min-width: 0; display: flex; flex-direction: column; }
.path { font-family: var(--font-data); font-size: 0.72rem; color: var(--ink-faint); margin-bottom: 0.7rem; overflow-wrap: anywhere; }
.path b { color: var(--ink-soft); font-weight: 500; }
.file { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--glass); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.file .fname { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line-soft); font-size: 0.86rem; }
.file .fname .data { font-weight: 500; }
.file pre { margin: 0; padding: 0.75rem 0.9rem; font-family: var(--font-data); font-size: 0.74rem; line-height: 1.75; color: var(--ink-soft); overflow-x: auto; }
.file pre .h { color: var(--ink-faint); }
.filepane .foot-note { font-size: 0.78rem; color: var(--ink-faint); margin: 0.8rem 0 0; }
.done { list-style: none; margin: 0; padding: 1.2rem 1.3rem; min-width: 0; }
.done li { position: relative; padding: 0.7rem 0 0.7rem 1.9rem; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; color: var(--ink-soft); }
.done li:last-child { border-bottom: 0; }
.done li strong { display: block; color: var(--ink); }
.done li::before {
  content: "✓"; position: absolute; left: 0; top: 0.95rem; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--glass-tint); color: var(--glass); font-size: 0.7rem; font-weight: 600; line-height: 1.1rem; text-align: center;
}

/* --- sections ------------------------------------------------------ */

.band { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.band.white { background: var(--surface); }
.band.first { border-top: 0; }
.band > .wrap > .eyebrow, .band .split > div > .eyebrow { margin-bottom: 0.8rem; }
.band h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.06; letter-spacing: -0.018em;
  margin: 0 0 1rem; max-width: 24ch; text-wrap: balance;
}
.band .intro { color: var(--ink-soft); max-width: 42rem; margin-bottom: 2.25rem; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem; align-items: start; }
.split .intro { margin-bottom: 1rem; }

/* The inbox, sorted. */
.inbox { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.inbox li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 1rem; align-items: center;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--line-soft); border-left: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.inbox li:last-child { border-bottom: 0; }
.inbox li:hover { background: var(--surface-2); border-left-color: var(--glass); }
.inbox .subj { font-size: 0.92rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox .meta { font-family: var(--font-data); font-size: 0.7rem; color: var(--ink-faint); grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox .badge { grid-column: 2; grid-row: 1 / span 2; }
.inbox li.person, .inbox li.person:hover { border-left-color: var(--amber); background: var(--amber-tint); }

/* Rules it works by. */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.rule { position: relative; border-top: 2px solid var(--line); padding-top: 0.9rem; }
.rule::before {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease);
  transition-delay: calc(0.15s + var(--i, 0) * 70ms);
}
.rule.in::before, html:not(.js) .rule::before { transform: scaleX(1); }
.rule.lead::before { background: var(--amber); }
.rule h3 { font-size: 1.08rem; font-weight: 600; margin: 0 0 0.35rem; letter-spacing: -0.01em; }
.rule p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

/* Plain two-column facts. */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.fact {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.6s ease, transform 0.6s var(--ease);
}
.fact:hover { border-left-color: var(--glass); box-shadow: var(--shadow-lift); }
.fact h3 { font-size: 1rem; font-weight: 600; margin: 0 0 0.3rem; }
.fact p { font-size: 0.93rem; color: var(--ink-soft); margin: 0; }

.plain { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plain li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 0.98rem; color: var(--ink-soft); }
.plain li strong { color: var(--ink); }

.live {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-data); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--glass-deep);
  background: var(--glass-tint); border: 1px solid rgba(var(--glass-rgb), 0.25); border-radius: 100px; padding: 0.3rem 0.8rem;
  margin-bottom: 1.1rem;
}
.live::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--glass); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(var(--glass-rgb), 0.45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(var(--glass-rgb), 0); } }

/* --- contact -------------------------------------------------------
   The pitch and what happens next on the left; the enquiry form, as a
   white panel, on the right. */

.contact { background: var(--glass); color: #fff; padding: 5rem 0; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 3.5rem; align-items: start; }
.contact h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.03; letter-spacing: -0.02em;
  margin: 0 0 1rem; max-width: 20ch; text-wrap: balance;
}
.contact .pitch { color: rgba(255, 255, 255, 0.82); max-width: 34rem; font-size: 1.1rem; margin-bottom: 1.75rem; }

.next { list-style: none; margin: 0 0 2rem; padding: 0; max-width: 34rem; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.next li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); padding: 0.7rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.22); font-size: 0.98rem; }
.next .n { font-family: var(--font-data); font-size: 0.72rem; letter-spacing: 0.08em; opacity: 0.7; padding-top: 0.25rem; }

.direct .eyebrow { color: rgba(255, 255, 255, 0.7); margin-bottom: 0.4rem; }
.direct .row { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.contact .mail {
  font-family: var(--font-data); font-size: clamp(1rem, 2vw, 1.2rem); color: #fff;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em;
  transition: opacity 0.15s ease;
}
.contact .mail:hover { opacity: 0.8; }
.contact .mail:focus-visible, .copy:focus-visible { outline-color: #fff; }
.copy {
  font-family: var(--font-ui); font-size: 0.82rem; font-weight: 500; color: #fff; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 6px; padding: 0.35rem 0.7rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.copy:hover { background: rgba(255, 255, 255, 0.12); }
.copy.done { background: #fff; border-color: #fff; color: var(--glass-deep); }

.ask {
  position: relative; background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: 1.6rem 1.6rem 1.4rem; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}
.ask h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; margin: 0 0 1rem; }
.ask .hp { position: absolute; left: -9999px; }
.field { display: grid; gap: 0.3rem; font-size: 0.84rem; font-weight: 500; color: var(--ink-soft); margin-bottom: 0.85rem; }
.field .opt { font-weight: 400; color: var(--ink-faint); margin-left: 0.3rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink);
  padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field textarea { resize: vertical; min-height: 5rem; }
.field input:hover, .field textarea:hover { border-color: var(--ink-faint); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--glass); outline-offset: 1px; border-color: var(--glass); background: var(--surface); }
.field ::placeholder { color: var(--ink-faint); }
.ask .btn { width: 100%; justify-content: center; margin-top: 0.3rem; }
.ask .note { margin: 0 0 0.85rem; }
.ask .privacy { font-size: 0.78rem; color: var(--ink-faint); margin: 0.8rem 0 0; text-align: center; }
.ask [data-when] { display: none; }
.ask[data-state="error"] [data-when="error"], .ask[data-state="sent"] [data-when="sent"] { display: block; }
.ask[data-state="sent"] .fields { display: none; }
.ask .sent { margin: 0; font-size: 1rem; padding: 1.1rem 1.2rem; }

/* --- footer -------------------------------------------------------- */

.foot { padding: 2.25rem 0 3rem; font-size: 0.84rem; color: var(--ink-soft); }
.foot .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 3rem; align-items: start; }
.foot img { height: 1.4rem; width: auto; display: block; margin-bottom: 0.6rem; }
.foot p { margin: 0 0 0.4rem; max-width: 46rem; }
.foot .small { color: var(--ink-faint); font-size: 0.78rem; }

/* --- narrow screens ------------------------------------------------ */

@media (max-width: 60rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .pile { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .contact .wrap { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* The four stages become cards to swipe through. */
  .process .pin > .wrap { padding-top: 3rem; padding-bottom: 3rem; }
  .process[data-mode="swipe"] .track {
    display: flex; align-items: flex-start; gap: 0.9rem; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
    transition: height 0.35s var(--ease);
    margin: 0 -1rem; padding: 0.25rem 1rem 1.25rem; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .process[data-mode="swipe"] .track::-webkit-scrollbar { display: none; }
  .process[data-mode="swipe"] .panel { flex: 0 0 88%; scroll-snap-align: center; }
  .process[data-mode="swipe"] .shot { height: auto; }
  .steps { gap: 0 0.5rem; }
  .step { padding-top: 0.6rem; }
  .step .t, .step .d, .step .who { display: none; }
  .step .n { font-size: 0.8rem; }
  .step.on .n { font-weight: 500; }
  .view, .view .real { min-height: 0; }
  .m-arrive, .m-read, .bench, .m-export { grid-template-columns: minmax(0, 1fr); }
  .maillist { border-right: 0; border-bottom: 1px solid var(--line); }
  .maillist li:nth-child(n + 3) { display: none; }
  .doc { border-right: 0; border-bottom: 1px solid var(--line); }
  .filepane { border-right: 0; border-bottom: 1px solid var(--line); }
  .review { margin-left: 0; }
}

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .wrap { padding: 0 1rem; }
  .nav a:not(.cta) { display: none; }
  .hero { padding: 2.75rem 0 3rem; }
  .hero .lede { font-size: 1.08rem; }
  .band { padding: 3.25rem 0; }
  .contact { padding: 3.5rem 0; }
  .rules, .facts { grid-template-columns: minmax(0, 1fr); }
  .rules { gap: 1.5rem; }
  .phead { margin-bottom: 0.9rem; }
  .parrows .count { display: none; }
  .photo { padding: 1.1rem 0.9rem 1.3rem; }
  .sheet { --row: 1.7rem; font-size: 1.22rem; padding-left: 0.9rem; padding-right: 0.6rem; }
  .review, .found { padding: 0.9rem 0.9rem 1rem; }
  .units { font-size: 0.8rem; }
  .units th, .units td { padding-right: 0.45rem; }
  .frow { grid-template-columns: 5rem minmax(0, 1fr); }
  .filepane, .done { padding: 1rem 0.9rem; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .rule::before { transform: scaleX(1); }
}
