/* Behub Paper Terminal
   Layout: one Kindle page column (max 1120px) inside reader chrome: a status bar on top and a location bar below.
   Every scene opens with a shell command. E-ink paper, hairlines only, colour only for links and live state. */

:root {
  color-scheme: light;
  /* e-ink greys: steps 0, 1, 2, 3, 8, 11, 15 of a 16-step ramp */
  --paper: #ECEBE5;
  --panel: #DEDDD8;
  --hair-soft: #D0CFCA;
  --hair: #C2C1BD;
  --ghost: #7C7C7A;
  --graphite: #525252;
  --ink: #1A1B1D;
  /* the only two colours */
  --signal: #3050EE;
  --live: #17734A;
  --live-inv: #4CC38A;
  /* fixed swatches for the Aa menu */
  --sw-paper: #ECEBE5;
  --sw-paper-ink: #1A1B1D;
  --sw-dark: #151617;
  --sw-dark-ink: #DAD9D3;

  --f-mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --f-read: 'Literata', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --display: var(--f-mono);
  --read: var(--f-read);
  --hud: var(--f-mono);
  --ax1: 'wdth'; --a1min: 75; --a1span: 37.5;
  --ax2: 'wght'; --a2min: 200; --a2span: 600;
  --hudfv: 'wdth' 100;

  --t-hud: 0.72rem;
  --t-body: 1.0625rem;
  --t-lede: clamp(1.1rem, 1.6vw, 1.3rem);
  --t-mani: clamp(1.5rem, 3.4vw, 2.7rem);
  --t-h2: clamp(2rem, 5vw, 3.6rem);

  --gutter: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px));
  --col: 1120px;
  --bar-top: 44px;
  --bar-bot: 34px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

:root[data-mode="dark"] {
  color-scheme: dark;
  --paper: #151617;
  --panel: #1E1F21;
  --hair-soft: #2A2B2D;
  --hair: #3A3B3E;
  --ghost: #85847F;
  --graphite: #A3A29D;
  --ink: #DAD9D3;
  --signal: #7D93FF;
  --live: #4CC38A;
  --live-inv: #17734A;
}

@property --w { syntax: '<number>'; inherits: true; initial-value: 0.5; }
@property --g { syntax: '<number>'; inherits: true; initial-value: 0.7; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); scroll-padding-top: calc(var(--bar-top) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--read);
  font-size: var(--t-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
  padding-block: calc(var(--bar-top) + env(safe-area-inset-top, 0px) + 24px) calc(var(--bar-bot) + env(safe-area-inset-bottom, 0px) + 32px);
}
img, video { max-width: 100%; }
p { margin: 0; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px dashed var(--signal); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

/* Kinetic display type: --w drives width, --g drives weight */
.kin, .kin * {
  font-family: var(--display);
  font-variation-settings: var(--ax1) calc(var(--a1min) + var(--w) * var(--a1span)), var(--ax2) calc(var(--a2min) + var(--g) * var(--a2span));
}
.hud-t {
  font-family: var(--hud);
  font-variation-settings: var(--hudfv);
  font-size: var(--t-hud);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.hud-t b { font-weight: 600; color: var(--ink); }
.sig { color: var(--signal); }
.ok { color: var(--live); }
a.sig { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.25em; }
a.sig:hover { background: var(--signal); color: var(--paper); text-decoration: none; }

.page { max-width: var(--col); margin-inline: auto; overflow-x: clip; }

/* Paper grain and e-ink blink */
.grain { position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0.045; mix-blend-mode: multiply; }
:root[data-mode="dark"] .grain { mix-blend-mode: screen; opacity: 0.03; }
.eink-flash { position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: 0; background: var(--ink); }
.eink-flash.go { animation: eink 0.36s both; animation-timing-function: steps(1, end); }
@keyframes eink {
  0% { opacity: 0; background: var(--ink); }
  10% { opacity: 0.92; background: var(--ink); }
  44% { opacity: 0.92; background: var(--ink); }
  52% { opacity: 0.55; background: var(--paper); }
  100% { opacity: 0; background: var(--paper); }
}

/* Boot log (first visit per session) */
.boot { position: fixed; inset: 0; z-index: 90; background: var(--paper); display: grid; place-items: center; padding: 24px var(--gutter-r) 24px var(--gutter); cursor: pointer; }
.boot-in { width: min(620px, 100%); display: grid; gap: 8px; font-size: 0.8rem; color: var(--ink); }
.boot-in > p:first-child { color: var(--graphite); margin-bottom: 8px; }
.boot [data-boot-line] { display: flex; gap: 0.6em; align-items: baseline; visibility: hidden; }
.boot [data-boot-line].on { visibility: visible; }
.boot .dots { flex: 1; min-width: 1em; border-bottom: 1px dotted var(--ghost); transform: translateY(-0.3em); }

/* Reader chrome */
.bar { position: fixed; left: 0; right: 0; z-index: 50; background: var(--paper); color: var(--graphite); }
.bar-top { top: 0; padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid var(--hair); }
.bar-bot { bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); border-top: 1px solid var(--hair); }
.bar-in {
  max-width: var(--col); margin-inline: auto; box-sizing: content-box;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
  height: var(--bar-top); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.bar-bot .bar-in { height: var(--bar-bot); }
.bar-progress { position: absolute; left: 0; right: 0; top: -1px; height: 2px; }
.bar-progress i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.mark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; min-height: 32px; }
.mark-block { width: 0.62em; height: 1.1em; background: var(--ink); display: inline-block; flex: none; }
.nav { display: none; gap: 20px; margin-right: auto; margin-left: 12px; }
.nav a { color: var(--graphite); text-decoration: none; padding-block: 4px; transition: color 0.12s steps(2); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--ink); }
.bar-right { display: flex; align-items: center; gap: 14px; }
.bar-clock, .bar-vp { display: none; }
@media (min-width: 560px) { .bar-vp { display: inline; } }
@media (min-width: 900px) { .nav { display: flex; } .menu-btn { display: none !important; } }
@media (min-width: 1080px) { .bar-clock { display: inline; } }
.aa, .menu-btn {
  height: 30px; min-width: 40px; padding: 0 9px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink); cursor: pointer;
  transition: background-color 0.12s steps(2), color 0.12s steps(2);
}
.aa { font-family: var(--f-read); font-size: 15px; line-height: 1; }
.menu-btn { display: inline-flex; align-items: center; }
.aa:hover, .aa[aria-expanded="true"], .menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }

