/* Layout concept: a work-first portfolio. Quiet black-and-white interface, the work itself carries
   colour on soft tinted covers. Sticky nav, big cover cards, image-led case studies, dark contact band. */
:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --soft: #F1F0EC;
  --ink: #161615;
  --ink-2: #4B4944;
  --mute: #6B675F;
  --line: #E3E0D9;
  --band-bg: #161615;
  --band-fg: #F5F4F0;
  --band-mute: #9C998F;
  --tint-1: #E8E8FB;
  --tint-2: #F6E8E2;
  --tint-3: #ECE6F4;
  --tint-4: #E2EEE4;
  --tint-5: #F2EEE3;
  --sans: "Noto Sans TC", "DM Sans", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --latin: "DM Sans", "Noto Sans TC", system-ui, sans-serif;
  --radius: 14px;
  --max: 1240px;
  --gap: clamp(96px, 12vw, 168px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --surface: #1A1A18; --soft: #1E1E1C; --ink: #EDECE8; --ink-2: #BEBBB4;
    --mute: #86827B; --line: #2D2C29; --band-bg: #000000; --band-fg: #F5F4F0; --band-mute: #8E8B83;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --surface: #1A1A18; --soft: #1E1E1C; --ink: #EDECE8; --ink-2: #BEBBB4;
  --mute: #86827B; --line: #2D2C29; --band-bg: #000000; --band-fg: #F5F4F0; --band-mute: #8E8B83;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, .zoomable:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { text-wrap: balance; line-height: 1.3; letter-spacing: -0.01em; }

.wrap {
  width: 100%; max-width: var(--max); margin-inline: auto;
  padding-left: max(clamp(20px, 4vw, 48px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(20px, 4vw, 48px), env(safe-area-inset-right, 0px));
}
.wrap.wide { --max: 1440px; }
.wrap.narrow { --max: 880px; }
.eyebrow { font-size: 14px; color: var(--mute); }

/* ---------- nav ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.logo { font-weight: 700; font-size: 16px; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.logo span { font-family: var(--latin); font-weight: 400; color: var(--mute); font-size: 14px; }
.nav ul { display: flex; gap: clamp(18px, 3vw, 36px); font-size: 15px; }
.nav ul a { color: var(--ink-2); padding-block: 6px; position: relative; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--ink); }
.nav ul a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--ink); }

/* ---------- home intro ---------- */
.intro { padding-block: clamp(72px, 11vw, 144px) clamp(56px, 7vw, 96px); }
.intro h1 { font-size: clamp(38px, 6vw, 76px); font-weight: 900; letter-spacing: -0.025em; line-height: 1.18; max-width: 15em; }
.intro h1 em { font-style: normal; color: var(--mute); font-weight: 700; }
.intro-meta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-2); font-size: 15px; }
.intro-meta span { display: inline-flex; align-items: center; gap: 10px; }
.intro-meta span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--mute); margin-right: 18px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #3BA55C; box-shadow: 0 0 0 4px color-mix(in srgb, #3BA55C 22%, transparent); }

/* ---------- work grid ---------- */
.work { padding-bottom: var(--gap); }
.work-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.work-head h2 { font-size: 15px; font-weight: 500; color: var(--mute); letter-spacing: .04em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 80px) clamp(24px, 3vw, 40px); }
.card { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.card.featured { grid-column: 1 / -1; }
.cover {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 10; max-width: 100%; background: var(--soft);
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
a.card:hover .cover img { transform: scale(1.025); }
.cover .badge {
  position: absolute; top: 16px; left: 16px; font-size: 12.5px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,.88); color: #161615; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; }
.card-title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; line-height: 1.35; }
.featured .card-title { font-size: clamp(26px, 3.2vw, 40px); }
.card-desc { grid-column: 1 / -1; color: var(--ink-2); max-width: 40em; }
.card-tags { grid-column: 1 / -1; font-size: 14px; color: var(--mute); }
.card .go { font-size: 22px; line-height: 1.6; transition: transform .25s; }
a.card:hover .go { transform: translateX(6px); }
a.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.card.soon .cover img { opacity: .92; }

.status {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 12.5px; line-height: 1.4; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--ink);
}
.status.done { background: var(--ink); color: var(--bg); }
.status.open { background: transparent; color: var(--ink); }

/* typographic cover for the AI Skill case */
.cover-type { background: var(--tint-5); display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 40px); padding: 24px; color: #161615; }
.cover-type div { display: flex; flex-direction: column; gap: 4px; }
.cover-type small { font-size: 13px; color: #6F6B63; }
.cover-type b { font-family: var(--sans); font-size: clamp(32px, 5vw, 76px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.05; white-space: nowrap; }
.cover-type div:last-child b { font-weight: 900; }
.cover-type .arr { font-size: clamp(24px, 3vw, 44px); color: #8B877F; }

/* ---------- dark contact band ---------- */
.band { background: var(--band-bg); color: var(--band-fg); padding-block: clamp(80px, 10vw, 140px) 40px; }
.band h2 { font-size: clamp(34px, 5.6vw, 72px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.2; max-width: 13em; }
.band-grid { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 48px; }
.band dt { font-size: 13px; color: var(--band-mute); margin-bottom: 8px; }
.band dd { font-size: 18px; overflow-wrap: anywhere; }
.band a.u { border-bottom: 1px solid currentColor; }
.band a.u:hover { color: var(--band-mute); }
.copy { margin-left: 12px; font: inherit; font-size: 12px; color: var(--band-fg); background: transparent; border: 1px solid var(--band-mute); border-radius: 999px; padding: 2px 12px; cursor: pointer; vertical-align: 2px; }
.copy:hover { border-color: var(--band-fg); }
.band-foot { margin-top: clamp(72px, 9vw, 120px); padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--band-fg) 16%, transparent); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--band-mute); }
.band-foot nav { display: flex; gap: 24px; }
.band-foot a:hover { color: var(--band-fg); }

/* ---------- about ---------- */
.about-hero { padding-block: clamp(64px, 9vw, 120px) clamp(72px, 9vw, 120px); display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 96px); align-items: center; }
.portrait { border-radius: var(--radius); overflow: hidden; width: 100%; max-width: 360px; }
.portrait img { width: 100%; height: auto; filter: grayscale(1); }
.about-hero h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 900; letter-spacing: -0.02em; }
.about-hero h1 span { display: block; font-family: var(--latin); font-size: .42em; font-weight: 400; color: var(--mute); letter-spacing: .02em; margin-top: 8px; }
.about-hero .bio { margin-top: 28px; font-size: clamp(17px, 1.7vw, 20px); color: var(--ink-2); max-width: 34em; line-height: 1.95; }
.facts-row { margin-top: 40px; display: flex; gap: clamp(28px, 5vw, 64px); flex-wrap: wrap; }
.facts-row b { display: block; font-family: var(--latin); font-size: clamp(36px, 4vw, 52px); font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; }
.facts-row span { font-size: 14px; color: var(--mute); }
.about-sec { padding-bottom: var(--gap); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(40px, 6vw, 96px); }
.about-sec > h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; }
.timeline li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 6px 28px; padding-block: 28px; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { font-family: var(--latin); font-size: 14px; color: var(--mute); padding-top: 3px; }
.timeline h3 { font-size: 19px; font-weight: 700; }
.timeline h3 span { display: block; font-size: 14.5px; font-weight: 400; color: var(--mute); margin-top: 2px; }
.timeline ul { margin-top: 14px; display: grid; gap: 8px; }
.timeline ul li { display: block; padding: 0 0 0 1.1em; border: 0; position: relative; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; }
.timeline ul li::before { content: "–"; position: absolute; left: 0; color: var(--mute); }
.timeline ul li:last-child { border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }

