/* zh faces use font-display: optional: a late Chinese font must not reflow the hero (Lighthouse CLS 0.21 with swap);
   a visitor on a slow first load sees the system Chinese face instead. */
/* marsfield.agency v4: Designer's page (job 20261110-site-critique, manifest bee20237b713), Cesar's approval 2026-11-10.
   Built into the site by Website Builder: self-hosted fonts, three languages, the back-office story (Cesar's boxes). */
@font-face { font-family: "Imbue"; src: url("/fonts/imbue.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("/fonts/albertsans.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Marsfield SC Sans"; src: url("/fonts/zh/NotoSansSC-site.woff2") format("woff2"); font-weight: 100 900; unicode-range: U+3000-303F, U+3400-9FFF, U+F900-FAFF, U+FF00-FFEF; font-display: optional; }
@font-face { font-family: "Marsfield SC Serif"; src: url("/fonts/zh/NotoSerifSC-site.woff2") format("woff2"); font-weight: 200 900; unicode-range: U+3000-303F, U+3400-9FFF, U+F900-FAFF, U+FF00-FFEF; font-display: optional; }
@font-face { font-family: "Marsfield Switch"; src: url("/fonts/zh/switch.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
:root {
  /* primitives: v4, paper ground, carbon ink, container orange (Cesar's pick 2026-11-10) */
  --paper-0: #ffffff; --paper-50: #f7f7f5; --paper-100: #ededea; --paper-200: #eaeae6; --paper-300: #e3e2dc; --paper-400: #c9c6bc;
  --carbon-900: #111418; --carbon-800: #1d2127; --carbon-700: #2c3139; --carbon-600: #4f545c; --carbon-300: #a9aeb6;
  --orange-500: #f05a14; --orange-600: #d24a0a; --orange-150: #ffbf9b; --orange-100: #ffd2b8; --orange-ink: #140800;
  /* roles: the page (paper) */
  --bg: var(--paper-50); --deep: var(--paper-200); --raise: var(--paper-0); --surface: var(--paper-400);
  --ink: var(--carbon-900); --muted: var(--carbon-600);
  /* orange is a fill only: on paper it fails 3:1 as text, so its text roles are ink */
  --accent: var(--orange-500); --accent-text: var(--carbon-900); --accent-hover: var(--orange-600); --accent-ink: var(--orange-ink);
  --focus: var(--carbon-900);
  /* r1 fix (D1): below the fold the ground is a deeper paper desk, and every document on it is white paper with one soft neutral shadow */
  --desk: var(--paper-100); --paper-shadow: 0 1px 2px rgba(17, 20, 24, .07), 0 18px 40px -18px rgba(17, 20, 24, .30);
  --paper-drop: drop-shadow(0 1px 1px rgba(17, 20, 24, .07)) drop-shadow(0 14px 18px rgba(17, 20, 24, .16));
  /* r1 fix (D2): full orange is for actions and the one spread; a total is an ink bar with an orange rule, a tag or chip is the pale tint */
  --total-bg: var(--carbon-900); --total-ink: var(--paper-0); --rule-accent: var(--orange-500); --tint: var(--orange-100); --tint-hover: var(--orange-150);
  /* roles: paper sheets and documents */
  --sheet: transparent; --doc: var(--paper-0); --doc-lo: var(--paper-300); --paper-ink: var(--carbon-900);
  --paper-muted: var(--carbon-600); --paper-rule: var(--paper-400); --mark: var(--orange-100);
  /* five type steps */
  --s1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --s2: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --s3: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --s4: clamp(2.5rem, 1.3rem + 3.6vw, 4.5rem);
  --s5: clamp(5rem, 11.5vw, 15rem);
  --m: clamp(16px, 1.6vw, 24px);
  --gap: 24px;
  --section: clamp(96px, 10vw, 160px);
  --pad: clamp(28px, 4.4vw, 72px);
  --display: "Imbue", "Times New Roman", serif;
  --cjk-sans: "Marsfield SC Sans", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --text: "Albert Sans", "Marsfield SC Sans", system-ui, sans-serif;
  --h1: clamp(3rem, 6.2vw, 8.75rem);
  --ease-out: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 400 var(--s2)/1.55 var(--text); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.num { font-variant-numeric: tabular-nums lining-nums; }
/* caps only on display lines: the h1, the wordmark, the B/L title, the closing word */
h1, .caps { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.86; font-optical-sizing: auto; }
h2 { font-family: var(--display); font-weight: 400; font-size: var(--s4); line-height: 0.98; letter-spacing: -0.015em; font-optical-sizing: auto; }
h3 { font-size: var(--s3); font-weight: 500; line-height: 1.2; }
.lead { font-size: var(--s3); line-height: 1.35; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 0 var(--m); }
.small { font-size: var(--s1); line-height: 1.45; }

/* a paper sheet laid on the paper desk: it re-maps the roles, so everything inside reads as paper */
.sheet { background: var(--sheet); color: var(--paper-ink); --ink: var(--paper-ink); --muted: var(--paper-muted); --surface: var(--paper-rule); margin: var(--section) 0 0; }
.sheet.grid { padding: 0 var(--m); }
main { background: var(--desk); padding-bottom: var(--section); }
/* one paper, one shadow: every sample document below the fold (the page's own tables lie on the desk) */
.lc .doc, .packing, .vessel, .obl, .paste, .record, .extras > div { background: var(--paper-0); box-shadow: var(--paper-shadow); }
.sheet :focus-visible { outline-color: var(--paper-ink); }

.bl { border-collapse: collapse; width: 100%; }
.bl th, .bl td { text-align: left; vertical-align: top; padding: 10px 18px 12px 0; }
.bl thead th { font: 500 var(--s1)/1.3 var(--text); border-top: 3px solid currentColor; padding-top: 10px; }
.bl td { line-height: 1.4; }
.bl th + th, .bl td + td { padding-left: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 64px; padding: 0 36px; background: var(--accent); color: var(--accent-ink); font: 500 var(--s3)/1 var(--text); text-decoration: none; border: 0; border-radius: 0; cursor: pointer; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }

/* ---------- hero: the headline, then the desk: the PI on paper with the order screen laid over it ---------- */
.hero { position: relative; padding-bottom: clamp(56px, 7vw, 104px); }
.bar { display: flex; justify-content: space-between; align-items: baseline; padding: 14px var(--m) 0; }
.wordmark { font-size: var(--s4); line-height: 1; text-decoration: none; }
.bar nav { display: flex; gap: 28px; }
.bar nav a { text-decoration: none; position: relative; }
.bar nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform 220ms var(--ease-out); }
.bar nav a:hover::after, .bar nav a:focus-visible::after { transform: scaleX(1); }
/* one plane: the headline, the supplier's PI and the order screen share one grid; SANTOS runs onto the window's header */
.stage { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 0 var(--m); margin-top: 26px; align-items: start; }
.hero h1 { grid-column: 1 / 12; grid-row: 1; font-size: var(--h1); position: relative; z-index: 3; }
.hero h1 span { display: block; width: fit-content; }
.hero h1 .l2 { margin-left: calc((100vw - 2 * var(--m) + var(--gap)) / 12 * 3); }
.hero-side { grid-column: 1 / 5; grid-row: 2; display: grid; gap: 22px; padding: 36px 8px 0 0; }
.hero-side .bl thead th { color: var(--muted); }
.hero-side .bl th, .hero-side .bl td { padding-right: 10px; }
#notify { color: var(--accent-text); font-weight: 500; }
#notify.done { color: var(--ink); }
.hero-act { display: grid; gap: 22px; justify-items: start; }
.hero-act p { max-width: 34ch; }

.stage .pi, .stage .order { font-size: var(--s1); line-height: 1.45; }
.stage .pi { grid-column: 7 / 13; grid-row: 1 / span 2; z-index: 1; padding-bottom: 48px; }
.stage .order { grid-column: 5 / 12; grid-row: 2; margin-top: calc(-1 * var(--tuck)); z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); }
.stage { --tuck: calc(var(--h1) * 0.86 - 10px); }
/* the window's header band is where SANTOS lands: the order's name sits at its foot, right */
.stage .order .order-bar { grid-row: 1; grid-column: 1; min-height: calc(var(--h1) * 0.86 + 12px); align-items: flex-start; justify-content: flex-end; gap: 28px; }
.stage .order .order-head { grid-row: 1; grid-column: 1; align-self: end; justify-self: end; text-align: right; flex-direction: column; align-items: flex-end; gap: 2px; padding: 0 18px 12px; position: relative; }
.stage .order table { grid-row: 2; }
.stage .order td { padding-top: 7px; padding-bottom: 7px; }
.stage .order .order-foot { grid-row: 3; }
.desk-cap { grid-column: 5 / 12; grid-row: 3; margin-top: 16px; max-width: 64ch; color: var(--ink); }

.pi { background: var(--carbon-800); color: var(--paper-50); --paper-ink: var(--paper-50); --paper-rule: var(--carbon-700); --doc-lo: var(--carbon-700); padding: 28px 30px 32px; }
.pi-top { display: flex; justify-content: space-between; gap: 16px; }
.pi-title { font: 700 var(--s2)/1.1 var(--text); margin-bottom: 6px; }
.pi-meta { text-align: right; }
.pi-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 14px; padding: 12px 0; border-top: 3px solid var(--paper-ink); } /* taste-skill-ignore: data-ui fragment */
.pi-parties b, .pi-terms b { font-weight: 700; display: block; }
.pi table { width: 100%; border-collapse: collapse; }
.pi th { text-align: left; font-weight: 700; padding: 6px 4px; border-bottom: 2px solid var(--paper-ink); } /* taste-skill-ignore: data-ui fragment */
.pi td { padding: 8px 4px; border-bottom: 1px solid var(--paper-rule); vertical-align: top; } /* taste-skill-ignore: data-ui fragment */
.pi .r { text-align: right; }
.pi tr { transition: background-color .25s ease; }
.pi tr.src { background: var(--accent); color: var(--accent-ink); }
.pi tr.reading { background: var(--doc-lo); }
.pi-total td { border-bottom: 0; font-weight: 700; padding-top: 10px; } /* taste-skill-ignore: data-ui fragment */
.pi-terms { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }

.order { background: var(--raise); color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
.order-bar { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--deep); color: var(--muted); }
.order-bar strong { color: var(--ink); font-weight: 500; }
.order-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 18px 12px; }
.order-head .oname { font: 700 var(--s3)/1.1 var(--text); }
.order-head .from { color: var(--muted); }
.counter { color: var(--accent-text); font-weight: 700; }
.counter.done { color: var(--ink); }
.order table { width: 100%; border-collapse: collapse; }
.order th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--surface); white-space: nowrap; } /* taste-skill-ignore: data-ui fragment */
.order th:first-child, .order td:first-child { padding-left: 18px; }
.order td { padding: 10px; border-bottom: 1px solid var(--bg); vertical-align: middle; } /* taste-skill-ignore: data-ui fragment */
.order .r { text-align: right; }
.order td.ln, .order th.ln { color: var(--muted); width: 1%; padding-right: 0; }
.order tr.line { transition: background-color .2s ease; }
.order tr.line:hover, .order tr.line.hot, .order tr.line.reading { background: var(--bg); }
.desc small { display: block; color: var(--muted); font-size: var(--s1); }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 0; font: 700 var(--s1)/1.2 var(--text); border: 0; white-space: nowrap; }
.chip.ok, .chip.done { color: var(--ink); background: var(--surface); }
.chip.check { color: var(--ink); background: var(--tint); box-shadow: inset 0 -2px 0 var(--rule-accent); cursor: pointer; transition: transform 120ms var(--ease-out), background-color 160ms ease; }
.chip.check:hover { background: var(--tint-hover); }
.chip.check:active { transform: scale(.95); }
.chip.asked { color: var(--paper-0); background: var(--carbon-900); }
tr.fix td { padding: 0 18px 14px; background: var(--bg); }
.fix-box { padding: 12px 14px; background: var(--doc-lo); box-shadow: inset 4px 0 0 var(--accent); } /* taste-skill-ignore: inset bar inside data-ui */
.fix-box p { margin-bottom: 10px; color: var(--ink); }
.opts { display: flex; gap: 8px; flex-wrap: wrap; }
.opt { font: 500 var(--s1)/1 var(--text); padding: 10px 14px; border-radius: 0; border: 0; background: var(--deep); color: var(--ink); cursor: pointer; transition: transform 120ms var(--ease-out), background-color 160ms ease; }
.opt:hover { background: var(--bg); }
.opt:active { transform: scale(.96); }
.opt.pref { background: var(--ink); color: var(--raise); }
.order-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--deep); }
.order-foot .tot { font-size: var(--s3); }
.send { font: 500 var(--s1)/1 var(--text); padding: 12px 16px; border: 2px solid var(--surface); border-radius: 0; background: transparent; color: var(--muted); cursor: not-allowed; transition: background-color .2s ease, transform 120ms var(--ease-out); }
.send.ready { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); cursor: pointer; }
.send.sent { background: var(--ink); border-color: var(--ink); color: var(--raise); cursor: default; }
.send.ready:active { transform: scale(.97); }

