/* sunnykumar.work — console theme ("cursor to prompt")
   Loaded after site.css on case-study pages. Re-maps site.css tokens to the logo's ink + paper,
   a selection blue for cursor moments and a violet for prompt / AI moments, adds dark mode,
   swaps the serif for the grotesque, uses Helvetica Neue for console details, and adds the
   console frame (title bar, icon rail, status bar). */

:root {
  --paper: #FBFAF7; --ink-text: #1A1A1A; --muted: #5B5953; --muted-2: #45433E;
  --line: #C8C4BB; --ph: #ECEAE5; --hair: #E0DDD6; --panel: #FFFFFF; --panel-2: #F3F2EE;
  --cursor: #2A5BE0; --prompt: #6A45E0; --ink: var(--cursor);
  --live: #1E7A4A; --wip: #8A5A00; --bad: #A3341F; --bad-bg: #FCF3F0;
  --glow: rgba(42, 91, 224, .07);
  --sans: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: var(--sans);
  --mono: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --bar: 44px; --rail: 56px; --statusbar: 40px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #141414; --ink-text: #FBFAF7; --muted: #A6A39C; --muted-2: #CBC8C1;
  --line: #3B3B3B; --ph: #232323; --hair: #2C2C2C; --panel: #1B1B1B; --panel-2: #212121;
  --cursor: #7FA2FF; --prompt: #AE94FF;
  --live: #5BC88C; --wip: #E2B34F; --bad: #FF8A75; --bad-bg: #2A1A17;
  --glow: rgba(127, 162, 255, .08); color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #141414; --ink-text: #FBFAF7; --muted: #A6A39C; --muted-2: #CBC8C1;
  --line: #3B3B3B; --ph: #232323; --hair: #2C2C2C; --panel: #1B1B1B; --panel-2: #212121;
  --cursor: #7FA2FF; --prompt: #AE94FF;
  --live: #5BC88C; --wip: #E2B34F; --bad: #FF8A75; --bad-bg: #2A1A17;
  --glow: rgba(127, 162, 255, .08); color-scheme: dark; }

/* per-case accent: AI story in prompt violet, platform stories in cursor blue */
.theme-violet { --ink: var(--prompt); --band: var(--prompt); }
.theme-teal, .theme-blue { --ink: var(--cursor); --band: var(--cursor); }

body { background: var(--paper); color: var(--ink-text); font-size: 17px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--paper); }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- console frame ---------- */
.cx-titlebar { position: fixed; z-index: 30; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: var(--bar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair); font: 13px var(--mono); }
.cx-brand { display: inline-flex; }
.cx-name { justify-self: center; font: 500 14px var(--mono); display: inline-flex; align-items: center; color: var(--ink-text); }
.cx-name:hover, .cx-brand:hover { text-decoration: none; }
.cx-actions { justify-self: end; display: flex; gap: 6px; align-items: center; }
.cx-actions a, .cx-theme { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-text); font: 13px var(--mono); cursor: pointer; }
.cx-actions a:hover, .cx-theme:hover { text-decoration: none; background: var(--ph); }
.cx-actions a.solid { background: var(--ink-text); color: var(--paper); border-color: var(--ink-text); }
.cx-theme svg { width: 15px; height: 15px; }
.cx-theme .moon { display: none; }
:root:not(.is-dark) .cx-theme .sun { display: none; } :root:not(.is-dark) .cx-theme .moon { display: inline; }

.cx-rail { position: fixed; z-index: 25; left: 0; top: calc(var(--bar) + env(safe-area-inset-top, 0px)); bottom: var(--statusbar); width: var(--rail);
  border-right: 1px solid var(--hair); background: var(--paper); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; padding: 16px 0; }
.cx-rail a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); position: relative; }
.cx-rail a:hover, .cx-rail a.on { color: var(--ink-text); background: var(--ph); text-decoration: none; }
.cx-rail a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--cursor); }
.cx-rail svg, .cx-mnav svg { width: 18px; height: 18px; }
.cx-rail a span { position: absolute; left: 46px; white-space: nowrap; font: 12px var(--mono); background: var(--ink-text); color: var(--paper); padding: 3px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transform: translateX(-4px); transition: .15s; }
.cx-rail a:hover span, .cx-rail a:focus-visible span { opacity: 1; transform: none; }

