/* ==========================================================================
   Ian's Portfolio · v3 case-study (work detail) styles. Dark only.
   Tokens, fonts, nav, buttons, tags and footer come from ../site.css.
   Layout (after piszczek.pl/michal-piszczek):
     1. full-width header (container 1280): crumb, badge, title, intro, facts box, hero media
     2. two columns: sticky numbered index | chapters (chapter media stays column-width)
   Block classes are unchanged from v2, so chapter markup carries over as is.
   Project colours are set per page on <body style="--ground-1 …">.
   ========================================================================== */
body { --ground-1: #2a5590; --ground-2: #16325c; --ground-3: #0c1a2e; --ground-alt: #1d232b; --ground-light: #e6e9e8;
  /* names used by the Shutucloud demos */
  --font-ui: var(--font-sans); --font-display: var(--font-sans); --font-text: var(--font-sans); }
.display { font-family: var(--font-sans); font-weight: 700; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
html[lang^="zh"] .eyebrow { letter-spacing: .05em; }
.mark { color: var(--text); background: linear-gradient(transparent 62%, rgba(235,91,25,.38) 62%); padding: 0 .06em; }

/* ---------- 1. header ---------- */
.case-head { padding-top: 56px; }
.crumb { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1 var(--font-mono); letter-spacing: .04em; color: var(--dim); text-decoration: none; }
.crumb b { color: var(--muted); font-weight: 400; }
.crumb:hover, .crumb:hover b { color: var(--text); }
.crumb .ri { width: 14px; height: 14px; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; padding: 7px 12px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.badge .eyebrow { color: var(--accent); font-size: 11px; }
.case-title { margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.case-title h1 { font-size: clamp(44px, 6vw, 84px); line-height: 1.04; letter-spacing: -.04em; }
html[lang^="zh"] .case-title h1 { letter-spacing: -.01em; line-height: 1.12; }
.case-intro { max-width: 820px; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.5; font-weight: 500; color: var(--text); text-wrap: pretty; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 48px; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.fact { background: var(--surface); padding: 24px 28px 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fact .eyebrow { font-size: 10px; color: var(--dim); }
.fact b { font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--text); letter-spacing: -.015em; }
.fact.is-key b { color: var(--accent); }
html[lang^="zh"] .fact b { letter-spacing: 0; }
.case-hero-media { margin-top: 24px; border-radius: 20px; overflow: hidden; background: var(--ground-3); aspect-ratio: 2 / 1; }
.case-hero-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .case-head { padding-top: 28px; }
  .badge { margin-top: 20px; }
  .case-title { margin-top: 18px; gap: 14px; }
  .facts { margin-top: 28px; }
  .fact { padding: 16px 14px 18px; }
  .fact b { font-size: 16px; }
  .case-hero-media { margin-top: 16px; border-radius: 14px; aspect-ratio: 16 / 11; }
  .case-hero-media img { object-position: 30% 50%; }
}

/* ---------- 2. index + chapters ---------- */
.case-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding-block: 96px 40px; }
.toc { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; display: flex; flex-direction: column; }
.toc > .eyebrow { font-size: 11px; color: var(--dim); text-transform: none; letter-spacing: .04em; }
.toc > .eyebrow::before { content: "// "; }
.toc-progress { order: -1; display: none; }
.toc a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px; padding: 9px 0 9px 14px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; transition: color .2s, background-color .2s; }
.toc a span:first-child { font: 400 11px/1.9 var(--font-mono); color: var(--dim); }
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--text); font-weight: 500; border-left-color: var(--accent); background: var(--accent-soft); padding-left: 12px; }
.toc a[aria-current="true"] span:first-child { color: var(--accent); }
.toc .toc-bar { height: 2px; background: var(--line-strong); margin: 16px 0; position: relative; overflow: hidden; }
.toc .toc-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .1s linear; }
@media (max-width: 960px) {
  .case-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 40px; }
  .toc { position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); z-index: 20; flex-direction: row; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--pad-x)) 40px; padding: 12px var(--pad-x); background: rgba(6,6,6,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-block: 1px solid var(--line); scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc > .eyebrow, .toc .toc-bar { display: none; }
  .toc a { flex: none; display: inline-flex; gap: 6px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; }
  .toc a span:first-child { line-height: 1.6; }
  .toc a[aria-current="true"] { border-color: var(--accent); padding-left: 12px; }
}
.article { min-width: 0; display: flex; flex-direction: column; gap: 128px; }
@media (max-width: 720px) { .article { gap: 88px; } }

