/* Le lab page only (/le-lab, /en/the-lab). Loaded after style.css. Prefix lb-. */
main > section { position: relative; }
.route { overflow-x: clip; }
.lb-k { font: 500 12px var(--mono); letter-spacing: .05em; color: var(--muted); }

/* chapter bar: five segments fill as you read */
.lb-chap { position: sticky; top: 73px; z-index: 8; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 0 max(var(--gut), calc((100% - var(--max)) / 2)) 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lb-chap a { text-decoration: none; font: 500 11px var(--mono); letter-spacing: .04em; color: var(--muted); padding-top: 6px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-chap a::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--line); }
.lb-chap a::after { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: calc(var(--p, 0) * 100%); background: var(--c); }
.lb-chap a.on { color: var(--ink); }

/* 1. hero: headline + the lab's spec card */
.lb-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: end; padding-top: clamp(28px, 4vw, 56px) !important; }
.lb-hero h1 { font-size: clamp(40px, 5vw, 78px); line-height: .96; letter-spacing: -.045em; margin: 0 0 22px; max-width: 16ch; }
.lb-hero h1 .grey { color: #8A877F; display: block; }
.lb-hero .lede { margin-bottom: 26px; }
.lb-card { background: var(--ink); color: #F1F0EC; border-radius: 14px; padding: clamp(22px, 2.6vw, 36px); }
.lb-word { font-weight: 800; font-size: clamp(64px, 7.6vw, 128px); letter-spacing: -.06em; line-height: .85; margin: 6px 0 4px; }
.lb-word .o { position: relative; display: inline-block; }
.lb-def { color: #C9C8C2; font-size: 16px; margin: 0 0 18px; max-width: 40ch; }
.lb-def i { font-family: var(--mono); font-style: normal; font-size: 12px; color: #8A8984; }
.lb-spec { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0; border-top: 1px solid #2E2E33; font-size: 15px; margin: 0; }
.lb-spec dt, .lb-spec dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #2E2E33; }
.lb-spec dt { font: 500 12px var(--mono); color: #8A8984; padding-right: 18px; padding-top: 11px; }

.lb-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px clamp(24px, 4vw, 64px); align-items: end; }
.lb-head p { margin: 0 0 12px; color: var(--soft); max-width: 50ch; }
.lb-where { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
.lb-where li { padding: 14px 16px 0 0; }
.lb-where small { display: block; font: 500 11px var(--mono); letter-spacing: .06em; color: var(--muted); }
.lb-where b { display: flex; align-items: center; gap: 8px; font-size: 20px; letter-spacing: -.02em; margin: 4px 0 2px; }
.lb-where b i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.lb-where b i.home { border-radius: 0; width: 18px; background: linear-gradient(90deg, var(--auto) 20%, var(--web) 20% 40%, var(--img) 40% 60%, var(--clips) 60% 80%, var(--pod) 80%); }
.lb-where span { color: var(--soft); font-size: 15px; }

/* 2. scrollytelling map: the map stays, the camera travels */
.lb-story { position: relative; margin-top: 32px; }
.lb-stage { position: sticky; top: 124px; height: calc(100svh - 144px); min-height: 420px; border: 1.5px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--bg); }
.lb-stage .smap { position: absolute; inset: 0; width: 100%; height: 100%; }
.lb-stage .grat { stroke: var(--line); fill: none; vector-effect: non-scaling-stroke; }
.lb-stage .grat path { vector-effect: non-scaling-stroke; }
.lb-stage .fine { fill: #B9B5AB; opacity: 0; }
.lb-stage .eq { stroke: #B9B5AB; stroke-dasharray: 3 4; }
.lb-stage .land { fill: #CFCBC1; }
.lb-stage .leg { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(.45, 0, .2, 1); }
.lb-stage .leg.on { stroke-dashoffset: 0; }
.lb-stage .pin { opacity: .35; transition: opacity .4s; }
.lb-stage .pin.on, .lb-stage .pin.seen { opacity: 1; }
.lb-stage .pin text { font-family: var(--sans); font-weight: 800; letter-spacing: -.02em; fill: var(--ink); opacity: 0; transition: opacity .4s; }
.lb-stage .pin.on text { opacity: 1; }
.lb-hud { position: absolute; right: 14px; top: 14px; background: var(--ink); color: #F1F0EC; border-radius: 12px; padding: 12px 16px; display: grid; gap: 2px; min-width: 210px; font: 500 12px var(--mono); }
.lb-hud > span:first-child { color: #8A8984; }
.lb-hud #hudcity { font: 800 28px var(--sans); letter-spacing: -.03em; }
.lb-hud .km { margin-top: 6px; padding-top: 6px; border-top: 1px solid #2E2E33; color: #C9C8C2; }
.lb-hud .km b { color: #FF7A1A; font-variant-numeric: tabular-nums; }
.lb-steps2 { position: relative; z-index: 2; margin-top: calc(-1 * (100svh - 144px)); pointer-events: none; }
.lb-steps2 .st { min-height: 85svh; display: flex; align-items: center; padding: 0 20px; }
.lb-steps2 .st:first-child { min-height: calc(100svh - 144px); align-items: flex-end; padding-bottom: 20px; }
.lb-steps2 .card { pointer-events: auto; max-width: 360px; background: var(--bg); border: 1.5px solid var(--ink); border-radius: 12px; padding: 18px 20px; box-shadow: 6px 6px 0 var(--c, var(--ink)); }
.lb-steps2 .card .lb-k { display: flex; align-items: center; gap: 8px; }
.lb-steps2 .card .lb-k i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.lb-steps2 .card .lb-k i.home { border-radius: 0; width: 18px; background: linear-gradient(90deg, var(--auto) 20%, var(--web) 20% 40%, var(--img) 40% 60%, var(--clips) 60% 80%, var(--pod) 80%); }
.lb-steps2 h3 { font-size: clamp(30px, 3vw, 48px); letter-spacing: -.045em; line-height: .95; margin: 8px 0 8px; }
.lb-steps2 p { margin: 0; color: var(--soft); }
@media (max-width: 960px) {
  .lb-stage { top: 116px; height: 58svh; min-height: 0; }
  .lb-steps2 { margin-top: -58svh; }
  .lb-steps2 .st { min-height: 80svh; align-items: flex-end; padding: 0 8px 8px; }
  .lb-steps2 .st:first-child { min-height: 58svh; }
  .lb-hud { left: 10px; right: auto; top: 10px; min-width: 0; padding: 8px 12px; font-size: 11px; } .lb-hud #hudcity { font-size: 20px; }
}

/* 3. what we saw everywhere: three small screens with lab notes */
.lb-seen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); margin-top: 36px; }
.lb-fig { margin: 0; }
.lb-scr { position: relative; background: #fff; border: 1.5px solid var(--ink); border-radius: 12px; padding: 14px 14px 56px; min-height: 250px; font-size: 14px; box-shadow: 6px 6px 0 var(--c); }
.lb-scr .bar { display: flex; gap: 5px; margin-bottom: 12px; } .lb-scr .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.lb-mail { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lb-mail i { width: 8px; height: 8px; border-radius: 50%; background: var(--clips); }
.lb-mail b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-mail small { font: 500 11px var(--mono); color: var(--muted); }
.lb-sheet { width: 100%; border-collapse: collapse; font: 500 12px var(--mono); }
.lb-sheet td { border: 1px solid var(--line); padding: 6px 7px; }
.lb-sheet tr:first-child td { background: var(--panel); }
.lb-file { font: 500 12px var(--mono); margin: 0 0 10px; }
.lb-flat { height: 120px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1.5px solid var(--ink); margin: 10px 0 8px; }
.lb-flat i { flex: 1; background: var(--line); height: var(--h); }
.lb-note { position: absolute; font: 500 13px var(--mono); color: var(--c); transform: rotate(var(--r, -3deg)); white-space: nowrap; }
.lb-note svg { display: block; overflow: visible; }
.lb-fig figcaption { margin-top: 16px; }
.lb-fig figcaption b { display: block; font-size: 19px; letter-spacing: -.015em; margin: 4px 0; }
.lb-fig figcaption span { color: var(--soft); font-size: 15px; }
.lb-punch { margin: 36px 0 0; font-weight: 800; font-size: clamp(26px, 2.8vw, 42px); letter-spacing: -.03em; line-height: 1.05; max-width: 26ch; }

/* 4. why now: one switch, two states */
.lb-now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.lb-switch { display: inline-flex; background: var(--panel); border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px; margin: 6px 0 20px; }
.lb-switch button { border: 0; background: none; border-radius: 999px; padding: 10px 20px; font: 500 15px var(--sans); cursor: pointer; }
.lb-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.lb-state { background: var(--panel); border-radius: 14px; padding: clamp(24px, 3vw, 44px); min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; transition: background .45s, color .45s; }
.lb-state.now { background: var(--web); color: #111113; }
.lb-state p.big { font-weight: 800; font-size: clamp(30px, 3.4vw, 52px); letter-spacing: -.04em; line-height: 1; margin: 0 0 20px; max-width: 16ch; }
.lb-state ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 16px; }
.lb-state li::before { content: ""; display: inline-block; width: 8px; height: 8px; background: currentColor; margin-right: 10px; vertical-align: 1px; }
.lb-state [data-when] { display: none; } .lb-state:not(.now) [data-when="then"], .lb-state.now [data-when="now"] { display: block; }

/* 5. method: four real steps, a line that fills */
.lb-steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); position: relative; }
.lb-steps::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 3px; background: var(--line); }
.lb-steps::after { content: ""; position: absolute; left: 0; top: 17px; height: 3px; width: 0; background: var(--ink); transition: width 1.6s cubic-bezier(.45, 0, .2, 1); }
.lb-method.go .lb-steps::after { width: 100%; }
.lb-steps li { position: relative; }
.lb-steps .dot { position: relative; z-index: 1; width: 37px; height: 37px; border-radius: 50%; background: var(--bg); border: 3px solid var(--ink); display: grid; place-items: center; font: 500 13px var(--mono); margin-bottom: 18px; transition: background .3s calc(var(--i) * .4s), color .3s calc(var(--i) * .4s); }
.lb-method.go .dot { background: var(--ink); color: var(--bg); }
.lb-steps b { display: block; font-size: clamp(20px, 1.7vw, 25px); letter-spacing: -.02em; line-height: 1.05; margin-bottom: 8px; }
.lb-steps p { margin: 0; color: var(--soft); font-size: 15px; max-width: 30ch; }
.lb-steps small { display: block; margin-top: 10px; }

/* 6. rules: stacked colour plates, fine-line figures */
.plate { position: sticky; top: calc(132px + var(--i) * 22px); min-height: min(58vh, 460px); margin-bottom: 18px; background: var(--c); color: var(--t, #111113); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: clamp(24px, 3.4vw, 56px); border-radius: 14px; box-shadow: 0 -14px 30px -22px rgba(17, 17, 19, .5); }
.plate h3 { font-size: clamp(34px, 4.6vw, 78px); line-height: .92; letter-spacing: -.05em; max-width: 9ch; margin: 0 0 18px; }
.plate p { font-size: clamp(17px, 1.4vw, 21px); max-width: 30ch; margin: 0; }
.plate figure { margin: 0; justify-self: center; width: 100%; max-width: 340px; }
.plate svg { width: 100%; height: auto; overflow: visible; }
.plate figcaption { font: 500 11px var(--mono); letter-spacing: .06em; margin-top: 10px; opacity: .8; }

/* 7. KAMINIZ in orange, like its own page */
.lb-xp { background: var(--img); color: #111113; }
.lb-xp .tag { border-color: #111113; }
.lb-xp h2 { font-size: clamp(40px, 5.4vw, 88px); max-width: 12ch; }
.lb-xp-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.lb-xp p { max-width: 46ch; margin: 0 0 16px; }
.lb-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 28px 0 12px; }
.lb-nums div { background: #111113; color: #F1F0EC; border-radius: 12px; padding: 18px 20px; }
.lb-nums b { display: block; font-weight: 800; font-size: clamp(48px, 5vw, 80px); letter-spacing: -.05em; line-height: .9; font-variant-numeric: tabular-nums; }
.lb-nums span { font-size: 15px; color: #C9C8C2; }
.lb-src { font: 500 12px var(--mono); }
.specimen { position: relative; display: block; width: min(100%, 460px); margin: 0 auto; text-decoration: none; color: #111113; background: #FBFAF6; padding: 56px 24px 22px; transform: rotate(-2deg); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); clip-path: polygon(0 36px, 36px 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%); }
.specimen:hover, .specimen:focus-visible { transform: rotate(0) translateY(-4px); }
.specimen .hole { position: absolute; top: 18px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--img); box-shadow: inset 0 0 0 3px #D9D6CE; }
.specimen .hd { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #111113; padding-bottom: 10px; margin-bottom: 14px; }
.specimen .hd b { font-size: 32px; letter-spacing: -.035em; }
.specimen .shots { display: grid; grid-template-columns: 1fr 64px 1fr; gap: 8px; align-items: end; margin-bottom: 14px; }
.specimen .shots img { width: 100%; height: 150px; object-fit: cover; object-position: top; border: 1px solid #D9D6CE; }
.specimen .shots img.ph { height: 132px; }
.specimen dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; font-size: 14px; line-height: 1.3; }
.specimen dt { font: 500 11px var(--mono); color: #5F5D57; padding-top: 2px; }
.specimen dd { margin: 0; }
.specimen .ft { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 10px; border-top: 1px dashed #B9B5AB; font: 500 12px var(--mono); }
.specimen .ft i { display: flex; gap: 2px; } .specimen .ft i s { width: 9px; height: 14px; background: var(--c); }
.specimen .go { text-decoration: underline; text-underline-offset: 3px; }

/* 8. the lab is open: live status */
.lb-open { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: stretch; }
.lb-live { background: var(--ink); color: #F1F0EC; border-radius: 14px; padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; justify-content: space-between; min-height: 320px; }
.lb-live .st { display: flex; align-items: center; gap: 12px; font: 500 13px var(--mono); color: #C9C8C2; }
.lb-live .st i { width: 12px; height: 12px; border-radius: 50%; background: #55555c; }
.lb-live.open .st i { background: #2BD46A; box-shadow: 0 0 0 0 rgba(43, 212, 106, .6); animation: ping 1.8s infinite; }
@keyframes ping { to { box-shadow: 0 0 0 12px rgba(43, 212, 106, 0); } }
.lb-live .big { font-weight: 800; font-size: clamp(44px, 5.4vw, 92px); letter-spacing: -.05em; line-height: .9; margin: 18px 0 10px; }
.lb-live .sub { color: #C9C8C2; margin: 0; }
.lb-langs { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 0; }
.lb-langs span { border: 1.5px solid #55555c; border-radius: 999px; padding: 6px 14px; font: 500 13px var(--mono); }
.lb-ways { display: grid; gap: 6px; }
.lb-ways div { background: var(--panel); border-radius: 14px; padding: 22px 24px; }
.lb-ways b { display: block; font-size: 22px; letter-spacing: -.02em; margin-bottom: 4px; }
.lb-ways span { color: var(--soft); }

/* 9. final call */
.lb-final { background: var(--auto); color: #fff; display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 24px 48px; align-items: end; }
.lb-final h2 { font-size: clamp(40px, 6vw, 100px); max-width: 13ch; margin: 0 0 16px; }
.lb-final p { margin: 0; font-size: 18px; max-width: 46ch; }
.lb-final .facts { margin: 18px 0 0; color: #fff; } .lb-final .facts li::before { background: #fff; }
.lb-final .btn { background: #fff; color: #111113; border-color: #fff; font-size: 18px; padding: 18px 28px; }

@media (max-width: 960px) {
  .lb-hero, .lb-head, .lb-now, .lb-xp-in, .lb-open, .lb-final { grid-template-columns: 1fr; }
  .lb-seen { grid-template-columns: 1fr; }
  .lb-steps { grid-template-columns: 1fr 1fr; row-gap: 34px; }
  .lb-steps::before, .lb-steps::after { display: none; }
  .plate { grid-template-columns: 1fr; min-height: 0; top: calc(116px + var(--i) * 18px); }
  .plate figure { max-width: 180px; justify-self: start; grid-row: 1; }
  .lb-chap a { font-size: 0; } .lb-chap { top: 73px; }
}
@media (max-width: 960px) { .lb-where { grid-template-columns: 1fr 1fr; row-gap: 12px; } }
@media (max-width: 520px) { .lb-steps { grid-template-columns: 1fr; } .lb-nums b { font-size: 44px; } }
@media (prefers-reduced-motion: reduce) {
  /* still version: no movement, every state shown at once */
  .lb-chap a::after, .lb-state, .lb-steps::after, .lb-steps .dot, .lb-stage .leg, .lb-stage .pin, .lb-stage .pin text, .specimen, .lb-live.open .st i { animation: none !important; transition: none !important; }
  .lb-steps::after { width: 100%; } .lb-steps .dot { background: var(--ink); color: var(--bg); }
  .specimen { transform: none; } .specimen:hover, .specimen:focus-visible { transform: none; }
}

/* Dark theme (2026-11-23): these cards are always dark, so they must not use var(--ink), which turns light in dark mode. */
.lb-card, .lb-hud, .lb-live { background: #111113; }
:root[data-theme="dark"] .lb-card, :root[data-theme="dark"] .lb-hud, :root[data-theme="dark"] .lb-live { background: #1A1A1D; border: 1.5px solid #3A3A40; }
.lb-card .lb-k, .lb-hud .lb-k { color: #A3A29B; }
:root[data-theme="dark"] .lb-hero h1 .grey { color: #A3A29B; }
:root[data-theme="dark"] .lb-scr { color: #111113; } /* browser-window mock keeps its white page */
:root[data-theme="dark"] .lb-scr .bar i { background: #D9D6CE; }
.lb-live .lb-k { color: #A3A29B; }
:root[data-theme="dark"] .lb-scr small, :root[data-theme="dark"] .lb-scr .lb-k { color: #5F5D57; }
:root[data-theme="dark"] .lb-scr .lb-sheet tr:first-child td { background: #ECEAE4; }
:root[data-theme="dark"] .lb-scr td { border-color: #D9D6CE; }
.lb-note { color: color-mix(in srgb, var(--c) 50%, #111113); } /* coloured notes on the white mock: darkened to pass AA */

/* Lighthouse 2026-11-24: header row is <th>; figure captions on coloured plates at full opacity (AA) */
.lb-sheet th { border: 1px solid var(--line); padding: 6px 7px; background: var(--panel); font-weight: 500; text-align: left; }
:root[data-theme="dark"] .lb-scr .lb-sheet th { background: #ECEAE4; border-color: #D9D6CE; }
.plate figcaption { opacity: 1; }
