/* Weiting Liu — portfolio. Shared styles for all pages. */
:root {
  --bg: #FBF8F3;
  --paper: #FFFDF9;
  --ink: #2B2A28;
  --ink-soft: #4A4743;
  --sage: #3D7A6F;
  --sage-deep: #2F6258;
  --sage-tint: #E5EFEC;
  --gold: #E8A33D;
  --gold-tint: #FBEBD2;
  --gold-deep: #9A6417;
  --clay: #C5705D;
  --clay-deep: #8E4434;
  --clay-tint: #F5E3DD;
  --muted: #8A8680;
  --muted-text: #6F6B65;
  --line: #E8E1D5;
  --line-soft: #F0EAE0;
  --r-card: 16px;
  --r-btn: 12px;
  --shadow: 0 1px 2px rgba(43, 42, 40, .06), 0 18px 40px -18px rgba(43, 42, 40, .28);
  --display: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  --zh-font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --topbar-h: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 90; }
.skip:focus { left: 8px; }

/* ---------- Review-only Chinese ---------- */
html:not(.show-zh) .zh { display: none !important; }
.zh { display: none; font-family: var(--zh-font); color: var(--muted-text); font-size: .92em; line-height: 1.7; font-weight: 400; letter-spacing: 0; text-transform: none; }
html.show-zh .zh { display: block; }
html.show-zh .zh-inline, html.show-zh span.zh { display: inline; margin-left: .35em; }
html.show-zh p + .zh, html.show-zh .zh.gap { margin-top: -.5em; margin-bottom: 1em; }
.zh-toggle { display: none; }
html.zh-review .zh-toggle { display: block; }
.zh-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 16px; font: 500 14px/1 var(--zh-font); cursor: pointer;
  box-shadow: 0 8px 24px rgba(43, 42, 40, .22);
}
.zh-toggle:hover { background: #000; }
html.show-zh .zh-toggle { background: var(--sage); }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 243, .92);
  -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px);
  transition: box-shadow .25s ease;
}
.topbar.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--topbar-h); }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.015em; line-height: 1; }
.brand-role { font-size: 13px; color: var(--muted-text); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
  line-height: 1.2; white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.nav-link small { font-size: 11.5px; font-weight: 500; color: var(--muted-text); letter-spacing: .01em; }
.nav-link:hover { background: var(--sage-tint); color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--sage-deep); background: var(--sage-tint); }
.nav-link[aria-current="page"] small { color: var(--sage-deep); }
.nav-in { display: inline-flex; padding: 8px; border-radius: 8px; color: var(--ink-soft); }
.nav-in:hover { color: var(--sage-deep); background: var(--sage-tint); }

