/* 勾稽 Tieout — production design.
   World: an accounting room's paperwork. Paper ground, black ink, black leader cards between chapters,
   one vermilion (朱) for anything signed. Type: Noto Serif TC 900 supers / 400 text, Martian Mono figures.
   Switch device: the inverse slug (.slug) — one term set paper-on-black inside a line. */

:root {
  --paper: #ECEAE4;
  --sheet: #F8F7F3;
  --thermal: #F3F2EE;
  --ink: #121211;
  --ink-2: #4d4b46;
  --rule: rgba(18, 18, 17, .22);
  --rule-2: rgba(18, 18, 17, .1);
  --black: #0D0D0C;
  --on-black: #EFEDE7;
  --on-black-2: #a7a49c;
  --shu: #C8321B;
  --ground: var(--paper);
  --fg: var(--ink);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --mono: "Martian Mono", ui-monospace, "Noto Serif TC", monospace;
  --gut: clamp(16px, 6vw, 96px);
  --slate-h: 56px;
  color-scheme: light;
}
html { background: var(--paper); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--slate-h) + 8px); }
html[data-ground="dark"] { --ground: var(--black); --fg: var(--on-black); }
body {
  background: var(--paper); color: var(--ink);
  font: 400 18px/1.9 var(--serif);
  font-feature-settings: "palt" 0;
  text-rendering: optimizeLegibility;
  text-wrap: pretty; /* no one-character last lines in reading copy */
}
body::after { /* paper tooth: one finish for every surface */
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
h1, h2, h3, h4, p, ol, ul, dl, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
.mono { font-family: var(--mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: .5em 1em; }
.skip:focus { top: 12px; }

/* the switch device */
.slug { background: var(--ink); color: var(--paper); padding: .02em .32em .08em; margin: 0 .12em; font-weight: 600; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.slug.mono { font-weight: 500; }

/* ---------------- instruments ---------------- */
.slate {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80; height: var(--slate-h);
  display: flex; align-items: center; gap: 18px; padding: 0 var(--gut) 0 clamp(16px, 2.2vw, 32px);
  background: var(--ground); color: var(--fg); border-bottom: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
}
.mark { display: flex; align-items: center; gap: .45em; text-decoration: none; white-space: nowrap; }
.mark-tick { width: 18px; height: 18px; background: var(--fg); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M2 9.5l4.6 4.6L16 3.6' stroke='black' stroke-width='3' fill='none'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M2 9.5l4.6 4.6L16 3.6' stroke='black' stroke-width='3' fill='none'/%3E%3C/svg%3E") center/contain no-repeat; }
.mark-zh { font-weight: 900; font-size: 19px; letter-spacing: .06em; }
.mark-en { font-family: var(--mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.chap {
  display: flex; align-items: baseline; gap: .7em; min-height: 44px; padding: 0 .9em; margin-left: 6px;
  background: none; border: 0; border-left: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); color: inherit; font: inherit; cursor: pointer; white-space: nowrap;
}
.chap-no { font-weight: 900; font-size: 15px; letter-spacing: .08em; }
.chap-t { font-size: 14px; color: color-mix(in srgb, var(--fg) 72%, transparent); }
.chap-i { font-family: var(--mono); font-stretch: 87.5%; font-size: 10px; letter-spacing: .12em; border: 1px solid currentColor; padding: 0 .5em; line-height: 1.7; }
.toc { position: absolute; top: calc(var(--slate-h) - 1px); left: clamp(16px, 2.2vw, 32px); width: min(360px, calc(100vw - 32px)); background: var(--black); color: var(--on-black); padding: 18px 22px 20px; }
.toc-h { font-family: var(--mono); font-stretch: 87.5%; font-size: 10px; letter-spacing: .16em; color: var(--on-black-2); margin-bottom: 8px; }
.toc ol { display: grid; }
.toc a { display: flex; gap: 1em; padding: .42em 0; border-bottom: 1px solid rgba(239, 237, 231, .14); text-decoration: none; font-size: 16px; }
.toc a:hover b, .toc a:focus-visible b { background: var(--on-black); color: var(--black); }
.toc b { font-weight: 900; min-width: 4.2em; padding: 0 .2em; }
.nav-price { margin-left: auto; font-size: 14px; white-space: nowrap; text-decoration: none; border-bottom: 1px solid currentColor; line-height: 1.5; }
.seal-cta, .btn-seal {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.15em;
  background: var(--shu); color: #fff; text-decoration: none; font-weight: 900; letter-spacing: .08em; white-space: nowrap;
  box-shadow: inset 0 0 0 2px var(--shu), inset 0 0 0 4px rgba(255, 255, 255, .55);
}
.seal-cta { min-height: 38px; font-size: 15px; }
.seal-cta:hover, .btn-seal:hover { background: #a92813; box-shadow: inset 0 0 0 2px #a92813, inset 0 0 0 4px rgba(255, 255, 255, .7); }
.seal-cta:active, .btn-seal:active { transform: translateY(1px) rotate(-.6deg); }
.btn-line {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1em; color: inherit; text-decoration: none; font-weight: 600;
  border: 1px solid currentColor; white-space: nowrap;
}
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-text { color: inherit; font-size: 16px; white-space: nowrap; }

.rail { position: fixed; z-index: 70; right: clamp(8px, 1.4vw, 22px); top: calc(var(--slate-h) + 28px); bottom: calc(64px + var(--safe-bottom)); width: 14px; color: var(--fg); pointer-events: none; }
.rail-line { position: absolute; left: 6px; top: 0; bottom: 8px; width: 1px; background: color-mix(in srgb, var(--fg) 22%, transparent); }
.rail-fill { position: absolute; inset: 0; background: var(--fg); transform-origin: 50% 0; transform: scaleY(0); }
.rail-ticks { position: absolute; inset: 0 0 8px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; font: 900 10px/1 var(--serif); }
.rail-ticks i { font-style: normal; background: var(--ground); padding: 2px 0; opacity: .45; }
.rail-ticks i.on { opacity: 1; background: var(--fg); color: var(--ground); padding: 2px 1px; }
.rail-end { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; opacity: .5; }
.rail.closed .rail-end { opacity: 1; }

.status {
  position: fixed; z-index: 70; left: clamp(12px, 2.2vw, 32px); bottom: calc(14px + var(--safe-bottom));
  display: flex; align-items: center; gap: 0; color: var(--fg); background: var(--ground);
  font-family: var(--mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .04em; line-height: 1;
  border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); pointer-events: none;
}
.status > span { padding: 7px 9px; }
.status > span + span { border-left: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); }
.st-state { background: var(--fg); color: var(--ground); font-family: var(--serif); font-weight: 900; font-size: 12px; letter-spacing: .1em; }
.st-role:empty { display: none; }
.st-note { display: none; font-family: var(--serif); font-weight: 600; font-size: 12px; letter-spacing: .06em; }
.status.has-note .st-note { display: block; }
.no-js .status, .no-js .rail { display: none; }
@media (min-width: 761px) { .status { transition: opacity .15s; } .status.over-credits { opacity: 0; } } /* bottom-left over the disclaimer: step aside */

/* ---------------- 0 · hero ---------------- */
.hero .frame {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 21vw, 320px); grid-template-rows: auto 1fr auto; column-gap: 5vw;
  padding: calc(var(--slate-h) + 3.2svh) calc(var(--gut) + 18px) calc(5.5svh + var(--safe-bottom)) var(--gut); box-sizing: border-box;
}
.super { font-weight: 600; font-size: clamp(14px, 1.15vw, 17px); letter-spacing: .14em; }
.super .mono { font-size: .86em; letter-spacing: .02em; font-weight: 500; }
.hero-super { grid-column: 1; grid-row: 1; padding-top: .4em; border-top: 1px solid var(--ink); width: max-content; }
.hero-copy { grid-column: 1; grid-row: 3; align-self: end; max-width: 60rem; }
.eyebrow { font-size: clamp(15px, 1.2vw, 18px); font-weight: 600; letter-spacing: .1em; margin-bottom: .6em; color: var(--ink-2); }
.hero-h { font-weight: 900; font-size: min(11vw, 19svh); line-height: 1.08; letter-spacing: .01em; margin-left: -.06em; }
.hero-h .ln { display: block; white-space: nowrap; }
/* display type: full-width punctuation set half-width, so 「，」「。」 hang instead of leaving a hole */
.hero-h, .card-word, .final-h { font-feature-settings: "halt" 1; }
.ph { display: inline-block; } /* authored phrase breaks: a headline breaks between phrases, never inside a word */
.lede { margin-top: 1.1em; max-width: 30em; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.85; }
.ctas { margin-top: 1.4em; display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.ctas .btn-seal { min-height: 52px; font-size: 18px; padding: 0 1.4em; }
.ctas .btn-line { min-height: 52px; }
.micro { margin-top: 1em; display: flex; flex-wrap: wrap; gap: .3em 1.4em; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.micro span::before { content: "✓ "; font-family: var(--mono); }
.micro a { font-weight: 600; color: var(--ink); }
.fine { margin-top: .5em; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

.receipt-wrap { grid-column: 2; grid-row: 1 / 4; align-self: start; position: relative; padding-top: 2.2svh; }
.printer { position: relative; height: 18px; margin: 0 -14px; background: var(--ink); }
.printer span { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 2px; background: #3a3936; }
.receipt { margin: 0 6px; font-size: clamp(10px, min(1.02vw, 1.72svh), 15px); overflow: clip; }
.anim .receipt .paper { visibility: hidden; animation: paper-safety 0s 3s forwards; } /* the intro feeds it out; shown anyway if the script never runs */
@keyframes paper-safety { to { visibility: visible; } }
.paper {
  background: var(--thermal); color: #1d1c1a; text-align: center; padding: 1.6em 1.3em 1.2em;
  font-family: var(--mono); font-stretch: 87.5%; line-height: 1.5;
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 7px) no-repeat, radial-gradient(circle at 5px 0, transparent 3.2px, #000 3.6px) bottom/10px 7px repeat-x;
  mask: linear-gradient(#000 0 0) top/100% calc(100% - 7px) no-repeat, radial-gradient(circle at 5px 0, transparent 3.2px, #000 3.6px) bottom/10px 7px repeat-x;
}
.r-seller { font: 900 1.25em/1.3 var(--serif); letter-spacing: .2em; }
.r-title { font: 900 1.9em/1.25 var(--serif); letter-spacing: .06em; margin-top: .3em; }
.r-period { font-size: 1.55em; font-weight: 700; margin-top: .2em; }
.r-no { font-size: 1.95em; font-weight: 700; letter-spacing: .02em; line-height: 1.25; }
.r-time { margin-top: .5em; }
.r-row { display: flex; justify-content: space-between; gap: 1em; text-align: left; }
.r-small { font-family: var(--serif); font-size: .95em; }
.barcode { display: block; width: 100%; height: 3.2em; margin: .8em 0 .6em; }
.barcode rect, .qr rect { fill: #1d1c1a; }
.qrs { display: flex; justify-content: space-between; gap: 1em; }
.qr { width: 44%; aspect-ratio: 1; }
.r-foot { margin-top: .9em; font-size: .78em; letter-spacing: .1em; color: #6b6964; }

/* ---------------- chapter cards (black leader) ---------------- */
.card .frame { background: var(--black); color: var(--on-black); }
.card-h { font-weight: 900; }
.card-no { position: absolute; left: var(--gut); top: calc(var(--slate-h) + 7svh); font-size: clamp(18px, 1.9vw, 30px); letter-spacing: .3em; font-weight: 900; padding-bottom: .35em; border-bottom: 2px solid currentColor; }
.card-word {
  position: absolute; left: calc(var(--gut) - .04em); bottom: calc(6svh + var(--safe-bottom)); display: block;
  font-size: min(17vw, 52svh); line-height: .98; letter-spacing: 0; white-space: nowrap; transform: scaleX(.86); transform-origin: 0 100%;
}
.card-super { position: absolute; right: calc(var(--gut) + 10px); top: calc(var(--slate-h) + 7svh); writing-mode: vertical-rl; font-weight: 600; font-size: clamp(15px, 1.35vw, 21px); letter-spacing: .22em; line-height: 1.6; max-height: 70svh; }
.card-count { position: absolute; right: calc(var(--gut) + 10px); bottom: calc(6svh + var(--safe-bottom)); font-family: var(--mono); font-stretch: 87.5%; font-size: 12px; letter-spacing: .14em; color: var(--on-black-2); }
.card:not(.card-band) .card-word, .card:not(.card-band) .card-count { translate: 0 calc(var(--enter, 0) * -1 * var(--frame-h, 100lvh)); }

/* minor chapters: a strip of leader, not a full card */
html section.card-band[data-scene][data-flow] > .frame { min-height: min(58svh, 520px); position: relative; }
.card-band .card-no { top: 9svh; }
.card-band .card-super { top: 9svh; }
.card-band .card-word { font-size: min(12vw, 30svh); bottom: 5svh; }
.card-band .card-count { bottom: 5svh; }

/* ---------------- flow documents ---------------- */
.doc .frame, .final .frame { box-sizing: border-box; }
.doc .frame {
  display: grid; grid-template-columns: minmax(8rem, 17vw) minmax(0, 34em) minmax(0, 1fr); column-gap: 4.5vw; row-gap: 0;
  padding: calc(var(--slate-h) + 12svh) calc(var(--gut) + 18px) 14svh var(--gut);
}
.doc-short .frame { padding-bottom: 10svh; }
.col-side { grid-column: 1; grid-row: 1 / span 12; }
.side-h { position: sticky; top: calc(var(--slate-h) + 28px); font-weight: 900; font-size: clamp(17px, 1.45vw, 22px); line-height: 1.5; letter-spacing: .14em; padding-top: .5em; border-top: 2px solid var(--ink); }
.col-read { grid-column: 2; }
.doc-h { font-weight: 900; font-size: clamp(30px, 3.3vw, 52px); line-height: 1.3; letter-spacing: .02em; margin-bottom: .8em; text-wrap: balance; }
.col-read > p + p, .col-read > p + ol, .col-read > ol + p { margin-top: 1.05em; }
.kicker { font-family: var(--mono); font-stretch: 87.5%; font-size: 12px; letter-spacing: .16em; margin-bottom: 1em; color: var(--ink-2); }
.say { font-weight: 600; font-size: clamp(20px, 1.6vw, 24px); line-height: 1.75; }
.say.last { margin-top: 2.2em; }
.caption { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.knots { counter-reset: k; margin-top: 1.6em; border-top: 1px solid var(--rule); }
.knots li { counter-increment: k; position: relative; padding: 1.05em 0 1.05em 3.2em; border-bottom: 1px solid var(--rule); }
.knots li::before { content: counter(k, cjk-ideographic); position: absolute; left: 0; top: 1.05em; width: 2em; text-align: center; font-weight: 900; background: var(--ink); color: var(--paper); line-height: 1.75; }
.knots b { font-weight: 900; display: block; }
.total-rule { grid-column: 2; margin: 4.5em 0 0; height: 5px; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }

/* the wall: one month of invoice numbers */
.wall-fig { grid-column: 2 / -1; margin: 3.4em 0 0; }
.wall {
  height: min(64svh, 600px); overflow: hidden; position: relative;
  font-family: var(--mono); font-stretch: 75%; font-size: 10px; line-height: 15px; color: rgba(18, 18, 17, .5);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8.6em, 1fr)); column-gap: 1.2em; align-content: start;
  -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent);
  border-top: 1px solid var(--ink);
}
.wall span { white-space: nowrap; }
.wall .x { color: var(--ink); text-decoration: line-through; }
.wall .lead { background: var(--ink); color: var(--paper); font-weight: 700; padding: 0 .2em; outline: 3px solid var(--paper); }
.wall-cap { display: flex; flex-wrap: wrap; gap: .2em 0; margin-top: .9em; font-size: 15px; font-weight: 600; }
.wall-cap span + span::before { content: "｜"; color: var(--ink-2); }
.no-js .wall { height: 120px; background: repeating-linear-gradient(transparent 0 14px, var(--rule-2) 14px 15px); }

/* ---------------- 4 · the close (set piece) ---------------- */
.close .frame { background: var(--paper); }
.close .dark { position: absolute; inset: 0; background: var(--black); opacity: 0; pointer-events: none; }
.steps { position: relative; }
.step {
  display: grid; grid-template-columns: minmax(0, 36fr) minmax(0, 50fr); column-gap: 5vw; align-items: center;
  padding: 0 calc(var(--gut) + 20px) 0 var(--gut); box-sizing: border-box;
}
.anim .close .steps { position: absolute; inset: 0; }
.anim .close .step { position: absolute; inset: calc(var(--slate-h) + 3svh) 0 calc(5svh + 96px + var(--safe-bottom)); }
.anim .close .step:not([data-step="1"]) { visibility: hidden; }
.plate { max-width: 34rem; }
.when { display: flex; align-items: baseline; gap: .7em; font-family: var(--mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; }
.when .d { font-family: var(--serif); font-weight: 900; font-size: clamp(16px, 1.5vw, 22px); letter-spacing: .16em; }
.when .t { font-size: min(6.2vw, 11svh); font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.what { display: inline-block; margin-top: .3em; background: var(--ink); color: var(--paper); font-weight: 900; font-size: min(3.6vw, 6.4svh); line-height: 1.25; padding: .08em .34em .14em; letter-spacing: .04em; }
.desc { margin-top: 1em; max-width: 23em; font-size: clamp(16px, min(1.25vw, 2.6svh), 19px); line-height: 1.85; }
.odo { margin-top: .9em; font-family: var(--mono); font-stretch: 87.5%; font-size: min(3.4vw, 6svh); font-weight: 600; line-height: 1.1; }
.odo-sub { font-size: 14px; color: var(--ink-2); margin-top: .2em; }

.sheet {
  background: var(--sheet); color: var(--ink); padding: clamp(14px, 2.2svh, 26px) clamp(16px, 1.8vw, 28px);
  font-size: clamp(13px, min(1.05vw, 2.2svh), 16px); line-height: 1.6; max-height: 64svh; overflow: hidden; box-sizing: border-box;
  border: 1px solid var(--rule); position: relative;
}
.sh-h { display: flex; justify-content: space-between; gap: 1em; font-family: var(--mono); font-stretch: 87.5%; font-size: .82em; letter-spacing: .04em; color: var(--ink-2); padding-bottom: .7em; border-bottom: 1px solid var(--ink); margin-bottom: .4em; }
.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger th { font-weight: 600; text-align: left; font-size: .82em; color: var(--ink-2); padding: .5em .4em; border-bottom: 1px solid var(--rule); }
.ledger td { padding: .52em .4em; border-bottom: 1px solid var(--rule-2); }
.ledger td:first-child { font-family: var(--mono); font-stretch: 87.5%; font-size: .9em; }
.ledger .n { text-align: right; font-family: var(--mono); font-stretch: 87.5%; }
.ledger tr.is-lead td { background: var(--ink); color: var(--paper); }
.sh-foot { margin-top: .7em; font-size: .82em; color: var(--ink-2); font-family: var(--mono); font-stretch: 87.5%; }

.sh-match { display: grid; grid-template-columns: 1fr minmax(40px, 16%) 1fr; align-items: start; }
.mcol { font-family: var(--mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; }
.mh { font-family: var(--serif); font-weight: 900; font-size: .9em; letter-spacing: .2em; height: 2.6em; display: flex; align-items: center; border-bottom: 1px solid var(--ink); }
.mr { display: flex; justify-content: space-between; align-items: center; gap: .6em; height: 2.62em; border-bottom: 1px solid var(--rule-2); white-space: nowrap; font-size: .95em; }
.mr b { font-weight: 600; }
.mr i { font-style: normal; font-weight: 700; }
.mr i.slug { font-size: .82em; font-family: var(--serif); font-weight: 900; }
.mr.is-lead { font-weight: 700; }
.mcol:last-child .mr { justify-content: flex-end; }
.mcol:last-child .mr i { margin-right: auto; }
.mlines { width: 100%; height: calc(2.62em * 6 + 2.6em); display: block; }
.mlines path { fill: none; stroke: var(--ink); stroke-width: 1.4px; }
.mlines .lead-line { stroke-width: 3px; stroke-dasharray: 4 3; }

.sh-diff { font-size: clamp(14px, min(1.2vw, 2.4svh), 18px); }
.diff { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--ink); margin: .4em 0 1em; }
.diff div { padding: .6em 0; }
.diff dt { font-size: .8em; color: var(--ink-2); letter-spacing: .14em; }
.diff dd { margin: 0; font-family: var(--mono); font-stretch: 87.5%; font-size: min(2.6vw, 5svh); font-weight: 600; line-height: 1.2; }
.diff .dz dd { background: var(--ink); color: var(--paper); display: inline-block; padding: 0 .25em; }
.why { color: var(--ink-2); }
.sugg { display: flex; justify-content: space-between; margin-top: .9em; padding: .6em .8em; border: 1px dashed var(--ink); font-weight: 600; }
.sugg span:last-child { font-family: var(--mono); font-stretch: 87.5%; }
.ok { display: flex; align-items: center; gap: 1em; margin-top: 1em; }
.okbox { border: 2px solid var(--ink); padding: .1em .6em; font-weight: 900; }
.okby { font-size: .82em; color: var(--ink-2); font-family: var(--mono); font-stretch: 87.5%; }

.sh-voucher { font-size: clamp(14px, min(1.15vw, 2.4svh), 17px); }
.v-title { text-align: center; font-weight: 900; font-size: 1.5em; letter-spacing: .5em; text-indent: .5em; border-bottom: 3px double var(--ink); width: max-content; margin: 0 auto .5em; padding: 0 .4em; }
.v-memo { margin: .4em 0 .6em; }
.v-lines { border-top: 1px solid var(--ink); }
.vl, .v-total { display: grid; grid-template-columns: 2.2em 1fr 7em 7em; align-items: center; border-bottom: 1px solid var(--rule); padding: .5em 0; }
.vl .amt { grid-column: 3; text-align: right; font-family: var(--mono); font-stretch: 87.5%; }
.vl.cr .amt { grid-column: 4; }
.vl.cr .acc { padding-left: 1.4em; }
.dc { font-weight: 900; }
.v-total { border-bottom: 0; font-weight: 900; position: relative; }
.v-total span:first-child { grid-column: 1 / 3; letter-spacing: .4em; }
.v-total .amt { text-align: right; font-family: var(--mono); font-stretch: 87.5%; }
.v-total::after { content: ""; position: absolute; left: calc(100% - 14em); right: 0; bottom: -2px; height: 5px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform-origin: 0 50%; transform: scaleX(var(--dbl, 1)); }
.v-att { margin-top: 1.1em; font-size: .8em; color: var(--ink-2); }
.v-hint { margin-top: .5em; font-size: .8em; font-weight: 600; }
.v-hint::before { content: "↗ "; font-family: var(--mono); }
.trace { font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px dotted color-mix(in srgb, var(--ink) 60%, transparent); padding: .1em 0 .05em; margin: 0; cursor: pointer; min-height: 32px; }
.trace:focus-visible { outline: none; }
.trace-fx { font-family: var(--mono); font-stretch: 87.5%; font-weight: 600; }
/* select-box draws its label in a system sans; in this world the label is a filing slip set in the page's mono */
.trace .tfx-stage span[style*="ui-sans-serif"] { font-family: "Martian Mono", "Noto Serif TC", serif !important; font-stretch: 87.5% !important; font-weight: 500 !important; border-radius: 0 !important; z-index: 2; }

.sh-review { font-size: clamp(14px, min(1.1vw, 2.3svh), 17px); }
.rv-list li { display: flex; justify-content: space-between; padding: .55em 0; border-bottom: 1px solid var(--rule-2); font-family: var(--mono); font-stretch: 87.5%; font-size: .9em; }
.rv-list li i { font-style: normal; font-weight: 700; }
.rv-list li.is-lead { background: var(--ink); color: var(--paper); padding-inline: .5em; }
.note { margin: 1.2em 0 0 2.6em; padding: .9em 1.1em; border-left: 3px solid var(--ink); background: var(--paper); position: relative; }
.note p { font-weight: 600; }
.note footer { margin-top: .4em; font-size: .8em; color: var(--ink-2); font-family: var(--mono); font-stretch: 87.5%; }

.sh-approve { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2em; align-items: center; background: transparent; border: 0; padding: 0; overflow: visible; }
.phone { background: var(--black); color: var(--on-black); border-radius: 26px; padding: 2.4em 1.3em 2em; width: min(17em, 100%); justify-self: center; font-size: clamp(13px, min(1.05vw, 2.1svh), 16px); box-shadow: inset 0 0 0 6px #232321; }
.ph-h { font-weight: 900; letter-spacing: .1em; padding-bottom: .6em; border-bottom: 1px solid rgba(239, 237, 231, .3); margin-bottom: .4em; }
.ph-r { display: flex; justify-content: space-between; padding: .55em 0; border-bottom: 1px solid rgba(239, 237, 231, .12); }
.ph-r b { font-family: var(--mono); font-stretch: 87.5%; font-weight: 500; }
.seals3 { display: grid; gap: .9em; }
.s3 { display: grid; grid-template-columns: 3.6em 4.4em; align-items: center; gap: .5em; font-size: clamp(14px, min(1.1vw, 2.2svh), 17px); }
.s3-k { font-weight: 900; letter-spacing: .2em; }
.s3-v { width: 4.4em; height: 4.4em; display: grid; place-items: center; border: 1px dashed var(--ink); font: 900 1.5em/1 var(--serif); }
.s3 .s3-v { font-size: 1em; }
.s3-v::after { content: ""; }
.s3 .s3-v { color: var(--ink); }
.s3.signed .s3-v, .s3:not(.s3-last) .s3-v { border: 2px solid var(--ink); }
.s3-last .s3-v { background: var(--shu); color: #fff; border: 0; box-shadow: inset 0 0 0 3px var(--shu), inset 0 0 0 5px rgba(255,255,255,.55); font-size: 1.4em; }

.sh-ledger { overflow: visible; }
.lg-sum td:nth-child(2) { font-weight: 600; }
.verdict-wrap { position: absolute; right: 6%; bottom: 8%; margin: 0; pointer-events: none; }
.verdict { font: 900 min(6.4vw, 12svh)/1 var(--serif); color: var(--shu); display: inline-block; }
.no-js .verdict, .rm .verdict { border: .085em solid var(--shu); padding: .06em .26em .1em; transform: rotate(-8deg); }

.steprail { position: absolute; left: var(--gut); right: calc(var(--gut) + 20px); bottom: calc(3svh + 46px + var(--safe-bottom)); display: flex; gap: 0; border-top: 1px solid var(--ink); counter-reset: s; color: var(--ink); }
.steprail li { flex: 1; padding-top: .6em; font-size: 13px; letter-spacing: .12em; font-weight: 600; opacity: .4; display: flex; align-items: center; gap: .5em; white-space: nowrap; }
.steprail li i { font-style: normal; font-family: var(--mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: 0; width: 1.9em; height: 1.9em; display: grid; place-items: center; border: 1px solid currentColor; }
.steprail li[data-s="done"] { opacity: .75; }
.steprail li i { position: relative; }
.steprail li[data-s="done"] i { color: transparent; }
.steprail li[data-s="done"] i::before { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); }
.close[data-dark="1"] .steprail li[data-s="done"] i::before { color: var(--on-black); }
.steprail li[data-s="done"] i { border-color: var(--ink); }
.steprail li[data-s="on"] { opacity: 1; }
.steprail li[data-s="on"] i { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.close-note { position: absolute; right: calc(var(--gut) + 20px); bottom: calc(3svh + 18px + var(--safe-bottom)); font-size: 12px; color: var(--ink-2); }
.close[data-dark="1"] .dark { opacity: 1; }
.close[data-dark="1"] .plate, .close[data-dark="1"] .steprail, .close[data-dark="1"] .close-note { color: var(--on-black); }
.close[data-dark="1"] .what { background: var(--on-black); color: var(--black); }
.close[data-dark="1"] .steprail { border-top-color: var(--on-black); }
.close[data-dark="1"] .steprail li[data-s="on"] i { background: var(--on-black); border-color: var(--on-black); color: var(--black); }
.close[data-dark="1"] .steprail li[data-s="done"] i { border-color: var(--on-black); }

/* the close without the reel: a plain sequence of steps */
.no-js .close .frame, .rm .close .frame { padding: calc(var(--slate-h) + 6svh) 0 8svh; }
.no-js .close .step, .rm .close .step { padding-block: 5svh; border-top: 1px solid var(--rule); }
.no-js .close .steprail, .rm .close .steprail { display: none; }
.no-js .close-note, .rm .close-note { position: static; padding: 2em var(--gut) 0; }

/* ---------------- 6 · the seat ---------------- */
.signsheet { grid-column: 2 / -1; margin-top: 2.6em; background: var(--sheet); border: 1px solid var(--rule); padding: 1.4em clamp(16px, 2vw, 32px) 1.6em; max-width: 58rem; }
.ss-h { display: flex; justify-content: space-between; font-weight: 900; letter-spacing: .14em; border-bottom: 3px double var(--ink); padding-bottom: .5em; }
.ss-co { font-weight: 400; font-size: 14px; letter-spacing: .04em; color: var(--ink-2); }
.ss-boxes { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--ink); margin-top: 1.1em; }
.ss-box { border-right: 1px solid var(--ink); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: .8em 1em 1em; display: grid; justify-items: center; gap: .4em; position: relative; }
.ss-k { font-weight: 900; letter-spacing: .4em; text-indent: .4em; font-size: 20px; justify-self: stretch; text-align: center; border-bottom: 1px solid var(--rule); padding-bottom: .3em; }
.ss-who { font-size: 14px; color: var(--ink-2); }
.ss-seal { width: 5.4em; height: 5.4em; display: grid; place-items: center; border: 1px dashed var(--rule); }
.ss-seal span { opacity: 0; display: grid; place-items: center; width: 100%; height: 100%; background: var(--shu); color: #fff; font: 900 18px/1.1 var(--serif); letter-spacing: .06em; writing-mode: vertical-rl; box-shadow: inset 0 0 0 3px var(--shu), inset 0 0 0 5px rgba(255,255,255,.6); }
.ss-box.is-sealed .ss-seal { border-color: transparent; }
.ss-btn { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ss-hold { position: absolute; left: -1px; bottom: -1px; height: 4px; width: calc(var(--h, 0) * (100% + 2px)); background: var(--shu); pointer-events: none; }
.ss-box.is-pressing:not(.is-sealed) .ss-seal span { opacity: calc(var(--h, 0) * .85); transform: scale(calc(1.32 - var(--h, 0) * .32)) rotate(-3deg); }
.ss-box.is-pressing .ss-seal { border-color: var(--shu); }
.ss-box.is-sealed .ss-seal span { opacity: 1; }
.ss-btn { min-height: 44px; padding: 0 1em; background: transparent; border: 1px solid var(--ink); color: var(--ink); font: 600 15px/1 var(--serif); cursor: pointer; }
.ss-btn:hover { background: var(--ink); color: var(--paper); }
.ss-box.is-sealed .ss-btn { background: var(--ink); color: var(--paper); }
.ss-ask { margin-top: 1em; font-weight: 600; }
.roles { grid-column: 2 / -1; display: flex; flex-direction: column; margin-top: 3em; border-top: 2px solid var(--ink); max-width: 64rem; }
.role { display: grid; grid-template-columns: minmax(0, 19em) minmax(0, 1fr); gap: 2.5vw; padding: 1.5em 0; border-bottom: 1px solid var(--rule); }
.role h4 { font-weight: 900; font-size: clamp(19px, 1.5vw, 23px); line-height: 1.5; }
.role-you { display: none; }
.role.is-you .role-you { display: inline-block; margin-right: .5em; background: var(--shu); color: #fff; font-size: .7em; padding: .1em .45em; vertical-align: .15em; letter-spacing: .1em; }
.role ul li { position: relative; padding-left: 1.4em; }
.role ul li + li { margin-top: .45em; }
.role ul li::before { content: "✓"; position: absolute; left: 0; font-family: var(--mono); font-weight: 700; }
.role[data-role="owner"] { order: var(--o-owner, 1); }
.role[data-role="acct"] { order: var(--o-acct, 2); }
.role[data-role="cpa"] { order: var(--o-cpa, 3); }
.mid-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 2.6em; }

/* ---------------- 4b · the estimate: one sheet under the light in the dark room ---------------- */
.tally .frame { background: var(--black); color: var(--on-black); }
.tally .side-h { border-top-color: var(--on-black); }
.tally .frame { padding-bottom: 16svh; }
.calc { grid-column: 2 / -1; margin-top: 2.4em; max-width: 46rem; background: var(--sheet); color: var(--ink); padding: 1.4em clamp(16px, 2.2vw, 36px) 1.6em; }
.calc-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; letter-spacing: .3em; font-size: 20px; border-bottom: 3px double var(--ink); padding-bottom: .4em; }
.calc-co { font-weight: 400; font-size: 13px; letter-spacing: .06em; color: var(--ink-2); }
.calc-in { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr); align-items: center; gap: 1em; padding: 1em 0; border-bottom: 1px solid var(--ink); font-weight: 600; }
.calc-box { display: flex; align-items: center; gap: .5em; }
.calc-box input { width: 100%; max-width: 9em; min-height: 52px; padding: 0 .5em; box-sizing: border-box; border: 0; border-bottom: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 600 26px/1 var(--mono); font-stretch: 87.5%; text-align: right; border-radius: 0; }
.calc-box input:focus-visible { outline: 2px solid var(--shu); outline-offset: 0; }
.calc-box i { font-style: normal; }
.calc-out > div { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr); align-items: center; gap: 1em; padding: .75em 0; border-bottom: 1px solid var(--rule); }
.calc-out > div:last-child { border-bottom: 3px double var(--ink); }
.calc-out dt { font-weight: 600; color: var(--ink-2); letter-spacing: .1em; }
.calc-out dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .1em .2em; }
.co-plan { font-size: 30px; font-weight: 900; line-height: 1.3; }
.flap-w { display: inline-flex; font-weight: 900; }
.co-fee { font-size: 30px; font-weight: 600; line-height: 1.3; }
.co-cur { font-family: var(--mono); font-stretch: 87.5%; font-size: .52em; }
.co-bill { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-left: .3em; }
.co-chk { font-size: 19px; font-weight: 600; }
.co-chk b { font-family: var(--mono); font-stretch: 87.5%; font-size: 1.35em; font-weight: 600; }
.calc-warn { margin-top: .9em; font-weight: 600; font-size: 15px; padding-left: .8em; border-left: 3px solid var(--shu); }
.calc-note { margin-top: 1em; font-size: 14px; color: var(--ink-2); line-height: 1.75; }
.calc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 1.4em; }

/* ---------------- 8 · integrations: pipes into one ledger ---------------- */
.pipes { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 30em) minmax(60px, 1fr) minmax(10em, 15em); margin-top: 2.6em; max-width: 72rem; }
.sources { border-top: 1px solid var(--ink); }
.sources li { height: 6.6rem; display: flex; align-items: center; border-bottom: 1px solid var(--rule); line-height: 1.7; }
.sources b { font-weight: 900; margin-right: .1em; }
.pipe-svg { width: 100%; height: calc(6.6rem * 6 + 1px); }
.pipe-svg path { fill: none; stroke: var(--ink); stroke-width: 1.2px; vector-effect: non-scaling-stroke; }
.onebook { align-self: center; background: var(--ink); color: var(--paper); padding: 1.2em 1.1em 1.3em; }
.ob-k { font-weight: 900; font-size: clamp(26px, 2.6vw, 40px); letter-spacing: .1em; line-height: 1.2; border-bottom: 3px double var(--paper); padding-bottom: .2em; }
.ob-v { margin-top: .6em; font-size: 14px; letter-spacing: .1em; }
.pipes + .col-read { margin-top: 1.4em; }

/* ---------------- 10 · security articles ---------------- */
.articles { counter-reset: a; border-top: 1px solid var(--ink); }
.articles li { counter-increment: a; display: grid; grid-template-columns: 5.6em 1fr; padding: 1em 0; border-bottom: 1px solid var(--rule); }
.articles li::before { content: "第 " counter(a) " 條"; font-weight: 900; letter-spacing: .06em; white-space: nowrap; }

/* ---------------- 12 · migration ---------------- */
.gantt { grid-column: 2 / -1; margin-top: 2.6em; max-width: 64rem; border-top: 1px solid var(--ink);
  background: linear-gradient(90deg, transparent calc(14em - 1px), var(--rule) calc(14em - 1px) 14em, transparent 14em) , none; }
.gantt li { display: grid; grid-template-columns: 14em minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0; padding: 1.2em 0 1.3em; border-bottom: 1px solid var(--rule); }
.g-k { grid-row: 1 / 3; font-weight: 900; font-size: 19px; padding-right: 1em; }
.g-k .mono { font-weight: 600; font-size: .8em; }
.g-bar { height: 14px; width: calc(100% / 3); margin-left: calc((var(--w) - 1) * 100% / 3); background: var(--ink); background-image: repeating-linear-gradient(90deg, transparent 0 calc(100% / 5 - 1px), var(--paper) calc(100% / 5 - 1px) calc(100% / 5)); align-self: center; }
.g-d { margin-top: .6em; padding-left: 0; max-width: 34em; }

/* ---------------- 14 · prices ---------------- */
.bill { display: inline-flex; margin-top: .4em; border: 1px solid var(--ink); }
.bill-b { min-height: 44px; padding: 0 1.1em; background: transparent; border: 0; color: var(--ink); font: 600 16px/1 var(--serif); cursor: pointer; }
.bill-b + .bill-b { border-left: 1px solid var(--ink); }
.bill-b[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.plans { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.4em; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); max-width: 76rem; }
.plan { padding: 1.6em 1.6em 1.8em; display: flex; flex-direction: column; gap: .7em; position: relative; }
.plan + .plan { border-left: 1px solid var(--rule); }
.plan-rec { background: var(--sheet); box-shadow: inset 0 4px 0 var(--ink); }
.rec { position: absolute; top: -1.05em; left: 1.4em; font-size: 14px; }
.plan h4 { font-weight: 900; font-size: clamp(26px, 2.2vw, 34px); letter-spacing: .14em; line-height: 1.2; }
.fit { color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.price { display: grid; border-bottom: 1px solid var(--rule); padding-bottom: .5em; }
.price > span { font-family: var(--mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; }
.price > span:not(.pfig) { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.price b { font-weight: 600; }
.price .py, html[data-bill="m"] .price .pm { color: var(--ink); }
html[data-bill="m"] .price .py { color: var(--ink-2); }
.price .pm::before { content: "月繳 "; }
/* the figures board: ink tiles, paper figures (the inverse slug as a split-flap) */
.pfig { display: flex; align-items: baseline; gap: .12em; margin-bottom: .35em; font-size: clamp(25px, 2.15vw, 34px); font-weight: 600; line-height: 1.3; color: var(--ink); white-space: nowrap; }
.pf-cur { font-size: .52em; letter-spacing: .02em; align-self: center; }
.pf-u { font-family: var(--serif); font-weight: 600; font-size: .5em; align-self: center; margin-left: .2em; }
.flap-n { display: inline-flex; align-items: center; font-family: var(--mono); font-stretch: 87.5%; font-weight: 600; font-variant-numeric: tabular-nums; }
.flap-n, .flap-w { color: var(--ink); }
.no-js .flap-n, .no-js .flap-w { background: var(--ink); color: var(--sheet); padding: 0 .15em; }
.lim { font-size: 15px; line-height: 1.7; }
.inc { font-size: 16px; line-height: 1.75; }
.plan-cta { margin-top: auto; padding-top: .8em; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.anchor { margin-top: 2em; padding: 1em 1.2em; border-left: 3px solid var(--ink); background: var(--sheet); font-size: 17px; }
.role-note { margin-top: 2em; font-weight: 600; }
.role-note::before { content: "您的位子"; background: var(--shu); color: #fff; font-size: .78em; padding: .1em .45em; margin-right: .6em; letter-spacing: .1em; }
.table-wrap { grid-column: 2 / -1; margin-top: 2.6em; max-width: 76rem; overflow-x: auto; }
.compare { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.compare th, .compare td { padding: .62em .8em; border-bottom: 1px solid var(--rule); text-align: center; }
.compare thead th { font-weight: 900; letter-spacing: .14em; border-bottom: 1px solid var(--ink); }
.compare tbody th { text-align: left; font-weight: 600; }
.compare td { font-family: var(--mono); font-stretch: 87.5%; font-size: 15px; }
.compare .c-rec { background: var(--sheet); }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 3px double var(--ink); }

/* ---------------- 16 · case files ---------------- */
.files { grid-column: 2 / -1; margin-top: 2em; max-width: 76rem; border-top: 2px solid var(--ink); }
.file { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr) minmax(0, 14em); gap: 3vw; padding: 2em 0 2.2em; border-bottom: 1px solid var(--rule); align-items: start; }
.f-where { font-weight: 900; line-height: 1.6; letter-spacing: .06em; padding-top: .2em; }
.f-q p { font-size: clamp(19px, 1.5vw, 23px); line-height: 1.8; font-weight: 600; }
.f-q p::before { content: "「"; margin-left: -1em; }
.f-q p::after { content: "」"; }
.f-q footer { margin-top: .7em; font-size: 15px; color: var(--ink-2); }
.f-fig { font-family: var(--mono); font-stretch: 87.5%; display: grid; gap: .1em; }
.f-k { font-family: var(--serif); font-size: 14px; color: var(--ink-2); }
.f-a { font-size: 16px; text-decoration: line-through; color: var(--ink-2); }
.f-arrow { display: none; }
.f-b { font-size: clamp(26px, 2.2vw, 34px); font-weight: 600; line-height: 1.15; }

/* ---------------- 18 · FAQ ---------------- */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 2.4em 1fr 1.4em; align-items: start; padding: 1em 0; font-weight: 600; font-size: 19px; line-height: 1.6; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "問"; font-weight: 900; font-size: 15px; width: 1.75em; height: 1.75em; display: grid; place-items: center; background: var(--ink); color: var(--paper); margin-top: .15em; }
.faq summary::after { content: "＋"; font-family: var(--mono); text-align: right; }
.faq details[open] summary::after { content: "－"; }
.faq details p { position: relative; padding: 0 0 1.3em; margin-left: 2.4em; }
.faq details p::before { content: "答"; position: absolute; left: -2.4em; top: .1em; font-weight: 900; font-size: 15px; width: 1.75em; height: 1.75em; display: grid; place-items: center; border: 1px solid var(--ink); }

/* ---------------- 19 · final card, form, credits ---------------- */
.final .frame { background: var(--black); color: var(--on-black); padding: 0 calc(var(--gut) + 18px) calc(4svh + var(--safe-bottom)) var(--gut); }
.final-card { min-height: 100svh; display: grid; grid-template-rows: auto auto 1fr auto auto; padding-top: calc(var(--slate-h) + 7svh); box-sizing: border-box; padding-bottom: 8svh; }
.f-no { position: static; width: max-content; font-size: clamp(18px, 1.9vw, 30px); letter-spacing: .3em; font-weight: 900; padding-bottom: .35em; border-bottom: 2px solid currentColor; }
.filed { margin-top: 2.4em; display: flex; flex-wrap: wrap; gap: .4em 1.2em; align-items: center; font-size: 12px; color: var(--on-black-2); }
.slug-w { background: var(--on-black); color: var(--black); font-weight: 900; padding: .1em .45em; letter-spacing: .12em; font-size: 13px; }
.final-h { grid-row: 4; font-weight: 900; font-size: min(11.5vw, 21svh); line-height: 1.06; letter-spacing: .01em; margin-left: -.06em; }
.final-h .ln { display: block; white-space: nowrap; }
.final-lede { grid-row: 5; margin-top: 1.2em; max-width: 30em; font-size: clamp(17px, 1.3vw, 20px); color: var(--on-black); }
/* the demo request as a 申請單: a voucher's title, ruled rows with the labels in the caption column, figures in
   mono, the seat's box, a double rule like a voucher total, and the vermilion seal block as the submit */
.book { background: var(--sheet); color: var(--ink); max-width: 46rem; padding: 1.8em clamp(18px, 2.4vw, 40px) 2em; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: row dense; column-gap: 1.6em; }
.book > * { grid-column: 1 / -1; }
.book-h { justify-self: center; font-weight: 900; font-size: 26px; letter-spacing: .5em; text-indent: .5em; border-bottom: 3px double var(--ink); padding: 0 .4em .15em; margin-bottom: 1em; }
.book label { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--rule); font-size: 15px; font-weight: 600; }
.book-h + label { border-top: 1px solid var(--ink); }
.book label > span:first-child { display: flex; align-items: center; padding: .5em 1em .5em 0; border-right: 1px solid var(--rule); font-weight: 900; letter-spacing: .14em; }
.book label:focus-within { background: color-mix(in srgb, var(--paper) 70%, transparent); }
.book label:last-of-type { border-bottom: 4px double var(--ink); }
.book input, .book select { min-width: 0; min-height: 54px; padding: 0 .9em; border: 0; background: transparent; font: 400 17px/1.2 var(--serif); color: var(--ink); border-radius: 0; }
.book input[type="email"], .book select[name="volume"] { font-family: var(--mono); font-stretch: 87.5%; font-size: 15px; font-variant-numeric: tabular-nums; }
.book input:focus-visible, .book select:focus-visible { outline: 2px solid var(--shu); outline-offset: -2px; }
.book input[aria-invalid="true"] { box-shadow: inset 0 -2px 0 var(--shu); }
.book label:has([aria-invalid="true"]) > span:first-child { color: var(--shu); }
.bk-role { grid-template-columns: minmax(0, 9em) minmax(0, 1fr) auto !important; }
.book-seal { align-self: center; width: 46px; height: 46px; margin: 4px 0 4px .6em; box-sizing: border-box; border: 1px dashed var(--rule); display: grid; place-items: center; font: 900 12px/1.05 var(--serif); letter-spacing: .04em; writing-mode: vertical-rl; color: transparent; }
.bk-role.is-stamped .book-seal { border: 0; background: var(--shu); color: #fff; box-shadow: inset 0 0 0 2px var(--shu), inset 0 0 0 4px rgba(255, 255, 255, .6); transform: rotate(-3deg); }
.book-go { grid-column: 2; align-self: center; margin-top: 1.3em; min-height: 64px; min-width: 7.6em; font-size: 20px; letter-spacing: .3em; text-indent: .3em; padding: 0 1.3em; border: 0; cursor: pointer; font-family: var(--serif); box-shadow: inset 0 0 0 3px var(--shu), inset 0 0 0 5px rgba(255, 255, 255, .55); }
.book-go:hover { box-shadow: inset 0 0 0 3px #a92813, inset 0 0 0 5px rgba(255, 255, 255, .7); }
.book-after, .book-alt, .book-done { font-size: 15px; line-height: 1.7; }
.book-after { grid-column: 1; align-self: center; margin-top: 1.3em; color: var(--ink-2); }
.book-done, .book-alt { margin-top: 1em; }
.book-alt a { white-space: nowrap; }
.book-done { padding: .8em 1em; border: 2px solid var(--ink); font-weight: 600; }
.credits { margin-top: 12svh; max-width: 64rem; font-size: 14px; color: var(--on-black-2); line-height: 1.8; }
.cr-total { display: flex; justify-content: space-between; color: var(--on-black); font-weight: 900; font-size: 16px; padding: .6em 0; border-top: 1px solid var(--on-black); border-bottom: 4px double var(--on-black); margin-bottom: 1.2em; }
.credits p + p { margin-top: .6em; }
.cr-links { display: flex; gap: 1.6em; padding-bottom: 10svh; }
.cr-links a { color: var(--on-black); }

/* ---------------- phone and narrow frames ---------------- */
@media (max-width: 980px) {
  .doc .frame { grid-template-columns: minmax(0, 1fr); padding: calc(var(--slate-h) + 8svh) var(--gut) 10svh; }
  .col-side { grid-row: auto; grid-column: 1; margin-bottom: 1.6em; }
  .side-h { position: static; display: inline-block; font-size: 15px; }
  .side-h br { display: none; }
  .col-read, .wall-fig, .signsheet, .roles, .pipes, .gantt, .plans, .table-wrap, .files, .total-rule, .calc { grid-column: 1; }
  .file { grid-template-columns: 1fr; gap: .8em; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--rule); }
  .plan-rec { margin-top: 1.4em; }
  .role { grid-template-columns: 1fr; gap: .6em; }
  .pipes { grid-template-columns: 1fr; }
  .pipe-svg { display: none; }
  .sources li { height: auto; padding: .8em 0; display: block; }
  .onebook { margin-top: 1.2em; }
  .gantt { background: none; }
  .gantt li { grid-template-columns: 1fr; }
  .g-k { grid-row: auto; margin-bottom: .4em; }
  .g-bar { width: calc(100% / 3); }
}
@media (max-width: 760px) {
  body { font-size: 17px; line-height: 1.85; }
  :root { --slate-h: 76px; --slip-h: 24px; } /* header: 52px of instruments, then the invoice's status line */
  .slate { gap: 8px; padding: 0 12px var(--slip-h); box-sizing: border-box; }
  .mark-en, .nav-price, .chap-i { display: none; }
  .chap { padding: 0 .6em; margin-left: 0; min-width: 0; overflow: hidden; }
  .chap-t { overflow: hidden; text-overflow: ellipsis; max-width: 7.5em; }
  .seal-cta { margin-left: auto; padding: 0 .8em; font-size: 14px; }
  .rail { right: 4px; width: 8px; }
  .rail-ticks { display: none; }
  .rail-line { left: 3px; }
  .rail-end { display: none; }
  .status { font-size: 10px; left: 0; right: 0; top: calc(var(--slate-h) - var(--slip-h)); bottom: auto; height: var(--slip-h); z-index: 81; padding: 0 12px; border-width: 1px 0; box-sizing: border-box; }
  .status > span { padding: 0 7px; height: 100%; display: flex; align-items: center; }
  .status > span:first-child { padding-left: 0; }
  .st-time { display: none; }

  [data-scene].hero > .frame { position: relative; height: auto; min-height: 100svh; overflow: visible; }
  .hero .frame { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; padding: calc(var(--slate-h) + 2svh) var(--gut) calc(9svh + var(--safe-bottom)); row-gap: 1.6svh; }
  .hero-super { grid-row: 1; font-size: 12px; letter-spacing: .08em; }
  .receipt-wrap { grid-column: 1; grid-row: 2; width: 54vw; max-width: 240px; justify-self: end; padding-top: 0; margin-right: 4px; }
  .receipt { font-size: min(2.2vw, 1.15svh); }
  .qrs { display: none; }
  .r-foot { display: none; }
  .hero-copy { grid-row: 3; }
  .eyebrow { font-size: 13px; }
  .hero-h { font-size: 16.5vw; line-height: 1.1; }
  .lede { font-size: 16px; margin-top: .7em; line-height: 1.75; }
  .ctas { margin-top: 1em; gap: 10px; }
  .ctas .btn-seal { min-height: 50px; font-size: 17px; flex: 1 1 100%; }
  .ctas .btn-line { min-height: 46px; }
  .micro { font-size: 12.5px; gap: .1em 1em; }
  .fine { font-size: 11.5px; }

  .card-no { top: calc(var(--slate-h) + 5svh); font-size: 18px; }
  .card-word { left: auto; right: calc(var(--gut) + 2px); top: calc(var(--slate-h) + 5svh); bottom: auto; writing-mode: vertical-rl; transform: scaleY(.9); transform-origin: 50% 0; font-size: min(27vw, 17svh); line-height: 1; }
  .card-super { right: auto; left: var(--gut); top: auto; bottom: calc(9svh + var(--safe-bottom)); writing-mode: horizontal-tb; font-size: 14px; letter-spacing: .1em; max-width: 52vw; max-height: none; }
  .card-count { left: var(--gut); right: auto; bottom: calc(5svh + var(--safe-bottom)); font-size: 11px; }
  .card:not(.card-band) .card-word { translate: none; }
  .card:not(.card-band) .card-super { translate: 0 calc(var(--enter, 0) * -1 * var(--frame-h, 100lvh)); }
  .card-band .card-no { top: 6svh; }
  .card-band .card-word { top: 6svh; bottom: auto; font-size: min(24vw, 15svh); }
  .card-band .card-super { top: auto; bottom: 11svh; }
  .card-band .card-count { bottom: 5svh; }

  .step { grid-template-columns: 1fr; row-gap: 2svh; align-content: start; padding: 0 var(--gut); }
  .anim .close .step { inset: calc(var(--slate-h) + 2.5svh) 0 calc(9svh + var(--safe-bottom)); }
  .when .t { font-size: 10svh; }
  .when .d { font-size: 15px; }
  .what { font-size: min(7.4vw, 4.2svh); }
  .desc { font-size: 15.5px; line-height: 1.75; margin-top: .6em; }
  .odo { font-size: 5.2vw; margin-top: .5em; }
  .odo-sub { font-size: 12px; }
  .sheet { max-height: 42svh; font-size: 12.5px; }
  .sh-match .mr { font-size: .86em; }
  .sh-approve { grid-template-columns: 1fr auto; gap: 1em; }
  .phone { padding: 1.5em 1em 1.2em; font-size: 12px; border-radius: 18px; }
  .s3 { font-size: 12px; grid-template-columns: 2.6em 3.6em; }
  .s3-v { width: 3.6em; height: 3.6em; }
  .verdict { font-size: 15vw; }
  .steprail { left: var(--gut); right: 16px; bottom: calc(2svh + 40px + var(--safe-bottom)); }
  .anim .close .step { inset: calc(var(--slate-h) + 2.5svh) 0 calc(2svh + 86px + var(--safe-bottom)); }
  .steprail li { font-size: 0; letter-spacing: 0; justify-content: center; }
  .close-note { display: none; }
  .no-js .close-note, .rm .close-note { display: block; }

  .doc-h { font-size: 27px; }
  .say { font-size: 19px; }
  .ss-boxes { grid-template-columns: 1fr; border-left: 0; }
  .ss-box { border-left: 1px solid var(--ink); grid-template-columns: auto 1fr auto; grid-template-areas: "k seal btn" "who seal btn"; justify-items: start; align-items: center; border-top: 0; }
  .ss-box:first-child { border-top: 1px solid var(--ink); }
  .ss-k { grid-area: k; border: 0; text-indent: 0; letter-spacing: .2em; font-size: 18px; padding: 0; }
  .ss-who { grid-area: who; }
  .ss-seal { grid-area: seal; width: 3.6em; height: 3.6em; justify-self: center; }
  .ss-seal span { font-size: 13px; }
  .ss-btn { grid-area: btn; font-size: 14px; padding: 0 .7em; }
  .articles li { grid-template-columns: 1fr; gap: .2em; }
  .faq summary { font-size: 17px; }
  .compare { font-size: 14px; }
  .final-h { font-size: 15.5vw; }
  .book { grid-template-columns: minmax(0, 1fr); }
  .book label { grid-template-columns: minmax(0, 7em) minmax(0, 1fr); }
  .bk-role { grid-template-columns: minmax(0, 7em) minmax(0, 1fr) auto !important; }
  .book label > span:first-child { padding-right: .5em; letter-spacing: 0; }
  .book input, .book select { padding: 0 .6em; }
  .book select { padding: 0 .2em 0 .5em; font-size: 16px; }
  .book-seal { width: 40px; height: 40px; margin-left: .4em; font-size: 11px; }
  .book-go, .book-after { grid-column: 1; }
  .calc-in, .calc-out > div { grid-template-columns: minmax(0, 6.5em) minmax(0, 1fr); gap: .6em; }
  .co-plan, .co-fee { font-size: 25px; }
  .calc-box input { font-size: 22px; }
  .status.has-note .st-no { display: none; }
  .book-go { justify-self: stretch; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .card-word { font-size: 40svh; }
  .hero-h { font-size: 15svh; }
}