/* ---------- the seam: Beilun, the page's one photograph, cropped to the cranes and the ship, full bleed ---------- */
.seam { position: relative; height: clamp(320px, 40vw, 600px); overflow: hidden; background: var(--deep); }
.seam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; transform: scale(1.42); transform-origin: 50% 42%; will-change: transform; }
.seam figcaption { position: absolute; left: var(--m); bottom: var(--m); background: var(--bg); color: var(--ink); padding: 8px 12px; max-width: 46ch; }

/* ---------- problem: a paper sheet, the heading beside the list of work ---------- */
.chores { align-items: start; }
.chores .body { grid-column: 1 / 6; }
.chores > .worklog { grid-column: 7 / 13; }
.cap { font-size: var(--s1); }
.chores .bl td:first-child { font-weight: 700; width: 34%; }
.chores .bl tbody td { border-bottom: 2px solid var(--paper-rule); padding: 16px 18px 16px 0; }
.chores .bl tbody td + td { padding-left: 12px; } /* taste-skill-ignore: table rows */
.chores .closer { margin-top: 36px; max-width: 24ch; }

/* ---------- what it does: on the paper page, the other modules' papers along its foot ---------- */
.mods { padding-top: var(--section); }
.mods h2 { grid-column: 1 / 6; }
.mods .intro { grid-column: 7 / 12; align-self: end; }
.mods .bl { grid-column: 1 / 13; margin-top: 56px; }
.mods .bl thead th { color: var(--muted); }
.mods .bl tbody td { padding: 22px 24px 22px 0; border-bottom: 2px solid var(--surface); } /* taste-skill-ignore: table rows */
.mods .bl tbody td:first-child { font-size: var(--s3); font-weight: 500; width: 30%; line-height: 1.2; }
.mods .bl tbody td:first-child a { text-decoration: none; }
.mods .bl tbody tr { transition: background-color .2s ease; }
.mods .bl tbody tr:hover { background: var(--raise); }
.mods .bl tbody td:last-child { width: 18%; color: var(--muted); }
.mods .also { grid-column: 1 / 9; margin-top: 28px; }
.extras { grid-column: 1 / 13; display: grid; grid-template-columns: 2.4fr 3fr 3.6fr 3fr; column-gap: var(--gap); margin-top: 24px; align-items: start; font-size: var(--s1); line-height: 1.4; }
.extras > div { background: var(--raise); color: var(--paper-ink); padding: 18px 20px 20px; }
.extras b { display: block; font-weight: 700; margin-bottom: 10px; }
.extras p + p { margin-top: 8px; }
.extras .mark-lines { font: 400 var(--s3)/1.02 var(--display); text-transform: uppercase; border: 3px solid var(--paper-ink); padding: 10px 12px; margin-top: 12px; }
.extras .x-label { margin-top: 32px; border-top: 6px solid var(--accent); }
.extras dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 2px solid var(--paper-rule); }
.extras dd { white-space: nowrap; }
.extras .x-cat { margin-top: 56px; }
/* phone-only pieces (r2 rebuild): each module's own small document, the checklist's head; drawn only under 761px */
.mfrag, .wl-head { display: none; }

