/* V3 Safety Signal — Chuan Works */
:root {
  --concrete: #f2f2ef;
  --concrete-2: #e7e7e2;
  --paper: #fbfbf9;
  --ink: #111110;
  --ink-2: #3d3d39;
  --line: #c9c9c2;
  --yellow: #facc15;
  --yellow-deep: #eab308;
  --signal-red: #b91c1c;
  --cond: "Helvetica Neue", "Arial Narrow", "Roboto Condensed", "Nimbus Sans Narrow", "Liberation Sans Narrow", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 16px;
  --max: 1240px;
  --hazard: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, var(--ink) 18px 36px);
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--concrete);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--yellow-deep); }
a:hover { background: var(--yellow); text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--yellow); }
h1, h2, h3 { font-family: var(--cond); font-stretch: condensed; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--yellow); padding: 8px 14px; font-weight: 700; }
.skip:focus { top: 8px; }

/* ---------- Hazard stripes ---------- */
.stripe { background: var(--hazard); background-size: 50.91px 50.91px; animation: hazard-sweep 6s linear infinite; }
.stripe--thin { height: 8px; }
.stripe--div { height: 18px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
@keyframes hazard-sweep { to { background-position: 50.91px 0; } }

/* scroll progress (decorative, scroll-driven where supported) */
.progress { position: fixed; inset: 0 0 auto 0; height: 4px; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); z-index: 40; display: none; }
@supports (animation-timeline: scroll()) {
  .progress { display: block; animation: progress-grow linear both; animation-timeline: scroll(root); }
}
@keyframes progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--concrete); border-bottom: 2px solid var(--ink); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; font-family: var(--cond); font-stretch: condensed; font-weight: 900; font-size: 24px; text-transform: uppercase; letter-spacing: 0.02em; text-decoration: none; border: 2px solid var(--ink); line-height: 1; }
.logo:hover { background: none; }
.logo-a { background: var(--ink); color: var(--concrete); padding: 7px 8px 6px; }
.logo-b { background: var(--yellow); color: var(--ink); padding: 7px 8px 6px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: 14px; font-weight: 600; }
.nav a { text-decoration: none; padding: 6px 9px; }
.nav a:hover { background: var(--yellow); }
.nav .lang-switch { border: 2px solid var(--ink); padding: 4px 9px; }
@media (max-width: 860px) {
  .site-head { position: relative; }
  .head-row { position: relative; }
  .nav { font-size: 13.5px; margin: 0 -8px; }
  .nav a { padding: 5px 8px; }
  .nav .lang-switch { position: absolute; top: 14px; right: var(--gutter); padding: 5px 9px; }
}
@media (max-width: 520px) { .ticker-label-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .ticker-label { padding: 8px 12px; } }

/* ---------- Ticker ---------- */
.ticker { display: flex; align-items: stretch; background: var(--yellow); border-top: 2px solid var(--ink); overflow: hidden; font-family: var(--mono); font-size: 13px; font-weight: 600; }
.ticker-label { flex: none; display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--yellow); padding: 8px 14px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }
.beacon { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .7); animation: beacon-pulse 1.6s ease-out infinite; }
@keyframes beacon-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .75); } 80%, 100% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); } }
.ticker-viewport { flex: 1; min-width: 0; overflow: hidden; position: relative; }
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 38s linear infinite; }
.ticker:hover .ticker-track, .ticker-viewport:focus-within .ticker-track, .ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; list-style: none; flex: none; }
.ticker-set li { display: flex; align-items: center; white-space: nowrap; padding: 8px 0; }
.ticker-set li::after { content: ""; width: 26px; height: 10px; margin: 0 22px; background: repeating-linear-gradient(-45deg, var(--ink) 0 3px, transparent 3px 6px); }
.ticker-set a { text-decoration: none; color: var(--ink); }
.ticker-set a:hover { text-decoration: underline; background: none; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-toggle { flex: none; border: 0; border-left: 2px solid var(--ink); background: var(--yellow); color: var(--ink); font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 0 12px; cursor: pointer; }
.ticker-toggle:hover { background: var(--ink); color: var(--yellow); }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 56px; background: var(--concrete); position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(17,17,16,.06) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(17,17,16,.06) 39px 40px);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
          mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero-grid { position: relative; display: grid; gap: 40px; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: end; gap: 56px; } .hero { padding: 80px 0 88px; } }