/* ---------- Layout with chapter list ---------- */
.layout { padding: 8px 0 72px; }
.main { max-width: 820px; margin: 0 auto; min-width: 0; }
.toc { display: none; }
.toc ol { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.toc ol::before, .toc ol::after { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; }
.toc ol::before { background: var(--line); }
.toc ol::after { background: var(--sage); transform-origin: top; transform: scaleY(var(--p, 0)); }
.toc a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted-text); font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.toc a:hover { color: var(--ink); }
.toc-num {
  position: relative; z-index: 1; flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--bg); color: var(--muted-text); box-shadow: inset 0 0 0 2px var(--line);
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
.toc a:hover .toc-num { box-shadow: inset 0 0 0 2px var(--sage); }
.toc .is-done .toc-num, .toc .is-active .toc-num { background: var(--sage); color: #fff; box-shadow: none; }
.toc .is-done a { color: var(--ink-soft); }
.toc .is-active a { color: var(--ink); font-weight: 700; }
.toc .zh { display: none !important; }
html.show-zh .toc .toc-zh { display: inline; margin-left: .3em; color: var(--muted); font-weight: 400; }
.toc-zh { display: none; }

.chapters-bar { position: relative; display: none; }
.cb-row { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cb-row::-webkit-scrollbar { display: none; }
.cb-link { padding: 9px 0 11px; font-size: 13px; font-weight: 600; color: var(--muted-text); text-decoration: none; white-space: nowrap; transition: color .2s ease; }
.cb-link b { color: var(--muted); font-weight: 700; margin-right: 5px; transition: color .2s ease; }
.cb-link.is-active { color: var(--ink); }
.cb-link.is-active b, .cb-link.is-done b { color: var(--sage); }
.cb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.cb-progress i { display: block; height: 100%; background: var(--sage); transform-origin: left; transform: scaleX(var(--p, 0)); }

.sec { padding: 48px 0 8px; scroll-margin-top: calc(var(--topbar-h) + 48px); }
.sec + .sec { border-top: 1px solid var(--line); margin-top: 44px; }
.sec:first-child { padding-top: 24px; }
@media (min-width: 1000px) {
  .layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 56px; padding-top: 24px; }
  .main { margin: 0; max-width: none; }
  .toc { display: block; position: sticky; top: calc(var(--topbar-h) + 28px); align-self: start; padding-top: 40px; max-height: calc(100vh - var(--topbar-h) - 40px); overflow: auto; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .sec { scroll-margin-top: calc(var(--topbar-h) + 24px); }
}
@media (max-width: 999px) { .chapters-bar { display: block; } }

/* ---------- Type helpers ---------- */
.kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sage); }
.kicker.clay { color: var(--clay-deep); }
.sec-title { font-weight: 700; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; margin: 10px 0 18px; }
.sec-title .zh, h3 .zh, h4 .zh { font-weight: 400; }
.lede { font-size: clamp(17px, 2vw, 19px); color: var(--ink-soft); max-width: 36em; }
.muted { color: var(--muted-text); }
.small { font-size: 14px; }
.note { font-size: 14px; color: var(--muted-text); max-width: 60ch; }
.prose { max-width: 42em; }
.prose p { font-size: 17px; line-height: 1.65; color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose .zh strong { color: var(--ink); font-weight: 600; }
.hl { color: var(--sage-deep); font-weight: 650; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.02em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 Inter, system-ui, sans-serif; padding: 14px 20px; border-radius: var(--r-btn);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sage); color: #fff; }
.btn-primary:hover { background: var(--sage-deep); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--sage); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.arrow-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--sage-deep); text-decoration: none; }
.arrow-link .ar { transition: transform .2s ease; }
.arrow-link:hover .ar { transform: translateX(3px); }
.arrow-link:hover span:first-child { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Case hero ---------- */
.case-hero { padding: 36px 0 8px; }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted-text); margin: 0 0 22px; }
.case-meta span + span::before { content: "·"; margin-right: 14px; color: var(--muted); }
.case-hero h1 { font-weight: 750; font-size: clamp(34px, 5.2vw, 56px); line-height: 1.03; letter-spacing: -.03em; max-width: 18ch; margin: 0 0 20px; }
.case-hero h1 .accent { color: var(--sage); }
.case-hero .lede { margin-bottom: 26px; }
.tagline { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.3; letter-spacing: -.015em; color: var(--ink); max-width: 30em; }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; margin: 28px 0 8px; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat .n { display: block; font-family: var(--display); font-weight: 750; font-size: clamp(30px, 3.6vw, 40px); line-height: 1; letter-spacing: -.03em; color: var(--sage-deep); font-variant-numeric: tabular-nums; }
.stat .n.ink { color: var(--ink); }
.stat .l { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.4; color: var(--muted-text); max-width: 22ch; }
@media (max-width: 640px) {
  .stats, .stats.four { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .stat .n { font-size: 28px; }
}

/* ---------- Generic cards & grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 22px 20px; }
.card-box h3 { font-size: 19px; font-weight: 650; line-height: 1.25; margin: 0 0 8px; }
.card-box h4 { font-size: 16px; font-weight: 650; margin: 0 0 6px; }
.card-box p { font-size: 15px; color: var(--ink-soft); }
.card-box .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-deep); background: var(--sage-tint); padding: 4px 9px; border-radius: 999px; margin-bottom: 12px; }
.card-box .tag.clay { color: var(--clay-deep); background: var(--clay-tint); }
.card-box .tag.gray { color: var(--muted-text); background: var(--line-soft); }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Business / problem / role rows */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 0 32px; padding: 20px 0 6px; border-bottom: 1px solid var(--line); }
.row h3 { font-family: Inter, system-ui, sans-serif; font-size: 15px; font-weight: 700; line-height: 1.6; letter-spacing: 0; }
.row p { color: var(--ink-soft); }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; padding: 16px 0 4px; } .row h3 { margin-bottom: 4px; } }