/* ---------- shipments: on the paper page, the ETA tracker laid large over the B/L it reads ---------- */
.ships { margin-top: calc(var(--section) * .8); padding: 0 var(--m); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.ships .plate { grid-column: 1 / 6; grid-row: 1; }
.ships .plate p { margin-top: 24px; max-width: 40ch; }
.vessel { grid-column: 1 / 9; grid-row: 2; position: relative; z-index: 2; margin-top: 56px; background: var(--raise); color: var(--ink); font-size: var(--s2); }
.vessel .vh { display: flex; justify-content: space-between; gap: 12px; padding: 16px 24px; background: var(--deep); color: var(--muted); }
.vessel .vh b { font-weight: 700; color: var(--ink); }
.vessel table { width: 100%; border-collapse: collapse; }
.vessel th, .vessel td { text-align: left; padding: 18px 24px; border-bottom: 2px solid var(--bg); }
.vessel th { font-weight: 500; color: var(--muted); font-size: var(--s1); }
.vessel td:nth-child(3) { font-size: var(--s3); font-weight: 500; white-space: nowrap; }
.vessel s { color: var(--muted); font-size: var(--s2); font-weight: 400; margin-right: 6px; }
.vessel .warn td { background: var(--mark); color: var(--paper-ink); }
.vessel .warn s { color: var(--paper-ink); }
.ships .obl { grid-column: 8 / 13; grid-row: 1 / span 2; margin-top: 0; }

/* ---------- letters of credit: a sheet, the credit set out as a document on it ---------- */
.lc { row-gap: 40px; }
.lc .left { grid-column: 1 / 5; }
.lc .left p { margin-top: 24px; max-width: 32ch; }
.lc .doc { grid-column: 5 / 13; color: var(--paper-ink); padding: 32px 36px 36px; align-self: start; }
.lc .doc .dh { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 20px; }
.lc .doc .dh-t { font: 700 var(--s3)/1.1 var(--text); }
.lc .doc table { width: 100%; border-collapse: collapse; }
.lc .doc th { text-align: left; font: 700 var(--s1)/1.3 var(--text); padding: 10px 4px 8px 0; border-top: 3px solid var(--paper-ink); }
.lc .doc td { padding: 14px 4px 14px 0; border-bottom: 1px solid var(--paper-rule); vertical-align: top; } /* taste-skill-ignore: data-ui fragment */
.lc .doc td:first-child { font-weight: 700; width: 26%; }
.lc .doc th + th, .lc .doc td + td { padding-left: 12px; }
.lc .doc tr.miss td:first-child { box-shadow: inset 4px 0 0 var(--rule-accent); padding-left: 14px; }
.lc .doc .tag { display: inline-block; font: 700 var(--s1)/1.2 var(--text); padding: 3px 8px; background: var(--carbon-900); color: var(--paper-50); }
.lc .doc .tag.red { background: var(--tint); color: var(--paper-ink); }
.lc .doc .foot { margin-top: 20px; font-weight: 500; }

/* ---------- container loading: the calculator writes the packing list ---------- */
.load { margin-top: var(--section); padding: var(--section) var(--m); background: var(--accent); color: var(--paper-ink); --ink: var(--paper-ink); --muted: var(--paper-ink); --focus: var(--paper-ink); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); row-gap: 40px; align-items: start; }
.load .left { grid-column: 1 / 8; }
.load .left > p { margin-top: 24px; max-width: 40ch; }
.calc { margin-top: 40px; }
.calc .bl thead th { color: var(--ink); }
.calc input { width: 100%; font: 500 var(--s3)/1 var(--text); padding: 12px 14px; border: 0; border-radius: 0; background: var(--paper-0); color: var(--paper-ink); font-variant-numeric: tabular-nums; transition: box-shadow 160ms ease; }
.calc input:focus { outline: none; box-shadow: inset 0 -4px 0 var(--focus); } /* taste-skill-ignore: focus bar inside a form field */
.calc .bl td { padding-right: 16px; }
.result { margin-top: 48px; }
.result output { display: block; font-size: var(--s5); color: var(--paper-ink); padding: 0; justify-self: start; width: fit-content; transition: transform 260ms var(--ease-out); transform-origin: 0 100%; }
.result output.bump { transform: scale(1.04); }
.result .how { margin-top: 16px; font-size: var(--s3); }
.packing { grid-column: 9 / 13; color: var(--paper-ink); padding: 28px; font-size: var(--s1); margin-top: 8px; }
.packing .pk-t { font: 700 var(--s2)/1.2 var(--text); }
.packing .pk-sub { margin-top: 4px; color: var(--paper-muted); }
.packing dl { margin-top: 18px; border-top: 3px solid var(--paper-ink); }
.packing dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--paper-rule); } /* taste-skill-ignore: data-ui fragment */
.packing dt { font-weight: 700; }
.packing dd { text-align: right; }
.packing dl div.pk-total { margin-top: 18px; align-items: baseline; background: var(--total-bg); color: var(--total-ink); padding: 14px 14px 16px; border-bottom: 0; box-shadow: inset 0 -4px 0 var(--rule-accent); }
.packing .pk-total dd b { font-size: var(--s3); }

