/* Nexara9 — inside pages. An engineering catalogue: wide display type, hairline rules, part numbers.
   Light by default; dark on request. */

@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-display.woff2") format("woff2-variations"); font-weight: 600 850; font-stretch: 100% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f4f3ef;
  --paper-2: #eae8e2;
  --card: #fbfaf8;
  --ink: #0d0d0c;
  --ink-2: #2d2c29;
  --muted: #6b6963;
  --rule: #d6d3ca;
  --rule-2: #b9b5aa;
  --gold: #a87717;
  --gold-hi: #e2b85a;
  --on-ink: #f4f3ef;
  --term: #11110f;
  --ok: #0d7f55; --bad: #c03d29; --warn: #a96d0e; --info: #2c63c4;
  --ai: #5b4fd6; --fintech: #0d7f55; --web: #2563d6; --research: #9b45bf; --hardware: #cf5b22;
  --display: "Archivo", "Arial Black", ui-sans-serif, system-ui, sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pad: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c0c0b;
  --paper-2: #161614;
  --card: #121211;
  --ink: #f1efe9;
  --ink-2: #cfcbc2;
  --muted: #8f8b82;
  --rule: #2a2926;
  --rule-2: #3d3b36;
  --gold: #e2b85a;
  --on-ink: #0c0c0b;
  --term: #070706;
  --ok: #45c088; --bad: #f07a68; --warn: #e3ae4c; --info: #79a8ff;
  --ai: #a59cff; --fintech: #45c088; --web: #79a8ff; --research: #d394f0; --hardware: #f39a6b;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; transition: background .3s, color .3s; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold-hi); color: #0d0d0c; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