/* Wordmark: business hub development -> behub/dev */
.lw { display: inline-flex; align-items: baseline; white-space: pre; }
.lw-x, .lw-c { display: inline-block; overflow: hidden; vertical-align: bottom; transition: max-width 0.5s var(--ease), opacity 0.2s steps(2); }
.lw-x { max-width: 0; opacity: 0; color: var(--graphite); }
.lw-c { max-width: 1em; }
.mark:hover .lw-x, .mark:focus-visible .lw-x, .foot-logo:hover .lw-x, .foot-logo:focus-visible .lw-x { max-width: calc(var(--n) * 0.8em); opacity: 1; }
.mark:hover .lw-c, .mark:focus-visible .lw-c, .foot-logo:hover .lw-c, .foot-logo:focus-visible .lw-c { max-width: 0; opacity: 0; }

/* Aa panel */
.aa-panel {
  position: fixed; z-index: 55;
  top: calc(var(--bar-top) + env(safe-area-inset-top, 0px) + 8px);
  right: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px), calc((100vw - var(--col)) / 2));
  width: min(360px, calc(100vw - 32px));
  background: var(--paper); border: 1.5px solid var(--ink); padding: 16px; display: grid; gap: 16px;
}
.aa-set { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.aa-set legend { color: var(--graphite); padding: 0; margin-bottom: 8px; }
.aa-opt {
  position: relative; display: grid; grid-template-columns: 2.6em minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 9px 12px; box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer;
  transition: background-color 0.12s steps(2), color 0.12s steps(2);
}
.aa-opt input { position: absolute; opacity: 0; pointer-events: none; }
.aa-opt:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.aa-opt:has(input:checked) { background: var(--ink); color: var(--paper); box-shadow: none; }
.aa-opt:has(input:checked) small { color: var(--hair-soft); }
.aa-opt:has(input:focus-visible) { outline: 2px dashed var(--signal); outline-offset: 2px; }
.aa-swatch { display: grid; place-items: center; width: 2.4em; height: 2.4em; font-family: var(--f-read); font-size: 0.95rem; box-shadow: inset 0 0 0 1px currentColor; }
.aa-swatch[data-swatch="paper"] { background: var(--sw-paper); color: var(--sw-paper-ink); }
.aa-swatch[data-swatch="dark"] { background: var(--sw-dark); color: var(--sw-dark-ink); }
.aa-opt b { display: block; font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 0.8rem; font-weight: 600; }
.aa-opt small { display: block; font-size: 0.82rem; line-height: 1.4; color: var(--graphite); }

/* Mobile menu */
.menu { position: fixed; inset: 0; z-index: 45; background: var(--paper); padding: calc(var(--bar-top) + env(safe-area-inset-top, 0px) + 28px) var(--gutter-r) 40px var(--gutter); overflow-y: auto; }
.menu-in { display: grid; gap: 4px; align-content: start; max-width: var(--col); margin-inline: auto; }
.menu-link { font-size: clamp(2.4rem, 13vw, 4.4rem); line-height: 1.05; color: var(--ink); text-decoration: none; --w: 0.5; --g: 0.85; transition: --w 0.4s var(--ease); }
.menu-link span { color: var(--signal); }
.menu-link:hover, .menu-link:focus-visible { --w: 1; }
.menu-mail { margin-top: 24px; }

/* Buttons: flat, invert on hover, stepped like e-ink */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink);
  font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.12s steps(2), color 0.12s steps(2), border-color 0.12s steps(2);
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-sq { width: 44px; padding: 0; justify-content: center; font-size: 1rem; }
.btn:disabled { cursor: default; border-color: var(--hair); color: var(--graphite); background: transparent; transform: none; }

/* Prompts */
.prompt { color: var(--graphite); }
.prompt .sig { font-weight: 600; }
.prompt-cmd { color: var(--ink); }
.prompt .tcur { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 2px; vertical-align: -0.2em; background: var(--signal); }

.cursor { display: inline-block; flex: none; width: 0.5em; height: 0.7em; margin-left: 0.06em; background: var(--signal); animation: blink 1.06s steps(1) infinite; }
.cursor.sm { width: 0.6em; height: 1.15em; margin-left: 0.3em; vertical-align: -0.22em; }
@keyframes blink { 50% { opacity: 0; } }
.dot { display: inline-block; width: 7px; height: 7px; background: currentColor; margin-right: 6px; vertical-align: 1px; animation: blink 2s steps(1) infinite; }