/* ---------- case study ---------- */
.crumb { font-size: 14px; color: var(--ink-2); display: inline-flex; gap: 8px; }
.crumb:hover { color: var(--ink); }
.cs-hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); }
.cs-hero .status { margin-top: 40px; }
.cs-hero h1 { margin-top: 20px; font-size: clamp(40px, 6.6vw, 88px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.12; }
.cs-hero .lead { margin-top: 24px; font-size: clamp(18px, 2vw, 23px); color: var(--ink-2); max-width: 32em; line-height: 1.7; }
.meta { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.meta dt { font-size: 13px; color: var(--mute); margin-bottom: 6px; }
.meta dd { font-size: 15.5px; line-height: 1.65; }
.cs-cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; background: var(--tint-1); }
.cs-cover img { width: 100%; height: 100%; object-fit: cover; }

.overview { padding-block: clamp(80px, 10vw, 140px) 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px clamp(40px, 6vw, 96px); }
.overview h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; }
.overview p { font-size: clamp(17px, 1.7vw, 20px); color: var(--ink-2); line-height: 1.9; max-width: 34em; }
.kpis { grid-column: 1 / -1; margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); }
.kpis b { display: block; font-family: var(--latin); font-size: clamp(44px, 6vw, 80px); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.kpis span { display: block; margin-top: 14px; color: var(--ink-2); font-size: 15px; }

.chapter { padding-top: var(--gap); }
.ch-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px clamp(40px, 6vw, 96px); margin-bottom: clamp(36px, 5vw, 56px); }
.ch-head .num { font-family: var(--latin); font-size: 14px; color: var(--mute); display: block; margin-bottom: 10px; }
.ch-head h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; letter-spacing: -0.02em; }
.ch-head p { color: var(--ink-2); max-width: 34em; align-self: end; }
.ch-head p + p { margin-top: .9em; }

.panel { border-radius: var(--radius); padding: clamp(20px, 3.6vw, 48px); background: var(--surface); border: 1px solid var(--line); }
.panel.tint { border: 0; background: var(--tint-1); color: #161615; }
.shot { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.shot.pad { padding: clamp(12px, 2.4vw, 32px); }
.zoomable { cursor: zoom-in; }
.cap { margin-top: 12px; font-size: 13.5px; color: var(--mute); }

.scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.scores div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.scores b { display: block; font-family: var(--latin); font-size: clamp(30px, 3.4vw, 44px); font-weight: 300; line-height: 1.1; font-variant-numeric: tabular-nums; }
.scores span { font-size: 14px; color: var(--mute); }

.bars { display: grid; gap: 4px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 2fr) 48px; gap: 20px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--line); }
.bar:last-child { border-bottom: 0; }
.bar b { font-weight: 500; }
.bar .track { display: flex; gap: 6px; }
.bar .track i { flex: 1; height: 10px; border-radius: 3px; background: var(--line); }
.bar .track i.on { background: var(--ink); }
.bar .n { font-family: var(--latin); text-align: right; font-variant-numeric: tabular-nums; }