.cx-status { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; min-height: calc(var(--statusbar) + env(safe-area-inset-bottom, 0px));
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--hair);
  background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 12.5px var(--mono); color: var(--muted); }
.cx-crumb { color: var(--ink-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cx-crumb i { font-style: normal; color: var(--muted); }
.cx-mid { display: flex; gap: 20px; }
.cx-mid .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent); }
.cx-talk { color: var(--ink-text); border: 1px solid var(--line); padding: 5px 12px; border-radius: 8px; white-space: nowrap; }
.cx-talk:hover { background: var(--ph); text-decoration: none; }
.cx-mnav { display: none; gap: 4px; }
.cx-mnav a { width: 34px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.cx-mnav a.on { color: var(--ink-text); background: var(--ph); }

body.cx { padding-top: calc(var(--bar) + env(safe-area-inset-top, 0px)); padding-bottom: calc(var(--statusbar) + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { body.cx { padding-left: var(--rail); } }
@media (max-width: 899px) { .cx-rail { display: none; } .cx-mnav { display: flex; } .cx-mid .hide-sm { display: none; } }
@media (max-width: 560px) { .cx-mid { display: none; } .cx-theme .tl, .cx-actions .x { display: none; } .cx-name { font-size: 13px; } .cx-actions a, .cx-theme { padding: 0 8px; } }
@media (max-width: 420px) { .cx-actions a.solid { display: none; } }

/* logo (animated) and prompt caret */
.logo { width: 26px; height: 26px; display: block; }
.logo .tile { fill: var(--ink-text); transform-box: fill-box; transform-origin: center; animation: lg-tile .5s cubic-bezier(.34,1.4,.64,1) .2s both; }
.logo .s { fill: none; stroke: var(--paper); stroke-width: 3; stroke-dasharray: 32; animation: lg-draw .28s linear both; }
.logo .s1 { animation-delay: .8s; } .logo .s2 { animation-delay: 1.1s; } .logo .s3 { animation-delay: 1.4s; } .logo .s4 { animation-delay: 1.7s; }
.logo .h { fill: var(--ink-text); stroke: var(--paper); stroke-width: 2.6; transform-box: fill-box; transform-origin: center; animation: lg-pop .24s cubic-bezier(.34,1.56,.64,1) both; }
.logo .h1 { animation-delay: .62s; } .logo .h2 { animation-delay: 1.06s; } .logo .h3 { animation-delay: 1.36s; } .logo .h4 { animation-delay: 1.66s; }
.logo .sp { fill: var(--paper); transform-box: fill-box; transform-origin: center; animation: lg-spark .6s ease-out 2s both; }
.cx-brand:hover .logo .sp { animation: lg-spark .6s ease-out both; }
@keyframes lg-tile { from { transform: scale(.5); } to { transform: scale(1); } }
@keyframes lg-draw { from { stroke-dashoffset: 32; } to { stroke-dashoffset: 0; } }
@keyframes lg-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes lg-spark { 0% { transform: scale(0) rotate(-120deg); } 70% { transform: scale(1.2) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 3px; vertical-align: -.18em; background: var(--prompt); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- header band: from a colour block to a console hero ---------- */
.band { background: radial-gradient(70vw 60vh at 10% 0%, color-mix(in srgb, var(--ink) 10%, transparent), transparent 70%), var(--paper); color: var(--ink-text); border-bottom: 1px solid var(--hair); }
.band a { color: var(--ink-text); }
.band-inner { padding-top: clamp(80px, 7vw, 112px); }
.back { top: 16px; left: 16px; min-height: 36px; padding: 0 10px; border-radius: 8px; font: 13px var(--mono); color: var(--muted); border: 1px solid var(--line); }
.back:hover { text-decoration: none; background: var(--ph); }
.eyebrow, .tldr h2, .label, .kicker, .part-n, figcaption, .table-wrap th, .decision dt, .model-k, .ba-k, .sub, .st, .pill-badge, .impact-note, .part-status { font-family: var(--mono); }
.eyebrow { font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.band h1 { font-weight: 500; letter-spacing: -0.04em; }
.tldr h2 { color: var(--muted); font-size: 12px; }
.tldr-lede { font-weight: 400; font-size: clamp(21px, 2.2vw, 30px); line-height: 1.35; letter-spacing: -0.015em; }
.stat b { color: var(--ink); font-weight: 600; }
.stat span, .impact-note { color: var(--muted-2); }
.impact-note { font-size: 13px; }
.kicker { font-size: 12px; font-weight: 500; }

/* serif moments become grotesque; italics become plain accents */
blockquote, .pull, .chapter h3, .principle .big, .next .big, .part-lede, .lessons li::before { font-family: var(--sans); font-style: normal; }
.pull, blockquote { font-weight: 400; letter-spacing: -0.02em; color: var(--ink-text); border-left: 3px solid var(--prompt); padding-left: 18px; }
.chapter h3 { font-weight: 500; letter-spacing: -0.02em; }
.principle .big { font-weight: 400; letter-spacing: -0.025em; }
.principle em, .next .big i, .about-lede em { font-style: normal; color: var(--ink); }
.next .big { font-weight: 500; letter-spacing: -0.04em; color: var(--ink-text); }
.next .big i { font-weight: 300; }
.part-lede { font-weight: 400; letter-spacing: -0.015em; }
.lessons li::before { font-family: var(--mono); font-size: 14px; content: counter(l, decimal-leading-zero); padding-top: 4px; }
.sec h2, .wide-sec > h2, .part-head h2 { font-weight: 600; }

/* ---------- components: replace fixed colours with tokens ---------- */
.card, .table-wrap, .chart-card, .parts-nav a, .opts li, .ba, .model-fig, .ph.white, .btn, .pill-badge, .tags span, .tag { background: var(--panel); border-color: var(--hair); }
.card h3, .chart-card h3 { color: var(--ink-text); }
.table-wrap th { background: var(--panel-2); color: var(--muted); font-size: 12px; }
.table-wrap th, .table-wrap td { border-bottom-color: var(--hair); }
.bottleneck, .bottleneck:first-of-type, .rounds li, .decision, .decision > div, .scenario li, .site-foot { border-color: var(--hair); }
ol.process li { border-top-color: var(--hair); }
ol.process li::before { color: var(--paper); box-shadow: 0 0 0 4px var(--paper); }
@media (max-width: 600px) { ol.process li { border-left-color: var(--hair); } }
.bars .track { background: var(--ph); }
img.diagram { border-color: var(--hair); background: #fff; }  /* diagrams are drawn on white: keep them framed as images */
.ph { background: var(--ph); color: var(--muted); }
.btn.primary { background: var(--ink-text); border-color: var(--ink-text); color: var(--paper); }
.btn:hover { border-color: var(--ink-text); }
.st-live, .status.live, .scenario .pass { color: var(--live); }
.st-wip, .status.wip { color: var(--wip); }
.st-idea { color: var(--muted); }
.st { font-size: 11.5px; }
.side-note { background: var(--panel-2); border-color: var(--line); }
.build-row div { background: var(--panel-2); }
.scope-box { border-color: var(--line); }
.scope-box.gate { border-color: var(--cursor); background: color-mix(in srgb, var(--cursor) 9%, var(--panel)); }
.ba-flow li { background: color-mix(in srgb, var(--ink) 10%, var(--panel)); color: var(--ink-text); }
.ba-tools span { border-color: var(--line); }
.parts-nav li.main a { border-color: var(--ink); }
.opts li.chosen { border-color: var(--ink); }
.scenario .fail { color: var(--bad); }
.verdict { border-color: var(--bad); background: var(--bad-bg); }
.verdict b { color: var(--bad); }
.cv h2 { color: var(--ink-text); }
.site-foot { color: var(--muted); }
.site-foot a { color: var(--muted-2); }

/* cursor motif: selection box with corner handles (like the logo) on the case-study title's accent part */
.next .big i { position: relative; display: inline-block; padding: 0 .12em; border: 1.5px solid var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); line-height: 1.05; }

@media (prefers-reduced-motion: reduce) { .logo *, .caret { animation: none !important; } }

/* full product screenshots */
.shot-fig { max-width: 920px; margin: 0 auto; }
.shot-fig img { width: 100%; height: auto; border: 1px solid var(--hair); border-radius: 14px; background: #fff; }

/* ---------- v5: visual placeholders, funnel, chain diagram ---------- */
.hero-sub { margin: 14px 0 0; font-size: clamp(18px, 1.9vw, 23px); line-height: 1.35; color: var(--muted-2); max-width: 40ch; }
.slot { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 24px clamp(18px, 3vw, 32px);
  border: 1.5px dashed var(--line); border-radius: 12px; color: var(--muted-2);
  background: repeating-linear-gradient(135deg, transparent 0 12px, var(--glow) 12px 24px), var(--panel-2); }
.slot .slot-k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.slot b { font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--ink-text); }
.slot p { margin: 0; font-size: 15px; line-height: 1.5; max-width: 60ch; }
.slot .slot-ic { width: 28px; height: 28px; color: var(--ink); }
.slot.r-wide, .slot.r-43, .slot.r-hero { min-height: 200px; }
@media (max-width: 640px) { .slot.r-wide, .slot.r-43, .slot.r-hero { aspect-ratio: auto; min-height: 190px; } }
.vis-k { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.gallery-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.funnel-fig { border: 1px solid var(--hair); background: var(--panel); border-radius: 12px; padding: clamp(18px, 3vw, 28px); }
.funnel-fig .bars li.child .bl { padding-left: 1.2em; position: relative; }
.funnel-fig .bars li.child .bl::before { content: "↳"; position: absolute; left: 0; color: var(--muted); }
.funnel-fig .bars .fill.mute { background: var(--line); }
.funnel-fig .bars li.apart { margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--hair); }
.chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.chain .node { border: 1px solid var(--hair); background: var(--panel); border-radius: 12px; padding: 16px 18px; }
.chain .node small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.chain .node.mine small { color: var(--ink); }
.chain .node b { display: block; font-weight: 600; line-height: 1.3; }
.chain .node span { display: block; font-size: 14.5px; line-height: 1.45; color: var(--muted-2); margin-top: 6px; }
.chain .arr { align-self: center; color: var(--ink); font-size: 22px; }
@media (max-width: 760px) { .chain { grid-template-columns: 1fr; } .chain .arr { justify-self: center; transform: rotate(90deg); } }
.path { list-style: none; margin: 8px 0 24px; padding: 0; display: grid; gap: 10px; }
.path li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 12px; align-items: baseline; padding: 14px 16px; border: 1px solid var(--hair); background: var(--panel); border-radius: 10px; }
.path li.after { border-color: color-mix(in srgb, var(--ink) 40%, var(--hair)); }
.path .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.path li.after .k { color: var(--ink); }
.path .s span { white-space: nowrap; } .path .s span + span::before { content: "→"; margin: 0 8px; color: var(--ink); }
.path .s { line-height: 1.8; }
@media (max-width: 560px) { .path li { grid-template-columns: 1fr; gap: 4px; } }
.big-result { display: flex; gap: 16px 24px; align-items: baseline; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 16px 0; }
.big-result b { font-weight: 800; font-size: clamp(40px, 4vw, 56px); letter-spacing: -0.04em; line-height: 1; color: var(--ink); }
.big-result span { color: var(--muted-2); max-width: 46ch; }
.ev { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.ev-m { color: var(--live); } .ev-t { color: var(--cursor); } .ev-e { color: var(--wip); } .ev-b { color: var(--muted); }
.ev-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 14px; font-size: 14px; color: var(--muted-2); }
.contrib { font-size: 16px; color: var(--muted-2); border-left: 2px solid var(--ink); padding-left: 14px; }
.link-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--hair); background: var(--panel); border-radius: 12px; text-decoration: none; color: var(--ink-text); }
.link-card:hover { border-color: var(--ink); }
.link-card small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.link-card b { font-weight: 600; font-size: 18px; } .link-card .go { color: var(--ink); font-size: 22px; }

/* ---------- v6: scrollable screen frame ---------- */
.scroll-fig { max-width: 920px; margin: 0 auto; }
.sf-frame { position: relative; border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; background: var(--panel); box-shadow: 0 1px 0 var(--hair), 0 18px 40px -24px rgba(0,0,0,.25); }
.sf-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--hair); background: var(--panel-2); font: 12px var(--mono); color: var(--muted); position: relative; }
.sf-bar .dots { display: inline-flex; gap: 6px; } .sf-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.sf-bar .sf-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-bar .sf-open { color: var(--ink); white-space: nowrap; }
.sf-bar .sf-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--ink); transition: width .1s linear; }
.sf-view { height: min(68vh, 600px); overflow-y: auto; overflow-x: hidden; background: #fff; scrollbar-width: thin; scrollbar-color: var(--line) transparent; outline-offset: -3px; }
.sf-view img { display: block; width: 100%; height: auto; }
.sf-fade { pointer-events: none; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(to bottom, transparent, rgba(0,0,0,.10)); transition: opacity .3s; }
.sf-hint { pointer-events: none; position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--ink-text); color: var(--paper); font: 12.5px var(--mono); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35); transition: opacity .3s, transform .3s; }
.sf-hint svg { width: 14px; height: 14px; animation: sf-nudge 1.4s ease-in-out infinite; }
@keyframes sf-nudge { 50% { transform: translateY(3px); } }
.sf-frame.moved .sf-hint { opacity: 0; transform: translate(-50%, 6px); }
.sf-frame.at-end .sf-fade { opacity: 0; }
@media (max-width: 640px) { .sf-view { height: 380px; } .sf-bar .sf-title { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .sf-hint svg { animation: none; } }
/* app-like frame: pinned top bar and side nav, only the content scrolls.
   Set --iw (export width), --th (top bar height) and --nw (side nav width) in image pixels. */
.sf-app { container-type: inline-size; }
.sf-app img { display: block; width: 100%; height: auto; }
.sf-app .sf-top { position: sticky; top: 0; z-index: 2; }
.sf-app .sf-body { display: grid; grid-template-columns: calc(100cqw * var(--nw) / var(--iw)) 1fr; align-items: start; }
.sf-app { --vh: min(78vh, 700px); height: var(--vh); }
.sf-app .sf-nav { position: sticky; top: calc(100cqw * var(--th) / var(--iw)); z-index: 1; height: calc(var(--vh) - 100cqw * var(--th) / var(--iw));
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background-repeat: repeat-y; background-size: 100% auto; }
.sf-app .sf-nav img { flex: 0 1 auto; min-height: 0; object-fit: cover; object-position: top; }
.sf-app .sf-nav img:last-child { flex-shrink: 0; }
@media (max-width: 640px) { .sf-app { --vh: 380px; } }
/* overview cards without links: no hover highlight */
.parts-nav a:not([href]):hover { border-color: var(--hair); }
.parts-nav li.main a:not([href]):hover { border-color: var(--ink); }
.path .s { display: flex; flex-wrap: wrap; align-items: baseline; }
.scroll-fig.gap-fig { margin-bottom: clamp(64px, 8vw, 112px); }
/* five before-tools at one size */
.tools-5 .ph img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
p.intro { display: block; }

/* ---------- v7: five tools two-up; click-to-expand lightbox ---------- */
.tools-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.tools-5 > figure:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; width: calc(50% - 12px); justify-self: center; }
@media (max-width: 640px) { .tools-5 { grid-template-columns: 1fr; } .tools-5 > figure:last-of-type:nth-of-type(odd) { width: 100%; } }