/* Hero */
.hero { position: relative; isolation: isolate; padding-block: clamp(12px, 3vw, 40px) clamp(48px, 7vw, 88px); --ksc: 1; }
.rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-in { display: grid; gap: clamp(16px, 2.6vw, 28px); }
.hero-logo { display: flex; align-items: baseline; white-space: nowrap; line-height: 0.9; font-size: clamp(3rem, 13.5vw, 10rem); letter-spacing: -0.03em; color: var(--ink); --kin: 1; --w: calc(var(--kin) * var(--ksc)); --g: calc(0.3 + 0.7 * var(--kin) * var(--ksc)); }
.hero-logo .lw-x { transition: none; }
.hero-logo .lw-c { transition: none; }
.hero-logo.is-open .lw-x { max-width: none; opacity: 1; }
.hero-logo.is-open .lw-c { max-width: 0; opacity: 0; }
.hero-logo .cursor { height: 0.68em; }
.hero-key { color: var(--graphite); margin-top: -6px; }
.hero-key b { color: var(--ink); }
.hero-foot { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero-foot { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: end; } .hero-foot .hero-actions { justify-content: flex-end; } }
.hero-copy { display: grid; gap: 14px; }
.hero-h1 { margin: 0; font-size: clamp(1.3rem, 2.5vw, 2rem); line-height: 1.18; font-weight: 400; --w: 0.3; --g: 0.72; text-wrap: balance; max-width: 34ch; }
.lede { font-size: var(--t-lede); line-height: 1.5; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hud-row { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding-top: 14px; border-top: 1px solid var(--hair); color: var(--graphite); }
.hud-row div { display: flex; gap: 8px; }
.hud-row dt, .hud-row dd { margin: 0; }
.hud-row dd { color: var(--ink); }
.hud-row dd.ok { color: var(--live); }

/* Chapters */
.ch { border-top: 1px solid var(--hair); padding-block: clamp(56px, 9vw, 112px); display: grid; gap: 26px; }
.ch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--graphite); }
.ch-n { color: var(--ink); font-weight: 600; }
.ch-loc { margin-left: auto; }
.h2 { font-size: var(--t-h2); line-height: 1; letter-spacing: -0.01em; margin: 0; font-weight: 400; text-wrap: balance; --w: 0.6; --g: 0.82; overflow-wrap: break-word; }
.intro { max-width: 62ch; color: var(--graphite); }

/* Manifesto */
.mani { font-size: var(--t-mani); line-height: 1.2; --w: 0.42; --g: 0.6; text-wrap: pretty; }
.mani .sig-w { color: var(--signal); text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.14em; }
.mani .w { --i: 1; color: color-mix(in srgb, var(--ink) calc(var(--i) * 100%), var(--ghost)); --g: calc(0.25 + 0.45 * var(--i)); }
.mani.is-split .sig-w { text-decoration: none; }
.mani .sig-w .w {
  color: color-mix(in srgb, var(--signal) calc(var(--i) * 100%), var(--ghost));
  --g: calc(0.25 + 0.7 * var(--i));
  text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.14em;
  text-decoration-color: color-mix(in srgb, var(--signal) calc(var(--i) * 100%), transparent);
}