code { font: 500 0.86em var(--mono); background: var(--paper-2); padding: 0.06em 0.36em; border-radius: 3px; color: var(--ink); word-break: break-word; }
strong { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 10px 14px; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.muted { color: var(--muted); }
.tlink { display: inline-flex; align-items: center; gap: 4px; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.tlink svg { width: 12px; height: 12px; }
.tlink:hover { color: var(--gold); }
.dot { display: inline-block; width: 8px; height: 8px; flex: none; }
.d-ai { background: var(--ai); } .d-fintech { background: var(--fintech); } .d-web { background: var(--web); } .d-research { background: var(--research); } .d-hardware { background: var(--hardware); }
.c-ai { --c: var(--ai); } .c-fintech { --c: var(--fintech); } .c-web { --c: var(--web); } .c-research { --c: var(--research); } .c-hardware { --c: var(--hardware); } .c-none { --c: var(--gold); }
.glyph { width: 100%; height: auto; display: block; }

/* ---------- type ---------- */
.mega { font: 820 clamp(2.4rem, 10.4vw, 10.5rem)/0.84 var(--display); font-stretch: 125%; letter-spacing: -0.045em; text-transform: uppercase; margin: 0; }
.mega sup { font: 500 clamp(0.9rem, 1.4vw, 1.2rem)/1 var(--mono); font-stretch: normal; letter-spacing: 0; color: var(--gold); vertical-align: top; margin-left: 0.4em; position: relative; top: 0.6em; }
.h2 { font: 760 clamp(1.8rem, 3.6vw, 3rem)/1 var(--display); font-stretch: 115%; letter-spacing: -0.035em; margin: 0 0 12px; }
.kicker { font: 500 0.74rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.sub { font: 500 0.74rem/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 30px 0 12px; }

/* ---------- buttons ---------- */
.btn { --h: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: var(--h); padding: 0 18px; border-radius: 4px; font: 560 0.92rem/1 var(--sans); border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); white-space: nowrap; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--gold); color: #0d0d0c; }
.btn-outline { border-color: var(--rule-2); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.btn-ghost { border-color: var(--rule-2); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-gold { background: linear-gradient(120deg, #f6e7b0, #d9b45a 45%, #b08a37); color: #15120a; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-sm { --h: 36px; padding: 0 12px; font-size: 0.84rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--pad); height: 64px; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 18px; height: auto; }
.brand-word { font: 800 0.95rem/1 var(--display); font-stretch: 125%; letter-spacing: 0.08em; }
.brand-word b { font-weight: 800; color: var(--gold); }
.header-right { display: flex; align-items: center; gap: 6px; }
.site-nav { display: flex; align-items: center; gap: 2px; height: 64px; }
.site-nav a { display: flex; align-items: center; height: 100%; padding: 0 14px; font-size: 0.92rem; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.site-nav .nav-cta { height: 36px; margin: 0 4px 0 10px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 4px; color: var(--ink); }
.site-nav .nav-cta:hover { background: var(--ink); color: var(--on-ink); }
.theme-toggle, .menu-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 4px; border: 1px solid var(--rule-2); background: transparent; cursor: pointer; color: var(--ink); }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
.menu-btn { display: none; position: relative; }
.menu-btn i { position: absolute; left: 9px; right: 9px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn i:first-of-type { top: 13px; } .menu-btn i:last-of-type { top: 21px; }
.menu-btn[aria-expanded="true"] i:first-of-type { top: 17px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-of-type { top: 17px; transform: rotate(-45deg); }
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .site-nav { position: absolute; top: 64px; left: 0; right: 0; height: auto; flex-direction: column; align-items: stretch; gap: 0; padding: 6px var(--pad) 14px; background: var(--paper); border-bottom: 1px solid var(--rule); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s, transform .25s var(--ease), visibility .2s; }
  .site-nav.open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { height: auto; padding: 14px 0; border-bottom: 1px solid var(--rule); font: 760 1.5rem/1 var(--display); font-stretch: 115%; letter-spacing: -0.02em; }
  .site-nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--rule); }
  .site-nav .nav-cta { margin: 14px 0 0; height: 46px; justify-content: center; font: 560 1rem var(--sans); }
  .no-js .site-nav { position: static; opacity: 1; visibility: visible; transform: none; flex-direction: row; padding: 0; border: 0; }
  .no-js .menu-btn { display: none; }
}

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- page title ---------- */
.title { padding: clamp(40px, 8vw, 110px) 0 clamp(24px, 4vw, 44px); }

/* ---------- projects index ---------- */
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-top: 2px solid var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 0.9rem; font-weight: 500; white-space: nowrap; }
.chip:hover { border-color: var(--rule-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.filter-count { font: 500 0.76rem var(--mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.no-js .filterbar .filters { display: none; }
.index-head, .row-main { display: grid; grid-template-columns: 84px minmax(0, 1.05fr) minmax(0, 1.6fr) 190px 56px 36px; gap: 20px; align-items: baseline; }
.index-head { padding: 10px 0; border-top: 1px solid var(--rule); font: 500 0.7rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.index { list-style: none; margin: 0 auto; padding: 0; position: relative; }
.row { border-top: 1px solid var(--rule); }
.row:last-child { border-bottom: 1px solid var(--rule); }
.row[hidden] { display: none; }
.row-main { position: relative; padding: 24px 0; }
.r-thumb { display: none; }
.r-code { font: 600 0.8rem var(--mono); color: var(--muted); transition: color .2s; }
.r-namecell { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.r-name { font: 760 clamp(1.25rem, 2vw, 1.7rem)/1.1 var(--display); font-stretch: 112%; letter-spacing: -0.03em; transition: color .2s; }
.r-name::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole row is clickable */
.r-toggle { position: relative; z-index: 2; flex: none; width: 30px; height: 30px; display: grid; place-items: center; align-self: center; border: 1px solid var(--rule-2); border-radius: 4px; background: var(--paper); color: var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.r-toggle .chev { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.r-toggle:hover { border-color: var(--ink); }
.r-toggle[aria-expanded="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.r-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.no-js .r-toggle { display: none; }
.r-desc { color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.r-stack { display: flex; align-items: center; gap: 6px; font: 500 0.8rem var(--mono); color: var(--muted); }
.r-stack span { margin-left: 4px; }
.r-year { font: 500 0.8rem var(--mono); color: var(--muted); }
.r-go { justify-self: end; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--rule-2); border-radius: 4px; transition: all .3s var(--ease); }
.r-go svg { width: 15px; height: 15px; }
@media (hover: hover) {
.row-main:hover .r-name { color: var(--gold); }
.row-main:hover .r-code { color: var(--gold); }
.row-main:hover .r-go { background: var(--ink); color: var(--on-ink); border-color: var(--ink); transform: rotate(-45deg); }
}
.r-secs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 22px 104px; animation: fadeUp .3s var(--ease); }
.r-secs[hidden] { display: none; }
.r-secs a { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 4px; background: var(--card); font-size: 0.88rem; font-weight: 500; transition: border-color .2s, background .2s, color .2s; }
.r-secs a span { font: 600 0.72rem var(--mono); color: var(--gold); }
.r-secs a:hover { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.peek { position: fixed; left: 0; top: 0; z-index: 40; width: 300px; aspect-ratio: 4 / 3; overflow: hidden; pointer-events: none; opacity: 0; border: 1px solid var(--rule-2); background: var(--card); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45); transform: translate3d(var(--px, -999px), var(--py, -999px), 0) scale(.96); transition: opacity .2s, transform .12s linear; }
.peek img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.peek-glyph { display: grid; place-items: center; color: var(--c); background-color: var(--card); background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 24px 24px; }
.peek-glyph .glyph { width: 34%; }
@media (hover: hover) and (min-width: 1000px) { .row-main:hover .peek { opacity: 1; } .r-toggle:hover ~ .peek { opacity: 0; } }
@media (max-width: 1000px) {
  .index-head { display: none; }
  .row-main { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "thumb code" "thumb name" "thumb desc" "thumb stack"; gap: 4px 14px; padding: 16px 0; align-items: start; }
  .r-thumb { grid-area: thumb; display: grid; place-items: center; width: 52px; height: 52px; color: var(--c); border: 1px solid var(--rule); background-color: var(--card); background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 13px 13px; }
  .r-thumb .glyph { width: 30px; }
  .r-code { grid-area: code; font-size: 0.72rem; }
  .r-namecell { grid-area: name; justify-content: space-between; }
  .r-name { font-size: 1.22rem; }
  .r-toggle { width: 34px; height: 34px; }
  .r-desc { grid-area: desc; font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .r-stack { grid-area: stack; font-size: 0.74rem; margin-top: 2px; }
  .r-year, .r-go, .peek { display: none; }
  .r-secs { padding: 0 0 18px 66px; }
  .r-secs a { padding: 7px 10px; font-size: 0.84rem; }
}
@media (max-width: 760px) {
  .filterbar { position: sticky; top: 64px; z-index: 30; background: var(--paper); flex-wrap: nowrap; gap: 10px; padding: 10px 0; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -4px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .filters::-webkit-scrollbar { display: none; }
  .filter-count { flex: none; }
}

/* ---------- project bar (sticky, on every project page) ---------- */
.pbar { position: sticky; top: 64px; z-index: 35; margin-top: clamp(20px, 3vw, 32px); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.pbar-in { display: flex; align-items: center; gap: 8px; min-height: 54px; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--rule-2); border-radius: 4px; background: var(--card); color: var(--ink); cursor: pointer; font-size: 0.9rem; max-width: 46vw; }
.dd-btn strong { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-btn .r-code { color: var(--gold); font-size: 0.74rem; }
.dd-k { font: 500 0.7rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pbar-cur { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-btn .chev { width: 15px; height: 15px; flex: none; transition: transform .3s var(--ease); }
.dd-btn:hover { border-color: var(--ink); }
.dd-btn[aria-expanded="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.dd-btn[aria-expanded="true"] .dd-k { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.dd-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dd-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; background: var(--card); border: 1px solid var(--ink); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5); animation: fadeUp .25s var(--ease); }
.dd-panel[hidden] { display: none; }
.dd-h { margin: 6px 8px 6px; font: 500 0.68rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.dd-panel a { display: grid; grid-template-columns: 52px 1fr; align-items: baseline; padding: 9px 8px; font-size: 0.92rem; font-weight: 500; border-radius: 3px; }
.dd-panel a span { font: 600 0.72rem var(--mono); color: var(--gold); }
.dd-panel a:hover { background: var(--paper-2); }
.dd-panel a[aria-current="page"], .dd-panel a.active { background: var(--ink); color: var(--on-ink); }
.dd-panel a[aria-current="page"] span, .dd-panel a.active span { color: var(--gold-hi); }
#dd-sec a { grid-template-columns: 32px 1fr; }
.dd-sub { margin: 0 0 4px 40px; padding-left: 10px; border-left: 1px solid var(--rule-2); }
.dd-sub a { display: block; padding: 6px 8px; font: 500 0.8rem var(--mono); color: var(--ink-2); }
.pbar-links { margin-left: auto; display: flex; gap: 6px; }
.pl { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 4px; font-size: 0.86rem; font-weight: 560; }
.pl svg { width: 15px; height: 15px; }
.pl:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
@media (max-width: 640px) {
  .pbar-in { gap: 6px; }
  .dd { flex: 1 1 0; min-width: 0; }
  .dd-btn { width: 100%; max-width: none; justify-content: space-between; padding: 0 8px 0 10px; }
  .dd-proj .r-code, .dd-k { display: none; }
  .pl span { display: none; }
  .pl { padding: 0 10px; }
  .dd-panel { position: fixed; top: 128px; left: 16px; right: 16px; width: auto; }
}
.no-js .pbar { display: none; }
.sec, [id^="repo-"] { scroll-margin-top: 76px; }

/* ---------- jump nav ---------- */
.jump { margin-top: clamp(56px, 9vw, 120px); margin-bottom: clamp(56px, 9vw, 120px); border-top: 2px solid var(--ink); }
.jump a { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 20px; padding: clamp(18px, 3vw, 30px) 0; border-bottom: 1px solid var(--rule); }
.jump-n { font: 600 0.8rem var(--mono); color: var(--muted); }
.jump-t { font: 820 clamp(2.2rem, 7vw, 5.6rem)/0.9 var(--display); font-stretch: 125%; letter-spacing: -0.045em; text-transform: uppercase; transition: color .2s, transform .35s var(--ease); }
.jump-go { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--rule-2); border-radius: 4px; transition: all .3s var(--ease); }
.jump-go svg { width: 20px; height: 20px; }
.jump a:hover .jump-t { color: var(--gold); transform: translateX(10px); }
.jump a:hover .jump-go { background: var(--ink); color: var(--on-ink); border-color: var(--ink); transform: rotate(-45deg); }
@media (max-width: 600px) { .jump a { grid-template-columns: 40px 1fr auto; gap: 12px; } .jump-go { width: 40px; height: 40px; } }

/* ---------- ventures (dark cards: the premium tier) ---------- */
.venture-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.venture { position: relative; padding: clamp(22px, 3vw, 36px); border-radius: 6px; background: radial-gradient(600px 300px at 100% 0%, rgba(217, 180, 90, 0.16), transparent 60%), #11100c; color: #f3eee4; border: 1px solid #2c2619; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.venture-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.venture-kind { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #d9b45a; }
.venture-lock { display: inline-flex; align-items: center; gap: 6px; font: 500 0.68rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #a39b8c; border: 1px solid #3a3222; padding: 6px 9px; border-radius: 3px; }
.venture-lock svg { width: 12px; height: 12px; }
.venture-glyph { color: #d9b45a; width: 58px; margin: 26px 0 12px; }
.venture-name { font: 820 clamp(2.2rem, 4.4vw, 3.6rem)/0.95 var(--display); font-stretch: 125%; letter-spacing: -0.045em; text-transform: uppercase; margin: 0; }
.venture-line { color: #cfc7b8; margin: 12px 0 0; max-width: 46ch; font-size: 1.02rem; }
.venture-badge { font: 500 0.76rem/1.4 var(--mono); color: #a39b8c; margin: 14px 0 22px; }
.venture .btn { align-self: flex-start; margin-top: auto; }
.autonomy { margin-top: 14px; padding: clamp(22px, 3vw, 36px); border: 1px solid var(--rule); border-radius: 6px; background: var(--card); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 28px; align-items: center; }
.autonomy-copy .muted { margin: 0; max-width: 40ch; }
.autonomy-pair { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 44px 1fr; }
.autonomy-pair .venture { padding: 22px; }
.autonomy-pair .venture-name { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.autonomy-pair .venture-glyph { width: 46px; margin: 16px 0 8px; }
.autonomy-pair .venture-badge { margin-bottom: 0; }
.autonomy-link { display: grid; place-items: center; }
.autonomy-link span { width: 100%; height: 2px; background: var(--gold); position: relative; }
.autonomy-link span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; background: var(--gold); transform: translate(-50%, -50%) rotate(45deg); }
.fund-band { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 22px clamp(22px, 3vw, 36px); border-radius: 6px; border: 1px solid var(--rule); background: var(--card); }
.fund-text { margin: 0; font: 700 clamp(1.1rem, 2vw, 1.45rem)/1.2 var(--display); font-stretch: 110%; letter-spacing: -0.02em; }
@media (max-width: 900px) { .venture-grid, .autonomy { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .autonomy-pair { grid-template-columns: 1fr; grid-template-rows: auto 32px auto; }
  .autonomy-link span { width: 2px; height: 100%; }
  .fund-band .btn { width: 100%; }
}

/* ---------- founders ---------- */
.fdr-list { display: grid; gap: clamp(56px, 8vw, 110px); border-top: 2px solid var(--ink); padding-top: clamp(28px, 4vw, 48px); }
.fdr { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; scroll-margin-top: 80px; }
.fdr-flip .fdr-photo { order: 2; }
.fdr-photo { margin: 0; position: sticky; top: 88px; }
.fdr-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.fdr-photo figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font: 500 0.74rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.fdr-name { font: 820 clamp(3rem, 7.5vw, 6.6rem)/0.86 var(--display); font-stretch: 125%; letter-spacing: -0.05em; text-transform: uppercase; margin: 0 0 28px; }
.spec { margin: 0; border-top: 1px solid var(--rule); }
.spec > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.spec dt { font: 500 0.72rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.spec dd { margin: 0; font-size: 0.97rem; }
.spec-links { display: flex; flex-wrap: wrap; gap: 14px; }
.fdr-quote { margin: 32px 0 20px; font: 700 clamp(1.3rem, 2.3vw, 1.8rem)/1.2 var(--display); font-stretch: 105%; letter-spacing: -0.025em; }
.fdr-quote::before { content: "“"; color: var(--gold); }
.fdr-quote::after { content: "”"; color: var(--gold); }
.fdr-bio { color: var(--ink-2); margin: 0 0 8px; max-width: 62ch; }
.hl-list { list-style: none; counter-reset: h; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.hl-list li { counter-increment: h; display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; color: var(--ink-2); }
.hl-list li::before { content: counter(h, decimal-leading-zero); font: 600 0.76rem var(--mono); color: var(--gold); padding-top: 3px; }
.focus { margin: 0; font-weight: 500; }
.focus span { color: var(--rule-2); margin: 0 10px; }
.built { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.built a { font-weight: 500; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.built a:hover { color: var(--gold); text-decoration-color: var(--gold); }
@media (max-width: 860px) { .fdr { grid-template-columns: 1fr; } .fdr-flip .fdr-photo { order: 0; } .fdr-photo { position: static; max-width: 460px; } }
@media (max-width: 480px) { .spec > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- project page: head ---------- */
.d-head { padding: clamp(20px, 3vw, 32px) 0 0; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.back svg { width: 15px; height: 15px; }
.back:hover { color: var(--ink); }
.d-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: clamp(28px, 5vw, 56px) 0 14px; font: 500 0.8rem var(--mono); color: var(--muted); }
.d-meta .r-code { color: var(--gold); }
.d-meta span { display: inline-flex; align-items: center; gap: 8px; }
.d-title { font: 820 clamp(2.6rem, 8vw, 7.4rem)/0.88 var(--display); font-stretch: 118%; letter-spacing: -0.05em; margin: 0; max-width: 16ch; }
.d-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; margin-top: clamp(22px, 3vw, 36px); }
.d-lead { margin: 0; font-size: clamp(1.08rem, 1.6vw, 1.32rem); line-height: 1.5; color: var(--ink-2); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(32px, 4vw, 48px); border-top: 2px solid var(--ink); }
.spec-row > div { display: block; padding: 14px 16px 16px 0; border-bottom: 1px solid var(--rule); }
.spec-row > div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.spec-row dd { margin-top: 6px; font-weight: 500; font-size: 0.93rem; }
@media (max-width: 900px) {
  .d-intro { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 1fr 1fr; }
  .spec-row > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .spec-row > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
}
.d-visual { margin-top: clamp(28px, 4vw, 48px); margin-bottom: 0; border: 1px solid var(--rule); background: var(--card); overflow: hidden; }
.d-visual > img { width: 100%; max-height: 640px; object-fit: cover; object-position: top center; }
.bp { position: relative; aspect-ratio: 3 / 1; display: grid; place-items: center; color: var(--c); background-color: var(--card); background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--rule) 50%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--rule) 50%, transparent) 1px, transparent 1px); background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px; background-position: center; }
.bp-glyph { width: clamp(90px, 13vw, 170px); }
.bp-c { position: absolute; font: 500 0.74rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--card); padding: 3px 6px; }
.bp-tl { left: 14px; top: 12px; color: var(--gold); } .bp-tr { right: 14px; top: 12px; } .bp-bl { left: 14px; bottom: 12px; } .bp-br { right: 14px; bottom: 12px; }
@media (max-width: 600px) { .bp { aspect-ratio: 4 / 3; } }

/* ---------- project page: body ---------- */
.d-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding: clamp(40px, 6vw, 80px) 0 0; }
.toc { position: sticky; top: 140px; align-self: start; }
.toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.toc a { display: grid; grid-template-columns: 30px 1fr; padding: 8px 0; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 0.88rem; transition: color .2s; }
.toc a span { font: 500 0.74rem var(--mono); padding-top: 2px; }
.toc a:hover, .toc a.active { color: var(--ink); }
.toc a.active span { color: var(--gold); }
@media (max-width: 1000px) { .d-body { grid-template-columns: 1fr; } .toc { display: none; } }
.prose { min-width: 0; max-width: 900px; }
.prose p { margin: 0 0 14px; color: var(--ink-2); }
.sec { border-top: 2px solid var(--ink); padding: 18px 0 clamp(48px, 6vw, 80px); }
.sec-h { display: grid; grid-template-columns: 56px 1fr; align-items: baseline; margin-bottom: 22px; }
.sec-n { font: 600 0.8rem var(--mono); color: var(--gold); }
.sec-h h2 { margin: 0; font: 780 clamp(1.7rem, 3.2vw, 2.6rem)/1 var(--display); font-stretch: 115%; letter-spacing: -0.04em; }
.sec-b { padding-left: 56px; }
@media (max-width: 640px) { .sec-h { grid-template-columns: 40px 1fr; } .sec-b { padding-left: 0; } }
.sec-b > .sub:first-child { margin-top: 0; }

/* problem / aim */
.pa-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.pa { padding: 16px 20px 4px 0; }
.pa + .pa { padding-left: 20px; border-left: 1px solid var(--rule); }
.pa .sub { margin-top: 0; }
.pa-aim .sub { color: var(--gold); }
.pa p { color: var(--ink) !important; font-size: 1.04rem; }
@media (max-width: 640px) { .pa-grid { grid-template-columns: 1fr; } .pa + .pa { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }

/* stepper */
.stepper { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 0; border: 1px solid var(--rule); background: var(--card); }
.step-list { list-style: none; margin: 0; padding: 0; border-right: 1px solid var(--rule); }
.step-list li + li { border-top: 1px solid var(--rule); }
.step-list button { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 6px; text-align: left; padding: 13px 16px; border: 0; background: transparent; cursor: pointer; color: var(--muted); transition: background .2s, color .2s; }
.step-list button:hover { color: var(--ink); background: var(--paper); }
.step-list button[aria-selected="true"] { color: var(--on-ink); background: var(--ink); }
.step-n { font: 600 0.78rem var(--mono); padding-top: 2px; }
.step-list button[aria-selected="true"] .step-n { color: var(--gold-hi); }
.step-list button.done .step-n { color: var(--gold); }
.step-t { font-weight: 560; font-size: 0.94rem; }
.step-panels { padding: 26px; display: flex; flex-direction: column; min-height: 280px; }
.step-panel h4 { font: 760 1.6rem/1.05 var(--display); font-stretch: 112%; letter-spacing: -0.03em; margin: 0 0 12px; }
.step-kicker { font: 600 0.76rem var(--mono) !important; color: var(--gold) !important; margin: 0 0 14px !important; }
.js .step-panel[data-inactive] { display: none; }
.js .step-panel { animation: fadeUp .35s var(--ease); }
.no-js .step-panel + .step-panel { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule); }
.step-progress { margin-top: auto; height: 2px; background: var(--rule); }
.step-progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .4s var(--ease); }
.step-nav { padding-top: 14px; display: flex; justify-content: space-between; gap: 10px; }
.no-js .step-nav, .no-js .step-progress { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .stepper { grid-template-columns: 1fr; }
  .step-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
  .step-list::-webkit-scrollbar { display: none; }
  .step-list li { flex: none; } .step-list li + li { border-top: 0; border-left: 1px solid var(--rule); }
  .step-t { white-space: nowrap; }
  .step-panels { min-height: 0; padding: 20px; }
}

/* architecture: a blueprint */
.arch { margin: 0; padding: 16px; border: 1px solid var(--rule); background-color: var(--card); background-image: linear-gradient(color-mix(in srgb, var(--rule) 60%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--rule) 60%, transparent) 1px, transparent 1px); background-size: 20px 20px; }
.arch-title { font: 600 0.74rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.arch-tiers { display: grid; align-items: stretch; }
.tiers-3 { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr); }
.tiers-2 { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); }
.tier { background: var(--paper); border: 1px solid var(--ink); padding: 12px; }
.tier-dashed { border-style: dashed; border-color: var(--rule-2); background: transparent; }
.tier-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px !important; font-weight: 650; color: var(--ink) !important; font-size: 0.95rem; }
.tier-n { width: 22px; height: 22px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font: 600 0.74rem var(--mono); }
.tier-name code { font-size: 0.72rem; }
.tier-flag { font: 600 0.64rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 6px; border: 1px solid var(--gold); color: var(--gold); }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tier li { padding: 8px 10px; background: var(--card); border: 1px solid var(--rule); }
.tier li strong { display: block; font-size: 0.86rem; }
.tier li span { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.tier-arrow { display: grid; place-items: center; }
.tier-arrow span { width: 100%; height: 1.5px; background: var(--ink); position: relative; }
.tier-arrow span::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--ink); border-right: 0; }
@media (max-width: 820px) {
  .tiers-3, .tiers-2 { grid-template-columns: 1fr; }
  .tier-arrow { height: 26px; }
  .tier-arrow span { width: 1.5px; height: 100%; }
  .tier-arrow span::after { right: auto; left: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top: 7px solid var(--ink); border-bottom: 0; }
}
.flow { list-style: none; counter-reset: f; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.flow li { counter-increment: f; display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: 0.95rem; }
.flow li::before { content: counter(f, decimal-leading-zero); font: 600 0.76rem var(--mono); color: var(--gold); padding-top: 3px; }

/* languages + repository */
.langs { margin-bottom: 4px; }
.lang-bar { width: 100%; height: 14px; display: block; }
.lang-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9rem; }
.lang-legend li { display: inline-flex; align-items: center; gap: 7px; }
.lang-legend svg { width: 10px; height: 10px; }
.lang-legend .pc { font: 500 0.8rem var(--mono); color: var(--muted); }
.tree { list-style: none; margin: 0; padding: 0; }
.tree-root { border-top: 1px solid var(--rule); }
.tree-root > li { border-bottom: 1px solid var(--rule); }
.tree .tree { margin: 0 0 8px 8px; padding-left: 14px; border-left: 1px solid var(--rule-2); }
.tree summary, .t-row { display: grid; grid-template-columns: 18px auto minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 9px 4px; }
.tree summary { cursor: pointer; list-style: none; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary:hover, .t-row:hover { background: var(--paper-2); }
.t-path { background: none; padding: 0; font-weight: 600; white-space: nowrap; }
.t-desc { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.t-ico { width: 14px; height: 11px; transform: translateY(1px); }
.t-ico.dir { background: var(--gold); position: relative; }
.t-ico.dir::before { content: ""; position: absolute; left: 0; top: -3px; width: 6px; height: 3px; background: var(--gold); }
details[open] > summary .t-ico.dir { opacity: .6; }
.t-ico.file { width: 11px; height: 14px; border: 1.5px solid var(--muted); transform: translate(1px, 2px); }
@media (max-width: 600px) { .tree summary, .t-row { grid-template-columns: 18px minmax(0, 1fr); } .t-desc { grid-column: 2; } .t-path { white-space: normal; } }

/* methodology, technology */
.method { list-style: none; counter-reset: m; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.method li { counter-increment: m; display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.method li::before { content: counter(m, decimal-leading-zero); font: 600 0.76rem var(--mono); color: var(--gold); padding-top: 3px; }
.stack { border-top: 1px solid var(--rule); }
.st-row { display: grid; grid-template-columns: 150px 220px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.st-g { font: 500 0.72rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.st-n { font-weight: 600; }
.st-w { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 720px) { .st-row { grid-template-columns: 1fr; gap: 2px; } .st-g:empty { display: none; } }

/* demo */
.live { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--rule); }
.live li { border-bottom: 1px solid var(--rule); }
.live-a { display: grid; grid-template-columns: 200px minmax(0, 1fr) 20px; gap: 14px; align-items: center; padding: 14px 4px; transition: background .2s; }
.live-a:hover { background: var(--paper-2); }
.live-a svg { width: 16px; height: 16px; }
.live-l { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.live-l::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.live-url { font: 500 0.88rem var(--mono); color: var(--muted); word-break: break-all; }
@media (max-width: 600px) { .live-a { grid-template-columns: 1fr 20px; } .live-url { grid-column: 1; } }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.shot { margin: 0; border: 1px solid var(--rule); background: var(--card); }
.shot-wide { grid-column: 1 / -1; }
.shot figcaption { padding: 10px 12px; font-size: 0.84rem; color: var(--muted); border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }

/* widgets */
.widget { margin: 0 0 18px; border: 1px solid var(--ink); background: var(--card); }
.w-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--ink); color: var(--on-ink); flex-wrap: wrap; }
.w-title { font: 600 0.74rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-hi); margin: 0; }
.w-head .w-note { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.w-note { font: 500 0.74rem/1.5 var(--mono); color: var(--muted); margin: 0; }
.w-body { padding: 16px; display: grid; gap: 14px; }
.w-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 720px) { .w-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field > span { font: 500 0.7rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.input, .select { width: 100%; min-height: 42px; padding: 0 12px; border-radius: 3px; border: 1px solid var(--rule-2); background: var(--paper); color: var(--ink); font: 400 0.95rem var(--sans); }
.input:focus, .select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.input:disabled { opacity: .45; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule-2); border-radius: 3px; overflow: hidden; }
.seg button { min-height: 36px; padding: 0 13px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.87rem; font-weight: 560; }
.seg button + button { border-left: 1px solid var(--rule-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.seg button.buy[aria-pressed="true"] { background: var(--ok); color: #fff; }
.seg button.sell[aria-pressed="true"] { background: var(--bad); color: #fff; }
.term { margin: 0; padding: 16px; background: var(--term); font: 400 0.82rem/1.65 var(--mono); color: #dedad2; white-space: pre-wrap; word-break: break-word; min-height: 150px; overflow-x: auto; }
.term .t-cmd { color: #f1d98a; } .term .t-ok { color: #6fd39a; } .term .t-err { color: #ff8e7c; } .term .t-dim { color: #8d877b; }
.verdict { display: inline-flex; align-items: center; font: 600 0.74rem var(--mono); letter-spacing: 0.08em; padding: 5px 10px; border: 1.5px solid currentColor; }
.v-ok { color: var(--ok); } .v-bad { color: var(--bad); } .v-warn { color: var(--warn); } .v-info { color: var(--info); }
.scen-list { display: grid; gap: 0; align-content: start; border-top: 1px solid var(--rule); }
.scen-list button { text-align: left; padding: 12px 12px 12px 14px; border: 0; border-bottom: 1px solid var(--rule); border-left: 3px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 0.92rem; line-height: 1.45; transition: background .2s; }
.scen-list button:hover { background: var(--paper); }
.scen-list button[aria-pressed="true"] { border-left-color: var(--gold); background: var(--paper); color: var(--ink); font-weight: 500; }
.scen-out { padding: 16px; border: 1px solid var(--rule); background: var(--paper); display: grid; gap: 12px; align-content: start; }
.scen-out h5 { margin: 0; font: 600 0.7rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.scen-out p { margin: 0 !important; font-size: 0.93rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; font-size: 0.9rem; color: var(--ink-2); }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.checks li.x::before { content: "✕"; color: var(--bad); }
.checks li.q::before { content: "?"; color: var(--warn); }
.checks li.skip::before { content: "–"; color: var(--muted); }
.checks li.skip { color: var(--muted); }
.range { width: 100%; accent-color: var(--gold); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; font-size: 0.92rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-family: var(--mono); }
.kv .total { color: var(--ink); font-weight: 650; }
.scen-out .big-num { margin: 6px 0 !important; font: 820 clamp(2rem, 4vw, 2.8rem)/1 var(--display) !important; font-stretch: 112% !important; letter-spacing: -0.04em; }
.scen-out .big-num.bad { color: var(--bad); }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp > div { padding: 12px; background: var(--card); border: 1px solid var(--rule); }
.twin { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.twin figure { margin: 0; overflow: hidden; border: 1px solid var(--rule); background: #fff; position: relative; }
.twin figcaption { position: absolute; left: 8px; top: 8px; font: 600 0.72rem var(--mono); background: #0d0d0c; color: #f1d98a; padding: 4px 7px; }
.twin-answer { font: 500 0.86rem var(--mono); color: var(--ink); background: var(--paper); padding: 8px 10px; border-top: 1px solid var(--rule); position: static !important; display: block; }
.plane-wrap { position: relative; max-width: 520px; margin: 0 auto; width: 100%; padding: 10px; background-color: var(--paper); background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 20px 20px; border: 1px solid var(--rule); }
.plane-wrap svg { width: 100%; height: auto; display: block; color: var(--ink); }
.hotspot { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font: 700 0.72rem var(--mono); cursor: pointer; display: grid; place-items: center; transition: transform .2s, background .2s; }
.hotspot:hover, .hotspot[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #0d0d0c; transform: scale(1.1); }
.method-row { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .cmp { grid-template-columns: 1fr; } }

/* results */
.results { margin: 0; }
.table-scroll { overflow-x: auto; border-top: 2px solid var(--ink); }
.results table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 520px; }
.results th, .results td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.results th { font: 600 0.7rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.results td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.results td strong { color: var(--gold); }
.results figcaption { margin-top: 12px; font-size: 0.88rem; color: var(--muted); }

/* concepts */
.learn { border-top: 1px solid var(--rule); }
.qa { border-bottom: 1px solid var(--rule); }
.qa summary { list-style: none; display: grid; grid-template-columns: 40px 1fr 22px; align-items: center; gap: 10px; padding: 15px 0; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover .qa-q { color: var(--gold); }
.qa-n { font: 600 0.76rem var(--mono); color: var(--gold); }
.qa-q { font-weight: 600; transition: color .2s; }
.qa-x { width: 22px; height: 22px; position: relative; }
.qa-x::before, .qa-x::after { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; height: 1.6px; background: var(--ink); transition: transform .3s var(--ease); }
.qa-x::after { transform: rotate(90deg); }
.qa[open] .qa-x::after { transform: rotate(0deg); }
.qa-a { padding: 0 0 16px 50px; }
.qa-a p { margin: 0 !important; }
@media (max-width: 520px) { .qa-a { padding-left: 0; } }

/* team */
.people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.people li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.pr-name { font: 760 1.2rem/1.1 var(--display); font-stretch: 112%; letter-spacing: -0.02em; }
.pr-name a:hover { color: var(--gold); }
.pr-role { font: 500 0.78rem var(--mono); color: var(--muted); }
.pr-links { display: flex; gap: 14px; font-size: 0.88rem; }
@media (max-width: 600px) { .people li { grid-template-columns: 1fr; gap: 4px; } }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); margin-top: clamp(24px, 4vw, 48px); margin-bottom: clamp(56px, 9vw, 110px); }
.pager-link { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 22px 0; border-bottom: 1px solid var(--rule); transition: background .2s; }
.pager-next { text-align: right; align-items: flex-end; padding: 22px 0 22px 20px; border-left: 1px solid var(--rule); }
.pager-link:hover .pager-name { color: var(--gold); }
.pager-k { display: inline-flex; align-items: center; gap: 8px; font: 500 0.76rem var(--mono); color: var(--muted); }
.pager-k svg { width: 13px; height: 13px; }
.pager-name { font: 780 clamp(1.3rem, 2.6vw, 2.2rem)/1 var(--display); font-stretch: 115%; letter-spacing: -0.035em; transition: color .2s; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-next { text-align: left; align-items: flex-start; padding-left: 0; border-left: 0; } }

/* footer: dark in both themes, a nod to the home page */
.ft { background: #0b0b0a; color: #f1efe9; padding-top: clamp(40px, 6vw, 64px); overflow: hidden; }
.ft .brand-word { color: #f1efe9; }
.ft-top { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 0.95rem; color: #bdb8ad; }
.ft-nav a:hover { color: #e2b85a; }
.ft-mark { margin: clamp(28px, 4vw, 48px) 0 0; font: 820 15vw/0.78 var(--display); font-stretch: 125%; letter-spacing: -0.05em; text-align: center; color: transparent; -webkit-text-stroke: 1px rgba(226, 184, 90, 0.42); user-select: none; white-space: nowrap; }
.ft-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 18px 0 24px; border-top: 1px solid #26241f; font: 500 0.78rem var(--mono); color: #8f8b82; letter-spacing: 0.04em; text-transform: uppercase; }

/* 404 */
.nf { padding: clamp(80px, 14vw, 180px) 0; }
.nf .d-lead { margin: 22px 0 24px; }

.hl-list .tlink, .fdr-bio .tlink { display: inline; }
.hl-list .tlink svg { display: none; }

.tree li.flash > details > summary, .tree li.flash > .t-row { background: var(--gold-soft, rgba(226,184,90,.25)); outline: 2px solid var(--gold); }

/* founder's own repositories */
.repo-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.repo-list li { border-bottom: 1px solid var(--rule); }
.rl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 13px 4px; transition: background .2s; }
.rl:hover { background: var(--paper-2); }
.rl-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.rl-name svg { width: 12px; height: 12px; color: var(--muted); }
.rl-lang { font: 500 0.74rem var(--mono); color: var(--muted); text-align: right; padding-top: 3px; }
.rl-desc { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; }
.rl:hover .rl-name { color: var(--gold); }

/* =====================================================================
   Clean pass (Apple-inspired): calmer palette, bottom dock, fewer lines,
   grouped white panels on Projects and project pages.
   ===================================================================== */
:root { --paper: #f5f5f7; --paper-2: #ebebef; --card: #ffffff; --ink: #1d1d1f; --ink-2: #424245; --muted: #6e6e73; --rule: #e5e5ea; --rule-2: #d2d2d7; --on-ink: #ffffff; }
:root[data-theme="dark"] { --paper: #000000; --paper-2: #1c1c1e; --card: #151517; --ink: #f5f5f7; --ink-2: #d2d2d7; --muted: #a1a1a6; --rule: #2c2c2e; --rule-2: #3a3a3c; --on-ink: #000000; }

/* header: brand + theme switch only */
.site-header { height: 56px; border-bottom-color: color-mix(in srgb, var(--rule-2) 60%, transparent); }
.theme-toggle { border-radius: 999px; width: 38px; height: 38px; }

/* bottom dock */
.dock { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; }
.dock-in { display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--card) 80%, transparent); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); border: 1px solid color-mix(in srgb, var(--rule-2) 75%, transparent); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.35); }
.dock-tab { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 560 0.9rem/1 var(--sans); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.dock-tab svg { width: 18px; height: 18px; flex: none; }
.dock-tab:hover { background: var(--paper-2); color: var(--ink); }
.dock-tab[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.dock-sep { width: 1px; height: 24px; background: var(--rule-2); margin: 0 4px; }
.dock-dd { position: relative; }
.dd-btn.dock-menu { height: 44px; max-width: 230px; border: 0; border-radius: 999px; background: var(--paper-2); color: var(--ink); padding: 0 12px 0 14px; }
.dock-menu .pbar-cur { overflow: hidden; text-overflow: ellipsis; }
.dd-btn.dock-menu[aria-expanded="true"] { background: var(--ink); color: var(--on-ink); }
.dd-panel.dock-panel { top: auto; bottom: calc(100% + 12px); left: 0; width: 340px; max-height: min(70vh, 600px); padding: 8px; border-radius: 20px; border: 1px solid var(--rule-2); background: var(--card); box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.4); }
.dock-panel a { border-radius: 10px; }
.dock-panel .dd-h2 { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ft { padding-bottom: 96px; }
.no-js .dock-dd { display: none; }
@media (max-width: 680px) {
  .dock { left: 10px; right: 10px; transform: none; bottom: max(10px, env(safe-area-inset-bottom)); }
  .dock-in { justify-content: space-between; border-radius: 24px; padding: 6px; }
  .dock-tab, .dd-btn.dock-menu { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 4px; height: 54px; min-width: 0; padding: 0 2px; border-radius: 18px; font-size: 0.66rem; font-weight: 600; background: transparent; }
  .dock-tab svg { width: 21px; height: 21px; }
  .dock-dd { flex: 1 1 0; min-width: 0; }
  .dd-btn.dock-menu { width: 100%; max-width: none; color: var(--gold); }
  .dock-menu .chev, .dock-sep { display: none; }
  .dock-menu .pbar-cur { max-width: 100%; }
  .dd-panel.dock-panel { position: fixed; top: auto; left: 10px; right: 10px; bottom: 86px; width: auto; max-height: 62vh; }
  .ft { padding-bottom: 100px; }
}

/* ---------- Projects page: calmer list ---------- */
.page-projects .title { padding-bottom: clamp(18px, 3vw, 32px); }
.page-projects .filterbar { border-top: 0; padding: 10px 0 18px; top: 56px; background: var(--paper); }
.page-projects .chip { border-radius: 999px; background: var(--card); border: 1px solid transparent; padding: 0 14px; min-height: 36px; }
.page-projects .chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.page-projects .index-head { display: none; }
.page-projects .index { background: var(--card); border-radius: 22px; padding: 0 28px; margin-bottom: clamp(48px, 8vw, 96px); }
.page-projects .row { border-top: 1px solid var(--rule); }
.page-projects .row:first-child { border-top: 0; }
.page-projects .row:last-child { border-bottom: 0; }
.page-projects .r-go { border-radius: 999px; border-color: var(--rule); }
.page-projects .r-toggle { border-radius: 999px; border-color: var(--rule); background: var(--paper); }
.page-projects .r-secs a { border-radius: 999px; border: 0; background: var(--paper); }
.page-projects .r-secs a:hover { background: var(--ink); color: var(--on-ink); }
@media (max-width: 1000px) {
  .page-projects .index { padding: 0 16px; border-radius: 20px; }
  .page-projects .row-main { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "thumb name" "thumb desc" "thumb stack"; gap: 3px 14px; padding: 16px 0; }
  .page-projects .r-code { display: none; }
  .page-projects .r-thumb { width: 48px; height: 48px; border: 0; border-radius: 12px; background-image: none; background-color: color-mix(in srgb, var(--c) 12%, var(--card)); }
  .page-projects .r-thumb .glyph { width: 28px; }
  .page-projects .r-name { font: 650 1.06rem/1.25 var(--sans); font-stretch: normal; letter-spacing: -0.01em; }
  .page-projects .r-namecell { align-items: center; }
  .page-projects .r-toggle { width: 32px; height: 32px; }
  .page-projects .r-desc { font-size: 0.9rem; color: var(--muted); }
  .page-projects .r-stack .dot { display: none; }
  .page-projects .r-stack span { margin: 0; }
  .page-projects .r-secs { padding: 0 0 16px 62px; gap: 6px; }
}

/* ---------- Project pages: one calm column ---------- */
.page-detail .btn { border-radius: 999px; }
.page-detail .d-title { font-size: clamp(2.4rem, 7vw, 6.2rem); }
.page-detail .spec-row { border-top: 0; background: var(--card); border-radius: 20px; padding: 6px 8px; gap: 0; }
.page-detail .spec-row > div { border: 0; padding: 14px 16px; }
.page-detail .spec-row > div + div { border-left: 1px solid var(--rule); }
.page-detail .d-visual { border: 0; border-radius: 22px; }
.page-detail .d-body { display: block; max-width: 880px; padding-top: clamp(24px, 4vw, 48px); }
.page-detail .prose { max-width: none; }
.page-detail .sec { border-top: 0; padding: clamp(36px, 5vw, 64px) 0 0; }
.page-detail .sec-h { display: block; margin-bottom: 18px; }
.page-detail .sec-n { display: block; margin-bottom: 6px; }
.page-detail .sec-h h2 { font: 700 clamp(1.7rem, 3.4vw, 2.5rem)/1.08 var(--sans); letter-spacing: -0.035em; }
.page-detail .sec-b { padding-left: 0; }
.page-detail :is(.method, .flow, .stack, .learn, .people, .tree-root, .live, .hl-list) { background: var(--card); border-radius: 18px; padding: 2px 20px; border-top: 0; }
.page-detail :is(.method, .flow, .learn, .people, .live) > :last-child,
.page-detail .stack > .st-row:last-child, .page-detail .tree-root > li:last-child { border-bottom: 0; }
.page-detail .pa-grid { border-top: 0; gap: 12px; }
.page-detail .pa, .page-detail .pa + .pa { background: var(--card); border-radius: 18px; padding: 20px; border: 0; }
.page-detail .stepper { border: 0; border-radius: 20px; overflow: hidden; }
.page-detail .step-list { border-right-color: var(--rule); }
.page-detail .step-panel h4 { font: 700 1.45rem/1.1 var(--sans); letter-spacing: -0.025em; }
.page-detail .arch { border: 0; border-radius: 20px; }
.page-detail .tier { border-color: var(--rule-2); border-radius: 12px; }
.page-detail .tier li { border-radius: 8px; }
.page-detail .widget { border: 1px solid var(--rule-2); border-radius: 20px; overflow: hidden; }
.page-detail .table-scroll { border-top: 0; background: var(--card); border-radius: 18px; padding: 0 16px; }
.page-detail .shot { border: 0; border-radius: 16px; overflow: hidden; }
.page-detail .langs { background: var(--card); border-radius: 18px; padding: 18px 20px; }
.page-detail .lang-bar { border-radius: 999px; }
.page-detail .pager { border-top: 0; gap: 12px; }
.page-detail .pager-link, .page-detail .pager-next { background: var(--card); border: 0; border-radius: 20px; padding: 22px; }
.page-detail .pager-name { font: 700 clamp(1.2rem, 2.2vw, 1.8rem)/1.1 var(--sans); letter-spacing: -0.03em; }
@media (max-width: 900px) {
  .page-detail .spec-row > div:nth-child(even) { border-left: 1px solid var(--rule); }
  .page-detail .spec-row > div:nth-child(odd) { border-left: 0; }
  .page-detail .spec-row > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .page-detail .d-meta { margin-top: 24px; }
  .page-detail .actions { width: 100%; }
  .page-detail .actions .btn { flex: 1 1 auto; }
  .page-detail .spec-row { grid-template-columns: 1fr; }
  .page-detail .spec-row > div, .page-detail .spec-row > div:nth-child(even) { border-left: 0; padding: 12px 12px; }
  .page-detail .spec-row > div + div { border-top: 1px solid var(--rule); }
  .page-detail .spec-row > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; }
  .page-detail .spec-row dd { margin: 0; }
  .page-detail :is(.method, .flow, .stack, .learn, .people, .tree-root, .live) { padding: 2px 14px; }
  .page-detail .pager { grid-template-columns: 1fr; }
}

/* keep the section arrow right after the project name on wide screens */
@media (min-width: 1001px) {
  .index-head, .row-main { grid-template-columns: 76px minmax(0, 1.3fr) minmax(0, 1.6fr) 170px 52px 36px; }
  .r-namecell { display: block; }
  .r-namecell .r-toggle { display: inline-grid; vertical-align: 0.15em; margin-left: 8px; width: 28px; height: 28px; }
}
@media (min-width: 1001px) { .page-projects .r-name { font-size: clamp(1.15rem, 1.6vw, 1.5rem); } }

/* dock menu: project codes need a wider column than section numbers */
#dd-sec a.dd-proj-link { grid-template-columns: 58px minmax(0, 1fr); gap: 4px; }
/* founders: GitHub projects inline with the rest */
.built a.built-ext { display: inline-flex; align-items: center; gap: 4px; }
.built a.built-ext svg { width: 11px; height: 11px; color: var(--muted); }

/* complexity meter: a five-step staircase; filled steps get darker as complexity rises */
.cx { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.cx-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.cx-bars i { display: block; width: 4px; border-radius: 1px; background: var(--rule-2); opacity: .55; }
.cx-bars i:nth-child(1) { height: 4px; } .cx-bars i:nth-child(2) { height: 6px; } .cx-bars i:nth-child(3) { height: 8px; } .cx-bars i:nth-child(4) { height: 10px; } .cx-bars i:nth-child(5) { height: 12px; }
.cx-1 .cx-bars i:nth-child(-n+1), .cx-2 .cx-bars i:nth-child(-n+2), .cx-3 .cx-bars i:nth-child(-n+3), .cx-4 .cx-bars i:nth-child(-n+4), .cx-5 .cx-bars i:nth-child(-n+5) { background: var(--ink); }
.cx-1 .cx-bars i:nth-child(-n+1) { opacity: .22; }
.cx-2 .cx-bars i:nth-child(-n+2) { opacity: .4; }
.cx-3 .cx-bars i:nth-child(-n+3) { opacity: .6; }
.cx-4 .cx-bars i:nth-child(-n+4) { opacity: .82; }
.cx-5 .cx-bars i:nth-child(-n+5) { opacity: 1; }
.cx-l { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.04em; color: var(--muted); }
.cx-5 .cx-l, .cx-4 .cx-l { color: var(--ink-2); }
.r-namecell .cx { display: flex; margin-top: 8px; }
.d-meta .cx { margin-left: 4px; }
.sortbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 0 14px; }
.sort { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--card); }
.sort-k { font: 500 0.72rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 8px 0 10px; }
.sort-b { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 0.86rem; font-weight: 560; cursor: pointer; }
.sort-b[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.cx-legend { display: inline-flex; align-items: center; gap: 16px; }
.no-js .sortbar { display: none; }
@media (max-width: 1000px) {
  .r-namecell { flex-wrap: wrap; row-gap: 6px; }
  .r-namecell .r-name { flex: 1 1 0; min-width: 0; }
  .r-namecell .cx { order: 3; flex-basis: 100%; margin-top: 0; }
}
@media (max-width: 520px) { .cx-legend { display: none; } }

/* =====================================================================
   Navigation v3: Founders in the top bar; a small rounded Projects | Ventures switch at the bottom;
   Contact lives at the bottom of every page.
   ===================================================================== */
.header-right { display: flex; align-items: center; gap: 8px; }
.hdr-link { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 560; color: var(--ink-2); transition: background .2s, color .2s; }
.hdr-link:hover { background: var(--paper-2); color: var(--ink); }
.hdr-link[aria-current="page"] { background: var(--ink); color: var(--on-ink); }

.dock { left: 50%; right: auto; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); }
.dock-in { gap: 6px; padding: 4px; border-radius: 999px; }
.sw { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper-2); }
.sw-seg { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px; font: 600 0.86rem/1 var(--sans); color: var(--muted); white-space: nowrap; transition: color .25s; }
.sw-seg svg { width: 16px; height: 16px; }
.sw-seg:hover { color: var(--ink); }
.sw-seg[aria-current="page"] { color: var(--on-ink); }
.sw::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--ink); opacity: 0; transition: transform .35s var(--ease), opacity .2s; }
.sw-l::before { opacity: 1; transform: translateX(0); }
.sw-r::before { opacity: 1; transform: translateX(100%); }
.sw-seg { flex: 1 1 0; justify-content: center; }
.dd-btn.dock-menu { height: 42px; max-width: none; padding: 0 14px 0 12px; gap: 7px; border-radius: 999px; background: transparent; color: var(--ink); font: 600 0.86rem/1 var(--sans); }
.dd-btn.dock-menu svg { width: 17px; height: 17px; }
.dd-btn.dock-menu .pbar-cur { min-width: 2.6em; text-align: left; }
.dd-btn.dock-menu:hover { background: var(--paper-2); }
.dd-btn.dock-menu[aria-expanded="true"] { background: var(--ink); color: var(--on-ink); }
.dock-has-menu .dock-in { padding-left: 4px; }
@media (max-width: 680px) {
  .dock { left: 50%; right: auto; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); }
  .dock-in { justify-content: center; border-radius: 999px; padding: 4px; }
  .sw-seg { flex-direction: row; height: 36px; padding: 0 14px; font-size: 0.82rem; }
  .dd-btn.dock-menu { flex: none; width: auto; flex-direction: row; height: 42px; padding: 0 12px; font-size: 0.82rem; color: var(--ink); background: transparent; border-radius: 999px; }
  .dock-dd { flex: none; }
  .dd-panel.dock-panel { bottom: 76px; }
  .hdr-link { padding: 0 12px; font-size: 0.88rem; }
}
@media (max-width: 360px) { .sw-seg svg { display: none; } }

/* contact at the bottom of every page */
.ft-contact { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: clamp(32px, 5vw, 48px); margin-bottom: clamp(28px, 4vw, 40px); border-bottom: 1px solid #26241f; }
.ft .kicker { color: #e2b85a; }
.ft-title { margin: 0; font: 700 clamp(1.8rem, 4vw, 3rem)/1.05 var(--sans); letter-spacing: -0.035em; color: #f5f5f7; }
.ft-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ft .btn { border-radius: 999px; }
.btn-dark { border: 1px solid #3a3933; color: #e9e6df; background: transparent; }
.btn-dark:hover { border-color: #e2b85a; color: #e2b85a; }
.btn-dark svg { width: 14px; height: 14px; }
.ft-top .btn-gold { display: none; }
@media (max-width: 600px) { .ft-actions { width: 100%; } .ft-actions .btn { flex: 1 1 auto; } }

/* very small screens (feature phones, small watches-sized viewports) */
@media (max-width: 360px) {
  .site-header { padding: 0 12px; gap: 6px; }
  .brand { gap: 7px; }
  .brand-word { font-size: 0.8rem; letter-spacing: 0.05em; }
  .hdr-link { height: 32px; padding: 0 10px; font-size: 0.82rem; }
  .theme-toggle { width: 32px; height: 32px; }
  .sw-seg { padding: 0 11px; height: 34px; font-size: 0.8rem; gap: 0; }
  .sw-seg svg { display: none; }
  .dd-btn.dock-menu { height: 40px; padding: 0 10px; }
  .dd-btn.dock-menu .pbar-cur { display: none; }
}
@media (max-width: 280px) {
  .brand-word { display: none; }
  .sw-seg { padding: 0 9px; font-size: 0.76rem; }
}
/* very large screens: keep the footer wordmark from growing without limit */
.ft-mark { font-size: min(15vw, 26rem); }

/* nothing may push the page wider than the screen */
main, .ft { overflow-x: clip; }
.jump a { grid-template-columns: 84px minmax(0, 1fr) auto; }
.jump-t { font-size: clamp(1.5rem, 8.6vw, 5.6rem); overflow-wrap: anywhere; }
@media (max-width: 600px) { .jump a { grid-template-columns: 34px minmax(0, 1fr) auto; } .jump-go { width: 38px; height: 38px; } }
.w-grid > *, .w-body > *, .field, .scen-out, .scen-list { min-width: 0; }
.input, .select { min-width: 0; max-width: 100%; }
@media (max-width: 420px) {
  .actions .btn, .method-row .btn, .ft-actions .btn { white-space: normal; text-align: center; height: auto; min-height: var(--h); padding-top: 8px; padding-bottom: 8px; line-height: 1.2; }
  .method-row .btn { flex: 1 1 100%; justify-content: flex-start; text-align: left; }
  .seg { width: 100%; } .seg button { flex: 1 1 auto; padding: 0 8px; }
  .twin { grid-template-columns: 1fr; }
  .cmp { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 76px 1fr 54px; }
}
.fdr > * { min-width: 0; }
.fdr-name { font-size: clamp(1.9rem, 12vw, 6.6rem); overflow-wrap: anywhere; }
.spec dd, .hl-list li, .fdr-bio, .fdr-quote { overflow-wrap: anywhere; }

/* large and very large screens (big monitors, TVs): scale the whole layout up */
body { font-size: 1rem; }
@media (min-width: 1800px) { html { font-size: 17px; } :root { --max: 1440px; } }
@media (min-width: 2300px) { html { font-size: 20px; } :root { --max: 1760px; } }
@media (min-width: 3000px) { html { font-size: 26px; } :root { --max: 2300px; } }
@media (min-width: 3000px) { .brand-mark { width: 26px; } .theme-toggle { width: 52px; height: 52px; } .theme-toggle svg { width: 24px; height: 24px; } .site-header { height: 84px; } }

@media (min-width: 2300px) { .site-header, .dock { zoom: 1.3; } }
@media (min-width: 3000px) { .site-header, .dock { zoom: 1.6; } .site-header { height: 56px; } .theme-toggle { width: 38px; height: 38px; } .theme-toggle svg { width: 17px; height: 17px; } .brand-mark { width: 18px; } }

/* liquid switch: a real thumb element, animated by script on tap */
.sw::before { content: none; }
.sw-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--ink); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.45); opacity: 0; will-change: left, width, transform; }
.sw-l .sw-thumb { opacity: 1; left: 3px; }
.sw-r .sw-thumb { opacity: 1; left: 50%; }
.sw-seg { transition: color .3s ease .05s; }
.sw.is-moving .sw-seg { transition-duration: .25s; }

/* =====================================================================
   Repository tree: every file opens in the code viewer
   ===================================================================== */
.code-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; font: 500 0.76rem var(--mono); color: var(--muted); }
.code-meta span + span::before { content: "·"; margin-right: 14px; }
.code-meta span:last-child { color: var(--gold); }
.t-file { display: inline-flex; align-items: baseline; gap: 10px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; text-align: left; min-width: 0; }
.t-file .t-path { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
.t-file:hover .t-path, .t-file:focus-visible .t-path { color: var(--gold); text-decoration-color: var(--gold); }
.t-row { cursor: default; }
.t-row:has(.t-file):hover { background: var(--paper-2); }
.tree summary .t-path, .t-file .t-path { font: 600 0.88rem var(--mono); }
.t-n { font: 500 0.72rem var(--mono); color: var(--muted); white-space: nowrap; }
.t-n-after { margin-left: 6px; }
.tree summary .t-ico { margin-right: 8px; }
.tree summary { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0; row-gap: 2px; }
.tree summary .t-desc { flex: 1 1 260px; margin-left: 12px; }
.t-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0; row-gap: 2px; }
.t-row .t-desc { flex: 1 1 260px; margin-left: 12px; }
.t-file.t-large .t-path::after { content: " ↗"; color: var(--muted); }
@media (max-width: 600px) { .tree summary .t-desc, .t-row .t-desc { flex-basis: 100%; margin-left: 22px; } .t-path { white-space: normal; overflow-wrap: anywhere; } }

/* =====================================================================
   Code viewer dialog
   ===================================================================== */
.cv { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
.cv[hidden] { display: none; }
.cv-back { position: absolute; inset: 0; background: rgba(8, 8, 10, 0.55); }
.cv-panel { position: relative; display: flex; flex-direction: column; width: min(1180px, 100%); height: min(90vh, 980px); background: var(--card); color: var(--ink); border-radius: 20px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6); border: 1px solid var(--rule); overflow: hidden; outline: none; }
.cv-grab { display: none; }
.cv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 18px 14px 22px; border-bottom: 1px solid var(--rule); }
.cv-titles { min-width: 0; }
.cv-kicker { margin: 0 0 4px; font: 500 0.7rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.cv-title { margin: 0; font: 650 1.02rem/1.3 var(--mono); overflow-wrap: anywhere; }
.cv-meta { margin: 4px 0 0; font: 500 0.76rem var(--mono); color: var(--muted); }
.cv-actions { display: flex; gap: 6px; flex: none; }
.cv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rule-2); background: var(--card); color: var(--ink); font: 560 0.84rem var(--sans); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.cv-btn svg { width: 15px; height: 15px; flex: none; }
.cv-btn:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.cv-close { width: 36px; padding: 0; }
.cv-note { margin: 0; padding: 8px 22px; font: 500 0.76rem var(--mono); color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); border-bottom: 1px solid var(--rule); }
.cv-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--code-bg); }
.cv-pre { margin: 0; padding: 14px 0 28px; font: 400 0.82rem/1.65 var(--mono); tab-size: 2; }
.cv-code { display: block; counter-reset: ln; background: none; padding: 0; color: var(--code-ink); }
.cv-code .ln { display: block; position: relative; padding: 0 22px 0 calc(4.2em + 14px); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; min-height: 1.65em; }
.cv-code .ln::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 4.2em; text-align: right; color: var(--code-num); user-select: none; -webkit-user-select: none; }
.cv-code .ln:hover { background: color-mix(in srgb, var(--gold) 7%, transparent); }
/* phones: a sheet from the bottom; code scrolls both ways and keeps its lines intact */
@media (max-width: 720px) {
  .cv { align-items: flex-end; padding: 0; }
  .cv-panel { width: 100%; height: 92dvh; height: 92vh; max-height: none; border-radius: 22px 22px 0 0; border-bottom: 0; }
  @supports (height: 1dvh) { .cv-panel { height: 92dvh; } }
  .cv-grab { display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: var(--rule-2); }
  .cv-head { padding: 10px 14px 12px 16px; flex-wrap: wrap; }
  .cv-titles { flex: 1 1 100%; }
  .cv-actions { width: 100%; }
  .cv-actions .cv-copy, .cv-actions .cv-gh { flex: 1 1 0; }
  .cv-note { padding: 8px 16px; }
  .cv-body { overflow-x: auto; }
  .cv-code { width: max-content; min-width: 100%; }
  .cv-code .ln { white-space: pre; overflow-wrap: normal; word-break: normal; padding: 0 18px 0 calc(3.4em + 10px); }
  .cv-code .ln::before { width: 3.4em; }
  .cv-pre { font-size: 0.78rem; }
}
@media (max-width: 360px) { .cv-btn span { display: none; } .cv-btn { padding: 0 10px; } }
@media (min-width: 2300px) { .cv-panel { width: min(1900px, 100%); height: min(86vh, 1700px); } .cv-pre { font-size: 1.05rem; } .cv-head { padding: 22px 26px 18px 30px; } .cv-title { font-size: 1.3rem; } .cv-btn { height: 44px; font-size: 1rem; } .cv-close { width: 44px; } }
@media (max-height: 420px) and (max-width: 720px) { .cv-panel { height: 100vh; border-radius: 0; } @supports (height: 1dvh) { .cv-panel { height: 100dvh; } } .cv-grab { display: none; } .cv-head { padding-top: 8px; padding-bottom: 8px; } .cv-meta { display: none; } }

/* code colours (light / dark) */
:root { --code-bg: #fbfbfd; --code-ink: #24292f; --code-num: #a1a1a6; --hl-k: #b4235a; --hl-s: #0a6b4f; --hl-n: #0b5cad; --hl-c: #8a8a8e; --hl-t: #7b3fbf; --hl-a: #9a5b00; }
:root[data-theme="dark"] { --code-bg: #0e0e10; --code-ink: #e6e6ea; --code-num: #5a5a61; --hl-k: #ff7aa8; --hl-s: #7ee2b8; --hl-n: #7cc4ff; --hl-c: #7d7d85; --hl-t: #c6a2ff; --hl-a: #ffcb6b; }
.cv-code .hljs-keyword, .cv-code .hljs-selector-tag, .cv-code .hljs-meta .hljs-keyword, .cv-code .hljs-doctag { color: var(--hl-k); }
.cv-code .hljs-string, .cv-code .hljs-regexp, .cv-code .hljs-addition, .cv-code .hljs-meta .hljs-string { color: var(--hl-s); }
.cv-code .hljs-number, .cv-code .hljs-literal, .cv-code .hljs-built_in, .cv-code .hljs-symbol, .cv-code .hljs-bullet { color: var(--hl-n); }
.cv-code .hljs-comment, .cv-code .hljs-quote, .cv-code .hljs-deletion { color: var(--hl-c); font-style: italic; }
.cv-code .hljs-title, .cv-code .hljs-title.function_, .cv-code .hljs-title.class_, .cv-code .hljs-section, .cv-code .hljs-name, .cv-code .hljs-selector-id, .cv-code .hljs-selector-class { color: var(--hl-t); }
.cv-code .hljs-attr, .cv-code .hljs-attribute, .cv-code .hljs-variable, .cv-code .hljs-template-variable, .cv-code .hljs-property, .cv-code .hljs-params, .cv-code .hljs-meta, .cv-code .hljs-type { color: var(--hl-a); }
.cv-code .hljs-tag { color: var(--code-ink); }
.cv-code .hljs-emphasis { font-style: italic; } .cv-code .hljs-strong { font-weight: 700; }

/* =====================================================================
   AI Orb (code viewer)
   ===================================================================== */
.orb-ball { display: block; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fffbe9 0 8%, #f6dc8c 22%, #d9b45a 46%, #a77bff 78%, #6c4fe0 100%); box-shadow: 0 0 10px 2px rgba(217, 180, 90, .55), 0 0 22px 6px rgba(167, 123, 255, .28); animation: orb-breathe 2.8s ease-in-out infinite; }
.orb-ball.sm { width: 14px; height: 14px; flex: none; }
@keyframes orb-breathe { 50% { box-shadow: 0 0 14px 3px rgba(217, 180, 90, .7), 0 0 30px 9px rgba(167, 123, 255, .36); transform: scale(1.06); } }
/* laptops: the orb replaces the cursor over the code */
@media (hover: hover) and (pointer: fine) {
  .cv-body.orb-on, .cv-body.orb-on * { cursor: none; }
  .cv-body.orb-on .ln:hover { background: color-mix(in srgb, #a77bff 9%, transparent); }
}
.orb-cursor { position: fixed; left: 0; top: 0; z-index: 260; pointer-events: none; opacity: 0; transition: opacity .18s; will-change: transform; }
.orb-cursor.on { opacity: 1; }
.orb-cursor .orb-ball { margin: -9px 0 0 -9px; }
.orb-tip { position: absolute; left: 16px; top: 8px; white-space: nowrap; padding: 5px 9px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font: 600 0.72rem/1 var(--sans); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .5); }
.orb-tip[hidden] { display: none; }
.cv-code .ln.sel { background: color-mix(in srgb, #a77bff 16%, transparent); box-shadow: inset 3px 0 0 #a77bff; }
.cv-code .ln.sel::before { color: #8b63f0; font-weight: 700; }
:root[data-theme="dark"] .cv-code .ln.sel::before { color: #c6a2ff; }
/* the floating orb button (all screens; the main way in on phones) */
.orb-fab { position: absolute; right: 18px; bottom: 18px; z-index: 5; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid color-mix(in srgb, #a77bff 35%, var(--rule-2)); border-radius: 50%; background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); cursor: pointer; }
.orb-fab .orb-ball { width: 24px; height: 24px; }
.orb-fab:hover { border-color: var(--gold); }
.orb-badge { position: absolute; top: -6px; right: -4px; padding: 3px 6px; border-radius: 999px; background: #8b63f0; color: #fff; font: 700 0.62rem/1 var(--mono); white-space: nowrap; }
.orb-badge[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .cv-body.orb-on ~ .orb-fab, .has-orb .orb-fab { cursor: pointer; } }
/* the menu of actions */
.orb-menu { position: absolute; z-index: 6; width: 236px; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--rule-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5); }
.orb-menu[hidden] { display: none; }
.orb-menu-h { margin: 2px 6px 8px; font: 600 0.72rem/1.3 var(--mono); color: var(--muted); }
.orb-menu-b { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.orb-menu-b button { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 11px; background: var(--paper-2); color: var(--ink); font: 600 0.84rem/1 var(--sans); cursor: pointer; }
.orb-menu-b button svg { width: 16px; height: 16px; color: #8b63f0; flex: none; }
:root[data-theme="dark"] .orb-menu-b button svg { color: #c6a2ff; }
.orb-menu-b button:hover, .orb-menu-b button:focus-visible { border-color: #a77bff; outline: none; }
/* the answer card */
.orb-card { position: absolute; z-index: 7; right: 16px; bottom: 16px; display: flex; flex-direction: column; width: min(440px, calc(100% - 32px)); max-height: min(70%, 560px); border-radius: 18px; background: var(--card); color: var(--ink); border: 1px solid color-mix(in srgb, #a77bff 30%, var(--rule-2)); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .55), 0 0 0 4px color-mix(in srgb, #a77bff 8%, transparent); overflow: hidden; }
.orb-card[hidden] { display: none; }
.orb-card-h { display: flex; align-items: center; gap: 10px; padding: 12px 10px 10px 14px; border-bottom: 1px solid var(--rule); }
.orb-card-h > div { flex: 1 1 auto; min-width: 0; }
.orb-card-k { margin: 0; font: 600 0.66rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; background: linear-gradient(90deg, #b8892c, #8b63f0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.orb-card-t { margin: 3px 0 0; font: 600 0.9rem/1.3 var(--sans); overflow-wrap: anywhere; }
.orb-x { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink); cursor: pointer; flex: none; }
.orb-x svg { width: 14px; height: 14px; }
.orb-card-b { flex: 1 1 auto; min-height: 60px; overflow: auto; overscroll-behavior: contain; padding: 4px 16px 10px; font: 400 0.9rem/1.6 var(--sans); }
.orb-card-b p { margin: 10px 0; }
.orb-card-b ul, .orb-card-b ol { margin: 8px 0; padding-left: 20px; }
.orb-card-b li { margin: 4px 0; }
.orb-card-b code { font: 500 0.82em var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--paper-2); }
.orb-card-b pre { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--rule); overflow: auto; font: 400 0.78rem/1.55 var(--mono); }
.orb-card-b pre code { padding: 0; background: none; font-size: inherit; }
.orb-q { padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #a77bff 10%, transparent); font-weight: 500; }
.orb-hint { color: var(--muted); }
.orb-err { color: var(--warn); }
.orb-thinking { display: flex; align-items: center; gap: 5px; margin: 14px 0; color: var(--muted); font: 500 0.86rem var(--sans); }
.orb-thinking span { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #d9b45a, #a77bff); animation: orb-dot 1s ease-in-out infinite; }
.orb-thinking span:nth-child(2) { animation-delay: .15s; } .orb-thinking span:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes orb-dot { 50% { transform: translateY(-4px); opacity: .5; } }
.orb-ask { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--rule); }
.orb-ask input { flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--paper-2); color: var(--ink); font: 500 16px var(--sans); outline: none; }
.orb-ask input:focus { border-color: #a77bff; }
.orb-ask button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, #d9b45a, #a77bff); color: #fff; cursor: pointer; flex: none; }
.orb-ask button svg { width: 16px; height: 16px; }
.orb-card-f { margin: 0; padding: 0 14px 10px; font: 500 0.66rem/1.4 var(--mono); color: var(--muted); }
.orb-card-f:empty { display: none; }
/* phones: the answer is a sheet across the bottom of the code window */
@media (max-width: 720px) {
  .orb-fab { right: 14px; bottom: 14px; width: 50px; height: 50px; }
  .orb-card { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 72%; }
  .orb-menu { width: min(260px, calc(100% - 16px)); }
}
@media (max-width: 300px) { .orb-menu-b { grid-template-columns: 1fr; } .orb-fab { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .orb-ball, .orb-thinking span { animation: none; } }

/* =====================================================================
   The crash, hidden in the big NEXARA9 at the bottom
   ===================================================================== */
.ft-egg { display: inline-block; margin: 0; padding: 0 0.04em; border: 0; background: none; font: inherit; letter-spacing: inherit; color: transparent; -webkit-text-stroke: inherit; cursor: default; transition: -webkit-text-stroke-color .35s, transform .35s var(--ease, ease), filter .35s; -webkit-tap-highlight-color: transparent; }
.ft-egg:focus { outline: none; }
.ft-egg:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) {
  .ft-egg:hover { cursor: pointer; -webkit-text-stroke-color: rgba(226, 184, 90, 0.95); background: linear-gradient(110deg, rgba(246, 231, 176, .0) 20%, rgba(246, 231, 176, .55) 45%, rgba(217, 180, 90, .35) 55%, rgba(246, 231, 176, .0) 80%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: egg-sheen 1.6s ease-in-out infinite; transform: translateY(-3px); filter: drop-shadow(0 10px 24px rgba(217, 180, 90, .25)); }
}
.ft-egg:active { transform: scale(.985); }
@keyframes egg-sheen { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .ft-egg:hover { animation: none; } }

/* the crash screen */
.crash { position: fixed; inset: 0; z-index: 400; cursor: default; }
.crash-wipe { position: absolute; inset: 0; background: #fff; clip-path: inset(0 0 100% 0); overflow: hidden; }
.crash-line { position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: #e0182d; box-shadow: 0 0 14px 2px rgba(224, 24, 45, .6), 0 0 44px 8px rgba(224, 24, 45, .25); will-change: transform; }
.crash-page { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: max(14px, env(safe-area-inset-top)) clamp(14px, 4vw, 64px) 16px; font: 400 clamp(11px, 1.05vw, 15px)/1.6 var(--mono); color: #c4161c; }
@media (min-width: 2300px) { .crash-page { font-size: clamp(15px, 0.85vw, 26px); } }
.crash-err { padding: 10px 14px; border-left: 4px solid #e0182d; border-radius: 6px; background: #fff1f1; opacity: 0; transition: opacity .2s; }
.crash-swept .crash-err { opacity: 1; }
.crash-err p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.crash-err-t { font-weight: 700; font-size: 1.06em; }
.crash-err-s { color: #d4444f; }
.crash-tab { align-self: flex-start; margin: 4px 0 -10px; padding: 3px 10px; border: 1px solid #f3c2c5; border-bottom: 0; border-radius: 6px 6px 0 0; background: #fff6f6; color: #a3121a; font-size: .86em; }
.crash-code { flex: 1 1 auto; min-height: 0; overflow: hidden; counter-reset: ln; padding-top: 8px; border-top: 1px solid #f3c2c5; }
.crash-ln { position: relative; display: none; min-height: 1.6em; padding-left: 3.4em; white-space: pre-wrap; overflow-wrap: anywhere; counter-increment: ln; }
.crash-ln.on { display: block; }
.crash-ln::before { content: counter(ln); position: absolute; left: 0; width: 2.4em; text-align: right; color: #f0a5aa; }
.crash-c { color: #e2737b; font-style: italic; }
.crash-ln.caret::after { content: ""; display: inline-block; width: .55em; height: 1.1em; margin-left: 1px; vertical-align: -0.18em; background: #e0182d; animation: crash-blink .5s steps(1) infinite; }
@keyframes crash-blink { 50% { opacity: 0; } }
.crash-run { min-height: 1.6em; margin: 0; color: #1a1a1a; font-weight: 700; }
.crash-out { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 16px; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.crash-done .crash-out { opacity: 1; }
.crash-logo { margin: 0; font: 700 clamp(7px, 2.2vmin, 18px)/1.2 var(--mono); color: #b8892c; text-shadow: 0 0 18px rgba(217, 180, 90, .35); white-space: pre; }
.crash-cap { max-width: 46ch; margin: 0; font: 500 clamp(10px, 1.1vw, 13px)/1.45 var(--mono); color: #8a6a1f; text-align: center; }
@media (prefers-reduced-motion: reduce) { .crash-ln.caret::after { animation: none; } }
.crash-view { justify-self: center; display: inline-flex; align-items: center; height: 40px; margin-top: 2px; padding: 0 20px; border: 1px solid #c9a24b; border-radius: 999px; background: #fff; color: #8a6a1f; font: 600 13px/1 var(--sans); cursor: pointer; pointer-events: none; transition: background .2s, color .2s; }
.crash-done .crash-view { pointer-events: auto; }
.crash-view:hover, .crash-view:focus-visible { background: #b8892c; color: #fff; outline: none; }
.crash-bar { display: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.crash-hint { flex: 1 1 220px; margin: 0; color: #8a6a1f; font-weight: 600; }
.crash-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid #f0b8bc; border-radius: 999px; background: #fff; color: #a3121a; font: 600 12.5px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.crash-btn:hover, .crash-btn:focus-visible { border-color: #e0182d; background: #fff1f1; outline: none; }
.crash-btn-x { background: #e0182d; border-color: #e0182d; color: #fff; }
.crash-btn-x:hover, .crash-btn-x:focus-visible { background: #b8121f; color: #fff; }
.crash-reading .crash-bar { display: flex; }
.crash-reading .crash-err, .crash-reading .crash-run { display: none; }
.crash-reading .crash-out { opacity: 0; visibility: hidden; }
.crash-reading .crash-code { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.crash-reading .crash-ln { color: #a3121a; }
.crash-reading .crash-c { color: #c76a71; }
@media (max-width: 520px) { .crash-hint { flex-basis: 100%; } .crash-btn { flex: 1 1 auto; justify-content: center; } }
.crash-x { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #f0b8bc; border-radius: 50%; background: #fff; color: #a3121a; box-shadow: 0 8px 24px -10px rgba(160, 18, 26, .35); cursor: pointer; opacity: 0; transform: scale(.8); pointer-events: none; transition: opacity .25s, transform .25s, background .2s; }
.crash-x svg { width: 18px; height: 18px; }
.crash-x-on .crash-x { opacity: 1; transform: none; pointer-events: auto; }
.crash-x:hover, .crash-x:focus-visible { background: #e0182d; border-color: #e0182d; color: #fff; outline: none; }
.crash-reading .crash-x { display: none; }
@media (min-width: 2300px) { .crash-x { width: 60px; height: 60px; } .crash-x svg { width: 24px; height: 24px; } }

/* Hackathon wins */
.chip-win svg { width: 15px; height: 15px; flex: none; color: var(--gold); }
.chip-win[aria-pressed="true"] svg { color: currentColor; }
.chip-win { display: inline-flex; align-items: center; gap: 7px; }
.award { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 0 0 6px; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--ink); font: 600 0.74rem/1.3 var(--sans); white-space: normal; }
.award svg { width: 14px; height: 14px; flex: none; color: var(--gold); }
.r-desc .award { display: flex; width: fit-content; }
.d-award { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: fit-content; max-width: 100%; margin: 14px 0 clamp(16px, 2.4vw, 30px); padding: 10px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 10%, var(--card)); font: 500 0.9rem/1.4 var(--sans); color: var(--ink); }
.d-award svg { width: 20px; height: 20px; flex: none; color: var(--gold); }
.d-award strong { font-weight: 750; }
.d-award-e { font-weight: 600; }
.d-award-d { flex-basis: 100%; padding-left: 32px; color: var(--muted); font-size: 0.84rem; }
@media (max-width: 420px) { .d-award { padding: 10px 12px; } .d-award-d { padding-left: 0; } }

/* Udaan diagram: the number markers shrink with the drawing so they never crowd each other */
.plane-wrap { container-type: inline-size; }
@supports (width: 1cqi) {
  .hotspot { --hs: clamp(15px, 5.4cqi, 28px); width: var(--hs); height: var(--hs); margin: calc(var(--hs) / -2) 0 0 calc(var(--hs) / -2); font-size: max(9px, calc(var(--hs) * 0.42)); }
}