/* Key decisions */
.decisions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.decision { min-width: 0; }
.decision { position: relative; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--sage); border-radius: 14px; padding: 20px 22px 18px 24px; }
.decision.clay { border-left-color: var(--clay); }
.decision .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-text); margin-bottom: 6px; display: block; }
.decision h3 { font-size: 21px; font-weight: 650; line-height: 1.25; margin: 0 0 10px; }
.decision p { color: var(--ink-soft); font-size: 15.5px; }
.decision .gave { margin-top: 10px; font-size: 14px; color: var(--muted-text); }
.decision .gave b { color: var(--ink-soft); font-weight: 600; }

/* Pillars (How I work) */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.pillar { border-top: 2px solid var(--ink); padding-top: 18px; }
.pillar .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--sage-tint); color: var(--sage-deep); display: grid; place-items: center; margin-bottom: 14px; }
.pillar h3 { font-size: 20px; font-weight: 650; line-height: 1.25; margin: 0 0 10px; }
.pillar p { font-size: 15px; color: var(--ink-soft); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; gap: 24px; } }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
table.t th, table.t td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.t th { font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--ink); background: var(--line-soft); }
table.t tr:last-child td { border-bottom: 0; }
table.t td:first-child, table.t th:first-child { font-weight: 600; color: var(--ink); min-width: 9rem; }
table.t td { color: var(--ink-soft); }
table.t .zh { font-size: .9em; }
table.t td .zh { margin-top: 4px; }
table.t .hi { background: var(--sage-tint); }
table.t .num { font-size: 1.05em; color: var(--sage-deep); }
table.t.compact td, table.t.compact th { padding: 10px 12px; }
table.t.phases th:first-child, table.t.phases td:first-child { min-width: 8rem; }
table.t.phases th:not(:first-child) { min-width: 12rem; }
table.t.phases tr.result td { background: var(--line-soft); font-weight: 600; color: var(--ink); }
table.t .type { white-space: nowrap; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-text); }

/* Lean canvas */
.canvas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.canvas .cell { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); min-height: 150px; }
.canvas .cell h4 { font-family: Inter, system-ui, sans-serif; letter-spacing: .02em; font-size: 12px; text-transform: uppercase; font-weight: 700; color: var(--sage-deep); margin: 0 0 8px; }
.canvas .cell ul { padding-left: 1.1em; }
.canvas .cell li { margin: 0 0 4px; }
.canvas .cell .sub { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted-text); }
.canvas .span2 { grid-row: span 2; }
.canvas .wide { grid-column: span 2; }
.canvas .uvp { background: var(--sage-tint); border-color: #CFE0DB; }
.canvas .uvp .big { font-family: var(--display); font-weight: 650; font-size: 17px; line-height: 1.3; color: var(--ink); letter-spacing: -.01em; }
.canvas .bottom { grid-column: span 5; }
.canvas .bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; grid-column: 1 / -1; }
@media (max-width: 860px) {
  .canvas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .canvas .span2, .canvas .wide { grid-row: auto; grid-column: auto; }
  .canvas .bottom-row { grid-template-columns: 1fr; }
  .canvas .cell { min-height: 0; }
}