.zoomable { position: relative; cursor: zoom-in; }
.zoom-btn { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 0;
  background: rgba(20,20,20,.72); color: #fff; cursor: pointer; opacity: 0; transform: translateY(-2px); transition: opacity .18s, transform .18s; }
.zoom-btn svg { width: 16px; height: 16px; }
.zoomable:hover .zoom-btn, .zoom-btn:focus-visible { opacity: 1; transform: none; }
.zoomable.img-z::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0); transition: background .18s; pointer-events: none; border-radius: inherit; }
.zoomable.img-z:hover::after { background: rgba(0,0,0,.06); }
@media (hover: none) { .zoom-btn { opacity: 1; transform: none; } }

.lb { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(12,12,12,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb.open { display: block; }
.lb-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; display: grid; place-items: center; padding: 64px 16px 24px; }
.lb-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; }
.lb-stage img, .lb-stage video { display: block; max-width: min(94vw, 1600px); max-height: calc(100vh - 150px); width: auto; height: auto; border-radius: 10px; background: #fff; box-shadow: 0 20px 60px -20px rgba(0,0,0,.6); }
.lb.tall .lb-scroll { place-items: start center; }
.lb.tall .lb-stage img { max-height: none; width: min(94vw, 1200px); }
.lb-cap { max-width: min(94vw, 900px); margin: 0; color: #d9d6cf; font: 14px/1.55 var(--mono); text-align: center; }
.lb-close { position: fixed; top: 14px; right: 14px; z-index: 2; height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff; font: 13px var(--mono); cursor: pointer; }
.lb-close:hover { background: rgba(255,255,255,.16); }
html.lb-lock, html.lb-lock body { overflow: hidden; }
.sf-frame > .zoom-btn { top: 48px; }

/* ---------- v8: before/after compare slider ---------- */
.cmp { --pos: 50%; position: relative; overflow: hidden; border: 1px solid var(--hair); border-radius: 12px; background: #fff; user-select: none; touch-action: pan-y; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; pointer-events: none; }
.cmp .cmp-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp .cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--ink-text); pointer-events: none; z-index: 2; }
.cmp .cmp-knob { position: absolute; top: 50%; left: var(--pos); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--ink-text); color: var(--paper);
  display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(0,0,0,.45); pointer-events: none; z-index: 3; }
