/* Shared by index.html and contact.html: color tokens (light and dark), base type, buttons, header. */
:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --fg: #111111;
  --muted: #666666;
  --faint: #9a9a9a;
  --line: #e3e3e1;
  --accent: #e4541b;
  --btn: #111111;
  --btn-ink: #ffffff;
  --ver: #1d7448; --ver-soft: #e5f2ea;
  --claim: #92600a; --claim-soft: #f8eed8;
  --conf: #22656d; --conf-soft: #e2eff0;
  --band: #111111; --band-fg: #ececec; --band-muted: #9b9b9b;
  --font-display: "Inter Tight", "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0c; --surface: #161616; --fg: #ececec; --muted: #a3a3a3; --faint: #737373; --line: #2a2a2a;
    --accent: #ff6b35; --btn: #ececec; --btn-ink: #111111;
    --ver: #6cc893; --ver-soft: #16301f; --claim: #e2b84f; --claim-soft: #33290f; --conf: #7cc4cc; --conf-soft: #132c2f;
    --band: #161616;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.6; }
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
/* every paragraph here is short: balance the lines so none ends with one or two lone words or characters */
p { margin: 0; text-wrap: balance; }
/* Chinese: Latin-tuned tight tracking and leading make CJK headings cramped */
:lang(zh) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.25; }
/* Chinese: break only at punctuation or spaces, never inside a word like 確認; anywhere is a last resort against overflow */
:lang(zh) :is(p, h1, h2, h3) { word-break: keep-all; overflow-wrap: anywhere; }
/* with breaks only at punctuation the last line is always a whole clause, so fill lines greedily instead of balancing */
:lang(zh) p { text-wrap: wrap; line-height: 1.7; }
.tag { display: inline-block; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 4px 8px; }
.tag.sample { color: var(--claim); background: var(--claim-soft); border-color: transparent; }

.btn { font: 500 12.5px var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn); border-radius: 6px; padding: 12px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.btn:hover { opacity: 0.86; }
.btn:disabled { opacity: 0.5; cursor: wait; }

/* header */
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-family: var(--font-display); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; text-decoration: none; display: flex; align-items: center; gap: 8px; }
/* wordmark: the two words stacked, Supply over Supply */
.mark { display: inline-grid; line-height: .9; }
.brand i { width: 8px; height: 8px; background: var(--accent); border-radius: 2px; display: inline-block; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang button { font: 500 11.5px var(--font-mono); background: transparent; color: var(--muted); border: 0; padding: 7px 9px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