/* Journey map */
.jm-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.jm { display: grid; grid-template-columns: 6.4rem repeat(5, minmax(0, 1fr)); min-width: 760px; font-size: 12.5px; line-height: 1.45; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.jm > div { padding: 10px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-soft); color: var(--ink-soft); }
.jm > div:nth-child(6n) { border-right: 0; }
.jm .h { background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.jm .h b { display: block; color: rgba(255,255,255,.55); font-size: 11px; font-weight: 600; margin-bottom: 2px; }
.jm .rh { background: var(--line-soft); font-weight: 700; color: var(--ink); font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase; }
.jm .step-in { background: var(--sage-tint); color: var(--ink); }
.jm .step-in::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); margin-right: 6px; vertical-align: 1px; }
.jm .feel { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 110px; position: relative; }
.jm .feel .dotwrap { position: relative; height: 70px; width: 100%; }
.jm .feel .dot { position: absolute; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--sage); border: 3px solid var(--paper); box-shadow: 0 0 0 1.5px var(--sage); transform: translate(-50%, -50%); }
.jm .feel .cap { font-size: 12px; color: var(--muted-text); text-align: center; margin-top: 4px; }
.jm .feel-line { position: absolute; left: 0; right: 0; top: 0; height: 70px; pointer-events: none; }
.jm .last { border-bottom: 0; }
.jm-insight { margin-top: 18px; font-family: var(--display); font-weight: 600; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.3; letter-spacing: -.015em; color: var(--sage-deep); max-width: 34em; }


/* Horizontal before/after bars */
.hb { display: grid; gap: 14px; }
.hb-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; align-items: center; }
.hb-k { font-size: 14px; color: var(--ink-soft); line-height: 1.35; }
.hb-k small { display: block; color: var(--muted-text); font-size: 12.5px; }
.hb-track { display: flex; align-items: center; gap: 10px; border-left: 1px solid var(--line); min-height: 28px; }
.hb-bar { flex: none; height: 18px; width: calc((100% - 4.5rem) * var(--p)); border-radius: 0 5px 5px 0; background: #CFC9BF; }
.hb-bar.after { background: var(--sage); }
.hb-bar.after.clay { background: var(--clay); }
.hb-v { font-weight: 700; font-size: 14.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .hb-row { grid-template-columns: 1fr; gap: 6px; } }

/* Diagram figures (SVG) */
.fig { margin: 0; }
.fig svg { width: 100%; height: auto; display: block; }
.fig .fig-cap { margin: 12px 0 0; font-size: 13.5px; color: var(--muted-text); max-width: 62ch; }
.fig-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.diagram-text { font-family: Inter, system-ui, sans-serif; }

/* Timeline (About) */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 20px 28px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--sage); }
.timeline li.now::before { background: var(--sage); }
.timeline .tl-when { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-text); }
.timeline .tl-what { display: block; font-weight: 600; margin-top: 2px; }
.timeline .tl-sub { display: block; font-size: 14px; color: var(--muted-text); }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 32px 0 96px; font-size: 14px; color: var(--muted-text); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--ink); font-weight: 600; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-note { max-width: 60ch; margin: 0; }
.foot .next { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--sage-deep); font-weight: 600; text-decoration: none; }