.tag { display: inline-block; background: var(--ink); color: var(--paper); font: 600 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(44px, 6.6vw, 92px); font-weight: 900; text-transform: uppercase; line-height: .94; letter-spacing: -0.015em; margin-bottom: 28px; overflow: hidden; padding-bottom: 4px; }
.rise { display: block; animation: rise-in .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise-in { from { transform: translateY(40%); } to { transform: none; } }
.lede { font-size: clamp(17px, 2.1vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 46em; margin: 0; }

.directory { background: var(--paper); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); animation: slide-in .9s .15s cubic-bezier(.2,.8,.2,1) both; }
@keyframes slide-in { from { transform: translateY(16px); } to { transform: none; } }
.directory-head { display: flex; align-items: center; gap: 10px; background: var(--yellow); border-bottom: 2px solid var(--ink); padding: 10px 16px; font: 800 15px/1 var(--cond); font-stretch: condensed; text-transform: uppercase; letter-spacing: .08em; }
.sign-tri { width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 17px solid var(--ink); position: relative; }
.sign-tri::after { content: "!"; position: absolute; left: -2px; top: 4px; color: var(--yellow); font: 900 11px/1 var(--body); }
.directory ol { list-style: none; }
.directory li + li { border-top: 1px solid var(--line); }
.directory a { display: flex; align-items: baseline; gap: 14px; padding: 9px 16px; text-decoration: none; font-weight: 600; font-size: 15px; transition: transform .2s; }
.directory a:hover { background: var(--yellow); transform: translateX(4px); }
.directory .sec { font: 700 13px/1 var(--mono); color: var(--ink-2); min-width: 32px; }

/* ---------- Sections ---------- */
.sec-block { padding: 64px 0 72px; }
@media (min-width: 980px) { .sec-block { padding: 96px 0 104px; } }
.sec-block--panel { background: var(--concrete-2); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.sec-block--panel + .sec-block--panel, .stripe + .sec-block--panel { border-top: 0; }
.sec-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-no { flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--yellow); font: 800 15px/1 var(--mono); padding: 9px 10px; min-width: 58px; margin-top: 4px; }
.sec-head h2 { font-size: clamp(34px, 6vw, 60px); font-weight: 900; text-transform: uppercase; flex: 1 1 260px; }
.sec-head h2 .status { vertical-align: middle; margin-left: 6px; position: relative; top: -6px; }
.intro { font-size: 18px; max-width: 52em; color: var(--ink-2); margin-bottom: 36px; }
.note { font-size: 14.5px; color: var(--ink-2); max-width: 60em; }

.status { display: inline-block; font: 700 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 8px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); white-space: nowrap; }
.status--live { background: var(--yellow); }
.status--live::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--ink); margin-right: 6px; vertical-align: 1px; animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { transform: scale(0); } }

/* ---------- Tool cards ---------- */
.tool-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; } .tool-grid .card + .card { border-left: 0; } }
.card { background: var(--paper); border: 2px solid var(--ink); padding: 0 0 22px; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; position: relative; }
.card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--ink); z-index: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ink); padding: 10px 20px; margin-bottom: 20px; }
.card-no { font: 700 13px/1 var(--mono); color: var(--yellow); letter-spacing: .08em; }
.card h3 { font-size: 30px; font-weight: 900; text-transform: uppercase; padding: 0 20px; margin-bottom: 12px; }
.card > p { padding: 0 20px; color: var(--ink-2); }
.sample { margin: auto 20px 0; border: 2px dashed var(--ink); padding: 14px 16px 12px; background: var(--concrete); font-size: 14.5px; }
.sample b { display: inline-block; font: 700 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; background: var(--yellow); padding: 4px 6px; margin-bottom: 10px; }
.sample ul { list-style: none; }
.sample li { position: relative; padding-left: 18px; margin-bottom: 8px; }
.sample li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--ink); }