/* Screens scene */
.screens.ch { gap: 20px; padding-bottom: 0; }
.screens-pin { display: grid; gap: 16px; padding-block: 8px clamp(40px, 6vw, 72px); }
.caps { margin: 0; font-size: var(--t-h2); line-height: 1.02; font-weight: 400; --w: 0.6; --g: 0.85; text-wrap: balance; }
.screens.is-pinned .caps { position: relative; height: 1.08em; white-space: nowrap; }
.screens.is-pinned .cap { position: absolute; left: 0; top: 0; opacity: 0; --w: 0.1; transition: opacity 0.3s steps(3), --w 0.7s var(--ease); }
.screens.is-pinned .cap.on { opacity: 1; --w: 1; }
.stage { position: relative; height: clamp(240px, calc(100svh - 360px), 540px); }
.screens:not(.is-pinned) .stage { height: auto; aspect-ratio: 16 / 10; max-width: 100%; }
.frame, .ghostframe { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.frame { width: 100%; height: 100%; border: 1.5px solid var(--ink); background: var(--paper); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; z-index: 1; }
.ghostframe { border: 1px dashed var(--ghost); opacity: 0; }
.frame-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--ink); color: var(--graphite); white-space: nowrap; overflow: hidden; background: var(--paper); }
.frame-bar .dots { display: flex; gap: 4px; flex: none; }
.frame-bar .dots i { width: 7px; height: 7px; border: 1px solid var(--ink); }
.frame-bar .url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.frame-view { position: relative; overflow: hidden; }
.mock { position: absolute; left: 0; top: 0; width: 960px; transform-origin: 0 0; container-type: inline-size; background: var(--paper); }
.mock-in { padding: 18px 24px; display: grid; gap: 20px; }
.m-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 8px; color: var(--ink); }
.m-brand { font-weight: 700; font-size: 10px; }
.m-links { display: flex; gap: 14px; }
.m-burger { display: none; font-size: 12px; }
.m-hero { display: grid; gap: 10px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; }
.m-title { font-size: clamp(20px, 6.6cqi, 66px); line-height: 0.86; letter-spacing: -0.03em; --g: 0.95; white-space: nowrap; }
.m-copy { display: grid; gap: 6px; }
.m-line { display: block; height: 5px; background: var(--hair); }
.m-line.s { width: 70%; }
.m-btn { justify-self: start; font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 7px; padding: 5px 8px; background: var(--ink); color: var(--paper); }
.m-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.m-card { display: grid; gap: 4px; }
.m-card i { display: block; aspect-ratio: 4 / 3; background: var(--panel); box-shadow: inset 0 0 0 1px var(--hair); }
.m-card span { font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 7px; color: var(--graphite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 799px) { .m-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 511px) { .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .m-hero { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 383px) { .m-grid { grid-template-columns: minmax(0, 1fr); } .m-links { display: none; } .m-burger { display: inline; } .mock-in { padding: 14px; } }
.stage-hud { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--graphite); }

/* Services reel */
.reel.ch { gap: 24px; padding-bottom: 0; }
.reel-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.reel-pin { padding-block: 8px clamp(48px, 7vw, 88px); display: grid; gap: 14px; }
.reel-hint { color: var(--graphite); }
.reel-view { overflow: hidden; }
.reel-native .reel-view { overflow-x: auto; padding-bottom: 12px; }
.reel-track { display: flex; width: max-content; }
.panel { flex: none; width: min(80vw, 400px); display: grid; gap: 16px; align-content: start; padding: 6px 28px 10px 20px; box-shadow: inset 1px 0 0 var(--hair); }
.panel:last-child { box-shadow: inset 1px 0 0 var(--hair), inset -1px 0 0 var(--hair); }
.panel-file { color: var(--graphite); }
.panel-h { font-size: clamp(1.6rem, 2.9vw, 2.3rem); line-height: 1; margin: 0; font-weight: 400; min-height: 2em; text-wrap: balance; --w: 0.7; --g: 0.85; }
.panel p { max-width: 40ch; }
.spec-list { display: grid; margin: 0; }
.spec-list div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; padding-block: 8px; border-top: 1px dashed var(--hair); }
.spec-list dt { color: var(--graphite); }
.spec-list dd { margin: 0; }

/* Reach: traceroute */
.trace-wrap { overflow-x: auto; }
.trace { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.78rem; }
.trace th { text-align: left; font-weight: 400; color: var(--graphite); padding: 0 16px 10px 0; white-space: nowrap; }
.trace td { border-top: 1px solid var(--hair); padding: 12px 16px 12px 0; vertical-align: top; transition: color 0.2s steps(2); }
.t-place { color: var(--ink); font-weight: 600; white-space: nowrap; }
.t-cc { color: var(--graphite); font-weight: 400; }
.t-km { white-space: nowrap; text-align: right; }
.t-bar { white-space: nowrap; letter-spacing: -0.06em; }
.t-fill { color: var(--ink); }
.t-empty { color: var(--hair); }
.t-clients { color: var(--graphite); min-width: 16em; }
.trace tr.wait td, .trace tr.wait .t-place, .trace tr.wait .t-fill { color: var(--ghost); }

/* Featured rail + covers */
.feat-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.rail-ctl { display: flex; align-items: center; gap: 8px; }
.rail-ctl .hud-t { color: var(--graphite); margin-right: 6px; min-width: 9ch; text-align: right; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 350px); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 16px;
  scrollbar-width: thin; scrollbar-color: var(--ink) var(--hair-soft);
}
.card { scroll-snap-align: start; display: grid; gap: 12px; align-content: start; }
.card-link { display: grid; gap: 14px; color: inherit; text-decoration: none; }
.card p { font-size: 0.98rem; }
.cover { position: relative; aspect-ratio: 16 / 10; max-width: 100%; overflow: hidden; background: var(--panel); box-shadow: 0 0 0 1.5px var(--ink); }
.cover canvas, .cover video, .cover img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.c-dither { image-rendering: pixelated; }
.js .c-color { clip-path: inset(0 0 100% 0); transition: clip-path 0.9s cubic-bezier(.65, 0, .35, 1); }
.js .no-dither .c-color { clip-path: inset(0 0 0 0); }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--signal); opacity: 0; z-index: 1; }
.card:hover .c-color, .card:focus-within .c-color, .w-link:hover .c-color, .w-link:focus-visible .c-color, .cover.dev .c-color { clip-path: inset(0 0 0 0); }
.card:hover .scanline, .card:focus-within .scanline, .w-link:hover .scanline, .w-link:focus-visible .scanline, .cover.dev .scanline { animation: scan 0.9s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes scan { 0% { top: 0; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.card-h { font-size: 1.5rem; line-height: 1.05; margin: 0; font-weight: 400; --w: 0.5; --g: 0.82; transition: --w 0.5s var(--ease); }
.card:hover .card-h, .card:focus-within .card-h { --w: 1; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--graphite); }
.card-url { color: var(--signal); text-decoration: none; }
.card-url:hover { text-decoration: underline; }
.marq { display: grid; gap: 2px; padding-block: 14px; border-block: 1.5px solid var(--ink); }
.marq-row { overflow: hidden; }
.marq-track { display: inline-flex; white-space: nowrap; font-size: clamp(2rem, 5.6vw, 4.4rem); line-height: 1.08; --w: 1; --g: 0.3; will-change: transform; }
.marq-row + .marq-row .marq-track { color: var(--graphite); }
.marq-track span { padding-inline: 0.28em; }
.marq-track .sep { color: var(--ghost); padding-inline: 0; }
.clients { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 1.1rem; line-height: 1.5; --w: 0.5; --g: 0.6; }
.clients li::after { content: '/'; color: var(--ghost); padding-inline: 0.45em; }
.feat-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.marq-foot { color: var(--graphite); }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--hair); }
.step { display: grid; grid-template-columns: 5.4em 8.5em minmax(0, 1fr); gap: 8px 20px; padding-block: 18px; border-bottom: 1px solid var(--hair); align-items: baseline; }
.st { white-space: pre; }
.st.wait { color: var(--ghost); }
.step-cmd { color: var(--graphite); }
.step-body { display: grid; gap: 6px; }
.step-h { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin: 0; font-weight: 400; line-height: 1.1; --w: 0.5; --g: 0.8; }
.step-body p { color: var(--graphite); max-width: 60ch; }
@media (max-width: 640px) { .step { grid-template-columns: 5.4em minmax(0, 1fr); } .step-body { grid-column: 1 / -1; } }
.own { margin-top: 8px; padding: clamp(20px, 3vw, 34px); background: var(--ink); color: var(--paper); display: grid; gap: 12px; }
.own .ok { color: var(--live-inv); }
.own-cmd { color: var(--hair); }
.own-h { margin: 0; font-size: var(--t-h2); line-height: 1; font-weight: 400; --w: 0.8; --g: 0.9; text-wrap: balance; }
.own p:last-child { max-width: 60ch; }

