/* Shared styles for the smaller pages: case study, brief template, 404. Same tokens as the homepage. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-04FF, U+0E3F, U+1E00-1EFF, U+2000-27BF, U+A720-A7FF, U+F8FF, U+FB00-FB06; }
:root { --bg: #FAFAF9; --bg-2: #F3F3F1; --card: #FFFFFF; --ink: #111110; --ink-2: #3C3C39; --muted: #6E6E69; --faint: #A3A39D; --line: #E6E5E1; --accent: #2D5BFF; --accent-press: #1E44D6; --dark: #111110; --on-dark: #F5F5F3; --on-dark-muted: #9E9E98; --ok: #2E7A58; --ease: cubic-bezier(0.22, 1, 0.36, 1); color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16.5px/1.65 "Geist", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font-family: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.top { border-bottom: 1px solid var(--line); background: rgba(250, 250, 249, .9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.word { font-weight: 650; font-size: 20px; letter-spacing: -0.03em; text-decoration: none; margin-right: auto; }
.top a.back { font-size: 14.5px; color: var(--ink-2); text-decoration: none; }
.top a.back:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; background: none; color: inherit; font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; transition: background .3s var(--ease), border-color .3s var(--ease); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-press); }
.btn-line { border-color: var(--line); background: var(--card); }
.btn-line:hover { border-color: var(--faint); }
.top .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
main { padding-block: clamp(48px, 7vw, 88px); }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--muted); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; margin: 10px 0 16px; }
html[lang^="zh"] h1 { letter-spacing: -0.01em; line-height: 1.2; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
h2 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 10px; }
.sec { padding-block: 36px; border-top: 1px solid var(--line); margin-top: 36px; }
.muted { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; font-weight: 500; background: var(--bg-2); border-radius: 999px; padding: 4px 10px; }
.foot { background: var(--dark); color: var(--on-dark-muted); font-size: 13.5px; padding-block: 32px; margin-top: 40px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot a { color: var(--on-dark); text-decoration: none; }
.lang-pane[lang="zh-Hans"], .lang-pane[lang="zh-Hant-HK"] { display: none; }
html.zh .lang-pane[lang="en"], html.hk .lang-pane[lang="en"] { display: none; }
html.zh .lang-pane[lang="zh-Hans"], html.hk .lang-pane[lang="zh-Hant-HK"] { display: block; }
html.zh span.lang-pane[lang="zh-Hans"], html.hk span.lang-pane[lang="zh-Hant-HK"] { display: inline; }
html[lang="zh-Hant-HK"] body { font-family: "Geist", "PingFang HK", "PingFang TC", "Noto Sans HK", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; }
.langsw { display: inline-flex; gap: 2px; }
.langsw a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); min-height: 34px; min-width: 30px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 8px; }
.langsw a:hover { color: var(--ink); }
.langsw a[aria-current="true"] { color: var(--ink); background: var(--bg-2); }
button.langsw { background: none; border: 0; cursor: pointer; font-family: inherit; font-weight: 500; font-size: 14px; line-height: 1; color: var(--ink-2); padding: 8px 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.top a.back, .top .btn { white-space: nowrap; }
@media (max-width: 560px) { .top a.back { display: none; } .top .wrap { gap: 10px; } }
@media (max-width: 360px) { .top .wrap { gap: 6px; } .top .btn { padding: 0 10px; font-size: 13px; } .langsw a { min-width: 26px; padding: 0 4px; } }

@media print {
  .top, .foot, .cta, .langsw { display: none !important; }
  body { background: #fff; }
  a { color: inherit; }
}