/* ---------- Process board ---------- */
.board { list-style: none; display: grid; gap: 0; border: 2px solid var(--ink); background: var(--paper); margin-bottom: 32px; counter-reset: none; }
.board li { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-bottom: 2px solid var(--ink); }
.board li:last-child { border-bottom: 0; }
.board .st { flex: none; font: 800 13px/1 var(--mono); background: var(--ink); color: var(--yellow); padding: 6px 7px; }
.board .tx { font-weight: 600; line-height: 1.35; }
.board li.c { background: var(--yellow); }
.board li.c .st { background: var(--ink); }
@media (max-width: 899px) {
  .board li:not(:last-child)::after { content: ""; position: absolute; left: 30px; bottom: -11px; width: 14px; height: 14px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 50% 100%); z-index: 1; animation: nudge-down 1.8s ease-in-out infinite; }
}
@media (min-width: 900px) {
  .board { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .board li { flex-direction: column; border-bottom: 0; border-right: 2px solid var(--ink); padding: 18px 20px 22px; min-height: 150px; }
  .board li:last-child { border-right: 0; }
  .board li:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 50%; width: 20px; height: 22px; margin-top: -11px; background: var(--ink); clip-path: polygon(0 0, 100% 50%, 0 100%); z-index: 1; animation: nudge-right 1.8s ease-in-out infinite; }
  .board li:nth-child(2)::after { animation-delay: .2s; } .board li:nth-child(3)::after { animation-delay: .4s; } .board li:nth-child(4)::after { animation-delay: .6s; }
}
@keyframes nudge-right { 50% { transform: translateX(4px); } }
@keyframes nudge-down { 50% { transform: translateY(3px); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--ink); background: var(--ink); gap: 2px; margin-bottom: 48px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats > div { background: var(--paper); padding: 18px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.stats > div:first-child { background: var(--yellow); }
.stats b { font: 900 clamp(40px, 7vw, 68px)/1 var(--cond); font-stretch: condensed; letter-spacing: -.02em; }
.stats span { font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.stats > div:first-child span { color: var(--ink); }

/* ---------- Cases ---------- */
.case { display: grid; gap: 24px; background: var(--paper); border: 2px solid var(--ink); padding: 20px; margin-bottom: 28px; position: relative; }
@media (min-width: 980px) { .case { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); padding: 32px; gap: 36px; align-items: start; } }
.case-tag { display: inline-block; font: 800 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; background: var(--ink); color: var(--yellow); padding: 6px 8px; margin-bottom: 14px; }
.case h3 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; text-transform: uppercase; margin-bottom: 14px; }
.meta { font: 500 13.5px/1.5 var(--mono); color: var(--ink-2); padding: 10px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.facts { list-style: none; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.facts li:last-child { border-bottom: 0; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
figure { margin: 0; }
.pair figure { border: 2px solid var(--ink); background: var(--ink); display: flex; flex-direction: column; }
.pair figcaption { flex: 1; }
.pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
figcaption { font: 500 12.5px/1.4 var(--mono); padding: 8px 10px; background: var(--paper); color: var(--ink); border-top: 2px solid var(--ink); }

.more { margin: 8px 0 20px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700; padding: 14px 18px; border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--yellow-deep); transition: transform .2s, box-shadow .2s; }
.btn:hover { background: var(--yellow); color: var(--ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }

/* ---------- Outputs ---------- */
.shots { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 900px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "a b" "c b"; align-items: start; }
  .shot--a { grid-area: a; } .shot--b { grid-area: b; } .shot--c { grid-area: c; }
}
.shot { border: 2px solid var(--ink); background: var(--paper); box-shadow: 6px 6px 0 var(--ink); }
.shot figcaption { border-top: 2px solid var(--ink); font-size: 13px; padding: 10px 12px; }

/* ---------- How it works ---------- */
.how-grid { display: grid; gap: 18px; }
.how-row { background: var(--paper); border: 2px solid var(--ink); }
.how-row h3 { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 900; text-transform: uppercase; padding: 12px 16px; border-bottom: 2px solid var(--ink); }
.line-no { font: 800 13px/1 var(--mono); background: var(--yellow); border: 2px solid var(--ink); padding: 5px 6px; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 0; padding: 16px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; display: flex; align-items: center; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.steps li::before { content: counter(step, decimal-leading-zero); font: 700 11px/1 var(--mono); background: var(--ink); color: var(--paper); padding: 4px 5px; margin-right: 8px; flex: none; }
.steps li { padding: 8px 12px; border: 2px solid var(--ink); background: var(--concrete); }
.steps li.c { background: var(--yellow); }
.steps li:not(:last-child) { margin-right: 26px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; right: -22px; top: 50%; width: 16px; height: 2px; background: var(--ink); box-shadow: 4px 0 0 var(--ink); }
.steps li:not(:last-child) { --ar: 1; }
@media (max-width: 640px) {
  .steps { flex-direction: column; align-items: stretch; gap: 14px; }
  .steps li:not(:last-child) { margin-right: 0; }
  .steps li:not(:last-child)::after { right: auto; left: 22px; top: auto; bottom: -14px; width: 2px; height: 12px; box-shadow: none; }
}

/* ---------- Uses ---------- */
.uses { list-style: none; display: grid; gap: 0; border: 2px solid var(--ink); background: var(--paper); counter-reset: use; }
@media (min-width: 900px) { .uses { grid-template-columns: repeat(2, minmax(0, 1fr)); } .uses li:nth-child(odd) { border-right: 2px solid var(--ink); } .uses li:last-child { grid-column: 1 / -1; border-right: 0; } }
.uses li { counter-increment: use; padding: 18px 20px 18px 64px; position: relative; border-bottom: 2px solid var(--ink); color: var(--ink-2); }
.uses li:last-child { border-bottom: 0; }
@media (min-width: 900px) { .uses li:nth-last-child(2) { border-bottom: 2px solid var(--ink); } }
.uses li::before { content: counter(use, decimal-leading-zero); position: absolute; left: 18px; top: 18px; font: 800 13px/1 var(--mono); background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); padding: 4px 5px; }
.uses b { color: var(--ink); }

/* ---------- Build log ---------- */
.log { list-style: none; display: grid; gap: 0; position: relative; margin-bottom: 24px; }
.log li { position: relative; padding: 0 0 22px 34px; }
.log li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; background: var(--paper); border: 3px solid var(--ink); }
.log li::after { content: ""; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: var(--ink); }
.log li:last-child::after { display: none; }
.log li.now::before { background: var(--yellow); animation: beacon-square 2s ease-in-out infinite; }
@keyframes beacon-square { 50% { transform: rotate(45deg); } }
.log b { display: block; font: 900 22px/1.1 var(--cond); font-stretch: condensed; text-transform: uppercase; margin-bottom: 4px; }
.log span { color: var(--ink-2); font-size: 15.5px; }
@media (min-width: 980px) {
  .log { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 20px; }
  .log li { padding: 36px 0 0; }
  .log li::before { top: 0; }
  .log li::after { left: 22px; right: -20px; top: 7px; bottom: auto; width: auto; height: 2px; }
}

/* ---------- Status ---------- */
.status-list { display: grid; gap: 0; border: 2px solid var(--ink); background: var(--paper); }
@media (min-width: 900px) { .status-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } .status-list > div + div { border-left: 2px solid var(--ink); } }
.status-list > div { padding: 0 0 20px; }
@media (max-width: 899px) { .status-list > div + div { border-top: 2px solid var(--ink); } }
.status-list b { display: block; font: 900 22px/1.1 var(--cond); font-stretch: condensed; text-transform: uppercase; background: var(--yellow); border-bottom: 2px solid var(--ink); padding: 12px 18px; margin-bottom: 14px; }
.status-list > div:last-child b { background: var(--concrete-2); }
.status-list span { display: block; padding: 0 18px; color: var(--ink-2); }

/* ---------- About ---------- */
@media (min-width: 980px) { .about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; } }
.about { background: var(--paper); border: 2px solid var(--ink); padding: 24px 22px; position: relative; font-size: 17px; }
@media (min-width: 720px) { .about { padding: 36px 40px; } }
.about::before { content: ""; position: absolute; top: -2px; right: -2px; width: 72px; height: 14px; background: var(--hazard); background-size: 25px 25px; }
.about h3 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; text-transform: uppercase; margin-bottom: 18px; }
.about p { color: var(--ink-2); max-width: 40em; }
.sign { font: 800 24px/1 var(--cond); font-stretch: condensed; color: var(--ink) !important; margin: 20px 0 0; }