/* Together */
.tog { display: grid; gap: 22px; }
@media (min-width: 900px) { .tog { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } }
.tog-body { font-size: var(--t-lede); line-height: 1.5; max-width: 52ch; }

/* Contact */
.contact { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; } }
.contact-copy { display: grid; gap: 16px; }
.contact-copy > p:not(.hud-t) { font-size: var(--t-lede); line-height: 1.5; max-width: 44ch; }
.term-form { position: relative; display: grid; background: var(--panel); padding: clamp(16px, 2.6vw, 28px); }
.tf-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); align-items: baseline; gap: 12px; padding-block: 10px; border-bottom: 1px dashed var(--hair); }
.tf-row label { color: var(--graphite); transition: color 0.12s steps(2); }
.tf-row input, .tf-row select, .tf-row textarea {
  width: 100%; min-width: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink);
  font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 0.92rem; line-height: 1.5; padding: 4px 0; caret-color: var(--signal);
}
.tf-row select { cursor: pointer; }
.tf-row textarea { resize: vertical; min-height: 7.5em; }
.tf-row input:focus, .tf-row select:focus, .tf-row textarea:focus { outline: none; }
.tf-row:focus-within { border-bottom: 1.5px solid var(--signal); }
.tf-row:focus-within label { color: var(--signal); }
.tf-row.bad { border-bottom: 1.5px solid var(--signal); }
.tf-msg { align-items: start; }
.tf-msg label { padding-top: 5px; }
.tf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 18px; }
.tf-status { color: var(--ink); max-width: 48ch; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* /work */
.work-head { display: grid; gap: 20px; padding-block: clamp(12px, 3vw, 36px) 24px; }
.work-h1 { font-size: clamp(4rem, 19vw, 13rem); line-height: 0.85; margin: 0; font-weight: 400; --w: 1; --g: 0.95; white-space: nowrap; }
.work-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--hair); }
.flags, .views { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { min-height: 36px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background-color 0.12s steps(2), color 0.12s steps(2); }
.flag b { font-weight: 400; color: var(--graphite); }
.flag:hover { background: var(--panel); }
.flag[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.flag[aria-pressed="true"] b { color: var(--hair-soft); }
.work-count { color: var(--graphite); }
.work { display: grid; gap: 40px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); padding-block: 12px clamp(56px, 8vw, 96px); }
.w-item { display: grid; gap: 10px; align-content: start; scroll-margin-top: calc(var(--bar-top) + 24px); }
.w-link { display: grid; gap: 12px; color: inherit; text-decoration: none; }
.w-perm { display: none; color: var(--graphite); }
.w-name { font-size: 1.35rem; line-height: 1.1; margin: 0; font-weight: 400; --w: 0.45; --g: 0.8; transition: --w 0.5s var(--ease); }
.w-link:hover .w-name, .w-link:focus-visible .w-name { --w: 1; }
.w-slash { color: var(--signal); }
.w-line { font-size: 0.95rem; color: var(--graphite); }
.w-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--graphite); }
.w-meta span:empty { display: none; }
.w-go { margin-left: auto; }
.work.is-list { display: block; border-top: 1px solid var(--hair); padding-top: 0; }
.work.is-list .w-item { grid-template-columns: minmax(0, 2fr) 7em minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 4px 16px; padding-block: 11px; border-bottom: 1px solid var(--hair); align-items: baseline; }
.work.is-list .cover, .work.is-list .w-line { display: none; }
.work.is-list .w-link { display: flex; gap: 14px; align-items: baseline; }
.work.is-list .w-perm { display: inline; }
.work.is-list .w-name { font-size: 1rem; }
.work.is-list .w-meta { display: contents; }
.work.is-list .w-go { margin-left: 0; text-align: right; }
@media (max-width: 760px) {
  .work.is-list .w-item { grid-template-columns: minmax(0, 1fr) auto; }
  .work.is-list .w-type, .work.is-list .w-sector, .work.is-list .w-loc, .work.is-list .w-perm { display: none; }
}