/* Callout */
.callout { background: var(--sage-tint); border-radius: 14px; padding: 18px 22px; color: var(--ink); font-size: 15.5px; }
.callout.dark { background: var(--ink); color: #fff; }
.callout.dark .zh { color: rgba(255,255,255,.7); }
.callout.clay { background: var(--clay-tint); }

@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .site-header { flex-wrap: wrap; min-height: 0; padding: 12px 0 8px; gap: 8px; }
  .brand-role { display: none; }
  .nav { width: 100%; justify-content: flex-start; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 8px 9px; font-size: 14px; }
  .nav-link small { display: none; }
  .sec { padding-top: 44px; }
  .sec + .sec { margin-top: 44px; }
  .case-hero { padding-top: 24px; }
  .zh-toggle { right: 12px; bottom: 12px; padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toc ol::after, .cb-progress i { transition: none; }
}
@media print {
  .topbar, .zh-toggle, .toc, .chapters-bar { display: none !important; }
}

/* ---------- Template modules (shared by both product pages) ---------- */
.kicker b { display: inline-block; min-width: 1.6em; font-weight: 800; color: var(--ink); margin-right: 4px; }
.sec .lede { margin-top: 0; }
.lede + .zh { margin-top: 6px; max-width: 40em; }
.vis { margin-top: 24px; }

/* Thesis line: the one-sentence takeaway under a visual */
.thesis { margin-top: 18px; font-family: var(--display); font-weight: 600; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.3; letter-spacing: -.015em; color: var(--sage-deep); max-width: 34em; }
.thesis.clay { color: var(--clay-deep); }

/* Money chain (who pays whom) */
.flow-row + .flow-row { margin-top: 22px; }
.flow-label { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; margin: 0 0 10px; }
.flow-label .sw { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--sage); }
.flow-label .sw.sell { background: var(--clay); }
.chain { display: grid; grid-template-columns: minmax(0,1.2fr) 92px minmax(0,1.2fr) 92px minmax(0,.9fr) 104px minmax(0,1.2fr); gap: 8px; align-items: stretch; }
.chain .node { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); display: flex; flex-direction: column; justify-content: center; min-height: 84px; }
.chain .node b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 3px; }
.chain .node.us { border: 1.5px solid var(--sage); background: var(--sage-tint); }
.chain .node.us.sell { border-color: var(--clay); background: var(--clay-tint); }
.chain .edge { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11.5px; line-height: 1.25; color: var(--muted-text); text-align: center; padding: 0 2px; }
.chain .edge i { display: block; width: 100%; height: 1.5px; background: var(--muted); position: relative; margin-top: 6px; }
.chain .edge i::after { content: ""; position: absolute; right: -1px; top: -3.5px; border-left: 7px solid var(--muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
html.js .chain > * { opacity: 0; transform: translateY(8px); }
html.js .chain.play > * { animation: chain-in .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 160ms); }
@keyframes chain-in { to { opacity: 1; transform: none; } }
@media (max-width: 860px) {
  .chain { grid-template-columns: 1fr; }
  .chain .node { min-height: 0; }
  .chain .edge { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 2px 0 2px 16px; min-height: 36px; }
  .chain .edge i { order: -1; width: 1.5px; height: 24px; margin: 0; }
  .chain .edge i::after { right: auto; top: auto; bottom: -1px; left: -3.5px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 7px solid var(--muted); border-bottom: 0; }
}

/* Persona cards */
.personas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.persona { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px 18px; }
.persona-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.persona-head .av { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-tint); color: var(--sage-deep); font-family: var(--display); font-weight: 700; font-size: 19px; }
.persona-head .av.clay { background: var(--clay-tint); color: var(--clay-deep); }
.persona-head h3 { font-size: 19px; font-weight: 650; line-height: 1.2; }
.persona-head .role { display: block; font-size: 13.5px; color: var(--muted-text); margin-top: 2px; }
.persona dl { margin: 0; display: grid; grid-template-columns: 5.2em minmax(0,1fr); gap: 7px 10px; font-size: 14px; }
.persona dt { font-weight: 700; color: var(--muted-text); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding-top: 3px; }
.persona dd { margin: 0; color: var(--ink-soft); line-height: 1.45; }
.persona .quote { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--sage); background: var(--bg); border-radius: 0 10px 10px 0; font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1.35; }
@media (max-width: 760px) { .personas { grid-template-columns: 1fr; } }