.cmp .cmp-knob svg { width: 22px; height: 22px; }
.cmp .cmp-tag { position: absolute; top: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px; font: 12px var(--mono); background: rgba(20,20,20,.75); color: #fff; pointer-events: none; }
.cmp .cmp-tag.l { left: 12px; } .cmp .cmp-tag.r { right: 12px; background: var(--ink); }
.cmp input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4; -webkit-appearance: none; appearance: none; }
.cmp input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100vh; }
.cmp input[type=range]::-moz-range-thumb { width: 44px; height: 100vh; border: 0; }
.cmp:has(input:focus-visible) .cmp-knob { outline: 3px solid var(--ink); outline-offset: 3px; }
/* link card to a live product */
.live-card { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px clamp(18px, 3vw, 32px); border: 1px solid var(--hair); border-radius: 12px;
  background: radial-gradient(80% 90% at 0% 0%, color-mix(in srgb, var(--ink) 9%, transparent), transparent 70%), var(--panel); color: var(--ink-text); text-decoration: none; transition: border-color .15s, transform .15s; }
.live-card:hover { border-color: var(--ink); text-decoration: none; transform: translateY(-2px); }
.live-card .st { align-self: flex-start; }
.live-card b { font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.live-card span { color: var(--muted-2); font-size: 15.5px; line-height: 1.45; }
.live-card .go { color: var(--ink); font: 500 14px var(--mono); margin-top: 4px; }
@media (max-width: 640px) { .live-card.r-43 { aspect-ratio: auto; min-height: 190px; } }

/* ---- Cloud: icon line, principles card, stacked figures ---- */
.icon-line { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.icon-line li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 12px; background: var(--panel); font-size: 14.5px; line-height: 1.35; color: var(--ink-text); font-weight: 600; }
.icon-line svg { flex: 0 0 auto; width: 34px; height: 34px; padding: 7px; border-radius: 9px; color: var(--ink); background: color-mix(in srgb, var(--ink) 11%, transparent); }
.icon-lead { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
@media (max-width: 900px) { .icon-line { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .icon-line li { font-size: 13.5px; padding: 10px; gap: 9px; } .icon-line svg { width: 30px; height: 30px; padding: 6px; } }

.principles-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); border: 1px solid var(--hair); border-radius: 16px; overflow: hidden; background: var(--panel); }
.principles-card > div { padding: clamp(24px, 3.4vw, 44px); }
.principles-card .pc-r { background: var(--panel-2); border-left: 1px solid var(--hair); }
.pc-k { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); font-weight: 600; margin-bottom: 10px; }
.principles-card h3 { margin: 0 0 22px; font-size: clamp(20px, 2.1vw, 26px); line-height: 1.25; font-weight: 600; }
.pc-l ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pc-l li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--muted); }
.pc-l li svg { flex: 0 0 auto; width: 36px; height: 36px; padding: 8px; border-radius: 10px; color: var(--ink); background: color-mix(in srgb, var(--ink) 11%, transparent); }
.pc-l li b { display: block; color: var(--ink-text); font-weight: 600; font-size: 16px; }
.pc-r p { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: var(--muted-2); }
.pc-ticks { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; }
.pc-ticks li { position: relative; padding-left: 26px; font-size: 15.5px; line-height: 1.5; color: var(--muted-2); }
.pc-ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.pc-r .pc-out { margin: 0; padding-top: 16px; border-top: 1px solid var(--hair); }
.pc-r b { color: var(--ink-text); }
@media (max-width: 760px) { .principles-card { grid-template-columns: 1fr; } .principles-card .pc-r { border-left: 0; border-top: 1px solid var(--hair); } }