/* Case study */
.cs-hero { display: grid; gap: 22px; padding-block: clamp(8px, 2vw, 28px) clamp(40px, 6vw, 72px); }
.crumbs { color: var(--graphite); }
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.cs-kicker { color: var(--graphite); }
.cs-h1 { font-size: clamp(2.6rem, 9vw, 7.5rem); line-height: 0.92; margin: 0; font-weight: 400; --w: 0.9; --g: 0.92; text-wrap: balance; overflow-wrap: break-word; }
.cs-intro { display: grid; gap: 20px; }
@media (min-width: 900px) { .cs-intro { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; } .cs-intro .hero-actions { justify-content: flex-end; } }
.cs-frame { background: var(--paper); box-shadow: 0 0 0 1.5px var(--ink); }
.cs-frame video, .cs-media > img { display: block; width: 100%; height: auto; background: var(--panel); }
.rec { color: var(--live); }
.cs-cols { display: grid; gap: 20px 48px; }
@media (min-width: 900px) { .cs-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; } }
.cs-sec .h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.reading { display: grid; gap: 1em; }
.reading p { max-width: 62ch; }
.deliver { list-style: none; padding: 0; margin: 0; display: grid; font-size: 0.85rem; }
.deliver li { padding-block: 11px; border-top: 1px solid var(--hair); }
.deliver li:last-child { border-bottom: 1px solid var(--hair); }
.glance { display: grid; margin: 0; font-size: 0.85rem; }
.glance div { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 12px; padding-block: 11px; border-top: 1px solid var(--hair); }
.glance div:last-child { border-bottom: 1px solid var(--hair); }
.glance dt { color: var(--graphite); }
.glance dd { margin: 0; }
.cs-next { gap: 18px; }
.next-link { display: grid; gap: 10px; padding: clamp(22px, 3.4vw, 40px); background: var(--ink); color: var(--paper); text-decoration: none; transition: background-color 0.12s steps(2); }
.next-link:hover { background: var(--signal); }
.next-link .hud-t { color: var(--hair-soft); }
.next-h { font-size: clamp(2rem, 6vw, 4.5rem); line-height: 1; --w: 0.55; --g: 0.9; transition: --w 0.6s var(--ease); overflow-wrap: break-word; }
.next-link:hover .next-h, .next-link:focus-visible .next-h { --w: 1; }
.next-line { color: var(--hair); max-width: 60ch; }

/* Plain pages and 404 */
.doc-page, .nf { display: grid; gap: 24px; padding-block: clamp(12px, 3vw, 36px) clamp(56px, 8vw, 96px); }
.prose { max-width: 66ch; display: grid; gap: 1em; }
.prose a { color: var(--signal); }
.prose h2, .prose h3 { font-family: var(--display); font-variation-settings: 'wdth' 90, 'wght' 650; line-height: 1.15; margin: 0.6em 0 0; }
.note-list { list-style: none; padding: 0; margin: 0; display: grid; }
.note-list a { display: flex; gap: 16px; padding-block: 10px; border-top: 1px solid var(--hair); text-decoration: none; }
.nf-err { color: var(--ink); }
.nf-h { font-size: clamp(6rem, 30vw, 20rem); line-height: 0.85; margin: 0; font-weight: 400; --w: 1; --g: 0.95; }

/* Footer */
.site-foot { max-width: var(--col); margin-inline: auto; border-top: 1.5px solid var(--ink); padding-top: 36px; display: grid; gap: 28px; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.foot-brand { display: grid; gap: 12px; align-content: start; }
.foot-brand > p:not(.hud-t) { color: var(--graphite); max-width: 36ch; }
.foot-logo { font-size: 1.7rem; line-height: 1; color: var(--ink); text-decoration: none; --w: 0.8; --g: 0.9; }
.foot-mail { color: var(--signal); }
.foot-nav { display: grid; gap: 6px; align-content: start; }
.foot-h { color: var(--graphite); margin-bottom: 4px; }
.foot-nav a { color: var(--ink); text-decoration: none; justify-self: start; }
.foot-nav a:hover { box-shadow: inset 0 -1.5px 0 var(--ink); }
.foot-hud { margin: 0; display: grid; align-content: start; }
.foot-hud div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 10px; padding-block: 6px; border-top: 1px solid var(--hair-soft); }
.foot-hud dt { color: var(--graphite); }
.foot-hud dd { margin: 0; }
.foot-legal { color: var(--graphite); border-top: 1px solid var(--hair); padding-top: 14px; }

/* Still mode: reduced motion or motion switched off */
@media (prefers-reduced-motion: reduce) {
  .cursor, .dot { animation: none; }
  .btn, .aa, .aa-opt, .card-h, .w-name, .lw-x, .lw-c, .next-h, .menu-link, .js .c-color { transition: none; }
  .card:hover .scanline, .card:focus-within .scanline, .w-link:hover .scanline, .cover.dev .scanline { animation: none; }
}
:root[data-motion="off"] .cursor, :root[data-motion="off"] .dot { animation: none; }
:root[data-motion="off"] .btn, :root[data-motion="off"] .card-h, :root[data-motion="off"] .w-name, :root[data-motion="off"] .lw-x, :root[data-motion="off"] .lw-c, :root[data-motion="off"] .next-h, :root[data-motion="off"] .menu-link, :root[data-motion="off"] .c-color { transition: none; }
:root[data-motion="off"] .scanline { display: none; }