/* ---------- Contact ---------- */
.contact { background: var(--yellow); border-bottom: 2px solid var(--ink); }
.contact-row { padding-top: 48px; padding-bottom: 52px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.contact .sec-head { margin: 0; }
.contact p { margin: 0; }
.mail { display: inline-block; font: 900 clamp(30px, 7vw, 64px)/1 var(--cond); font-stretch: condensed; color: var(--ink); text-decoration: none; border-bottom: 5px solid var(--ink); padding-bottom: 4px; word-break: break-all; }
.mail:hover { background: var(--ink); color: var(--yellow); }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #e6e6e0; font-size: 13.5px; padding: 28px 0 36px; line-height: 1.6; }
.site-foot a { color: var(--yellow); text-decoration-color: var(--yellow); }
.site-foot a:hover { background: var(--yellow); color: var(--ink); }
.site-foot :focus-visible { outline-color: var(--yellow); box-shadow: none; }

/* ---------- Secondary button ---------- */
.btn--ghost { background: var(--paper); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }

/* ---------- 404 ---------- */
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.nf { flex: 1; display: flex; flex-direction: column; justify-content: center; background: var(--concrete); }
.nf .wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; padding-top: 72px; padding-bottom: 72px; }
.nf-code { margin: 0 0 18px; }
.nf-code .sec-no { font-size: 22px; padding: 12px 14px; }
.nf h1 { font-size: clamp(40px, 8vw, 88px); font-weight: 900; text-transform: uppercase; line-height: .95; margin-bottom: 32px; }
.nf-links { display: flex; flex-wrap: wrap; gap: 16px 18px; margin: 0; }
.nf + .site-foot { border-top: 0; }