/* Big quote (customer challenges) */
.bigquote { margin: 0; padding: 20px 24px; border-left: 4px solid var(--clay); background: var(--paper); border-radius: 0 14px 14px 0; font-family: var(--display); font-weight: 600; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.3; letter-spacing: -.012em; }
.bigquote small { display: block; margin-top: 8px; font: 500 13px/1.4 Inter, sans-serif; color: var(--muted-text); letter-spacing: 0; }

/* Three facts in a row */
.facts3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.fact { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.45; }
.fact .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--clay-tint); color: var(--clay-deep); margin-bottom: 10px; }
.fact b { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 4px; }
@media (max-width: 760px) { .facts3 { grid-template-columns: 1fr; } }

/* User stories */
.stories { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: st; }
.stories li { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 16px 56px; font-size: 15.5px; line-height: 1.5; color: var(--ink-soft); }
.stories li::before { counter-increment: st; content: "S" counter(st); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--sage-tint); color: var(--sage-deep); font-size: 12px; font-weight: 800; }
.stories li b { color: var(--ink); font-weight: 650; }
.stories li em { font-style: normal; color: var(--sage-deep); font-weight: 600; }
table.t.ac td:first-child { min-width: 7rem; white-space: nowrap; color: var(--sage-deep); }
table.t.ac td .type { display: inline-block; margin-right: 6px; }

/* MVP scope in / out */
.inout { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.inout .box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.inout h4 { font-family: Inter, system-ui, sans-serif; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--sage-deep); margin: 0 0 10px; }
.inout .out h4 { color: var(--muted-text); }
.inout ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: 14.5px; color: var(--ink-soft); }
.inout li { display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 8px; }
.inout li::before { content: "✓"; color: var(--sage); font-weight: 800; }
.inout .out li::before { content: "–"; color: var(--muted); }
@media (max-width: 640px) { .inout { grid-template-columns: 1fr; } }

/* Lean canvas placement (standard layout) */
.canvas .c-problem { grid-column: 1; grid-row: 1 / 3; }
.canvas .c-solution { grid-column: 2; grid-row: 1; }
.canvas .c-metrics { grid-column: 2; grid-row: 2; }
.canvas .c-uvp { grid-column: 3; grid-row: 1 / 3; }
.canvas .c-unfair { grid-column: 4; grid-row: 1; }
.canvas .c-channels { grid-column: 4; grid-row: 2; }
.canvas .c-segments { grid-column: 5; grid-row: 1 / 3; }
.canvas .c-cost { grid-column: 1 / 4; grid-row: 3; }
.canvas .c-revenue { grid-column: 4 / 6; grid-row: 3; }
.canvas .cell { min-height: 120px; font-size: 13px; }
.canvas .cell li { margin-bottom: 5px; }
@media (max-width: 860px) { .canvas [class^="c-"], .canvas [class*=" c-"] { grid-column: auto !important; grid-row: auto !important; } }

/* Reveal on scroll */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } html.js .chain > * { opacity: 1; transform: none; animation: none !important; } }

/* Animated diagrams */
portfolio-motion { display: block; min-width: 0; }

/* Appendix tag */
.side-tag { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--clay-deep); background: var(--clay-tint); padding: 5px 10px; border-radius: 999px; }
.sec.appendix { border-top: 2px solid var(--clay-tint); }

/* Chinese review mode: headings and stats stack the translation under the English */
html.show-zh .sec-title > span.zh, html.show-zh h1 > span.zh { display: block; margin: 6px 0 0; font-size: .58em; line-height: 1.4; font-weight: 400; }
html.show-zh .stat .l .zh, html.show-zh .proof-item span .zh, html.show-zh .work-stats li .zh { display: block; margin: 3px 0 0; }
/* Wide diagrams scroll sideways on small screens */
@media (max-width: 760px) {
  .fig.wide { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fig.wide svg { min-width: 720px; }
  .fig.wide .fig-cap { position: sticky; left: 0; }
}
@media (max-width: 420px) { .nav-link { font-size: 13px; padding: 8px 7px; } }
