/* Hallmark · shape: Workbench · genre: modern-minimal · theme: cobalt (by request) · job: sign up · draw: manual, scripts not run
 * hero: Stage · nav: edge-aligned, wordmark, two links and one key · footer: mast · imagery: the product built in 5 slots, 1 photograph slot (stockroom, pending) · signature: the stock table taking a sale, the 綠豆椪 row on the cobalt wash
 * axes: light/grotesk-sans/cool · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 · weakest: P, a calm tool page argues little; the hero head is the argument (a sale and the stock are one event) and every section shows that one ledger instead of describing features */
/* Hallmark · note · fonts: Familjen Grotesk and IBM Plex Sans from the theme, Noto Sans TC as the CJK face inside both stacks (counted as the same display and body roles); JetBrains Mono dropped, no code on this page */
/* Hallmark · waive 81 · one slot, img/stockroom.jpg, a flat stand-in · the stockroom photograph is generated with Midjourney by the coordinator after this build */
/* Hallmark · answered F4 · two cobalt keys share one recipe: the hero trial key and the closing trial form, the sign up anatomy repeats the hero action at the close */
/* Hallmark · dismissed fill · the 價格示意 text slot in the FAQ is the brief's own labelled placeholder for a price nobody gave */
/* Hallmark · hero-review: none separately, headless run with one subagent; folded into the finish review */
/* Hallmark · finish-review: subagent · fix · 8 findings · 5 resolved (signature motion, copy heads, flow spacing, cut inputs, FAQ pairing) 3 dismissed (photo slot waived 81, price slot per brief, capture tail was window height) · sloplint not run; manual gate check */
/* Hallmark · note · no ASCII field: the genre refuses a code register as decoration on a product that is not a developer tool */
@import url("./tokens.css");
@import url("./base.css");

/* Page type for CJK */
body { line-height: 1.65; }
h1 { font-size: clamp(2.5rem, 4vw + 0.5rem, 4.5rem); line-height: 1.12; max-width: 8em; }
h2 { line-height: 1.15; max-width: 16em; }
h3 { font-weight: 500; }
.lead { color: var(--color-ink-2); line-height: 1.6; }
.num { font-variant-numeric: tabular-nums; }

/* Controls: keycaps */
.key { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-key-face); color: var(--color-ink); font: 500 var(--text-md)/1 var(--font-display); white-space: nowrap; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-key); transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.key:hover { transform: translateY(-1px); }
.key:active { transform: translateY(3px); box-shadow: var(--shadow-key-press); }
.key:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.key:disabled, .key[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.key[aria-busy="true"] { cursor: progress; }
.key--primary { background: var(--color-accent); border-color: var(--color-accent-edge); color: var(--color-accent-ink); box-shadow: var(--shadow-key-accent); }
.key--primary:hover { background: var(--color-accent-deep); }
.key--sm { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }
@media (prefers-reduced-motion: reduce) { .key { transition: background-color var(--dur-micro) linear; } .key:hover, .key:active { transform: none; } }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

.icon { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Cut surfaces */
.app, .doc, .sheet, .phone, .map, .photo { border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper); box-shadow: var(--shadow-card); margin: 0; }
@supports (corner-shape: bevel) { .app, .doc, .sheet, .phone, .map { border-radius: var(--cut-l) 4px var(--cut-l) 4px; corner-shape: bevel round bevel round; } .signup input { border-radius: var(--cut) 4px var(--cut) 4px; corner-shape: bevel round bevel round; } }

/* Nav: edge-aligned */
.nav { border-bottom: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); }
.nav__row { display: flex; align-items: center; gap: var(--space-xl); min-height: 72px; }
.wordmark { font: 600 var(--text-xl)/1 var(--font-display); color: var(--color-ink); text-decoration: none; letter-spacing: 0.02em; }
.wordmark:hover { color: var(--color-accent); }
.wordmark:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.nav__links { display: flex; gap: var(--space-lg); margin-left: auto; }
.nav__links a { font-size: var(--text-sm); color: var(--color-ink-2); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; white-space: nowrap; transition: text-decoration-color var(--dur-short) var(--ease-out); }
.nav__links a:hover { color: var(--color-ink); text-decoration-color: var(--color-accent); }
.nav__links a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* Hero: Stage */
.hero { min-height: calc(100dvh - 73px); display: grid; align-items: center; padding-block: var(--space-xl); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: center; }
.hero__text { display: grid; gap: var(--space-lg); justify-items: start; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xs); }
.hero__terms { font-size: var(--text-sm); color: var(--color-muted); }