/* ---------- Traditional Chinese typography ----------
   CJK has no uppercase or condensed faces: headings switch to heavy
   CJK system fonts, no text-transform, looser line-height. */
:root { --cjk: "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, sans-serif; }
:lang(zh-Hant) { font-feature-settings: normal; }
html:lang(zh-Hant) body { font-family: var(--body); line-height: 1.75; }
html:lang(zh-Hant) :is(h1, h2, h3, .log b, .status-list b, .stats b, .sign, .directory-head) {
  font-family: var(--cjk); font-stretch: normal; text-transform: none; letter-spacing: 0;
}
html:lang(zh-Hant) :is(h1, h2, h3) { font-weight: 900; line-height: 1.25; }
html:lang(zh-Hant) .hero h1 { font-size: clamp(38px, 5.4vw, 76px); line-height: 1.18; letter-spacing: .01em; }
html:lang(zh-Hant) .sec-head h2 { font-size: clamp(30px, 5vw, 52px); }
html:lang(zh-Hant) .card h3 { font-size: 26px; }
html:lang(zh-Hant) .case h3 { font-size: clamp(24px, 3.4vw, 36px); }
html:lang(zh-Hant) .how-row h3 { font-size: 21px; }
html:lang(zh-Hant) .about h3 { font-size: clamp(26px, 3.4vw, 38px); }
html:lang(zh-Hant) :is(.log b, .status-list b) { font-weight: 800; font-size: 20px; line-height: 1.3; }
html:lang(zh-Hant) .stats b { font-weight: 900; }
html:lang(zh-Hant) .sign { font-weight: 800; font-size: 22px; }
html:lang(zh-Hant) .directory-head { font-weight: 800; font-size: 16px; letter-spacing: .12em; }
html:lang(zh-Hant) :is(.ticker, .ticker-label, .tag, .status, .sample b, .meta, figcaption, .case-tag, .ticker-toggle) {
  font-family: var(--cjk); letter-spacing: .04em;
}
html:lang(zh-Hant) .ticker-set li { padding: 7px 0; }
html:lang(zh-Hant) :is(.lede, .intro, .note, .about p, .facts li, .uses li, .log span, .status-list span, .sample) { line-height: 1.8; }
html:lang(zh-Hant) :is(.board .tx, .steps li) { line-height: 1.5; }
html:lang(zh-Hant) .stats span { line-height: 1.5; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .ticker-track { transform: none; width: auto; flex-wrap: wrap; }
  .ticker-set { flex-wrap: wrap; }
  .ticker-set li { white-space: normal; }
  .ticker-set[aria-hidden="true"] { display: none; }
  .ticker-toggle { display: none; }
  .progress { display: none; }
}
