/* CREW — 方向 A「引用帳本」。
   骨架:報紙。厚報頭 → 通欄細線 → 左側 gutter 編號 → 逐列證據。
   刻意不用的東西(2026-08-17 老闆點名的預設值):金色 mono 眉標、grain 顆粒層、Noto Sans TC 900 挑字、暗底金字。 */

:root {
  --paper:      #EFEDE7;
  --paper-2:    #E6E3DA;
  --card:       #F7F5F0;
  --ink:        #15150F;
  --ink-2:      #3B392F;
  --muted:      #6B6858;
  --rule:       #CBC7B9;
  --rule-hard:  #15150F;
  --stamp:      #B4241F;
  --cited:      #2E6B45;
  --shadow:     0 1px 0 rgba(21,21,15,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #131310;
    --paper-2:   #1A1A15;
    --card:      #1C1C17;
    --ink:       #EDE9DC;
    --ink-2:     #C6C1B0;
    --muted:     #8C8877;
    --rule:      #34332B;
    --rule-hard: #EDE9DC;
    --stamp:     #E0604E;
    --cited:     #67B183;
    --shadow:    none;
  }
}
:root[data-theme="dark"] {
  --paper:     #131310;
  --paper-2:   #1A1A15;
  --card:      #1C1C17;
  --ink:       #EDE9DC;
  --ink-2:     #C6C1B0;
  --muted:     #8C8877;
  --rule:      #34332B;
  --rule-hard: #EDE9DC;
  --stamp:     #E0604E;
  --cited:     #67B183;
  --shadow:    none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  text-autospace: normal;
  text-spacing-trim: trim-start;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: "Courier Prime", "Courier New", monospace; font-variant-numeric: tabular-nums; }

/* ── 報頭 ───────────────────────────────────────── */
.masthead { border-top: 6px solid var(--rule-hard); }
.masthead .bar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 10px 0 8px; border-bottom: 1px solid var(--rule);
  font-family: "Courier Prime", monospace; font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.masthead .bar button {
  background: none; border: 1px solid var(--rule); color: var(--muted);
  font: inherit; letter-spacing: .1em; padding: 3px 9px; cursor: pointer; border-radius: 0;
}
.masthead .bar button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.wordmark {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 22px 0 16px; border-bottom: 3px solid var(--rule-hard); flex-wrap: wrap;
}
.wordmark h1 {
  margin: 0; font-family: "Instrument Serif", "Noto Serif TC", Georgia, serif;
  font-size: clamp(46px, 9vw, 96px); line-height: .86; letter-spacing: .06em; font-weight: 400;
}
.wordmark .sub {
  font-family: "Courier Prime", monospace; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding-bottom: 8px;
}