/* Cookie notice (CookieYes legacy) restyled as an e-ink bar */
#cookie-law-info-bar {
  background: var(--paper) !important; color: var(--ink) !important;
  border-top: 1.5px solid var(--ink) !important; box-shadow: none !important; border-radius: 0 !important;
  font-family: var(--hud) !important; font-variation-settings: var(--hudfv); font-size: 0.75rem !important; line-height: 1.5 !important;
  padding: 14px var(--gutter-r) 14px var(--gutter) !important;
  bottom: calc(var(--bar-bot) + env(safe-area-inset-bottom, 0px)) !important; z-index: 60 !important;
}
#cookie-law-info-bar a { color: var(--signal) !important; }
#cookie-law-info-bar .cli-plugin-button, #cookie-law-info-bar .cli_action_button, #cookie-law-info-bar .cli_settings_button, #cookie-law-info-bar .medium.cli-plugin-button {
  background: var(--ink) !important; color: var(--paper) !important; border: 1.5px solid var(--ink) !important; border-radius: 0 !important;
  font-family: var(--hud) !important; font-size: 0.75rem !important; padding: 8px 14px !important; box-shadow: none !important; margin-left: 8px !important;
}
#cookie-law-info-bar .cli-plugin-button:hover { background: var(--signal) !important; border-color: var(--signal) !important; }
.cli-modal .cli-modal-content, .cli-modal .cli-modal-dialog { border-radius: 0 !important; background: var(--paper) !important; color: var(--ink) !important; }
.cli-modal .cli-btn, .cli-modal .wt-cli-privacy-accept-btn { background: var(--ink) !important; color: var(--paper) !important; border-radius: 0 !important; }

/* Featured: pinned horizontal reel */
.feat-pin { display: grid; gap: 22px; }
.rail-view { min-width: 0; }
.feat-hint { display: none; color: var(--graphite); }
.feat.is-pinned .rail-view { overflow: hidden; }
.feat.is-pinned .rail { display: flex; gap: 28px; width: max-content; overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
.feat.is-pinned .card { flex: none; width: min(78vw, 470px); }
.feat.is-pinned [data-rail] { display: none; }
.feat.is-pinned .feat-hint { display: block; }
.feat.is-pinned .card-h { font-size: clamp(1.5rem, 2.4vw, 2rem); transition: none; }

/* Consent notice */
.consent { position: fixed; left: 0; right: 0; bottom: calc(var(--bar-bot) + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--paper); border-top: 1.5px solid var(--ink); }
.consent-in { max-width: var(--col); margin-inline: auto; box-sizing: content-box; padding: 14px var(--gutter-r) 16px var(--gutter); display: grid; gap: 10px 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .consent-in { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .consent-in .prompt { grid-column: 1 / -1; } }
.consent-text { font-size: 0.95rem; line-height: 1.5; max-width: 62ch; }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.consent .btn { min-height: 40px; }
.linkbtn { border: 0; padding: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 0.25em; cursor: pointer; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-legal a { color: var(--graphite); }
.foot-legal a:hover, .linkbtn:hover { color: var(--ink); }

/* Policy pages */
.prose h2 { font-size: 1.35rem; }
.prose h3 { font-size: 1.05rem; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 0.4em; }
.prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 0.76rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-top: 1px solid var(--hair); }
.prose th { color: var(--graphite); font-weight: 400; }

/* Location bar stays on one line on phones */
.bar-bot .bar-in { white-space: nowrap; }
@media (max-width: 480px) { .bar-bot .bar-in { font-size: 0.64rem; gap: 10px; } }
@media (max-width: 600px) {
  .consent-in { padding-block: 10px 12px; gap: 8px; }
  .consent-in .prompt { display: none; }
  .consent-text { font-size: 0.85rem; }
  .consent-actions { gap: 8px 12px; }
  .consent .btn { min-height: 38px; padding: 0 12px; font-size: 0.72rem; }
}

/* WhatsApp chat bubble */
.wa { position: fixed; z-index: 58; right: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px)); bottom: calc(var(--bar-bot) + env(safe-area-inset-bottom, 0px) + 14px); display: grid; justify-items: end; gap: 10px; }
.consent-open .wa, .menu-open .wa { display: none; }
.wa-btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 14px;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); text-decoration: none;
  font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 0.78rem; letter-spacing: 0.02em;
  transition: background-color 0.12s steps(2), border-color 0.12s steps(2);
}
.wa-btn:hover, .wa-btn[aria-expanded="true"] { background: var(--signal); border-color: var(--signal); }
.wa-ico { width: 22px; height: 22px; flex: none; }
.wa-live { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; background: var(--live); box-shadow: 0 0 0 2px var(--paper); animation: blink 2s steps(1) infinite; }
@media (max-width: 600px) { .wa-label { display: none; } .wa-btn { width: 48px; padding: 0; justify-content: center; } }
.wa-panel { width: min(340px, calc(100vw - 32px)); background: var(--paper); border: 1.5px solid var(--ink); padding: 12px 16px 16px; display: grid; gap: 12px; }
.wa-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--graphite); border-bottom: 1px solid var(--hair); padding-bottom: 8px; }
.wa-x { width: 32px; height: 32px; border: 0; border-radius: 0; background: none; color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: background-color 0.12s steps(2), color 0.12s steps(2); }
.wa-x:hover { background: var(--ink); color: var(--paper); }
.wa-msg { font-size: 0.95rem; line-height: 1.5; }
.wa-form { display: grid; gap: 8px; }
.wa-form label { color: var(--graphite); }
.wa-form textarea { width: 100%; min-width: 0; resize: vertical; border: 0; border-bottom: 1.5px dashed var(--hair); border-radius: 0; background: var(--panel); color: var(--ink); font-family: var(--hud); font-variation-settings: var(--hudfv); font-size: 0.85rem; line-height: 1.5; padding: 8px 10px; caret-color: var(--signal); }
.wa-form textarea:focus { outline: none; border-bottom: 1.5px solid var(--signal); }
.wa-form .btn { justify-self: start; }
.wa-note { color: var(--graphite); }
@media (prefers-reduced-motion: reduce) { .wa-live { animation: none; } }
:root[data-motion="off"] .wa-live { animation: none; }