/* chapter head: number + label, then one statement */
.ch-label { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
html[lang^="zh"] .ch-label { letter-spacing: .05em; }
.ch-head { margin-bottom: 28px; max-width: 880px; }
.ch-head h2 { margin-top: 14px; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.15; letter-spacing: -.03em; }
html[lang^="zh"] .ch-head h2 { letter-spacing: -.01em; line-height: 1.25; }
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 18px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.prose strong { color: var(--text); font-weight: 500; }

/* hairline boxes: steps, decisions, results, retro (Piszczek-style cells) */
.cols { display: grid; gap: 1px; margin: 40px 0 0; padding: 0; list-style: none; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols > * { background: var(--bg); padding: 24px 24px 28px; min-width: 0; }
.cols b { display: block; font-size: 19px; font-weight: 600; line-height: 1.35; color: var(--text); letter-spacing: -.01em; }
html[lang^="zh"] .cols b { font-weight: 700; letter-spacing: 0; }
.cols p { margin-top: 8px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.cols .ch-label { display: block; margin-bottom: 10px; }
@media (max-width: 900px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } .cols > * { padding: 18px 16px 20px; } }
.stats > * { background: var(--surface); }
.stats b { font-size: clamp(48px, 5.6vw, 76px); line-height: 1; font-weight: 700; letter-spacing: -.04em; color: var(--text); }
.stats li:first-child b { color: var(--accent); }
.stats b small { font-size: .4em; margin-left: 4px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.stats p { margin-top: 12px; }
.retro { margin-top: 24px; }

/* pull quote */
.pull { margin: 48px 0 0; max-width: 820px; padding: 18px 0 18px 24px; border-left: 2px solid var(--accent); }
.pull p { font-size: clamp(19px, 2vw, 24px); line-height: 1.55; font-weight: 500; color: var(--text); }
.pull cite { display: block; margin-top: 12px; font-style: normal; font: 400 12px/1 var(--font-mono); letter-spacing: .06em; color: var(--dim); }
.pull cite::before { content: "— "; }

/* personas */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 56px; }
.person { margin: 0; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.person img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.person figcaption { padding: 14px 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.person b { font-size: 22px; line-height: 1.25; font-weight: 700; color: var(--text); }
.person figcaption > span { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.person q { margin-top: 8px; font-size: 15.5px; line-height: 1.55; font-weight: 500; color: var(--text); }
@media (max-width: 760px) {
  .people { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .person { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
  .person figcaption { padding: 4px 4px 4px 0; }
}
.note { margin-top: 14px; font: 400 11.5px/1.5 var(--font-mono); letter-spacing: .04em; color: var(--dim); }

/* media: screens float on the project ground; diagrams on a light ground */
.media { margin: 32px 0 0; padding: clamp(14px, 5vw, 64px); border-radius: clamp(14px, 1.6vw, 20px); background: radial-gradient(120% 100% at 18% 0%, var(--ground-1) 0%, var(--ground-2) 58%, var(--ground-3) 100%); }
.media img { border-radius: clamp(6px, .8vw, 10px); box-shadow: 0 2px 6px #0000004d, 0 32px 64px -24px #000000a6; }
.media--alt { background: var(--ground-alt); border: 1px solid var(--line); }
.media--light { background: var(--ground-light); padding: clamp(10px, 3vw, 32px); }
.media--light img { box-shadow: none; border-radius: 8px; }
.media--phones img { border-radius: 0; box-shadow: none; filter: drop-shadow(0 2px 4px #00000040) drop-shadow(0 28px 36px #00000066); }
.caption { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 52em; }
.zoomable { cursor: zoom-in; position: relative; display: block; width: 100%; border: 0; padding: 0; background: none; color: inherit; font: inherit; }
.zoomable img { width: 100%; height: auto; }
.zoomable .zoom-chip { position: absolute; right: 12px; bottom: 12px; font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); padding: 8px 10px; border-radius: 2px; opacity: 0; transition: opacity .2s ease; }
.zoomable:hover .zoom-chip, .zoomable:focus-visible .zoom-chip { opacity: 1; }

/* one screen: label, statement, media, decisions */
.shot { margin-top: 96px; }
.ch-head + .shot { margin-top: 16px; }
.shot > h3 { margin-top: 10px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; font-weight: 700; letter-spacing: -.025em; max-width: 24em; }
html[lang^="zh"] .shot > h3 { letter-spacing: 0; line-height: 1.3; }
.points { margin-top: 24px; }

/* details: close-ups */
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.detail { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.detail--wide { grid-column: 1 / -1; }
.detail-ground { flex: 1; display: grid; place-items: center; padding: clamp(20px, 4vw, 52px); border-radius: 16px; background: radial-gradient(120% 100% at 18% 0%, var(--ground-1) 0%, var(--ground-2) 58%, var(--ground-3) 100%); }
.detail-ground img { width: auto; max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 2px 6px #0000004d, 0 24px 48px -18px #000000a6; }
.detail--wide .detail-ground img { width: min(100%, 760px); }
.detail figcaption { margin-top: 12px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
@media (max-width: 640px) { .details { grid-template-columns: minmax(0, 1fr); } }

/* visual language */
.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
@media (max-width: 760px) { .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sw { border-radius: 12px; border: 1px solid var(--line-strong); overflow: hidden; background: var(--surface); }
.sw i { display: block; height: 72px; border-bottom: 1px solid var(--line); }
.sw div { padding: 10px 12px 12px; }
.sw b { display: block; font-size: 14px; font-weight: 600; }
.sw code { font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
.sw div > span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 28px; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; font-size: 15px; }
.compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; color: var(--text); }
.compare tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; width: 22%; background: var(--surface); color: var(--muted); }
@media (max-width: 640px) { .compare td { padding: 10px 12px; font-size: 14px; } }

/* credo band: closes the story */
.creed { margin-top: 48px; padding: clamp(24px, 4vw, 44px); border-radius: 16px; background: var(--surface); border: 1px solid var(--line-strong); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.creed .eyebrow { color: var(--accent); width: 100%; }
.creed b { font-size: clamp(26px, 3.4vw, 44px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
html[lang^="zh"] .creed b { letter-spacing: .02em; }
.creed i { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }

/* end: back to all works, then the contact bar (after excited.agency) */
.case-end { border-top: 1px solid var(--line); margin-top: 64px; padding-block: 72px 96px; }
.case-end .wrap { display: flex; flex-direction: column; gap: 40px; }
.all-works { display: flex; justify-content: center; }
.contact-bar { display: flex; align-items: center; gap: 24px 28px; padding: 44px 44px 44px 48px; border: 1px solid var(--line-strong); border-radius: 20px; }
.cb-icon { color: var(--accent); flex: none; display: grid; }
.cb-icon .ri { width: 52px; height: 52px; }
.cb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cb-text h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -.025em; }
html[lang^="zh"] .cb-text h2 { letter-spacing: 0; }
html:not([lang^="zh"]) .cb-text h2 br, .cb-text h2 .zh br { display: none; }
.cb-text p { font-size: 16px; line-height: 1.55; color: var(--muted); }
@media (max-width: 860px) {
  .contact-bar { flex-direction: column; align-items: stretch; padding: 28px 20px 20px; gap: 18px; border-radius: 16px; }
  .cb-icon .ri { width: 40px; height: 40px; }
  .contact-bar .btn { justify-content: space-between; }
}
@media (max-width: 720px) {
  .case-end { padding-block: 48px 64px; }
  .case-end .wrap { gap: 16px; }
  .all-works .btn { flex: 1; justify-content: space-between; }
  .cb-text h2 { font-size: 26px; }
  .cb-text .zh br { display: inline; }
  html[lang^="zh"] .cb-text h2 .zh br { display: inline; }
}

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6,6,6,.96); display: none; flex-direction: column; }
.lightbox.open { display: flex; }
.lightbox-bar { display: flex; align-items: center; gap: 10px; padding: 12px max(var(--pad-x), env(safe-area-inset-right)) 12px max(var(--pad-x), env(safe-area-inset-left)); color: var(--text); font: 400 13px/1.4 var(--font-mono); }
.lightbox-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.lightbox-bar button { width: 40px; height: 40px; border-radius: 2px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.lightbox-bar button:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-bar button svg { width: 18px; height: 18px; fill: currentColor; }
.lightbox-stage { flex: 1; overflow: auto; display: grid; place-items: start center; padding: 0 16px 24px; -webkit-overflow-scrolling: touch; }
.lightbox-stage img { max-width: min(100%, 1800px); height: auto; border-radius: 8px; }
.lightbox-stage.is-full img { max-width: none; width: 2400px; }

/* ==========================================================================
   Research & system blocks (added 2026-10-24 for BOS 2.0; reusable in any case)
   .fmap feature map · .cards role / region cards (+ live clocks via [data-tz])
   .board sticky wall · .smap user story map · .ba before/after slider
   .issues numbered problems · .tline sprint timeline
   ========================================================================== */
/* feature map */
.fmap { margin-top: 36px; padding: clamp(16px, 3vw, 32px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.fmap-root { display: flex; flex-direction: column; align-items: center; }
.fmap-root span { font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.fmap-root::after { content: ""; width: 1px; height: 20px; background: var(--line-strong); }
.fmap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.fmap-col { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--bg); min-width: 0; }
.fmap-col h4 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.35; font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.fmap-col h4 small { font: 400 11px/1 var(--font-mono); color: var(--dim); }
.fmap-col ul { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.fmap-col li { font-size: 13px; line-height: 1.45; color: var(--muted); }
.fmap-col li.is-hot { color: var(--text); }
.fmap-col li.is-hot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--accent); }
.fmap-key { margin-top: 16px; font: 400 11.5px/1.5 var(--font-mono); letter-spacing: .04em; color: var(--dim); }
.fmap-key i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
@media (max-width: 760px) { .fmap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* role and region cards */
.sub-h { margin-top: 72px; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
/* prototype link: one standard primary button after a short paragraph (Cargo, Mobile App) */
.proto-cta { margin-top: 28px; }
html[lang^="zh"] .sub-h { letter-spacing: 0; }
.sub-h + p { margin-top: 10px; max-width: 720px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 12px; margin-top: 28px; }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px 18px 20px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card h4 { font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.card-top .ri { width: 22px; height: 22px; color: var(--accent); flex: none; }
.card .clock { font: 500 20px/1 var(--font-mono); color: var(--accent); letter-spacing: .02em; }
.card .clock small { display: block; margin-top: 6px; font-size: 10.5px; color: var(--dim); letter-spacing: .06em; }
.card dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.card dt { font: 400 10.5px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.card dd { margin: 3px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.card dd b { color: var(--text); font-weight: 500; }
.card--region { border-top: 2px solid var(--accent); }

/* sticky wall (after excited.agency/works/clubready) */
.board { margin-top: 32px; padding: clamp(18px, 3.5vw, 40px); border-radius: 16px; color: #1e1e1e; background: #f3f1ec radial-gradient(rgba(0,0,0,.09) 1px, transparent 1.4px) 0 0 / 22px 22px; }
.board-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
.board-group > h4 { margin-bottom: 18px; font-size: 14px; line-height: 1.35; font-weight: 600; color: #1e1e1e; }
.sticky { position: relative; margin: 0 0 22px; padding: 30px 14px 18px; min-height: 140px; background: var(--st, #ffe299); color: #1e1e1e; font-size: 14.5px; line-height: 1.5; font-weight: 500; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 12px 18px -12px rgba(0,0,0,.45); transform: rotate(var(--r, 0deg)); transition: transform .25s ease, box-shadow .25s ease; }
.sticky:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 18px 24px -12px rgba(0,0,0,.5); }
.sticky .who { position: absolute; left: 50%; top: -9px; transform: translateX(-50%) rotate(-2deg); padding: 4px 10px; white-space: nowrap; background: rgba(255,255,255,.88); color: #333; font: 500 11px/1.25 var(--font-mono); letter-spacing: .03em; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.sticky--yellow { --st: #ffe299; } .sticky--blue { --st: #a8daff; } .sticky--green { --st: #b3efbd; } .sticky--violet { --st: #d3bdff; }
.sticky--pink { --st: #ffa8db; } .sticky--teal { --st: #b3f4ef; } .sticky--gray { --st: #e6e6e6; } .sticky--orange { --st: #ffd3a8; }
.board-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font: 400 11.5px/1.5 var(--font-mono); color: #555; }
.board-legend > span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 7px; vertical-align: -1px; background: var(--st); }
@media (max-width: 900px) { .board-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .board-groups { grid-template-columns: minmax(0, 1fr); } .sticky { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .sticky, .sticky:hover { transition: none; transform: none; } }

/* user story map */
.smap-wrap { margin-top: 32px; border-radius: 16px; overflow-x: auto; background: #edf2ec radial-gradient(rgba(0,0,0,.08) 1px, transparent 1.4px) 0 0 / 22px 22px; scrollbar-width: thin; }
.smap { min-width: 940px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 14px; padding: clamp(18px, 3vw, 36px); color: #1e1e1e; }
.smap .act { padding: 12px 10px; border-radius: 999px; background: #1e1e1e; color: #fff; text-align: center; font-size: 14px; line-height: 1.3; font-weight: 600; }
.smap .cell { display: flex; flex-direction: column; gap: 10px; }
.smap .sticky { margin: 0; min-height: 0; padding: 12px 12px 14px; font-size: 13px; line-height: 1.45; transform: none; }
.smap .sticky:hover { transform: translateY(-2px); }
.smap .rel { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; font: 500 11.5px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #1f804d; }
.smap .rel::after { content: ""; flex: 1; height: 2px; background: currentColor; }
.smap .rel--next { color: #6f6f6f; }
.smap .rel--next::after { background: repeating-linear-gradient(90deg, #9a9a9a 0 8px, transparent 8px 14px); }
.smap-hint { display: none; margin-top: 10px; font: 400 11.5px/1.4 var(--font-mono); color: var(--dim); }
@media (max-width: 960px) { .smap-hint { display: block; } }

/* before / after slider */
.ba { position: relative; overflow: hidden; border-radius: clamp(6px, .8vw, 10px); box-shadow: 0 2px 6px #0000004d, 0 32px 64px -24px #000000a6; touch-action: pan-y; --pos: 50%; }
.ba img { width: 100%; height: auto; border-radius: 0 !important; box-shadow: none !important; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-before img { height: 100%; object-fit: cover; }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
.ba-line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230b0b0b'%3E%3Cpath d='M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z' transform='translate(-3 0)'/%3E%3Cpath d='M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z' transform='translate(3 0)'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba-range:focus-visible + .ba-line::after { box-shadow: var(--focus); }
.ba-tag { position: absolute; top: 12px; padding: 6px 10px; border-radius: 2px; font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.ba-tag--l { left: 12px; background: rgba(6,6,6,.82); color: var(--text); }
.ba-tag--r { right: 12px; background: var(--accent); color: var(--on-accent); }

/* numbered problems (match the markers on a screenshot) */
.issues .ch-label { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-bottom: 12px; border-radius: 50%; background: var(--text); color: var(--bg); letter-spacing: 0; font-weight: 600; }
.issues b { font-size: 17px; }

/* sprint timeline */
.tline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 44px; }
.tline li { position: relative; padding: 26px 16px 0 0; border-top: 2px solid var(--line-strong); min-width: 0; }
.tline li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tline li.is-now::before { background: var(--accent); }
.tline .when { font: 500 11.5px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tline b { display: block; margin-top: 8px; font-size: 16px; line-height: 1.35; font-weight: 600; }
.tline p { margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 900px) {
  .tline { grid-template-columns: minmax(0, 1fr); }
  .tline li { border-top: 0; border-left: 2px solid var(--line-strong); padding: 0 0 24px 22px; }
  .tline li::before { top: 2px; left: -7px; }
}
/* roles as a hairline table (stacks on phones) */
.rtable { margin-top: 28px; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.rt-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; gap: 1px; background: var(--line); }
.rt-row + .rt-row { border-top: 1px solid var(--line); }
.rt-row > span { background: var(--bg); padding: 16px 18px; font-size: 14px; line-height: 1.6; color: var(--muted); min-width: 0; }
.rt-head > span { background: var(--surface); padding-block: 11px; font: 400 10.5px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.rt-role { display: flex; align-items: flex-start; gap: 10px; }
.rt-role .ri { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--accent); }
.rt-role b { font-size: 16px; line-height: 1.35; font-weight: 600; color: var(--text); }
.rt-need { color: var(--text) !important; }
@media (max-width: 760px) {
  .rt-head { display: none; }
  .rt-row { grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--bg); padding: 14px 16px 16px; }
  .rt-row > span { padding: 0; }
  .rt-row > span[data-k] { margin-top: 10px; }
  .rt-row > span[data-k]::before { content: attr(data-k); display: block; font: 400 10px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 2px; }
}
/* five region cards in one row on wide screens */
.cards--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cards--5 .card { padding: 16px 14px 18px; gap: 12px; }
.cards--5 .card-top { flex-direction: column; gap: 8px; }
.cards--5 .card h4 { font-size: 16px; }
.cards--5 .card dd { font-size: 13px; }
@media (max-width: 1180px) { .cards--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cards--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .cards--5 { grid-template-columns: minmax(0, 1fr); } .cards--5 .card-top { flex-direction: row; } }
.nowrap { white-space: nowrap; }

/* confidentiality note at the end of Overview (fintech employer cases) */
.note.confidential { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 760px; font: 400 13.5px/1.65 var(--font-sans); letter-spacing: 0; color: var(--dim); }
.note.confidential b { display: block; margin-bottom: 4px; font: 500 11.5px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- template v4 (2026-11) ---------- */
.tldr { margin: 0 0 80px; padding: 28px 32px 32px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.tldr-head { margin-bottom: 22px; }
.tldr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.tldr dl { display: grid; gap: 18px; margin: 0; }
.tldr dt { font: 500 11.5px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.tldr dd { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); }
.tldr ol { list-style: none; margin: 0; padding: 0; }
.tldr ol li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.55; color: var(--text); }
.tldr ol .n { font: 500 13px/1.6 var(--font-mono); color: var(--accent); flex: none; }
.tldr ol a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--accent-line); }
.tldr ol a:hover { border-bottom-color: var(--accent); }
details.decision { margin-top: 32px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); scroll-margin-top: 96px; }
details.decision > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 18px 24px; }
details.decision > summary::-webkit-details-marker { display: none; }
details.decision > summary b { font-size: 16px; font-weight: 500; color: var(--text); }
.dec-plus { position: relative; width: 14px; height: 14px; flex: none; }
.dec-plus::before, .dec-plus::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: var(--accent); transition: transform .2s; }
.dec-plus::after { transform: rotate(90deg); }
details.decision[open] .dec-plus::after { transform: rotate(0deg); }
.dec-body { padding: 0 24px 28px; }
.dec-body > p { max-width: 760px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.dec-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.dec-opt { border: 1px solid var(--line-strong); border-radius: 12px; padding: 22px 24px; background: var(--bg); }
.dec-opt.is-picked { border-color: var(--accent-line); background: var(--accent-soft); }
.dec-opt header { display: flex; justify-content: space-between; font: 500 11.5px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.dec-opt.is-picked header .st { color: var(--accent); }
.dec-opt h4 { margin: 10px 0; font-size: 19px; font-weight: 600; line-height: 1.35; color: var(--text); }
.dec-opt p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.dec-opt p + p { margin-top: 6px; }
.dec-result { display: flex; gap: 14px; align-items: baseline; margin-top: 20px; font-size: 16px; font-weight: 500; color: var(--text); }
.board, .smap-wrap { position: relative; }
.dec-result .ch-label { white-space: nowrap; }
.recreated { position: absolute; top: 12px; right: 14px; z-index: 2; font: 500 10.5px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #6f6a60; background: rgba(255,255,255,.8); border: 1px solid rgba(0,0,0,.08); padding: 4px 8px; border-radius: 4px; }
.cols.principle > * { padding: 24px 28px; }
.retro .learn ol { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: l; }
.retro .learn li { counter-increment: l; position: relative; padding-left: 30px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.retro .learn li + li { margin-top: 10px; }
.retro .learn li::before { content: "0" counter(l); position: absolute; left: 0; top: 1px; font: 500 12px/1.6 var(--font-mono); color: var(--accent); }
.retro .learn b { color: var(--accent); }
@media (max-width: 860px) { .tldr { padding: 22px 20px 24px; margin-bottom: 56px; } .tldr-grid, .dec-opts { grid-template-columns: minmax(0, 1fr); gap: 28px; } .retro.cols-2 { grid-template-columns: minmax(0, 1fr); } details.decision > summary { padding: 16px 18px; } .dec-body { padding: 0 18px 22px; } .recreated { position: static; display: inline-block; margin-bottom: 12px; } }
.dec-opts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dec-opts + p, .dec-opts + p + p { margin-top: 20px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.metrics > div { padding: 26px 28px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.metrics b { display: block; font-size: clamp(40px, 5vw, 56px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.metrics p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.metrics small { display: block; margin-top: 6px; font: 500 11.5px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.metrics + .cols { margin-top: 20px; }
@media (max-width: 1080px) { .dec-opts--3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .metrics { grid-template-columns: minmax(0, 1fr); } }
.metrics--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metrics--3 b { font-size: clamp(32px, 3.6vw, 44px); }
.dec-body > p + p { margin-top: 10px; }
@media (max-width: 860px) { .metrics--3 { grid-template-columns: minmax(0, 1fr); } }