.stack-figs { display: grid; gap: 40px; margin-bottom: 32px; }
.persona-list { list-style: none; margin: 8px 0 24px !important; padding: 0 !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.persona-list li:last-child { grid-column: 1 / -1; }
@media (max-width: 640px) { .persona-list { grid-template-columns: 1fr; } }
.persona-list li { margin: 0 !important; }
.persona-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--hair); border-radius: 12px; background: var(--panel); font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.persona-list svg { flex: 0 0 auto; width: 36px; height: 36px; padding: 8px; border-radius: 10px; color: var(--ink); background: color-mix(in srgb, var(--ink) 11%, transparent); }
.persona-list b { display: block; color: var(--ink-text); font-weight: 600; font-size: 15.5px; }
.persona-list em { display: block; font-style: normal; color: var(--muted-2); margin-bottom: 2px; }
/* ---- Cloud: component reuse figure ---- */
.reuse-fig { border: 1px solid var(--hair); border-radius: 16px; background: var(--panel); padding: clamp(18px, 3vw, 32px); display: grid; gap: 28px; }
.ru-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ru-row + .ru-row { padding-top: 28px; border-top: 1px solid var(--hair); }
.ru-k b { display: block; font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--ink-text); }
.ru-k span { display: block; max-width: 620px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ru-navs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ru-nav img, .ru-strip img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--hair); }
.ru-svc { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.ru-strips { display: grid; gap: 12px; }
.ru-strip { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; }
.ru-strip .ru-svc { margin: 0; justify-self: start; }
@media (max-width: 760px) { .ru-navs { gap: 8px; } .ru-svc { font-size: 11px; padding: 2px 7px; } .ru-strip { grid-template-columns: 1fr; gap: 6px; } }
/* ---- Cloud: managed access figure ---- */
.managed-fig { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 5.2fr); gap: 16px; align-items: center; padding: clamp(16px, 2.6vw, 28px); border: 1px solid var(--hair); border-radius: 16px; background: var(--panel); }
.managed-fig img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--hair); }
.mf-arrow { font-size: 24px; color: var(--ink); }
.managed-fig .ru-svc { margin-top: 10px; }
@media (max-width: 760px) { .managed-fig { grid-template-columns: 1fr; } .mf-nav img { max-height: 320px; width: auto; } .mf-arrow { transform: rotate(90deg); justify-self: center; } }