/* ---------- landed cost: a sheet, the receipt laid across it at scale, hanging off its foot onto the paper page ---------- */
.landed { align-items: end; row-gap: 48px; }
.slip-wrap { grid-column: 1 / 13; filter: var(--paper-drop); }
.landed h2 { grid-column: 1 / 6; }
.landed .intro { grid-column: 7 / 12; max-width: 46ch; }
.slip { position: relative; background: var(--doc); color: var(--paper-ink); font-size: var(--s2); padding: 40px 40px 80px; clip-path: polygon(0 0,100% 0,100% calc(100% - 14px),98% 100%,96% calc(100% - 14px),94% 100%,92% calc(100% - 14px),90% 100%,88% calc(100% - 14px),86% 100%,84% calc(100% - 14px),82% 100%,80% calc(100% - 14px),78% 100%,76% calc(100% - 14px),74% 100%,72% calc(100% - 14px),70% 100%,68% calc(100% - 14px),66% 100%,64% calc(100% - 14px),62% 100%,60% calc(100% - 14px),58% 100%,56% calc(100% - 14px),54% 100%,52% calc(100% - 14px),50% 100%,48% calc(100% - 14px),46% 100%,44% calc(100% - 14px),42% 100%,40% calc(100% - 14px),38% 100%,36% calc(100% - 14px),34% 100%,32% calc(100% - 14px),30% 100%,28% calc(100% - 14px),26% 100%,24% calc(100% - 14px),22% 100%,20% calc(100% - 14px),18% 100%,16% calc(100% - 14px),14% 100%,12% calc(100% - 14px),10% 100%,8% calc(100% - 14px),6% 100%,4% calc(100% - 14px),2% 100%,0 calc(100% - 14px)); }
.slip .slip-head { font: 400 var(--s4)/0.98 var(--display); }
.slip .slip-sub { margin-top: 10px; font-size: var(--s1); }
.slip .grps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; margin-top: 12px; border-top: 3px solid var(--paper-ink); }
.slip h3 { font-size: var(--s2); font-weight: 700; margin-top: 24px; }
.slip dl { margin-top: 6px; }
/* the leader runs on the last line's baseline, so a wrapped label still leads straight to its figure */
.slip .row { display: flex; align-items: last baseline; gap: 10px; padding: 6px 0; }
.slip .dots { flex: 1 0 48px; min-width: 48px; height: 4px; margin-bottom: 1px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='4'%3E%3Ccircle cx='2' cy='2' r='2' fill='%23111418'/%3E%3C/svg%3E") repeat-x; }
.slip dt { min-width: 0; }
.slip dd { white-space: nowrap; }
.slip .total { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--total-bg); color: var(--total-ink); box-shadow: inset 0 -4px 0 var(--rule-accent); min-height: 72px; padding: 0 20px; margin: 40px -20px 0; font-weight: 500; font-size: var(--s3); }
.slip .total b { font: 400 var(--s4)/1 var(--display); }
.slip .note { margin-top: 16px; font-size: var(--s1); }

/* ---------- sourcing: on the paper page, the pasted note on paper beside the record ---------- */
.src-sec { margin-top: var(--section); padding: 0 var(--m); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); row-gap: 40px; align-items: start; }
.src-sec h2 { grid-column: 1 / 13; font-size: var(--s5); line-height: .9; }
.src-sec .lead { grid-column: 1 / 6; }
.paste, .record { font-size: var(--s1); }
.paste { grid-column: 6 / 9; background: var(--raise); color: var(--paper-ink); padding: 22px 24px; }
.paste b, .record b { display: block; font-weight: 700; margin-bottom: 8px; }
.record { grid-column: 9 / 13; background: var(--raise); }
.record .rh { padding: 14px 18px; background: var(--deep); display: flex; justify-content: space-between; }
.record table { width: 100%; border-collapse: collapse; }
.record td { padding: 10px 18px; border-bottom: 1px solid var(--bg); } /* taste-skill-ignore: data-ui fragment */
.record td:first-child { color: var(--muted); width: 40%; }
.record .rf { padding: 12px 18px; color: var(--accent-text); font-weight: 500; }
.src-sec .cap { grid-column: 9 / 13; color: var(--ink); margin-top: -24px; }

/* ---------- how it goes in: a sheet, the heading beside its terms; the B/L itself sits in shipments ---------- */
.goes { align-items: start; }
.goes h2 { grid-column: 1 / 5; }
.goes .termsheet { grid-column: 5 / 13; }
.goes .terms thead th { color: var(--muted); }
.goes .terms tbody td { padding: 20px 4px 20px 0; border-bottom: 2px solid var(--paper-rule); } /* taste-skill-ignore: table rows */
.goes .terms tbody td:first-child { font-size: var(--s3); font-weight: 500; width: 32%; line-height: 1.2; }
.obl { background: var(--raise); color: var(--paper-ink); padding: 24px; font-size: var(--s1); line-height: 1.4; }
.obl-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.obl-head .caps { font-size: var(--s4); }
.obl-head span:last-child { text-align: right; }
.obl-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 3px solid var(--paper-ink); border-left: 1px solid var(--paper-ink); } /* taste-skill-ignore: data-ui fragment */
.obl-grid > div { padding: 8px 10px 10px; border-right: 1px solid var(--paper-ink); border-bottom: 1px solid var(--paper-ink); } /* taste-skill-ignore: data-ui fragment */
.obl-grid .w2 { grid-column: span 2; }
.obl-grid b { display: block; font-weight: 700; }