/* Product: shared grid table */
.grid-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.grid-table th { font: 500 var(--text-sm)/1.3 var(--font-display); color: var(--color-muted); text-align: left; padding: var(--space-xs) var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule-2); white-space: nowrap; }
.grid-table td { padding: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); white-space: nowrap; }
.grid-table .num { text-align: right; }
.grid-table .col-code { text-align: left; }
.tab { font-variant-numeric: tabular-nums; }
.grid-table tr.is-new td { background: var(--color-accent-wash); }
.grid-table tfoot td { font-weight: 500; border-bottom: 0; }
.grid-table .qty { position: relative; color: var(--color-accent-deep); font-weight: 500; }
/* The sale lands once on load: 88 leaves, 86 arrives, then the status line. End state is the default. */
.qty__old { position: absolute; right: var(--space-sm); opacity: 0; color: var(--color-muted); animation: qty-out var(--dur-long) var(--ease-out) 900ms both; }
.qty__new { display: inline-block; animation: qty-in var(--dur-long) var(--ease-out) 900ms both; }
.app__status { animation: qty-in var(--dur-long) var(--ease-out) 1300ms both; }
@keyframes qty-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px); } }
@keyframes qty-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qty__old, .qty__new, .app__status { animation: none; } }
.low { display: flex; align-items: center; gap: var(--space-2xs); color: var(--color-error); }
.void { color: var(--color-muted); text-decoration: line-through; }

/* Hero app */
.app { min-height: 520px; overflow: hidden; }
.app__shell { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 520px; }
.app__side { list-style: none; margin: 0; padding: var(--space-lg) var(--space-sm); display: grid; align-content: start; gap: var(--space-2xs); background: var(--color-paper-2); border-right: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-ink-2); }
.app__side li { padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-input); }
.app__side li.is-on { background: var(--color-paper); color: var(--color-accent-deep); font-weight: 500; }
.app__main { display: grid; align-content: start; gap: var(--space-md); padding: var(--space-lg); min-width: 0; }
.app__bar { display: flex; align-items: center; gap: var(--space-md); }
.app__title { font: 600 var(--text-xl)/1 var(--font-display); }
.field { display: inline-flex; align-items: center; gap: var(--space-xs); margin-left: auto; min-height: 36px; padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-paper); color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
.tray { display: inline-flex; gap: var(--space-2xs); padding: var(--space-2xs); background: var(--color-paper-3); border-radius: var(--radius-input); justify-self: start; }
.tray__key { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 32px; padding: 0 var(--space-sm); border: var(--rule-hair) solid transparent; border-radius: 4px; background: transparent; color: var(--color-ink-2); font: 500 var(--text-sm)/1 var(--font-display); white-space: nowrap; }
.tray__key.is-on, .tray__key[aria-selected="true"] { background: var(--color-key-face); border-color: var(--color-rule-2); color: var(--color-ink); box-shadow: var(--shadow-key-press); }
.app__status { font-size: var(--text-sm); color: var(--color-ink-2); padding-top: var(--space-xs); }