/* ---- one corner radius for every image, video and screen frame ---- */
:root { --media-r: 12px; }
.ph, .shot-fig img, .sf-frame, .cmp, img.diagram, .ru-nav img, .ru-strip img, .managed-fig img,
.proto, .lb-stage img, .lb-stage video, .zoomable.img-z::after { border-radius: var(--media-r) !important; }
.ph { overflow: hidden; }

/* ---------- v9: embedded interactive prototype ---------- */
.proto { position: relative; aspect-ratio: 1440 / 900; overflow: hidden; border: 1px solid var(--hair); border-radius: 12px; background: #fff; }
.proto-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.proto-start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border: 0; border-radius: 999px;
  background: var(--ink-text); color: var(--paper); font: 500 15px var(--mono); cursor: pointer; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); }
.proto-start svg { width: 16px; height: 16px; }
.proto-start:hover { transform: translate(-50%, -50%) scale(1.03); }
.proto::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.12); pointer-events: none; }
.proto.live::after { display: none; }
.proto iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
.proto-fig figcaption a { white-space: nowrap; }
@media (max-width: 760px) { .proto-start { padding: 11px 16px; font-size: 13px; } }
/* nine-step process: three rows of three */
ol.process.nine { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
@media (max-width: 600px) { ol.process.nine { grid-template-columns: 1fr; row-gap: 0; } }
/* ---- IAM: how I directed the AI ---- */
.ai-moments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 14px; }
.aim { border: 1px solid var(--hair); border-radius: 12px; background: var(--panel); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.aim-d { font: 12px var(--mono); color: var(--muted); }
.aim h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.aim blockquote { margin: 2px 0; padding: 10px 12px; border-left: 3px solid var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 0 8px 8px 0; font: 13.5px/1.5 var(--mono); color: var(--ink-text); }
.aim p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--muted-2); }
.aim-note { font-size: 13px; color: var(--muted); }
@media (max-width: 700px) { .ai-moments { grid-template-columns: 1fr; } }
/* logo reversed: no tile, the selection box and spark drawn in ink */
.logo .tile { display: none; }
.logo .s { stroke: var(--ink-text); }
.logo .h { fill: var(--paper); stroke: var(--ink-text); }
.logo .sp { fill: var(--ink-text); }