/* ---------- contact: one container-orange band, the whole band is the link ---------- */
.cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--gap); align-items: end; position: relative; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: clamp(56px, 6vw, 96px) var(--m) clamp(32px, 3vw, 48px); transition: background-color 0s, color 0s; }
.cta .word { grid-column: 1; font-size: var(--s5); line-height: .8; white-space: nowrap; }
.cta .say { grid-column: 1; max-width: 46ch; margin-top: 28px; font-size: var(--s3); line-height: 1.35; }
.cta .say b { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cta svg { grid-column: 2; grid-row: 1; align-self: start; width: 48px; height: 48px; transition: transform 220ms var(--ease-out); }
.cta:hover, .cta:focus-visible { background: var(--ink); color: var(--accent); }
.cta:hover svg, .cta:focus-visible svg { transform: translate(6px, -6px); }
.cta:focus-visible { outline-offset: -6px; }

/* ---------- footer: the issue box, the cropped name ---------- */
.close { background: var(--desk); position: relative; overflow: hidden; padding: 96px var(--m) 0; }
.close .bl thead th { color: var(--muted); }
.close .bl td { font-size: var(--s2); }
.close .credits { margin-top: 48px; max-width: 62ch; color: var(--ink); }
.close .credits a { color: inherit; }
.giant { font-size: var(--s5); line-height: .8; white-space: nowrap; transform-origin: 0 0; transform: scale(2.3) translateY(14%); margin-top: 40px; height: 1.05em; color: var(--surface); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(24px); transition: opacity 700ms ease, transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .rise.is-in { opacity: 1; transform: none; }
  .js .stage .pi.rise { transform: translate(24px, -24px); }
  .js .stage .order.rise { transform: translate(24px, 48px); }
  .js .stage .rise.is-in { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .hero h1 { grid-column: 1 / -1; }
  .hero-side { grid-column: 1 / 10; padding-top: 28px; }
  .stage .order { grid-column: 1 / -1; grid-row: 3; margin-top: 48px; }
  .stage .order { display: flex; }
  .stage .order .order-bar { min-height: 0; justify-content: space-between; }
  .stage .order .order-head { text-align: left; align-items: baseline; justify-self: auto; padding: 18px 18px 12px; flex-direction: row; gap: 4px 16px; }
  .hero h1 .l2 { margin-left: calc((100vw - 2 * var(--m) + var(--gap)) / 12 * 2); }
  .stage .pi { grid-column: 3 / 13; grid-row: 4; margin-top: -32px; padding-bottom: 32px; }
  .desk-cap { grid-column: 1 / -1; grid-row: 5; }
  .order th.hs, .order td.hs { display: none; }
  .lc .left, .lc .doc, .landed h2, .landed .intro, .slip-wrap, .load .left, .packing, .goes h2, .goes .termsheet, .mods h2, .mods .intro, .chores .body, .chores > .worklog, .ships .plate, .vessel, .ships .obl { grid-column: 1 / -1; }
  .chores > .worklog { margin-top: 32px; }
  .goes .termsheet { margin-top: 32px; }
  .vessel { grid-row: auto; margin-top: 40px; }
  .ships .obl { grid-row: auto; margin: -24px 48px 0; }
  .extras { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .extras .x-label, .extras .x-cat { margin-top: 0; }
  .packing { max-width: 560px; }
  .slip-wrap { max-width: 640px; }
  .slip .grps { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  :root { --gap: 16px; --pad: 20px; }
  .grid, .load, .src-sec, .chores, .stage { grid-template-columns: minmax(0, 1fr); }
  .grid > *, .load > *, .src-sec > *, .chores > *, .stage > * { grid-column: 1 / -1 !important; }
  .bar nav a:not(.keep) { display: none; }
  .stage { margin-top: 3svh; padding: 0 var(--m); }
  .hero h1 { font-size: clamp(2.75rem, 12.4vw, 4.5rem); line-height: .9; }
  .hero h1 .l2 { margin-left: 0; }
  .hero-side { padding: 20px 0 0; }
  .hero-side .bl th, .hero-side .bl td { padding-right: 10px; font-size: var(--s1); }
  .hero-act { justify-items: stretch; gap: 14px; }
  .btn { width: 100%; }
  /* r2 rebuild, the hero desk drawn at its own width: the PI is the satellite, above and offset right, its head whole;
     the order screen is the hero and lies over the PI's empty foot only, a set 36px, so no font load can cut a line */
  .stage .pi { grid-row: 3; margin: 32px calc(-1 * var(--m)) 0 32px; padding: 18px 16px 60px; }
  .pi-meta { white-space: nowrap; }
  .stage .order { grid-row: 4; margin: -36px -8px 0; }
  .desk-cap { grid-row: 5; }
  .pi thead, .pi tbody tr[data-l], .pi-terms { display: none; }
  .pi-parties { margin: 14px 0 12px; }
  .pi-total td { padding: 10px 0 0; border-top: 2px solid var(--paper-ink); } /* taste-skill-ignore: data-ui fragment */
  .pi-total td:first-child { display: none; }
  .stage .order .order-bar { flex-wrap: wrap; gap: 4px 16px; }
  .stage .order .order-bar span:first-child { flex-basis: 100%; }
  /* cropped closer: the two lines to check and one checked line; four columns */
  .order th.hs, .order td.hs, .order th.price, .order td.price, .order th:nth-child(4), .order td:nth-child(4) { display: none; }
  .order tr.line[data-l="1"], .order tr.line[data-l="3"] { display: none; }
  .order tr.fix td { padding: 0 12px 14px; }
  /* the total bar: the figure on one line, the button under it */
  .stage .order .order-foot { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 18px 18px; }
  .order-foot .tot { white-space: nowrap; }
  .send { min-height: 44px; }
  .seam { height: 52svh; }
  .seam img { object-position: 30% 44%; transform-origin: 30% 42%; }
  .seam figcaption { right: var(--m); }
  .mods .intro { margin-top: 20px; }
  /* r2 rebuild: "What it does" is six white cards, each led by a strip of its module's own small document */
  .mods .bl, .mods .bl tbody { display: grid; gap: 12px; }
  .mods .bl { margin-top: 40px; }
  .mods .bl thead { display: none; }
  .mods .bl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; padding: 12px 12px 16px; background: var(--paper-0); }
  .mods .bl tbody tr:hover { background: var(--paper-0); }
  .mods .bl tbody td { display: block; width: auto !important; border-bottom: 0; padding: 0 4px; font-size: var(--s2); line-height: 1.45; }
  .mods .bl tbody td:first-child { display: contents; }
  .mods .bl tbody td:first-child a { padding: 0 4px; margin: 16px 0 6px; font: 500 var(--s3)/1.2 var(--text); }
  .mods .bl tbody td:last-child { margin-top: 10px; font-size: var(--s1); color: var(--muted); }
  .mods .bl tbody td:last-child::before { content: attr(data-l) ": "; }
  .mfrag { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-height: 64px; align-content: center; padding: 12px; background: var(--paper-100); color: var(--paper-ink); font: 400 var(--s1)/1.3 var(--text); }
  .mf-k { color: var(--paper-muted); }
  .mf-v { font-weight: 700; }
  .mf-v s { font-weight: 400; color: var(--paper-muted); margin-right: 6px; }
  .mf-big { font-size: var(--s4); line-height: .9; }
  .mf-tag, .mf-bar { margin-left: auto; padding: 4px 8px; font-weight: 700; }
  .mf-tag { background: var(--tint); box-shadow: inset 0 -2px 0 var(--rule-accent); }
  .mf-bar { padding: 6px 10px 8px; background: var(--total-bg); color: var(--total-ink); box-shadow: inset 0 -3px 0 var(--rule-accent); }
  /* r2 rebuild: "The same work" is a paper checklist, five open boxes and nothing ticked */
  .chores > .worklog { margin-top: 32px; padding: 18px 16px 8px; background: var(--paper-0); }
  .wl-head { display: flex; justify-content: flex-start; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 3px solid var(--paper-ink); font-size: var(--s1); line-height: 1.4; color: var(--paper-muted); }
  .wl-head b { display: block; color: var(--paper-ink); font-size: var(--s2); }
  .wl-count { margin-left: auto; flex: none; padding: 4px 8px; background: var(--tint); color: var(--paper-ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--rule-accent); }
  .chores .bl thead { display: none; }
  .chores .bl, .chores .bl tbody { display: block; }
  .chores .bl tbody tr { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; padding: 16px 0; border-bottom: 2px solid var(--paper-rule); } /* taste-skill-ignore: checklist rows on a paper document */
  .chores .bl tbody tr:last-child { border-bottom: 0; }
  .chores .bl tbody tr::before { content: ""; grid-column: 1; grid-row: 1 / span 2; width: 20px; height: 20px; margin-top: 3px; border: 2px solid var(--paper-ink); }
  .chores .bl tbody td, .chores .bl tbody td + td { display: block; grid-column: 2; width: auto !important; padding: 0; border: 0; }
  .chores .bl tbody td:last-child { margin-top: 4px; color: var(--paper-muted); }
  .ships { grid-template-columns: minmax(0, 1fr); }
  .ships > * { grid-column: 1 / -1 !important; }
  .vessel { margin: 32px -8px 0; font-size: var(--s1); }
  .vessel .vh { flex-direction: column; gap: 2px; padding: 14px 16px; }
  .vessel th, .vessel td { padding: 12px 10px; }
  .vessel th:first-child, .vessel td:first-child { padding-left: 16px; }
  .vessel td:nth-child(3) { font-size: var(--s2); }
  .vessel s { display: block; font-size: var(--s1); }
  .vessel th:nth-child(2), .vessel td:nth-child(2) { display: none; }
  .ships .obl { margin: -16px 8px 0; }
  .extras { grid-template-columns: minmax(0, 1fr); }
  .lc .doc { padding: 22px 16px; }
  /* r2 rebuild: the L/C re-flows into field-over-values rows; the tag sits on the field's line, inside the paper */
  .lc .doc table, .lc .doc tbody { display: block; }
  .lc .doc thead { display: none; }
  .lc .doc tbody { border-top: 3px solid var(--paper-ink); }
  .lc .doc tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; row-gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--paper-rule); } /* taste-skill-ignore: data-ui fragment */
  .lc .doc td, .lc .doc td + td { display: block; padding: 0; border: 0; width: auto; }
  .lc .doc td:first-child { grid-column: 1; grid-row: 1; width: auto; align-self: center; }
  .lc .doc td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
  .lc .doc td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .lc .doc td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .lc .doc td:nth-child(2)::before, .lc .doc td:nth-child(3)::before { display: block; font-size: var(--s1); color: var(--paper-muted); }
  .lc .doc td:nth-child(2)::before, .lc .doc td:nth-child(3)::before { content: attr(data-l); }
  .lc .doc tr.miss { padding-left: 14px; box-shadow: inset 4px 0 0 var(--rule-accent); }
  .lc .doc tr.miss td:first-child { box-shadow: none; padding-left: 0; }
  .calc .bl td { padding-right: 8px; }
  /* r2: capped at 18vw so the figure fits its band in the fallback serif too (fonts blocked), 70px at 390 */
  .result output { font-size: min(var(--s5), 18vw); }
  .packing { padding: 22px 18px; }
  .slip { padding: 28px 18px 64px; font-size: var(--s1); }
  /* a phone has no room for leaders: each line gets a plain rule, the figure under its label */
  .slip .row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 9px 0; border-bottom: 2px solid var(--paper-rule); }
  .slip .dots { display: none; }
  .slip dd { font-size: var(--s2); font-weight: 500; }
  .slip .total { flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 20px; }
  .src-sec h2 { font-size: var(--s4); }
  .obl { padding: 18px 14px; }
  /* r2: the B/L lies 16px under the vessel; its title starts a set 18px clear of the vessel's edge */
  .ships .obl { padding-top: 34px; }
  .cta svg { width: 32px; height: 32px; }
  .cta .word { white-space: normal; line-height: .84; }
  .close .bl, .close .bl thead, .close .bl tbody, .close .bl tr { display: block; }
  .close .bl thead { display: none; }
  .close .bl td { display: block; border-top: 3px solid var(--ink); padding: 8px 0 14px; }
  .close .bl td::before { content: attr(data-l); display: block; font-size: var(--s1); font-weight: 700; }
  .giant { transform: scale(1.5) translateY(14%); }
}