.quote { padding-top: var(--gap); }
.quote blockquote { font-size: clamp(28px, 4.4vw, 56px); font-weight: 900; line-height: 1.38; letter-spacing: -0.02em; max-width: 21em; text-wrap: balance; }
.quote blockquote::before { content: "“"; display: block; font-family: var(--latin); font-size: 1.6em; line-height: .8; color: var(--mute); font-weight: 400; }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 12px; }
.principle .pn { font-family: var(--latin); font-size: 44px; font-weight: 300; line-height: 1; color: var(--mute); }
.principle h3 { font-size: 21px; font-weight: 700; line-height: 1.5; }
.principle > p { color: var(--ink-2); font-size: 15.5px; }
.trace { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 12px; font-size: 14.5px; line-height: 1.65; }
.trace dt { color: var(--mute); }
.trace dd { color: var(--ink-2); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.split .panel h3 { font-size: 18px; font-weight: 700; }
.split .panel h3 small { display: block; font-size: 14px; color: var(--mute); font-weight: 400; margin-top: 2px; }
.split ol { margin-top: 20px; counter-reset: s; }
.split li { counter-increment: s; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding-block: 12px; border-top: 1px solid var(--line); font-size: 15.5px; color: var(--ink-2); }
.split li::before { content: counter(s); font-family: var(--latin); color: var(--mute); }
.split li b { color: var(--ink); display: block; }
.split .panel.later { background: transparent; border-style: dashed; }

.proposal + .proposal { margin-top: clamp(64px, 8vw, 104px); }
.proposal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 40px; flex-wrap: wrap; margin-bottom: 20px; }
.proposal-head h3 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 700; }
.proposal-head h3 small { font-family: var(--latin); font-size: 14px; color: var(--mute); font-weight: 400; margin-right: 12px; }
.proposal-head p { color: var(--ink-2); max-width: 30em; font-size: 15.5px; }
.ba { background: var(--tint-1); border-radius: var(--radius); padding: clamp(16px, 3vw, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.ba.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ba figure { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ba .tag { align-self: flex-start; font-size: 12.5px; padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,.75); color: #4B4944; }
.ba .tag.after { background: #161615; color: #fff; }
.ba .frame { background: #fff; border-radius: 10px; aspect-ratio: 4 / 3; max-width: 100%; display: flex; align-items: center; justify-content: center; padding: clamp(8px, 1.4vw, 16px); box-shadow: 0 12px 32px -18px rgba(20, 30, 60, .35); }
.ba .frame img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.ba figcaption { font-size: 14px; line-height: 1.65; color: #4B4944; }

.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 2.6vw, 32px); }
.stage .sn { font-family: var(--latin); font-size: 13px; color: var(--mute); }
.stage h3 { font-size: 20px; font-weight: 700; margin-top: 6px; }
.stage h3 small { font-size: 14px; color: var(--mute); font-weight: 400; margin-left: 8px; }
.stage ul { margin-top: 16px; display: grid; gap: 10px; }
.stage li { font-size: 14.5px; color: var(--ink-2); line-height: 1.65; }
.stage li b { display: block; color: var(--ink); font-weight: 500; }
.note { margin-top: 20px; font-size: 13.5px; color: var(--mute); max-width: 54em; }

.insight { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 5vw, 72px); align-items: end; }
.insight blockquote { font-size: clamp(26px, 3.6vw, 46px); font-weight: 900; line-height: 1.42; letter-spacing: -0.02em; }
.insight .panel p { color: var(--ink-2); font-size: 15.5px; }
.insight .panel p + p { margin-top: 12px; }
.insight .panel b { color: var(--ink); }

.next-case { padding-block: var(--gap) var(--gap); }
.next-case .eyebrow { margin-bottom: 18px; display: block; }
.next-card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(24px, 4vw, 56px); align-items: center; }
.next-card .cover { aspect-ratio: 16 / 10; }

/* ---------- lightbox ---------- */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(10, 10, 9, .94); }
dialog.lightbox img { max-width: 96vw; max-height: 90vh; width: auto; height: auto; border-radius: 6px; background: #fff; cursor: zoom-out; }

/* ---------- reveal (only below the fold, never fully hidden) ---------- */
.reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.pre { opacity: .2; transform: translateY(24px); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 16px; }
  :root { --gap: 88px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .about-hero, .about-sec, .overview, .ch-head, .insight, .next-card { grid-template-columns: minmax(0, 1fr); }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpis div { display: flex; align-items: baseline; gap: 16px; }
  .kpis span { margin-top: 0; }
  .scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles, .split, .stages, .ba, .ba.three { grid-template-columns: minmax(0, 1fr); }
  .band-grid { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); }
  .bar { grid-template-columns: minmax(0, 1fr) 90px 40px; gap: 12px; }
  .cs-cover { aspect-ratio: 16 / 10; }
}
@media (max-width: 480px) {
  .logo span { display: none; }
  .nav ul { gap: 18px; font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal.pre { opacity: 1; transform: none; }
  * { transition: none !important; }
}

/* --- fixes after review --- */
.ch-head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ch-head h2 { max-width: 20em; }
.ch-head p { align-self: start; }
.work-head { flex-wrap: wrap; }
.work-head h2 { white-space: nowrap; }
@media (max-width: 900px) {
  .intro-meta { flex-direction: column; gap: 4px; }
  .intro-meta span + span::before { display: none; }
}

/* --- v4: section nav, progress, lightbox controls --- */
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 68px); z-index: 15; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); margin-top: clamp(48px, 6vw, 80px); }
.toc details { position: relative; }
.toc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding-block: 14px; font-size: 14px; }
.toc summary::-webkit-details-marker { display: none; }
.toc-label { font-weight: 700; white-space: nowrap; }
.toc-current { color: var(--ink-2); }
.toc-caret { margin-left: auto; transition: transform .2s; font-size: 12px; color: var(--mute); }
.toc details[open] .toc-caret { transform: rotate(180deg); }
.toc ol { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.toc ol a { display: inline-block; font-size: 14px; color: var(--mute); padding-block: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.toc ol a:hover { color: var(--ink); }
.toc ol a.active { color: var(--ink); border-color: var(--ink); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.chapter[id], .overview[id] { scroll-margin-top: 140px; }
@media (min-width: 901px) {
  .toc .wrap > details { display: flex; align-items: center; gap: 28px; }
  .toc summary { pointer-events: none; padding-block: 0; }
  .toc-current, .toc-caret { display: none; }
}
@media (max-width: 900px) {
  .toc ol { display: none; }
  .toc details[open] ol { display: grid; gap: 0; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px; box-shadow: 0 18px 40px -20px rgba(0,0,0,.35); }
  .toc details[open] ol a { display: block; padding-block: 10px; border: 0; margin: 0; }
  .toc details[open] ol li + li { border-top: 1px solid var(--line); }
  .toc ol a.active { font-weight: 700; }
}

dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; display: none; align-items: center; justify-content: center; }
dialog.lightbox[open] { display: flex; }
dialog.lightbox img { max-width: min(94vw, 1800px); max-height: 84vh; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font: 400 22px/1 var(--latin); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-btn:hover { background: rgba(255,255,255,.26); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lb-close { top: calc(env(safe-area-inset-top, 0px) + 16px); right: calc(env(safe-area-inset-right, 0px) + 16px); }
.lb-prev { left: calc(env(safe-area-inset-left, 0px) + 16px); top: 50%; transform: translateY(-50%); }
.lb-next { right: calc(env(safe-area-inset-right, 0px) + 16px); top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.75); font: 13px var(--latin); }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); transform: none; } }
.meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meta .hl dd { font-weight: 700; }

/* ===================== v5: device tuning ===================== */
.scroll-hint { display: none; margin-top: 10px; font-size: 13.5px; color: var(--mute); }