/* Code rain sits behind every page: the page ground comes from <html>, so <body> stays clear */
body { background: transparent; }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* HUD cursor: fine pointers with motion on. Inverts against whatever is underneath. */
.has-cur, .has-cur * { cursor: none !important; }
.has-cur input:not([type="range"]):not([type="radio"]):not([type="checkbox"]), .has-cur textarea { cursor: text !important; }
.has-cur select, .has-cur video[controls] { cursor: auto !important; }
.cur { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; color: #fff; mix-blend-mode: difference; opacity: 0; transition: opacity 0.15s steps(2); }
.cur.is-on { opacity: 1; }
.cur.is-native { opacity: 0; }
.cur-dot { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; background: currentColor; will-change: transform; }
.cur-box { position: absolute; left: 0; top: 0; width: 26px; height: 26px; will-change: transform; }
.cur-box i { position: absolute; width: 8px; height: 8px; border: 0 solid currentColor; transition: width 0.2s var(--ease), height 0.2s var(--ease); }
.cur-box .tl { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
.cur-box .tr { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
.cur-box .bl { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.cur-box .br { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.cur.is-lock .cur-box i { width: 12px; height: 12px; }
.cur.is-lock .cur-dot { opacity: 0; }
.cur.is-down .cur-box i { width: 5px; height: 5px; }
.cur-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 10px; letter-spacing: 0.04em; will-change: transform; }

/* Scrollbars. Fine pointers: the native window scrollbar is hidden and the HUD rail replaces it.
   Everything else gets flat ink scrollbars. */
html { scrollbar-color: var(--ink) var(--paper); }
.trace-wrap, .reel-view, .rail, .menu, textarea, .prose .table-wrap, .config { scrollbar-width: thin; scrollbar-color: var(--ink) var(--hair-soft); }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 0; }
*::-webkit-scrollbar-track { background: var(--hair-soft); }
html.has-rail { scrollbar-width: none; }
html.has-rail::-webkit-scrollbar { display: none; width: 0; height: 0; }

.srail {
  position: fixed; z-index: 49; width: 18px;
  right: max(4px, env(safe-area-inset-right, 0px));
  top: calc(var(--bar-top) + env(safe-area-inset-top, 0px) + 10px);
  bottom: calc(var(--bar-bot) + env(safe-area-inset-bottom, 0px) + 10px);
}
.srail-track { position: absolute; top: 0; bottom: 0; right: 8px; width: 1px; background: var(--hair); }
.srail-tick { position: absolute; right: 2px; width: 14px; height: 9px; margin-top: -4px; }
.srail-tick::before { content: ''; position: absolute; right: 2px; top: 4px; width: 9px; height: 1px; background: var(--ghost); transition: width 0.12s steps(2); }
.srail-tick.past::before { background: var(--ink); }
.srail-tick.on::before { background: var(--signal); width: 13px; }
.srail-tick:hover::before { width: 14px; background: var(--ink); }
.srail-thumb {
  position: absolute; top: 0; right: 6px; width: 5px; height: 28px; background: var(--ink);
  transition: width 0.12s steps(2), right 0.12s steps(2), background-color 0.12s steps(2);
}
.srail:hover .srail-thumb, .srail.is-drag .srail-thumb { width: 9px; right: 4px; }
.srail.is-drag .srail-thumb { background: var(--signal); }
.srail-label {
  position: absolute; right: 24px; top: 0; white-space: nowrap; pointer-events: none;
  background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--ink);
  padding: 1px 7px; font-size: 10px; line-height: 16px; opacity: 0; transition: opacity 0.15s steps(2);
}
.srail:hover .srail-label, .srail.is-active .srail-label, .srail.is-drag .srail-label { opacity: 1; }
.is-dragging-rail, .is-dragging-rail * { -webkit-user-select: none; user-select: none; }

/* Screens scene: the mock site shows real project shots, in e-ink grey */
.m-card i { overflow: hidden; }
.m-card i img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); opacity: 0.92; }
:root[data-mode="dark"] .m-card i img { opacity: 0.8; }