/* ======================================================================================================
   Website Builder additions (2026-11-10): the back-office story in v4's paper world (Cesar's boxes).
   Same tokens, same paper-on-desk rule: the page's own copy lies on the desk, sample screens are white
   paper with the one shadow and carry data-ui.
   ====================================================================================================== */
.skip { position: absolute; left: var(--m); top: -80px; z-index: 10; background: var(--ink); color: var(--raise); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }
.bar .langs { display: flex; gap: 14px; list-style: none; margin-left: 28px; }
.bar .langs a { text-decoration: none; color: var(--muted); }
.bar .langs a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 currentColor; }
.bar .langs [lang^="zh"] a { font-family: "Marsfield Switch", var(--text); }
.bar .r { display: flex; align-items: baseline; }

/* hero: the yes line, the lead, the two actions */
.hero h1 { line-height: .88; }
.yesline { font: 400 var(--s4)/.98 var(--display); letter-spacing: -.015em; max-width: 13ch; }
.hero-act .alt { font-weight: 500; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.hero-act .acts { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }

/* a day in the back office: the day log, a paper list on the desk */
.day { align-items: start; }
.day .body { grid-column: 1 / 6; }
.day .body .lead { margin-top: 28px; max-width: 26ch; }
.day .log { grid-column: 7 / 13; }
.day .bl tbody td { border-bottom: 2px solid var(--paper-rule); padding: 16px 12px 16px 0; } /* taste-skill-ignore: table rows */
.day .bl td.t { font-weight: 700; width: 4.5em; white-space: nowrap; }
.day .bl td.s { width: 1%; white-space: nowrap; text-align: right; padding-right: 0; }
.st { display: inline-block; padding: 3px 8px; font: 700 var(--s1)/1.2 var(--text); background: var(--raise); color: var(--ink); }
.st.wait { background: var(--tint); box-shadow: inset 0 -2px 0 var(--rule-accent); }
.st.held { background: var(--ink); color: var(--raise); }

/* the yes: the approval queue, three drafts waiting */
.yes { margin-top: var(--section); padding: 0 var(--m); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; align-items: start; }
.yes .left { grid-column: 1 / 6; }
.yes .left > p { margin-top: 24px; max-width: 40ch; }
.points { list-style: none; margin-top: 36px; display: grid; gap: 0; }
.points li { padding: 16px 0; border-top: 2px solid var(--surface); }
.points b { display: block; font-size: var(--s3); font-weight: 500; line-height: 1.2; margin-bottom: 4px; }
.queue { grid-column: 7 / 13; background: var(--paper-0); box-shadow: var(--paper-shadow); font-size: var(--s1); }
.queue .qh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 20px; background: var(--deep); color: var(--muted); }
.queue .qh b { color: var(--ink); font-weight: 700; font-size: var(--s2); }
.draft { padding: 18px 20px 20px; border-top: 2px solid var(--deep); }
.draft:first-of-type { border-top: 0; }
.dmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; color: var(--muted); }
.dmeta .ch { font-weight: 700; color: var(--ink); }
.dtext { margin-top: 10px; padding: 12px 14px; background: var(--paper-50); color: var(--ink); font-size: var(--s2); line-height: 1.5; outline-offset: 2px; }
.dtext[contenteditable="true"] { background: var(--paper-0); box-shadow: inset 0 0 0 2px var(--ink); } /* taste-skill-ignore: edit state inside data-ui */
.dgloss { margin-top: 6px; color: var(--muted); }
.dacts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.ap { font: 500 var(--s1)/1 var(--text); min-height: 44px; padding: 0 20px; border: 0; border-radius: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: transform 120ms var(--ease-out), background-color 160ms ease; }
.ap:hover { background: var(--accent-hover); }
.ap:active { transform: scale(.97); }
.ed { font: 500 var(--s1)/1 var(--text); min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; }
.ed[aria-pressed="true"] { background: var(--ink); color: var(--raise); }
.stamp { display: none; padding: 8px 12px; background: var(--total-bg); color: var(--total-ink); box-shadow: inset 0 -3px 0 var(--rule-accent); font-weight: 500; }
.draft.ok .stamp { display: inline-block; }
.draft.ok .ap { display: none; }
.renew { display: none; color: var(--ink); font-weight: 500; }
.draft.again .renew { display: block; margin-top: 10px; padding-left: 12px; box-shadow: inset 4px 0 0 var(--rule-accent); }

/* the desks: the modules' table pattern, one row per agent */
.desks { padding-top: var(--section); }

/* the control room: one screen, every desk's question */
.room { row-gap: 40px; align-items: start; }
.room .left { grid-column: 1 / 5; }
.room .left p { margin-top: 24px; max-width: 34ch; }
.ctl { grid-column: 5 / 13; background: var(--paper-0); box-shadow: var(--paper-shadow); color: var(--paper-ink); font-size: var(--s1); }
.ctl .vh { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--deep); color: var(--muted); }
.ctl .vh b { color: var(--ink); font-weight: 700; }
.ctl table { width: 100%; border-collapse: collapse; }
.ctl th, .ctl td { text-align: left; padding: 14px 12px; border-bottom: 2px solid var(--bg); vertical-align: top; } /* taste-skill-ignore: data-ui fragment */
.ctl th { font-weight: 500; color: var(--muted); }
.ctl th:first-child, .ctl td:first-child { padding-left: 20px; }
.ctl td:first-child { font-weight: 700; white-space: nowrap; }
.ctl td:last-child { text-align: right; padding-right: 20px; }
.ctl tr.hold td { background: var(--paper-50); }
.ctl tr.hold td:first-child { box-shadow: inset 4px 0 0 var(--rule-accent); }
.ctl .holdbox { padding: 0 20px 18px; background: var(--paper-50); }
.ctl .holdbox p { padding: 12px 14px; background: var(--paper-0); box-shadow: inset 4px 0 0 var(--accent); font-size: var(--s2); } /* taste-skill-ignore: inset bar inside data-ui */
.ctl .cf { padding: 14px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--muted); }