/* touch devices: comfortable 44px targets, no hover-zoom */
@media (pointer: coarse) {
  .nav ul a { display: inline-block; padding-block: 12px; }
  .band-foot a { display: inline-block; padding-block: 10px; }
  .band a.u { display: inline-block; padding-block: 8px; }
  .copy { padding: 8px 16px; font-size: 13px; }
  .crumb { padding-block: 10px; }
  .toc summary { min-height: 48px; }
  a.card:hover .cover img { transform: none; }
}

/* tablet portrait (iPad mini / iPad / Air: 641–900px) */
@media (min-width: 641px) and (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 24px; }
  .card.featured .card-title { font-size: 30px; }
  .meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis div { display: block; }
  .kpis span { margin-top: 10px; }
  .scores { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .principles, .split, .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ba { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ba.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-hero { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
  .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline li { grid-template-columns: 112px minmax(0, 1fr); }
}

/* phone (≤640px) */
@media (max-width: 640px) {
  .intro { padding-block: 48px 40px; }
  .intro h1 { font-size: clamp(30px, 8.6vw, 38px); }
  .meta { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 4px; }
  .meta > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
  .meta > div:last-child { border-bottom: 0; }
  .meta dt { margin: 0; }
  .status, .ba .tag, .cover .badge { font-size: 13px; }
  .cs-hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .cs-cover { border-radius: 10px; }
  .wrap.wide { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .scroll-x img { width: 860px; max-width: none; }
  .scroll-hint { display: block; }
  .quote blockquote { font-size: 26px; }
  .insight blockquote { font-size: 24px; }
  .principle .pn { font-size: 36px; }
  .band h2 { font-size: 30px; }
  .timeline li { padding-block: 22px; }
}

/* small laptops and short screens (e.g. 1280×720, 1366×768) */
@media (min-width: 901px) and (max-height: 820px) {
  .nav .wrap { height: 60px; }
  .toc { top: calc(env(safe-area-inset-top, 0px) + 60px); }
  .intro { padding-block: 64px 48px; }
  .cs-hero { padding-block: 40px 36px; }
  .cs-cover { aspect-ratio: 2 / 1; }
}
/* tablet landscape / small laptop widths: keep the 10-item section nav on one line */
@media (min-width: 901px) and (max-width: 1180px) {
  .toc ol { gap: 4px 16px; }
  .toc ol a { font-size: 13.5px; }
  .toc .wrap > details { gap: 18px; }
}
@media (max-width: 640px) {
  .about-hero { padding-top: 40px; gap: 28px; }
  .portrait { max-width: 200px; }
}

/* After screens share one canvas (1440×1148): equal frames, After fills the width */
.ba .frame { aspect-ratio: 1440 / 1148; }
.ba .tag.after + .frame { padding: 0; overflow: hidden; }
.ba .tag.after + .frame img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: top; }

/* component spec images */
.spec-fig + .spec-fig { margin-top: clamp(28px, 4vw, 48px); }
.spec-fig img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #f5f5f7; }
@media (max-width: 640px) {
  .spec-fig { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .spec-fig img { width: 1060px; max-width: none; }
  .spec-fig .cap::after { content: "　· 左右滑動或點擊放大"; }
}

/* v6: proposals — readable zoom + full screen */
.ba2 { background: var(--tint-1); border-radius: var(--radius); padding: clamp(14px, 2.4vw, 32px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(16px, 2.4vw, 28px); }
.ba2 figure { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ba2 .tag { align-self: flex-start; font-size: 13px; padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,.8); color: #4B4944; }
.ba2 .tag.after { background: #161615; color: #fff; }
.ba2 .frame { background: #fff; border-radius: 10px; display: flex; align-items: flex-start; justify-content: center; padding: 12px; box-shadow: 0 12px 32px -18px rgba(30, 25, 90, .35); }
.ba2 .frame img { max-width: 100%; height: auto; max-height: 520px; width: auto; }
.ba2 .sheet { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 32px -18px rgba(30, 25, 90, .35); }
.ba2 .sheet img { width: 100%; height: auto; display: block; }
.ba2 figcaption { font-size: 14.5px; line-height: 1.65; color: #4B4944; }
.ba2 .ba-full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .ba2 { grid-template-columns: minmax(0, 1fr); }
  .ba2 .ba-zoom { order: -1; }
  .ba2 .frame img { max-height: 360px; }
}

/* v6: journey map as live text */
.journey { --jp: #4F46E5; --jp-bg: #F4F4FE; --jp-line: #C7D2FE; --jp-dark: #3730A3; }
.jm { display: grid; grid-template-columns: 76px repeat(5, minmax(0, 1fr)); column-gap: 10px; }
.jm-lab { font-weight: 700; font-size: 15px; padding: 16px 0; border-top: 1px dashed var(--line); }
.jm-lab:first-child { border-top: 0; padding-top: 12px; }
.jm-stage { background: var(--jp); color: #fff; font-weight: 700; font-size: 16px; text-align: center; padding: 12px 8px; border-radius: 10px 10px 0 0; line-height: 1.4; }
.jm-cell { background: var(--jp-bg); padding: 14px 16px; font-size: 15px; line-height: 1.7; color: #434343; border-top: 1px dashed #DCDDF5; }
.jm-intent { font-weight: 700; color: #1f1f1f; }
.jm-opp { color: var(--jp-dark); }
.jm-last { border-radius: 0 0 10px 10px; }
.jm ol, .jm-card ol { margin: 0; padding-left: 1.2em; }
.jm-na { color: #8c8c8c; }
.jm-tag { display: inline-block; font-size: 12px; color: var(--jp-dark); background: #fff; border: 1px solid var(--jp-line); border-radius: 4px; padding: 0 6px; line-height: 1.6; }
.jm-emo { grid-column: 2 / -1; position: relative; height: 290px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 10px; border-top: 1px dashed #DCDDF5; }
.jm-col { background: var(--jp-bg); position: relative; }
.jm-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.jm-line path { fill: none; stroke: var(--jp); stroke-width: 3; stroke-linejoin: round; }
.jm-pt { position: absolute; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; border: 3px solid var(--jp); z-index: 2; box-sizing: border-box; }
.jm-bubble { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); background: #fff; border: 1.5px solid var(--jp-line); border-radius: 10px; padding: 8px 30px 8px 12px; font-size: 14px; font-weight: 700; line-height: 1.55; color: #1f1f1f; white-space: nowrap; box-shadow: 0 6px 16px -10px rgba(55,48,163,.45); }
.jm-bubble .jm-face { position: absolute; right: -10px; top: -10px; }
.jm-face { width: 24px; height: 24px; flex: none; }
.jm-face circle { fill: #fff; stroke: var(--jp); stroke-width: 2; }
.jm-face circle.e { fill: var(--jp); stroke: none; }
.jm-face path { fill: none; stroke: var(--jp); stroke-width: 2; stroke-linecap: round; }
.jm-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 16px; }
.jm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.jm-legend .jm-face { width: 18px; height: 18px; }
.jm-cards, .jm-hint { display: none; }
@media (max-width: 1100px) { .jm-bubble { white-space: normal; width: max-content; max-width: 170px; } }
@media (max-width: 900px) {
  .jm { display: none; }
  .jm-cards { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 380px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 6px; overscroll-behavior-x: contain; }
  .jm-card { scroll-snap-align: start; background: var(--jp-bg); border-radius: 12px; overflow: hidden; }
  .jm-card .jm-step { margin: 0; padding: 10px 16px 0; font-size: 13px; color: var(--jp-dark); background: var(--jp); color: rgba(255,255,255,.8); }
  .jm-card h3 { margin: 0; padding: 2px 16px 12px; background: var(--jp); color: #fff; font-size: 18px; }
  .jm-card dl { margin: 0; padding: 4px 16px 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 10px; }
  .jm-card dt { font-weight: 700; font-size: 14px; padding: 12px 0; border-top: 1px dashed #DCDDF5; }
  .jm-card dd { margin: 0; font-size: 15px; line-height: 1.7; color: #434343; padding: 10px 0; border-top: 1px dashed #DCDDF5; }
  .jm-card dt:first-of-type, .jm-card dt:first-of-type + dd { border-top: 0; }
  .jm-card .jm-intent { color: #1f1f1f; }
  .jm-card .jm-opp { color: var(--jp-dark); }
  .jm-mood { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; color: #1f1f1f !important; }
  .jm-hint { display: block; margin-top: 8px; font-size: 13.5px; color: var(--mute); }
}

/* v6: competitive table as live text */
.cmp { overflow: hidden; border: 1px solid #DCDDF7; border-radius: var(--radius); background: var(--surface); }
.cmp table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.7; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: 16px 20px; border-bottom: 1px solid #ECECFB; }
.cmp tbody tr:last-child > * { border-bottom: 0; }
.cmp thead th { background: #4F46E5; color: #fff; font-size: 16px; }
.cmp thead th small { font-weight: 400; opacity: .8; font-size: 13px; margin-left: 4px; }
.cmp tbody th { background: #F4F4FE; color: #1f1f1f; width: 170px; }
.cmp td { color: var(--ink-2); }
.cmp td + td, .cmp th + td, .cmp th + th { border-left: 1px solid #ECECFB; }
.cmp ul { margin: 0; padding-left: 1.2em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .cmp { border: 0; background: transparent; overflow: visible; }
  .cmp thead { display: none; }
  .cmp table, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: auto; }
  .cmp tr { background: var(--surface); border: 1px solid #DCDDF7; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
  .cmp tbody th { width: auto; background: #4F46E5; color: #fff; padding: 10px 16px; }
  .cmp td { padding: 12px 16px; border-left: 0 !important; }
  .cmp td::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 700; color: #3730A3; margin-bottom: 2px; }
}
.jm ol, .jm-card ol { list-style: decimal; }
.cmp ul, .jm ul { list-style: disc; }
/* v6b: keep zoom crops and spec sheets readable on tablet / phone */
@media (max-width: 900px) {
  .ba2 { grid-template-columns: minmax(0, 1fr); }
  .ba2 .ba-zoom { order: -1; }
  .ba2 .ba-before .frame img { max-height: 380px; }
  .spec-fig { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .spec-fig img { width: 1060px; max-width: none; }
  .spec-fig .cap::after { content: "　· 左右滑動或點擊放大"; }
}
@media (max-width: 640px) {
  .ba2 .ba-zoom .sheet { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .ba2 .ba-zoom .sheet img { width: 700px; max-width: none; }
  .ba2 .ba-zoom figcaption::after { content: "　· 左右滑動或點擊放大"; color: var(--mute); }
}
/* v6c: light-surface blocks keep dark text in dark mode */
.jm-card, .jm-card dt, .jm-card h3 + dl { color: #1f1f1f; }
.jm-card h3 { color: #fff; }
.jm-cell, .jm-bubble { color: #434343; }
.jm-intent, .jm-bubble { color: #1f1f1f; }

/* case summary */
.sum-lead { font-size: clamp(26px, 3.6vw, 44px); font-weight: 900; line-height: 1.45; letter-spacing: -0.02em; max-width: 22em; text-wrap: balance; }
.sum-h { margin-top: clamp(56px, 7vw, 88px); margin-bottom: 20px; font-size: 18px; font-weight: 700; }
.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sum-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 10px; }
.sum-card .pn { font-family: var(--latin); font-size: 36px; font-weight: 300; line-height: 1; color: var(--mute); }
.sum-card h4 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.5; }
.sum-card p { color: var(--ink-2); font-size: 15.5px; }
.sum-apply { margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--tint-1); color: #161615; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; font-size: 16px; }
.sum-apply span { font-size: 13px; font-weight: 700; color: #3730A3; }
@media (max-width: 900px) { .sum-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 641px) and (max-width: 900px) { .sum-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sum-card h4 { font-size: 17px; } }
.cap .tap-hint { color: var(--mute); }
.lb-count { pointer-events: none; padding-inline: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .lb-count { bottom: calc(env(safe-area-inset-bottom, 0px) + 68px); padding-inline: 16px; }
}
/* lightbox: tap image to zoom & pan */
dialog.lightbox img { cursor: zoom-in; }
dialog.lightbox.zoomed { display: block; overflow: auto; -webkit-overflow-scrolling: touch; }
dialog.lightbox.zoomed[open] { display: block; }
dialog.lightbox.zoomed img { max-width: none; max-height: none; height: auto; margin: 0; cursor: zoom-out; border-radius: 0; }
.lb-btn, .lb-count { position: fixed; z-index: 2; }
.lb-hint { position: fixed; z-index: 2; top: calc(env(safe-area-inset-top, 0px) + 28px); left: 16px; right: 80px; color: rgba(255,255,255,.7); font: 13px var(--latin), var(--sans); pointer-events: none; }
dialog.lightbox.zoomed .lb-hint { display: none; }

/* ===== case 2 ===== */
.status.arch { background: var(--soft); color: var(--ink-2); border-color: var(--line); }
.states3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; counter-reset: none; }
.st { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 2.6vw, 30px); }
.st + .st::before { content: "→"; position: absolute; left: -28px; top: 50%; transform: translateY(-50%); font-family: var(--latin); font-size: 20px; color: var(--mute); }
.st .st-when { margin-top: 10px; font-size: 14px; color: var(--mute); }
.st dl { margin-top: 18px; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0 12px; }
.st dt, .st dd { padding-block: 10px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.st dt { color: var(--mute); }
.st dd { margin: 0; }
.states3 + .figure { margin-top: clamp(40px, 5vw, 64px); }
.sheet-lone { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sheet-lone img { width: 100%; height: auto; display: block; }
.dec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 5vw, 64px); align-items: center; }
.dec + .dec { margin-top: clamp(56px, 7vw, 96px); }
.dec .pn { font-family: var(--latin); font-size: 40px; font-weight: 300; color: var(--mute); line-height: 1; }
.dec h3 { margin-top: 14px; font-size: clamp(21px, 2.2vw, 26px); font-weight: 700; line-height: 1.45; }
.dec p { margin-top: 12px; color: var(--ink-2); }
.dec:nth-of-type(even) .dec-text { order: 2; }
.dec-img img { max-height: 560px; object-fit: contain; }
.flow-notes { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.flow-notes h3 { font-size: 17px; font-weight: 700; }
.flow-notes p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 900px) {
  .states3 { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .st + .st::before { content: "↓"; left: 50%; top: -28px; transform: translateX(-50%); }
  .dec { grid-template-columns: minmax(0, 1fr); }
  .dec:nth-of-type(even) .dec-text { order: 0; }
  .flow-notes { grid-template-columns: minmax(0, 1fr); }
}
a.next-card:hover .card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
a.next-card:hover .cover img { transform: scale(1.02); }

/* case 2 flow */
.flow-keys { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.flow-keys li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.flow-keys .k { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #4F46E5; color: #fff; font: 700 14px var(--latin); display: grid; place-items: center; margin-top: 1px; }
.flow-keys b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.quote-fb { margin-top: clamp(56px, 7vw, 96px); max-width: 52em; }
.quote-fb blockquote { margin-top: 12px; font-size: clamp(22px, 2.8vw, 34px); font-weight: 900; line-height: 1.5; letter-spacing: -0.01em; }
.quote-fb .fb-why { margin-top: 16px; color: var(--ink-2); }
.flow-orig { margin-top: clamp(40px, 5vw, 64px); }
@media (max-width: 900px) { .flow-keys { grid-template-columns: minmax(0, 1fr); } .flow-orig { max-width: none; } }
.sub-head { margin-top: clamp(64px, 8vw, 104px); }
.sub-head h3 { margin-top: 8px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; }

/* ===== case 3 ===== */
.placements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; background: var(--tint-3); border-radius: var(--radius); padding: clamp(18px, 3vw, 40px); }
.pl { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pl-pair img { width: 100%; height: auto; aspect-ratio: 478 / 973; object-fit: cover; object-position: top; border-radius: 14px; box-shadow: 0 14px 30px -18px rgba(40, 20, 80, .5); background: #fff; }
.pl figcaption { display: flex; flex-direction: column; gap: 2px; color: #161615; }
.pl figcaption b { font-size: 16px; }
.pl figcaption span { font-size: 13.5px; color: #4B4944; }
.decision { background: var(--band-bg); color: var(--band-fg); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); }
.decision .eyebrow { color: var(--band-mute); }
.decision p { margin-top: 8px; font-size: clamp(19px, 2.2vw, 26px); font-weight: 700; line-height: 1.5; }
.decision b { color: #A5B4FC; }
.langs { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.lang { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 52px; display: flex; flex-direction: column; gap: 12px; }
.lang header h3 { font-size: 18px; font-weight: 700; }
.lang header h3 small { font-size: 13px; font-weight: 400; color: var(--mute); }
.lang header span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--mute); }
.lang p { color: var(--ink-2); font-size: 15.5px; line-height: 1.8; padding-top: 12px; border-top: 1px solid var(--line); }
.lang code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--soft); padding: 1px 5px; border-radius: 4px; color: var(--ink); }
.lang .ai { position: absolute; left: 22px; bottom: 18px; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }
.retros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.retro { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 2.6vw, 30px); display: flex; flex-direction: column; gap: 12px; }
.retro .pn { font-family: var(--latin); font-size: 15px; font-weight: 500; color: var(--mute); }
.retro h3 { font-size: 19px; font-weight: 700; line-height: 1.5; }
.retro dl { margin-top: 4px; display: grid; gap: 4px; }
.retro dt { font-size: 13px; color: var(--mute); margin-top: 8px; }
.retro dd { margin: 0; font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.retro dt:last-of-type + dd { color: var(--ink); font-weight: 500; }
@media (max-width: 1100px) { .langs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .placements, .retros { grid-template-columns: minmax(0, 1fr); } .placements { gap: 28px; } .pl-pair { max-width: 460px; } }
@media (max-width: 640px) { .langs { grid-template-columns: minmax(0, 1fr); } }
.pl-video { display: block; width: 100%; max-width: 300px; margin: 0 auto; height: auto; aspect-ratio: 480 / 1050; border-radius: 30px; background: #fff; outline: 1px solid rgba(22, 22, 21, .08); outline-offset: -1px; box-shadow: 0 18px 36px -20px rgba(40, 20, 80, .45); }
.pl figcaption { text-align: center; align-items: center; }
@media (max-width: 900px) { .placements { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .pl figcaption b { font-size: 14px; } .pl figcaption span { font-size: 12px; } }
@media (max-width: 560px) { .placements { grid-template-columns: minmax(0, 1fr); gap: 32px; } .pl-video { max-width: 260px; } }

/* ---------- Case 4 ---------- */
.scenes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scene { background: var(--tint-4); color: #161615; border-radius: var(--radius); padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 6px; }
.scene .sc-if { align-self: flex-start; font-size: 14px; font-weight: 500; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid rgba(22, 22, 21, .1); }
.scene .sc-arr { font-family: var(--latin); color: #4B4944; margin: 6px 0 2px; }
.scene h3 { font-size: 20px; font-weight: 700; line-height: 1.45; }
.scene p { font-size: 15px; color: #4B4944; }
.sub-head + .chain, h3.sub-head + .retros, .sub-head + .phones4, .sub-head + .desk2 { margin-top: 16px; }
.chain + .sub-head, .phones4 + .sub-head, .desk2 + .sub-head { margin-top: clamp(40px, 5vw, 64px); }
.chain { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: ch; }
.chain li { position: relative; counter-increment: ch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 16px; font-weight: 500; line-height: 1.55; }
.chain li::before { content: counter(ch, decimal-leading-zero); display: block; font-family: var(--latin); font-size: 13px; font-weight: 400; color: var(--mute); margin-bottom: 6px; }
.chain li + li::after { content: "→"; position: absolute; left: -22px; top: 50%; transform: translateY(-50%); font-family: var(--latin); color: var(--mute); }
.chain li.hl { background: var(--band-bg); color: var(--band-fg); border-color: transparent; }
.chain li.hl::before { color: var(--band-mute); }
.rm-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rm { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 15.5px; line-height: 1.7; }
.rm th, .rm td { text-align: left; vertical-align: top; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.rm tbody tr:last-child th, .rm tbody tr:last-child td { border-bottom: 0; }
.rm thead th { font-size: 17px; font-weight: 700; background: var(--soft); color: var(--ink); }
.rm .lv { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--latin); font-size: 12px; font-weight: 500; vertical-align: 2px; }
.rm tbody th { width: 7.5em; font-size: 13.5px; font-weight: 500; color: var(--mute); }
.rm td { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.phones4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); background: var(--tint-4); border-radius: var(--radius); padding: clamp(18px, 3vw, 40px); }
.phones4 figure { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.phones4 img { width: 100%; height: auto; aspect-ratio: 390 / 849; object-fit: cover; object-position: top; border-radius: 18px; background: #fff; box-shadow: 0 14px 30px -18px rgba(20, 50, 30, .5); }
.phones4 figcaption { text-align: center; font-size: 14px; font-weight: 500; color: #161615; }
.desk2 { display: grid; gap: clamp(20px, 3vw, 32px); }
.desk2 .shot img { display: block; width: 100%; height: auto; }
.scope { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); }
.scope h3 { font-size: 19px; font-weight: 700; }
.scope p { margin-top: 10px; color: var(--ink-2); max-width: 46em; }
@media (max-width: 900px) {
  .scenes { grid-template-columns: minmax(0, 1fr); }
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .chain li + li::after { display: none; }
  .phones4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .chain { grid-template-columns: minmax(0, 1fr); } }
h3.sub-head { font-size: clamp(18px, 2vw, 22px); font-weight: 700; }
.ch-head + h3.sub-head { margin-top: 0; }
.chain + h3.sub-head, .phones4 + h3.sub-head, .desk2 + h3.sub-head { margin-top: clamp(48px, 6vw, 80px); }
.rm thead th { color: var(--ink); }
.sub-note { margin-top: 6px; color: var(--ink-2); font-size: 15.5px; }
h3.sub-head + .sub-note + .desk2 { margin-top: 16px; }

/* ---------- Case 5 ---------- */
.cover-hero { aspect-ratio: 21 / 9; border-radius: var(--radius); }
@media (max-width: 640px) { .cover-hero { aspect-ratio: 4 / 3; flex-direction: column; gap: 10px; } .cover-hero .arr { transform: rotate(90deg); } }
.cover-hero b { font-size: clamp(40px, 8vw, 120px); }
.cover-hero small { font-size: clamp(13px, 1.4vw, 17px); }
.cover-hero .after b { font-weight: 900; }
.vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vs-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 10px; }
.vs-card b { font-size: clamp(40px, 5.6vw, 72px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; }
.vs-card ul { margin-top: 8px; padding-left: 1.1em; color: var(--ink-2); display: grid; gap: 4px; }
.vs-card.after { background: var(--band-bg); color: var(--band-fg); border-color: transparent; }
.vs-card.after .eyebrow { color: var(--band-mute); }
.vs-card.after b { font-weight: 900; }
.vs-card.after ul { color: #D9D7D1; }
.chain.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chain li small { display: block; margin-top: 6px; font-size: 13.5px; font-weight: 400; color: var(--mute); line-height: 1.6; }
.chain li.hl small { color: var(--band-mute); }
.chain li em { display: inline-block; font-style: normal; font-family: var(--latin); font-size: 12px; font-weight: 500; padding: 1px 8px; margin-right: 6px; border-radius: 999px; background: #A5B4FC; color: #1E1B4B; vertical-align: 2px; }
.threads { margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.threads-lead { margin-top: 8px; font-size: clamp(17px, 1.8vw, 20px); max-width: 36em; }
.thread-list { list-style: none; margin-top: 24px; border-top: 1px solid var(--line); }
.thread-list li a { display: grid; grid-template-columns: 3em 9em minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 18px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.thread-list li a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.thread-list .pn { font-family: var(--latin); color: var(--mute); }
.thread-list b { font-size: 18px; }
.thread-list li span:last-child { color: var(--ink-2); }
@media (max-width: 1100px) { .chain.c5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .chain.c5 li:nth-child(4)::after { display: none; } }
@media (max-width: 900px) { .chain.c5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .vs { grid-template-columns: minmax(0, 1fr); }
  .thread-list li a { grid-template-columns: 2.4em minmax(0, 1fr); }
  .thread-list li span:last-child { grid-column: 2; }
}
@media (max-width: 560px) { .chain.c5 { grid-template-columns: minmax(0, 1fr); } }
.threads .sum-h { margin-top: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; }
.kpis b { white-space: nowrap; }
.threads.home { margin-top: clamp(48px, 6vw, 80px); padding-top: 0; border-top: 0; max-width: 960px; }
.threads-h { font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--mute); }
.threads.home .thread-list { margin-top: 12px; }
.thread-list li a .go-sm { margin-left: auto; }
.thread-list li a::after { content: "→"; font-family: var(--latin); color: var(--mute); justify-self: end; }
.thread-list li a { grid-template-columns: 3em 9em minmax(0, 1fr) 1.5em; }
.thread-list li a:hover::after { color: var(--ink); }
@media (max-width: 640px) { .thread-list li a { grid-template-columns: 2.4em minmax(0, 1fr) 1.2em; } .thread-list li a::after { grid-row: 1; grid-column: 3; } }

/* ---------- Home: methods ---------- */
.methods { margin-top: clamp(56px, 7vw, 96px); }
.m-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.m-tile { display: flex; flex-direction: column; gap: 8px; min-height: 236px; padding: 22px 20px 20px; border-radius: var(--radius); color: #161615; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.m-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -22px rgba(22, 22, 21, .45); }
.m-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.m-n { font-family: var(--latin); font-size: 14px; color: #6B675F; }
.m-tile h3 { margin-top: 18px; font-size: clamp(19px, 1.7vw, 22px); font-weight: 900; line-height: 1.35; }
.m-tile p { font-size: 14.5px; line-height: 1.7; color: #4B4944; }
.m-case { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(22, 22, 21, .12); font-size: 13px; color: #4B4944; display: flex; justify-content: space-between; gap: 8px; }
.m-tile:hover .m-case { color: #161615; }
.m-next { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; color: var(--ink-2); font-size: 15.5px; }
.m-next span { font-size: 13px; font-weight: 700; color: var(--ink); }
@media (max-width: 1100px) {
  .m-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .m-tile { grid-column: span 2; min-height: 0; }
  .m-tile:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 640px) {
  .m-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .m-tile, .m-tile:nth-child(n+4) { grid-column: auto; display: grid; grid-template-columns: 2.2em minmax(0, 1fr); column-gap: 8px; row-gap: 4px; padding: 16px 18px; }
  .m-n { grid-row: 1 / span 2; padding-top: 3px; }
  .m-tile h3 { margin-top: 0; font-size: 18px; }
  .m-tile p { grid-column: 2; }
  .m-case { grid-column: 2; margin-top: 8px; padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .m-tile { transition: none; } .m-tile:hover { transform: none; } }
@media (max-width: 640px) {
  .m-grid { gap: 8px; }
  .m-tile, .m-tile:nth-child(n+4) { grid-template-columns: 2em minmax(0, 1fr) 1em; row-gap: 2px; padding: 12px 16px; align-items: baseline; }
  .m-tile::after { content: "→"; grid-column: 3; grid-row: 1; font-family: var(--latin); font-size: 14px; color: #6B675F; justify-self: end; }
  .m-n { grid-row: 1; padding-top: 0; font-size: 13px; }
  .m-tile h3 { font-size: 16.5px; }
  .m-tile p { grid-column: 2 / span 2; font-size: 13.5px; line-height: 1.6; }
  .m-case { display: none; }
  .m-next { font-size: 14.5px; }
}
.extend { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr) minmax(0, 2.4fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.extend div { padding: 18px 20px 20px 0; }
.extend div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.extend dt { font-size: 13px; color: var(--mute); }
.extend dd { margin: 6px 0 0; font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }
.extend dd b { color: var(--ink); font-size: 18px; }
@media (max-width: 720px) {
  .extend { grid-template-columns: minmax(0, 1fr); }
  .extend div, .extend div + div { padding: 14px 0; border-left: 0; }
  .extend div + div { border-top: 1px solid var(--line); }
}
/* methods: monochrome */
.m-tile { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.m-n { color: var(--mute); }
.m-tile p, .m-case { color: var(--ink-2); }
.m-case { border-top-color: var(--line); }
.m-tile:hover { border-color: var(--ink); box-shadow: none; }
.m-tile:hover .m-case { color: var(--ink); }
@media (max-width: 640px) { .m-tile::after { color: var(--mute); } }

/* Case 5 cover */
.time-cover { aspect-ratio: 21 / 9; background: var(--tint-5); color: #161615; border-radius: var(--radius); padding: clamp(24px,4vw,64px); display:flex; flex-direction:column; justify-content:space-between; }
.time-cover-head { display:flex; justify-content:space-between; gap:12px; font-size:clamp(10px,1vw,13px); letter-spacing:.12em; color:#777268; }
.time-cover-body { display:grid; grid-template-columns: 1.5fr 1fr; align-items:end; gap:clamp(24px,5vw,80px); }
.time-result > span { font-size:clamp(13px,1.3vw,17px); color:#6f6b63; }
.time-result strong { display:block; font-size:clamp(58px,9vw,140px); letter-spacing:-.06em; line-height:1.15; font-weight:800; white-space:nowrap; }
.time-result strong small { font-size:.36em; letter-spacing:0; margin-left:.2em; }
.time-result p { margin:0; color:#6f6b63; font-size:14px; }
.time-detail { padding-bottom:5px; }
.time-badge { display:inline-block; background:#161615; color:#f2eee3; border-radius:100px; padding:8px 16px; font-size:14px; }
.time-detail p { font-size:clamp(16px,1.5vw,21px); line-height:1.7; margin:20px 0; color:#6f6b63; }
.time-detail p b { color:#161615; font-size:1.4em; margin-right:.3em; }
.time-rule { display:block; height:1px; background:#c9c3b7; margin-bottom:15px; }
.time-detail > small { color:#6f6b63; font-size:12px; }
@media(max-width:640px) { .time-cover { aspect-ratio:auto; min-height:410px; } .time-cover-head span:last-child { display:none; } .time-cover-body { grid-template-columns:1fr; gap:28px; } .time-result strong { font-size:clamp(64px,17vw,96px); } .time-detail p { margin:10px 0; } }