/* Flow: pinned */
.flow { padding-block: var(--section-gap-s); }
.flow__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); margin-top: var(--space-2xl); }
.flow__pin { position: sticky; top: var(--space-2xl); align-self: start; }
.doc { padding: var(--space-xl); display: grid; gap: var(--space-lg); }
.doc__head { display: flex; justify-content: space-between; align-items: start; gap: var(--space-lg); }
.doc__title { font: 600 var(--text-xl)/1.2 var(--font-display); }
.doc__meta { font-size: var(--text-sm); color: var(--color-ink-2); text-align: right; }
.doc__part, .doc__lines { border-radius: var(--radius-input); transition: background-color var(--dur-short) var(--ease-out); }
.doc__part { padding: var(--space-md); background: var(--color-paper-2); }
.doc__label { font: 500 var(--text-sm)/1.3 var(--font-display); color: var(--color-muted); margin-bottom: var(--space-xs); }
.pairs { margin: 0; display: grid; gap: var(--space-2xs); font-size: var(--text-sm); }
.pairs div { display: flex; justify-content: space-between; gap: var(--space-md); }
.pairs dd { margin: 0; }
.doc__invoice { display: flex; align-items: center; gap: var(--space-xs); color: var(--color-success); }
.doc__invoice p { color: var(--color-ink); }
.doc[data-step="1"] [data-part="1"] td { background: var(--color-accent-wash); }
.doc[data-step="2"] [data-part="2"], .doc[data-step="3"] [data-part="3"] { background: var(--color-accent-wash); }
.flow__steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.flow__step { counter-increment: step; min-height: 52dvh; display: grid; align-content: center; gap: var(--space-md); padding-left: var(--space-2xl); position: relative; }
.flow__step::before { content: counter(step); position: absolute; left: 0; top: 50%; translate: 0 -50%; font: 600 var(--text-2xl)/1 var(--font-display); color: var(--color-rule-2); font-variant-numeric: tabular-nums; }
.flow__step:first-child { min-height: 32dvh; align-content: start; }
.flow__step:first-child::before { top: 0; translate: 0 0; }
.flow__step p { color: var(--color-ink-2); max-width: 26em; }

/* Ledger: switcher */
.ledger { padding-block: var(--section-gap-s) var(--section-gap); border-top: var(--rule-hair) solid var(--color-rule); }
.headblock--split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--gap-columns); align-items: end; }
.switch { margin-top: var(--space-2xl); display: grid; gap: var(--space-xl); }
.tray--tabs { justify-self: start; }
.tray--tabs .tray__key { min-height: 44px; padding: 0 var(--space-lg); font-size: var(--text-md); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.tray--tabs .tray__key:hover { color: var(--color-ink); background: var(--color-paper-2); }
.tray--tabs .tray__key[aria-selected="true"]:hover { background: var(--color-key-face); }
.tray--tabs .tray__key:active { box-shadow: var(--shadow-key-press); }
.tray--tabs .tray__key:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tray--tabs .tray__key:disabled { opacity: 0.55; cursor: not-allowed; }
.view { min-height: 420px; min-width: 0; }
.switch > * { min-width: 0; }
.sheet { padding: var(--space-xl); }
.sheet__head { margin-bottom: var(--space-lg); }
.sheet__title { font: 600 var(--text-xl)/1.2 var(--font-display); }
.view--phone { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: center; }
.phone { width: 100%; max-width: 360px; justify-self: end; padding: var(--space-lg); display: grid; gap: var(--space-md); min-height: 420px; align-content: start; }
.phone .field { margin-left: 0; min-height: 44px; }
.phone__title { font: 600 var(--text-xl)/1.2 var(--font-display); }
.phone__list { list-style: none; margin: 0; padding: 0; }
.phone__list li { display: flex; justify-content: space-between; gap: var(--space-md); padding: var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-error); }
.phone__list li span:first-child { color: var(--color-ink); }
.view__note { font-size: var(--text-lead); color: var(--color-ink-2); max-width: 20em; }

/* Import: mapping on graphite */
.import { padding-block: var(--section-gap-l) var(--section-gap); }
.import__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-2xl); align-items: center; }
.import__text { display: grid; gap: var(--space-lg); }
.graphite { background: var(--color-graphite); color: var(--color-graphite-ink); border-color: var(--color-graphite-2); }
.map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(64px, 160px) minmax(0, 1fr); padding: var(--space-xl); row-gap: var(--space-lg); }
.map__file { font: 500 var(--text-sm)/1.3 var(--font-display); color: var(--color-graphite-muted); height: 40px; display: flex; align-items: center; }
.map__col ul { list-style: none; margin: 0; padding: 0; }
.map__col li { height: 56px; display: flex; align-items: center; padding: 0 var(--space-md); border-top: var(--rule-hair) solid var(--color-graphite-2); background: var(--color-graphite-2); }
.map__col li + li { margin-top: 0; }
.map__col:last-of-type li { color: var(--color-accent-2); }
.map__lines { width: 100%; height: 224px; margin-top: var(--space-xl); overflow: visible; }
.map__lines path { fill: none; stroke: var(--color-graphite-glyph-3); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map__cap { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--color-graphite-muted); }