/* ── 頭條 ───────────────────────────────────────── */
.lead { padding: 34px 0 26px; border-bottom: 1px solid var(--rule); }
.lead-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 30px; }
@media (min-width: 900px) { .lead-grid { grid-template-columns: minmax(0,1.55fr) minmax(230px,.9fr); gap: 46px; } }
.returns { border-top: 3px solid var(--rule-hard); padding-top: 10px; align-self: start; }
.returns .k {
  font-family: "Courier Prime", monospace; font-size: 11px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.returns ol { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.returns li {
  counter-increment: r; display: grid; grid-template-columns: 30px 1fr; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-2);
}
.returns li::before {
  content: counter(r, decimal-leading-zero);
  font-family: "Courier Prime", monospace; color: var(--stamp); font-size: 12.5px;
}
.lead h2 {
  margin: 0 0 14px; font-family: "Instrument Serif", "Noto Serif TC", Georgia, serif;
  font-weight: 400; font-size: clamp(30px, 5.2vw, 52px); line-height: 1.12;
  letter-spacing: -.005em; text-wrap: balance; max-width: 20ch;
}
.lead h2 em { font-style: normal; color: var(--stamp); }
.lead .deck { max-width: 54ch; color: var(--ink-2); font-size: 17px; }
/* drop cap 只給拉丁文。中文沒有首字放大的排版慣例,套上去會把「輸入」拆成
   巨大的「輸」+「入一個網址」,讀起來像壞掉(2026-08-19 手機中文版實測)。 */
:root[lang="en"] .lead .deck::first-letter,
html[lang="en"] .lead .deck::first-letter {
  float: left; font-family: "Instrument Serif", Georgia, serif; font-size: 3.1em;
  line-height: .82; padding: 6px 10px 0 0; color: var(--ink);
}

/* ── 派工單(輸入) ───────────────────────────────── */
.order { margin: 26px 0 4px; max-width: 620px; }
.order .label {
  font-family: "Courier Prime", monospace; font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.order form { display: flex; border: 2px solid var(--rule-hard); background: var(--card); }
.order input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font-family: "Courier Prime", monospace; font-size: 16px; padding: 15px 14px; outline: none;
}
.order button {
  border: 0; border-left: 2px solid var(--rule-hard); background: var(--rule-hard);
  color: var(--paper); font-family: "Courier Prime", monospace; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; padding: 0 22px; cursor: pointer;
  transition: opacity .16s cubic-bezier(.23,1,.32,1);
}
.order button:hover { opacity: .82; }
.order button[disabled] { opacity: .45; cursor: default; }
.order .note { margin-top: 8px; font-size: 13px; color: var(--muted); }
.order .err { color: var(--stamp); font-size: 14px; margin-top: 8px; min-height: 1.2em; }

/* ── 帳本列 ─────────────────────────────────────── */
.ledger { border-top: 3px solid var(--rule-hard); margin-top: 40px; }
.ledger > h3 {
  margin: 0; padding: 12px 0; font-family: "Courier Prime", monospace; font-weight: 400;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--rule);
}
.row {
  display: grid; grid-template-columns: 62px 1fr; gap: 0;
  border-bottom: 1px solid var(--rule); align-items: start;
}
.row .num {
  font-family: "Courier Prime", monospace; font-size: 13px; color: var(--muted);
  padding: 16px 0 16px 2px; letter-spacing: .06em;
}
.row .body { padding: 16px 0 16px 14px; border-left: 1px solid var(--rule); min-width: 0; }
.row .q { font-size: 17px; line-height: 1.45; margin: 0 0 8px; }
.row .verdict {
  font-family: "Courier Prime", monospace; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; display: inline-block; padding: 2px 8px; border: 1px solid currentColor;
}
.verdict.miss { color: var(--stamp); }
.verdict.hit  { color: var(--cited); }
.verdict.dim  { color: var(--muted); }
.srcs { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.srcs li { display: grid; grid-template-columns: minmax(0,190px) 1fr; gap: 12px; font-size: 13.5px; }
.srcs .d { font-family: "Courier Prime", monospace; color: var(--ink-2); }
.srcs a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.srcs a:hover, .srcs a:focus-visible { color: var(--stamp); border-color: var(--stamp); }

/* ── 進度 ───────────────────────────────────────── */
.steps { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.steps li {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--rule);
  font-family: "Courier Prime", monospace; font-size: 13.5px; color: var(--muted);
}
.steps li[data-state="done"] { color: var(--ink); }
.steps li[data-state="active"] { color: var(--ink); }
.steps li[data-state="active"] .mark::after { content: "▶"; }
.steps li[data-state="done"] .mark::after { content: "✓"; }
.steps li[data-state="todo"] .mark::after { content: "·"; }
.steps .t { font-size: 12px; }

/* ── 區塊 ───────────────────────────────────────── */
section { padding: 46px 0; border-bottom: 1px solid var(--rule); }
section > h3 {
  margin: 0 0 18px; font-family: "Courier Prime", monospace; font-weight: 400;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.brief { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px 34px; }
.brief .f .k {
  font-family: "Courier Prime", monospace; font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule);
  padding-bottom: 4px; margin-bottom: 7px;
}
.brief .f .v { font-size: 15.5px; color: var(--ink-2); }
.brief .f ul { margin: 0; padding-left: 17px; }

.crew {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  column-gap: 34px; border-top: 1px solid var(--rule);
}
.seat { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.seat .h { display: flex; align-items: baseline; gap: 9px; margin-bottom: 4px; }
.seat .h .g { font-family: "Instrument Serif", serif; font-size: 20px; color: var(--stamp); }
.seat .h .n { font-family: "Instrument Serif", "Noto Serif TC", serif; font-size: 21px; }
.seat .c { font-family: "Courier Prime", monospace; font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.seat ol { margin: 10px 0 0; padding-left: 18px; }
.seat li { font-size: 14.5px; color: var(--ink-2); margin: 6px 0; }
.seat li b { font-weight: 600; color: var(--ink); display: block; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.plan { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); padding: 20px 20px 22px 0; }
.plan:last-child { border-right: 0; }
.plan .n { font-family: "Instrument Serif", "Noto Serif TC", serif; font-size: 25px; }
.plan .p { font-family: "Courier Prime", monospace; font-size: 15px; margin: 4px 0 12px; }
.plan ul { margin: 0; padding-left: 17px; }
.plan li { font-size: 14.5px; color: var(--ink-2); margin: 5px 0; }
.plan.feature { border-top: 3px solid var(--stamp); margin-top: -3px; }

.capture { display: flex; gap: 0; max-width: 480px; border: 2px solid var(--rule-hard); background: var(--card); }
.capture input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font-family: "Courier Prime", monospace; padding: 13px 13px; outline: none; font-size: 15px; }
.capture button { border: 0; border-left: 2px solid var(--rule-hard); background: var(--rule-hard);
  color: var(--paper); font-family: "Courier Prime", monospace; font-size: 12.5px; letter-spacing: .1em;
  text-transform: uppercase; padding: 0 18px; cursor: pointer; }

footer { padding: 26px 0 60px; font-family: "Courier Prime", monospace; font-size: 12px; color: var(--muted); }
footer p { margin: 4px 0; }

a { color: var(--stamp); }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }
[hidden] { display: none !important; }
.hint { font-size: 14px; color: var(--muted); max-width: 60ch; }

@media (max-width: 640px) {
  .row { grid-template-columns: 42px 1fr; }
  .srcs li { grid-template-columns: 1fr; gap: 1px; }
  .seat, .plan { border-right: 0; padding-left: 0 !important; padding-right: 0; }
  .lead .deck::first-letter { font-size: 2.6em; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 還沒做出來的功能要講清楚 —— 網站宣稱的機制實際不存在,是我們吃過虧的那條。 */
.soon {
  font-family: "Courier Prime", monospace; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--stamp); border: 1px solid var(--stamp);
  padding: 1px 6px; white-space: nowrap;
}

/* 逐引擎明細 */
.engines { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.eng { border-left: 2px solid var(--rule); padding-left: 12px; }
.eng-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eng-n {
  font-family: "Courier Prime", monospace; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}

/* ── 訂戶櫃檯 ───────────────────────────────── */
.linkish {
  background: none; border: 0; padding: 0; color: var(--stamp); cursor: pointer;
  font-family: "Courier Prime", monospace; font-size: 13px;
  border-bottom: 1px solid var(--stamp);
}
.btn-solid {
  background: var(--rule-hard); color: var(--paper); border: 0; cursor: pointer;
  font-family: "Courier Prime", monospace; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; padding: 12px 18px;
}
.btn-solid[disabled] { opacity: .4; cursor: not-allowed; }
.acct-head {
  display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 18px; font-size: 13px;
}
.acct-head .mono { color: var(--ink-2); }
.split2 { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 820px) { .split2 { grid-template-columns: 1.2fr .8fr; gap: 44px; } }
.k {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--rule); padding-bottom: 5px;
}
.tracklist { list-style: none; margin: 12px 0 0; padding: 0; }
.tracklist li {
  font-family: "Courier Prime", monospace; font-size: 14px; padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
#hist .hrow { border-bottom: 1px solid var(--rule); padding: 12px 0; }
#hist .hrow .d { font-family: "Courier Prime", monospace; font-size: 12px; color: var(--muted); }
#hist .hrow .q { font-size: 14.5px; margin: 4px 0 0; }

/* ── 起草的一頁 ─────────────────────────────── */
.draftbar { margin-top: 12px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.draft {
  margin: 14px 0 4px; padding: 18px 20px; background: var(--card);
  border: 1px solid var(--rule); border-left: 3px solid var(--stamp);
}
.draft .dmeta {
  font-size: 15px; color: var(--ink); font-weight: 700; line-height: 1.4; margin-bottom: 4px;
}
.draft .dmeta2 { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.draft .lede { font-size: 16px; color: var(--ink); margin: 0 0 14px; }
.draft h4 {
  font-family: "Instrument Serif", "Noto Serif TC", serif; font-weight: 400;
  font-size: 18px; margin: 16px 0 5px; color: var(--ink);
}
.draft p { font-size: 15px; color: var(--ink-2); margin: 0 0 10px; }
.draft .opnote {
  font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule);
  padding-top: 10px; margin-top: 14px;
}