/* proof: five counts from our own operation */
.proof { align-items: end; row-gap: 48px; }
.proof h2 { grid-column: 1 / 8; }
.proof .figs { grid-column: 1 / 13; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; }
.proof .figs li { border-top: 3px solid var(--ink); padding-top: 14px; }
.proof .figs b { display: block; font: 400 var(--s4)/1 var(--display); letter-spacing: -.01em; margin-bottom: 10px; }
.proof .fn { grid-column: 1 / 9; margin-top: -16px; }

/* your own instance: four steps, numbered down the desk */
.steps { list-style: none; counter-reset: st; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 16px; padding: 22px 0; border-top: 2px solid var(--paper-rule); }
.steps li::before { content: counter(st); grid-row: 1 / span 2; font: 400 var(--s4)/.9 var(--display); }
.steps b { font-size: var(--s3); font-weight: 500; line-height: 1.2; }
.steps span { margin-top: 6px; }

/* questions */
.faq { align-items: start; }
.faq h2 { grid-column: 1 / 5; }
.faq dl { grid-column: 5 / 13; }
.faq dl div { padding: 20px 0; border-top: 2px solid var(--paper-rule); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--gap); }
.faq dt { font-size: var(--s3); font-weight: 500; line-height: 1.2; }

@media (max-width: 1100px) {
  .day .body, .day .log, .yes .left, .queue, .room .left, .ctl, .proof h2, .proof .fn, .faq h2, .faq dl { grid-column: 1 / -1; }
  .day .log, .faq dl { margin-top: 32px; }
  .proof .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .queue { max-width: 720px; }
}
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; row-gap: 6px; }
  .bar .langs { margin-left: 0; }
  .yesline { font-size: clamp(2rem, 9vw, 2.75rem); }
  .hero-act .acts { flex-direction: column; align-items: stretch; }
  .hero-act .alt { align-self: flex-start; }
  .yes, .proof .figs { grid-template-columns: minmax(0, 1fr); }
  .yes > * { grid-column: 1 / -1 !important; }
  .queue { margin: 0 -8px; }
  .draft { padding: 16px 14px 18px; }
  .ap, .ed { flex: 1 1 auto; }
  .day .bl thead { display: none; }
  .day .bl, .day .bl tbody { display: block; }
  .day .bl tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 6px; padding: 14px 0; border-bottom: 2px solid var(--paper-rule); } /* taste-skill-ignore: log rows on the desk */
  .day .bl tbody td { display: block; border: 0; padding: 0; width: auto; }
  .day .bl td.t { grid-column: 1; grid-row: 1; }
  .day .bl td.s { grid-column: 2; grid-row: 1; justify-self: end; }
  .day .bl td.w { grid-column: 1 / -1; grid-row: 2; }
  .ctl { margin: 0 -8px; }
  .ctl thead { display: none; }
  .ctl table, .ctl tbody { display: block; }
  .ctl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 14px; border-bottom: 2px solid var(--bg); } /* taste-skill-ignore: data-ui fragment */
  .ctl td, .ctl th:first-child, .ctl td:first-child, .ctl td:last-child { display: block; padding: 0; border: 0; text-align: left; }
  .ctl td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; margin-top: 4px; color: var(--muted); }
  .ctl td:last-child { grid-column: 2; grid-row: 1; }
  .ctl .holdbox { padding: 0 14px 14px; }
  .steps li { grid-template-columns: 44px minmax(0, 1fr); }
  .faq dl div { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
}

/* zh: the display face is Noto Serif SC (subset), never set in capitals; text in Noto Sans SC */
:lang(zh) { --display: "Marsfield SC Serif", "Songti SC", "Noto Serif CJK SC", serif; --text: "Albert Sans", "Marsfield SC Sans", "PingFang SC", "Microsoft YaHei", sans-serif; }
:lang(zh) h1, :lang(zh) .caps { text-transform: none; letter-spacing: 0; line-height: 1.08; font-weight: 600; }
:lang(zh) h2, :lang(zh) .yesline, :lang(zh) .proof .figs b, :lang(zh) .steps li::before { letter-spacing: 0; line-height: 1.18; font-weight: 600; }
:lang(zh) body, :lang(zh) .lead { line-height: 1.7; }
.wordmark, .giant, .cta .word[lang="en"] { font-family: "Imbue", "Times New Roman", serif; }
.mods .bl tbody td:first-child .dn { display: block; }
@media (max-width: 760px) {
  .mods .bl tbody td:first-child .dn { padding: 0 4px; margin: 16px 0 6px; font: 500 var(--s3)/1.2 var(--text); }
}
.ctl td.holdbox { white-space: normal; font-weight: 400; padding-top: 0; }
@media (max-width: 760px) {
  .day .bl tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
  .ctl tr.holdrow { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
  .ctl td.holdbox { grid-column: 1 / -1; grid-row: auto; padding: 0; }
}
@media (max-width: 760px) { .day .bl td.s, .day .bl td.t { width: auto; } }
/* r1 fixes after the first shots: the second h1 line stays clear of the PI; the hold note reads left; the phone bar has air */
@media (min-width: 1101px) { .hero h1 .l2 { margin-left: calc((100vw - 2 * var(--m) + var(--gap)) / 12 * 2); } }
.ctl td.holdbox { text-align: left; padding-left: 20px; padding-right: 20px; }
.bar .r { gap: 0 28px; flex-wrap: wrap; justify-content: flex-end; }
.bar .langs { margin-left: 0; }
@media (max-width: 760px) { .bar .r { gap: 0 18px; } .ctl td.holdbox { padding: 0; } }
/* r2: per-language display sizes (PT runs longer, zh is set wide), and the Latin wordmark keeps its capitals on zh */
:lang(pt) { --h1: clamp(2.75rem, 4.7vw, 6.5rem); }
:lang(zh) { --h1: clamp(2.5rem, 4.6vw, 6.25rem); }
.caps[lang="en"] { text-transform: uppercase; letter-spacing: -0.01em; line-height: .86; font-weight: 400; }
.wordmark[lang="en"] { line-height: 1; }
@media (max-width: 760px) {
  :lang(zh) .hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.15; }
  :lang(zh) .yesline { font-size: clamp(1.6rem, 7.4vw, 2.2rem); }
  :lang(pt) .hero h1 { font-size: clamp(2.5rem, 10.6vw, 4rem); }
}
/* r3: the window's header band keeps room for its two lines whatever the h1 size; the hero button stays on one line */
@media (min-width: 1101px) { .stage .order .order-bar { min-height: max(calc(var(--h1) * 0.86 + 12px), 92px); } }
@media (min-width: 761px) { .hero-act .btn { flex: none; white-space: nowrap; } }
.bar { gap: 8px 24px; }
.bar nav { flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; }
.bar nav a { white-space: nowrap; }
@media (max-width: 1100px) { .bar { align-items: flex-start; } .bar .r { flex-direction: column; align-items: flex-end; row-gap: 6px; } }
@media (max-width: 760px) { .bar .r { flex-direction: row; align-items: baseline; } }
/* r5, taste-skill inspector: the skip link is clipped until focused (not an eyebrow); zh display sized to its wider set;
   PT's longer hero line fits two lines on a phone; the instance heading gets a wider measure */