/* FAQ: rows */
.faq { padding-block: var(--section-gap-s) var(--section-gap); }
.faq__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap-columns); align-items: start; }
.faq__rows { margin: 0; border-top: var(--rule-hair) solid var(--color-rule-2); }
.faq__rows div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-columns); padding-block: var(--space-xl); border-bottom: var(--rule-hair) solid var(--color-rule); align-items: baseline; }
.faq__rows dt { font: 500 var(--text-title)/1.3 var(--font-display); }
.faq__rows dd { margin: 0; color: var(--color-ink-2); font-size: var(--text-lead); }
.fill { padding: 0 0.25em; border: 1px dashed color-mix(in oklch, var(--color-muted) 70%, transparent); border-radius: 3px; color: var(--color-muted); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Trial: band */
.trial { background: var(--color-paper-2); padding-block: var(--section-gap-s); border-top: var(--rule-hair) solid var(--color-rule); }
.trial__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-2xl); align-items: center; }
.trial__text { display: grid; gap: var(--space-xl); }
.signup { display: grid; gap: var(--space-md); max-width: 28rem; justify-items: start; }
.signup__field { display: grid; gap: var(--space-2xs); width: 100%; }
.signup label { font: 500 var(--text-sm)/1.3 var(--font-display); color: var(--color-ink-2); }
.signup input { width: 100%; min-height: 48px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-input); background: var(--color-paper); color: var(--color-ink); font-size: var(--text-md); outline: 2px solid transparent; outline-offset: -3px; }
.signup input:hover { border-color: var(--color-ink-2); }
.signup input:focus-visible { outline-color: var(--color-focus); }
.signup input[aria-invalid] { border-color: var(--color-error); }
.signup input:disabled { opacity: 0.55; cursor: not-allowed; }
.signup .key { margin-top: var(--space-xs); }
.signup__help { min-height: 1lh; font-size: var(--text-sm); color: var(--color-muted); }
.photo { aspect-ratio: 4 / 3; min-height: 440px; box-shadow: none; }
.photo > img { filter: grayscale(1) contrast(1.05); outline: 1px solid color-mix(in oklab, var(--color-ink) 8%, transparent); outline-offset: -1px; }
.photo::after { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--color-graphite); mix-blend-mode: screen; pointer-events: none; }

/* Footer: mast */
.foot { padding-block: var(--space-3xl) var(--space-xl); }
.foot__mark { font: 600 clamp(4rem, 9vw, 8rem)/1 var(--font-display); color: var(--color-ink); letter-spacing: 0.02em; }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-xl); margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.foot__links a { color: var(--color-ink-2); text-decoration-color: var(--color-rule-2); white-space: nowrap; }
.foot__links a:hover { color: var(--color-ink); text-decoration-color: var(--color-accent); }
.foot__links a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.foot__legal { margin-top: var(--space-xl); font-size: var(--text-sm); color: var(--color-muted); }

/* Under 60rem: everything stacks in reading order */
@media (max-width: 60rem) {
  .hero { min-height: 0; padding-block: var(--space-2xl); }
  .hero__grid, .flow__grid, .headblock--split, .view--phone, .import__grid, .faq__grid, .trial__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .flow__pin { position: static; }
  .flow__step, .flow__step:first-child { min-height: 0; padding-block: var(--space-md); }
  .flow__step::before, .flow__step:first-child::before { top: var(--space-md); translate: 0 0; }
  .phone { justify-self: start; }
  .faq__rows div { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
  .photo { min-height: 0; }
  .app, .app__shell { min-height: 0; }
}
@media (max-width: 40rem) {
  .nav__links { display: none; }
  .nav__row { justify-content: space-between; }
  .app__shell { grid-template-columns: minmax(0, 1fr); }
  .app__side, .col-code, .col-safe { display: none; }
  .app__main, .doc, .sheet, .map { padding: var(--space-md); }
  .app__bar { flex-wrap: wrap; }
  .field { margin-left: 0; }
  .grid-table td, .grid-table th { padding-inline: var(--space-xs); }
  .sheet { overflow-x: auto; }
  .tray--tabs .tray__key { padding: 0 var(--space-sm); }
  .tray--tabs { max-width: 100%; }
  .doc__head { flex-direction: column; }
  .doc__meta { text-align: left; }
  .map { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
  .map__col li { padding: 0 var(--space-xs); }
}