.skip { top: 12px; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; }
:lang(zh) h2, :lang(zh) .yesline { font-size: calc(var(--s4) * .72); }
.goes h2 { grid-column: 1 / 6; }
.goes .termsheet { grid-column: 6 / 13; }
@media (max-width: 1100px) { .goes h2, .goes .termsheet { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  :lang(pt) .hero h1 { font-size: clamp(2.25rem, 9.6vw, 4rem); }
  :lang(zh) .yesline { font-size: 1.5rem; }
}
/* r6: zh's yes line is measured in characters, not ch; proof figures on a phone sit beside their label */
:lang(zh) .yesline { max-width: 9em; }
@media (max-width: 760px) {
  .proof .figs li { display: grid; grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr); column-gap: 14px; align-items: baseline; }
  .proof .figs b { margin-bottom: 0; }
}
@media (max-width: 760px) { .proof .figs li { font-size: 1.1875rem; line-height: 1.4; } }
/* r7, render_check: the rules on the page's own lists are drawn as pseudo-elements (they are rules, not plates);
   the packing list and the receipt bleed off their band at tablet and phone, as the receipt does on desktop */
.points li, .faq dl div { position: relative; border-top: 0; }
.points li::before, .faq dl div::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--surface); }
.faq dl div::before { background: var(--paper-rule); }
.ctl td.holdbox { padding-top: 12px; }
.mfrag > :last-child { margin-left: auto; }
@media (max-width: 1100px) {
  .load { padding-bottom: 0; }
  .packing { max-width: none; margin-bottom: -56px; position: relative; z-index: 1; }
  .slip-wrap { max-width: none; }
}
/* r8: the order screen's offset over the PI, tuned per language so no PI row edge runs 1-2 px from an order row (render_check at 1440) */
@media (min-width: 1101px) { .stage { --tuck: calc(var(--h1) * 0.86 - 22px); } :lang(zh) .stage { --tuck: calc(var(--h1) * 0.86 - 28px); } }
@media (max-width: 1100px) { .seam figcaption { right: var(--m); max-width: none; } }
/* r9, contrast: Approve is small text, so its hover goes to ink (orange-ink on the darker orange measures under 4.5) */
.ap:hover { background: var(--ink); color: var(--raise); }
.btn:hover { background: var(--ink); color: var(--raise); }
/* r10, Lighthouse: the record's field names are row headers; the footer's giant name is drawn by CSS (decorative) */
.record th { text-align: left; font-weight: 400; color: var(--muted); width: 40%; padding: 10px 18px; border-bottom: 1px solid var(--bg); } /* taste-skill-ignore: data-ui fragment */
.giant::before { content: attr(data-word); }
/* r11, CLS: on a phone the bar is one row whatever the wordmark's font (the fallback serif is wider than Imbue) */
@media (max-width: 760px) { .bar { flex-wrap: nowrap; } .bar .r { flex-wrap: nowrap; flex: none; } .wordmark { min-width: 0; overflow: hidden; } }
/* r12, fresh critic: Approve is ink (orange stays the booking CTA and the one spread); the phone wordmark fits whole */
.ap { background: var(--ink); color: var(--raise); }
.ap:hover { background: var(--carbon-700); color: var(--raise); }
@media (max-width: 760px) { .wordmark { font-size: clamp(1.75rem, 8vw, 2.25rem); overflow: visible; } }
@media (max-width: 760px) { .wordmark { font-size: 2.1875rem; } }
/* r13, privacy pages in v4 (Cesar's box 2026-11-10): the policy on the paper desk, one heading per row like the term sheet */
.legal-top { padding-bottom: 0; }
main.legal { padding-top: clamp(56px, 7vw, 104px); row-gap: 0; }
.legal h1 { grid-column: 1 / -1; font-size: clamp(2.75rem, 6.4vw, 7rem); }
.legal .meta { grid-column: 1 / -1; margin-top: 20px; color: var(--muted); font-size: var(--s1); }
.legal section { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding-top: 18px; margin-top: 48px; border-top: 3px solid currentColor; }
.legal h2 { grid-column: 1 / 5; font-size: calc(var(--s4) * .6); line-height: 1.05; }
.legal .txt { grid-column: 6 / 12; max-width: 64ch; }
.legal .txt p + p { margin-top: 1em; }
.legal .txt a { text-underline-offset: 3px; }
:lang(zh) .legal h2 { font-size: calc(var(--s4) * .5); }
@media (max-width: 1100px) { .legal h2 { grid-column: 1 / 5; } .legal .txt { grid-column: 5 / -1; } }
@media (max-width: 760px) {
  .legal section { margin-top: 36px; }
  .legal h2, .legal .txt { grid-column: 1 / -1; }
  .legal .txt { margin-top: 14px; }
}
/* r13, the desks table: the yes is told once, in #yes; here two columns, the job in ink */
.desks .bl tbody td:last-child { width: auto; color: var(--ink); }
@media (max-width: 760px) { .desks .bl tbody td:last-child { margin-top: 0; font-size: var(--s2); color: var(--ink); } .desks .bl tbody td:last-child::before { content: none; } }
/* r13: on a phone the held row's bar and tint sit on the row, not over the desk's name */
@media (max-width: 760px) {
  .ctl tr.hold, .ctl tr.holdrow { background: var(--paper-50); box-shadow: inset 4px 0 0 var(--rule-accent); }
  .ctl tr.hold td, .ctl tr.holdrow td { background: none; }
  .ctl tr.hold td:first-child { box-shadow: none; }
}

/* 2026-11-11, Cesar: "the layout is off": the headline no longer lies over the order screen; the screen starts below
   line 2, with its header as on a tablet (bar, then the order's name on its own row) */
@media (min-width: 1101px) {
  .stage, :lang(zh) .stage { --tuck: -32px; }
  .stage .order .order-bar { min-height: 0; justify-content: space-between; }
  .stage .order { display: flex; }
  .stage .order .order-head { text-align: left; align-items: baseline; justify-self: auto; padding: 18px 18px 12px; flex-direction: row; gap: 4px 16px; }
}

/* 2026-11-11, F-designer-1111-0910-1: PT's and 中文's second line is longer than EN's and ran into the PI's dark edge;
   their indent drops from two columns to one (中文 16px less), which keeps 30px+ clear of the PI at 1101-2560 */
@media (min-width: 1101px) {
  :lang(pt) .hero h1 .l2 { margin-left: calc((100vw - 2 * var(--m) + var(--gap)) / 12 * 1); }
  :lang(zh) .hero h1 .l2 { margin-left: calc((100vw - 2 * var(--m) + var(--gap)) / 12 * 1 - 16px); }
}

/* 2026-11-11, ask designer-1111-0916 finding: PT's one-line CTA ("Agendar demo de 30 minutos") is wider than the
   left column up to ~1340px and pushed the column under the order screen; there it may wrap, and the column holds */
@media (min-width: 1101px) and (max-width: 1399px) {
  :lang(pt) .hero-act .btn { white-space: normal; flex: 0 1 auto; max-width: 100%; text-align: center; }
  :lang(pt) .hero-side { min-width: 0; }
}
