/* debughive.com — the hive: the logo's black frame, honey and circuit cyan,
   on a honeycomb ground. Dark first; a paper-white light theme follows the OS. */
:root {
  color-scheme: dark;
  --ground: #050708;
  --paper: #0c1012;
  --faint: #131a1d;
  --ink: #eef3f2;
  --muted: #93a3a6;
  --line: #253236;
  --honey: #ffe600;
  --honey-soft: #2e2a07;
  --honey-ink: #ffee55;
  --circuit: #22e5ea;
  --circuit-soft: #0b3133;
  --bug: #ff5d4f;
  --violet: #b892ff;
  --violet-soft: #2a1e43;
  --on-honey: #050708;
  --comb: rgba(255, 230, 0, 0.06);
  --display: "Saira Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ground: #eef0ec; --paper: #ffffff; --faint: #f5f6f2; --ink: #0b0f10; --muted: #56656a; --line: #d6dcd8;
    --honey: #e8c700; --honey-soft: #fff8c2; --honey-ink: #6e5e00; --circuit: #00838a; --circuit-soft: #d3f3f3;
    --bug: #c93a2e; --violet: #6b45b8; --violet-soft: #ece4fa; --on-honey: #0b0f10; --comb: rgba(11, 15, 16, 0.05);
  }
}

* { box-sizing: border-box; }
/* Always show the scrollbar track, so pages that don't scroll (a short Discovery
   list) don't widen and shift everything sideways on desktop (review 2026-10-13). */
html { -webkit-text-size-adjust: 100%; overflow-y: scroll; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
}
img { max-width: 100%; height: auto; }
a { color: var(--circuit); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--honey); }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--honey); color: var(--on-honey); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* The honeycomb ground. The bees (Post-MVP, Q17) will live in #hive. */
#hive {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33M0 48l-28 16M56 48l28 16' fill='none' stroke='%23888' stroke-opacity='.12' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  mask-image: radial-gradient(ellipse at 70% 10%, #000 0%, transparent 70%);
}

/* Header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 0.8rem var(--gutter);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.mark { display: flex; align-items: center; gap: 0.1rem; color: var(--ink); text-decoration: none; font: 800 1.5rem/1 var(--display); }
.mark b { color: var(--circuit); font-weight: 800; }
.top nav { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-right: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
.top nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--honey); }
.tools { display: flex; align-items: center; gap: 0.7rem; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; text-decoration: none; font: 600 0.75rem/1 var(--mono); }
.lang span { padding: 0.4rem 0.5rem; color: var(--muted); }
.lang span.on { background: var(--honey); color: var(--on-honey); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; justify-content: center;
  background: var(--honey); color: var(--on-honey); border: 0; border-radius: 4px;
  padding: 0.75rem 1.2rem; font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--on-honey); filter: brightness(1.08); }
.btn small { font-weight: 500; opacity: 0.75; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--honey); color: var(--ink); }
.btn.small { padding: 0.5rem 0.8rem; font-size: 0.9rem; }
.soft { font-weight: 600; text-decoration: none; }
.row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 2.5rem var(--gutter) 4rem; display: grid; gap: 3.5rem; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; padding-top: 1.5rem; }
.hero > div { display: grid; gap: 1.2rem; }
.hero h1 span { color: var(--honey); }
.eyebrow { font: 600 0.8rem/1.3 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--circuit); }
.badge-hex { justify-self: center; width: min(100%, 320px); filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45)); }
.band { display: grid; gap: 1.2rem; }
.band .head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.band .head a { font-weight: 600; text-decoration: none; }

.grid { display: grid; gap: 1rem; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.scard { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem; display: grid; gap: 0.6rem; align-content: start; }
.scard.tall p { color: var(--muted); font-size: 0.98rem; }
.shead { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0.8rem; align-items: center; }
.shead h3 { margin: 0; }
.hex {
  width: 44px; height: 50px; display: grid; place-items: center;
  background: var(--honey); color: var(--on-honey); font: 800 0.95rem/1 var(--display);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips li { border: 1px solid var(--line); background: var(--faint); border-radius: 3px; padding: 0.35rem 0.6rem; font: 500 0.85rem/1 var(--mono); }

/* Projects */
.pcard { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem; }
.pbody { display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.pmedia { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
/* The logo matches the deck: its width when stacked, its height side by side (both 120px). */
.pmedia .plogo { width: 120px; height: 120px; }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.prow h3 a { color: var(--ink); text-decoration: none; }
.prow h3 a:hover { color: var(--honey); }
.pbody p { color: var(--muted); font-size: 0.98rem; }
.stack { font: 500 0.8rem/1.4 var(--mono); color: var(--circuit) !important; }
.applink { font-weight: 600; }
/* Whole tile is the link (review 2026-10-12): the title's link covers the card. */
.pcard { position: relative; transition: border-color 0.15s; }
.pcard:hover, .pcard:focus-within { border-color: var(--honey); }
.tile-link::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.tile-link:focus-visible { outline: none; }
.pcard:has(.tile-link:focus-visible) { outline: 2px solid var(--honey); outline-offset: 2px; }
.pcard .applink, .pcard .hx { position: relative; z-index: 1; }

/* Hexagon badges with a short code; the full name shows on hover, focus or a tap. */
.hx { position: relative; display: inline-grid; outline: none; }
/* The label itself is one element placed by src/client/tooltip.ts, kept on screen. */
.tip {
  position: fixed; z-index: 60; max-width: min(260px, calc(100vw - 16px)); pointer-events: none;
  background: var(--ink); color: var(--ground); font: 600 0.78rem/1.25 var(--body); padding: 0.35rem 0.55rem; border-radius: 4px;
}
.hx:focus-visible > span { outline: 2px solid var(--ink); }
.hexes { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hex.sm { width: 30px; height: 34px; font-size: 0.72rem; }
/* Status: an outlined hexagon so it doesn't read as a service or a button. */
.shex {
  position: relative; width: 44px; height: 50px; display: grid; place-items: center;
  font: 800 0.72rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--tone); color: var(--tone); isolation: isolate;
}
.shex::before {
  content: ""; position: absolute; inset: 2px; z-index: -1; background: var(--paper);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.shex.live { --tone: var(--circuit); }
.shex.dev { --tone: var(--honey); }
.shex.new { --tone: var(--violet); }
.shex.hold { --tone: var(--muted); }

/* The fanned deck: decorative, never opened (Q4, Q25). */
.deck { position: relative; width: 120px; height: 120px; }
.deck i {
  position: absolute; left: 30px; top: 12px; width: 62px; height: 92px; border-radius: 5px;
  border: 1px solid var(--line); background: linear-gradient(var(--circuit-soft) 0 20%, var(--faint) 20% 100%);
  transform-origin: 50% 100%; transition: transform 0.25s ease;
}
.deck i:nth-child(1) { transform: rotate(-16deg); }
.deck i:nth-child(2) { background: linear-gradient(var(--honey-soft) 0 20%, var(--faint) 20% 100%); }
.deck i:nth-child(3) { transform: rotate(16deg); background: linear-gradient(var(--violet-soft) 0 20%, var(--faint) 20% 100%); }
.pcard:hover .deck i:nth-child(1) { transform: rotate(-22deg); }
.pcard:hover .deck i:nth-child(3) { transform: rotate(22deg); }
.project .split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.project .split > div { display: grid; gap: 1rem; justify-items: start; }
.project .deck { width: 220px; height: 220px; justify-self: center; }
.project .deck i { left: 55px; top: 20px; width: 112px; height: 170px; }
.project .desc { margin: 0; color: var(--muted); max-width: 64ch; }
.project h2 { margin: 0.4rem 0 0; font-size: 1.3rem; }
.project .hex.sm { width: 38px; height: 44px; font-size: 0.85rem; }

/* Pages */
.page { display: grid; gap: 1.3rem; align-content: start; }
.page.narrow { max-width: 720px; }
.cvrow { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; border-left: 2px solid var(--line); }
.timeline li { padding-left: 1.2rem; position: relative; display: grid; gap: 0.25rem; }
.timeline li::before {
  content: ""; position: absolute; left: -9px; top: 0.35rem; width: 16px; height: 18px; background: var(--honey);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.timeline .when { font: 600 0.8rem/1 var(--mono); color: var(--circuit); }
.timeline small { font: 500 0.95rem var(--body); color: var(--muted); }
.timeline .role { font-weight: 600; }
.timeline p:last-child { color: var(--muted); max-width: 70ch; }
.edu { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.edu li { display: grid; gap: 0.1rem; }
.edu span { color: var(--muted); font-size: 0.95rem; }
.empty { border: 1px dashed var(--line); border-radius: 6px; padding: 2rem; display: grid; gap: 1rem; justify-items: start; background: var(--paper); }
/* Hidden means hidden, whatever display a class gives it. */
[hidden] { display: none !important; }
/* The splash page a referral link opens (Q94, Q95): one centred column. */
.splash { display: grid; justify-items: center; text-align: center; gap: 1.1rem; max-width: 760px; margin-inline: auto; }
.splash-logo { width: 200px; height: auto; }
.splash h1 { margin: 0; }
.splash h1 span { color: var(--honey); }
.splash .lede { margin: 0; }
.splash h2 { margin: 1.4rem 0 0; }
.splash-quote { margin: 1rem 0 0; padding: 1.2rem 1.4rem; max-width: 600px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--honey); border-radius: 6px; text-align: left; }
.splash-quote blockquote { margin: 0 0 0.6rem; font-size: 1.1rem; white-space: pre-line; }
.splash-quote figcaption { color: var(--muted); font-size: 0.92rem; }
.splash-services { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; width: 100%; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); text-align: left; }
.splash-services li { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.splash-services a { color: var(--ink); text-decoration: none; font-weight: 600; }
.splash-services a:hover { color: var(--honey); }
/* Testimonials (Q27, Q83). */
.tm-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem 1rem; }
.tm-head h1 { margin: 0; }
.tm-list { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.tm { display: grid; gap: 0.8rem; align-content: start; padding: 1.1rem 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.tm-pending { border-style: dashed; border-color: var(--honey); }
.tm-thanks-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tm-who { display: flex; align-items: center; gap: 0.8rem; }
.tm-who > div { display: grid; gap: 0.1rem; min-width: 0; flex: 1; }
.tm-who .muted { font-size: 0.9rem; }
/* No photo yet: a hexagon with their initials (review 2026-10-13). */
.tm-hex { flex: none; display: grid; place-items: center; width: 44px; height: 50px; background: var(--line); color: var(--ink); font: 700 1rem/1 var(--display); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.tm-state { flex: none; padding: 0.15rem 0.45rem; border-radius: 4px; border: 1px solid var(--honey); color: var(--honey); font: 700 0.7rem/1.2 var(--body); letter-spacing: 0.06em; text-transform: uppercase; }
.tm blockquote { margin: 0; color: var(--ink); white-space: pre-line; }
.tm-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tm-state.partner { border-color: var(--circuit); color: var(--circuit); }

/* Forms */
form { display: grid; gap: 1rem; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field > span { font: 700 0.75rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.7rem 0.8rem; font: 400 1rem/1.4 var(--body);
}
.field select option, .field select optgroup { background: var(--paper); color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--honey); }
.field [aria-invalid="true"] { border-color: var(--bug); }
.field input[readonly] { color: var(--muted); background: var(--faint); cursor: default; }
form .btn { justify-self: start; }
.status { color: var(--circuit); min-height: 1.4em; }

/* Shown inside a project's App tab: no way back into the project area. */
html.framed .tools .btn { display: none; }

/* Signed-in project area (/app/). */
.notice { border: 1px solid var(--honey); border-radius: 4px; padding: 0.7rem 0.9rem; }
/* Referring partners (Q93): the agreement and the partner's link. */
.agreement .terms { display: grid; gap: 0.7rem; padding-left: 1.3rem; margin: 0.4rem 0 1.4rem; }
.partner-link { display: grid; gap: 0.4rem; margin: 1rem 0 1.4rem; padding: 1rem 1.1rem; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--circuit); border-radius: 6px; }
/* My Account (review 2026-10-13). */
.account-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; margin-bottom: 2rem; }
.panel { display: grid; gap: 0.9rem; align-content: start; padding: 1.2rem 1.3rem; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.panel h2 { margin: 0; font-size: 1.4rem; }
.panel .partner-link { margin: 0; background: var(--faint); }
.avatar-row { display: flex; align-items: center; gap: 1rem; }
.avatar { flex: none; width: 44px; height: 50px; object-fit: cover; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.avatar.big, .tm-hex.big { width: 76px; height: 88px; font-size: 1.5rem; }
.status-images { display: flex; gap: 0.8rem; align-items: flex-end; }
.status-images a { display: grid; gap: 0.3rem; justify-items: center; color: var(--ink); text-decoration: none; font-size: 0.85rem; }
.status-images a:hover span { color: var(--honey); }
.status-images img { height: 120px; width: auto; border: 1px solid var(--line); border-radius: 4px; }
.client-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.client-list li { display: flex; flex-wrap: wrap; gap: 0.2rem 0.4rem; align-items: baseline; }
.client-list li .small { margin-left: auto; }
.my-tm { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.my-tm li { display: grid; gap: 0.5rem; justify-items: start; }
.my-tm blockquote { margin: 0; white-space: pre-line; }
.my-tm form { width: 100%; }
.my-tm textarea { width: 100%; padding: 0.7rem 0.8rem; background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
/* The heartbeat (Q45–Q47). */
svg.beat { width: 100%; height: 140px; background: var(--faint); border: 1px solid var(--line); border-radius: 6px; }
svg.beat .grid { stroke: var(--line); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.beat-axis { display: flex; justify-content: space-between; margin-top: -0.4rem; }
.beat-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.beat-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 0.4rem; vertical-align: middle; border-radius: 2px; }
.totals { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; padding-top: 0.6rem; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); }
.totals b { color: var(--ink); }
/* Admin (Q90, Q100): payments and the partner report. */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.4rem; border-bottom: 1px solid var(--line); }
.admin-tabs button { padding: 0.6rem 0.9rem; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 600 0.95rem var(--body); cursor: pointer; margin-bottom: -1px; }
.admin-tabs button.on { color: var(--honey); border-bottom-color: var(--honey); }
.admin-search { width: 100%; max-width: 420px; margin: 0 0 1rem; padding: 0.6rem 0.8rem; background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.admin-create { margin-bottom: 1rem; }
.admin-create summary { cursor: pointer; font-weight: 700; }
.admin-create form { margin-top: 0.9rem; }
.admin-tbl select { padding: 0.35rem 0.5rem; background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.switch { display: inline-flex; align-items: center; gap: 0.45rem; font: 700 0.8rem/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.switch input { width: 1.1rem; height: 1.1rem; accent-color: var(--honey); }
.switch input:checked + span { color: var(--honey); }
.cv-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.project-admin { display: grid; gap: 1rem; }
.project-admin .panel { gap: 0.6rem; }
.project-admin .panel > button { justify-self: start; }
.upload-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin fieldset.field { border: 0; padding: 0; margin: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0.3rem 1rem; }
.lead-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.lead-list li { gap: 0.3rem; }
.lead-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.lead-list blockquote { margin: 0.4rem 0 0; white-space: pre-line; }
.admin .check { display: flex; gap: 0.5rem; align-items: center; font-size: 0.95rem; }
.tbl-scroll { overflow-x: auto; margin-bottom: 2rem; border: 1px solid var(--line); border-radius: 6px; }
.admin-tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-tbl th, .admin-tbl td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-tbl th { font: 700 0.72rem/1.2 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--paper); white-space: nowrap; }
.admin-tbl tr.voided td { opacity: 0.45; text-decoration: line-through; }
.admin-tbl form.inline { display: flex; gap: 0.4rem; margin-bottom: 0.4rem; }
.admin-tbl form.inline input { width: 6.5rem; padding: 0.35rem 0.5rem; background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.field-label { font: 700 0.75rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.partner-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
/* On narrow screens the link takes its own row and Copy goes under it. */
.partner-link-row code { font: 400 0.9rem/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; min-width: 0; flex: 1 1 16rem; }
.partner-link .muted { margin: 0; }
.room-tabs { display: grid; gap: 0.35rem; margin-top: 0.3rem; padding-top: 0.7rem; border-top: 1px solid var(--line); font-size: 0.9rem; }
.room-tabs > span { display: grid; justify-items: start; gap: 0.2rem; }
.room-tabs b { font-weight: 600; }
.pill { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font: 600 0.75rem/1.4 var(--mono); border: 1px solid currentColor; white-space: nowrap; }
.pill.approved { color: var(--circuit); }
.pill.ready { color: var(--honey); }
.pill.modified { color: var(--muted); }
.room { padding: 1.2rem clamp(16px, 3vw, 2.5rem) 1.5rem; display: grid; gap: 0.8rem; }
.room-head { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.plogo { width: 48px; height: 48px; flex: none; }
.room-head h1 { margin: 0; display: flex; align-items: center; gap: 0.25em; }
/* Top right of the room (review 2026-10-13): one joined element outlined in
   the level's colour (same colours as the card footer) — the level as a
   solid label on the left, Chat as the button on the right. */
.room-badges {
  --lvl: var(--line); --on-lvl: var(--ink);
  margin-left: auto; display: inline-flex; align-items: stretch;
  border: 1px solid var(--lvl); border-radius: 6px; overflow: hidden;
}
.room-badges.approving, .room-badges.developer { --lvl: var(--honey); --on-lvl: var(--on-honey); }
.room-badges.client { --lvl: var(--circuit); --on-lvl: var(--on-honey); }
.access-badge {
  display: flex; align-items: center; padding: 0.4rem 0.7rem; background: var(--lvl); color: var(--on-lvl);
  font: 700 0.75rem/1.2 var(--body); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.chat-btn {
  display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border: 0; cursor: pointer;
  background: transparent; color: var(--ink); font: 600 0.9rem/1.2 var(--body);
}
.chat-btn:hover, .chat-btn:focus-visible, .chat-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--lvl) 22%, transparent); outline: none; }
.chat-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(420px, 100vw); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0.8rem;
  padding: 1rem 1.2rem; background: var(--paper); border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.4);
}
.chat-panel header { display: flex; justify-content: space-between; align-items: center; font: 700 1.2rem/1.2 var(--display); }
.chat-panel header button { background: none; border: 0; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.chat-panel header button:hover, .chat-panel header button:focus-visible { color: var(--honey); }
/* The chat (Q7, Q49–Q54): the timeline scrolls between the header and the box. */
.chat-log { overflow-y: auto; display: grid; align-content: start; gap: 0.7rem; padding-right: 0.2rem; }
.msg { display: grid; gap: 0.3rem; padding: 0.6rem 0.75rem; background: var(--faint); border: 1px solid var(--line); border-radius: 6px; }
.msg.mine { border-left: 3px solid var(--honey); }
.msg-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.msg-head .muted { font-size: 0.78rem; }
.msg-head .icon-btn { width: 1.8rem; height: 1.8rem; }
.msg-head .icon-btn svg { width: 16px; height: 16px; }
.msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-file { display: flex; align-items: center; gap: 0.5rem; min-width: 0; padding: 0.4rem 0.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.msg-file .file-name { flex: 1; }
.msg-file-actions { display: flex; gap: 0.35rem; }
.chat-compose { display: grid; gap: 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.chat-compose textarea { width: 100%; resize: vertical; background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 0.6rem 0.7rem; font: 400 1rem/1.4 var(--body); }
.chat-compose textarea:focus { outline: none; border-color: var(--honey); }
.chat-actions { display: flex; justify-content: space-between; align-items: center; }
.chat-actions label.icon-btn { cursor: pointer; }
.chat-picked { display: flex; align-items: center; gap: 0.4rem; min-width: 0; padding: 0.3rem 0.5rem; border: 1px dashed var(--honey); border-radius: 4px; }
.chat-picked .file-name { flex: 1; }
.chat-picked button { background: none; border: 0; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
/* Unread messages on the Chat button. */
.chat-count { min-width: 1.3rem; height: 1.3rem; padding: 0 0.3rem; display: inline-grid; place-items: center; border-radius: 999px; background: var(--honey); color: var(--on-honey); font: 700 0.72rem/1 var(--body); }
/* The logo matches the title's height at every screen size. */
.room-head h1 .plogo { width: auto; height: 1em; }
/* No logo yet: a plain grey hexagon the title's height (review 2026-10-13). */
.room-head h1 .plogo-none { display: inline-block; width: 0.87em; height: 1em; background: var(--line); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
/* Project steps (review 2026-10-13, option A): the tabs as the steps of the
   process, hexagons like the "How I build" cells joined by a line. Drawn
   like the cells: the step's own background is the edge colour, a slightly
   smaller copy inside is the fill. The open step is large with its title and
   status inside; the others are small with an icon and grow while hovered.
   The row keeps the large size's height, so nothing below it moves. */
.steps {
  --small: 48px; --large: 122px;
  /* Each step has a fixed slot as wide as the large size, so a step growing
     never moves the others (review 2026-10-13); lines fill the gaps between. */
  display: grid; grid-template-columns: var(--large) 1fr var(--large) 1fr var(--large) 1fr var(--large);
  align-items: center; justify-items: center; min-height: calc(var(--large) * 1.1547);
}
.step {
  --s: var(--small);
  --edge: var(--line); --fill: var(--faint); --ink-step: var(--muted);
  position: relative; z-index: 1; width: var(--s); height: calc(var(--s) * 1.1547);
  padding: 0; border: 0; cursor: pointer; background: var(--edge); color: var(--ink-step);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  transition: width 0.3s ease, height 0.3s ease;
}
.step.done { --edge: var(--circuit-edge); --fill: var(--circuit-fill); --ink-step: var(--circuit); }
.step[aria-selected="true"] { --edge: var(--honey-edge); --fill: var(--honey-fill); --ink-step: var(--honey); }
.step[aria-selected="true"], .step:hover, .step:focus-visible { --s: var(--large); z-index: 2; }
.step:focus-visible { outline: none; --edge: var(--ink); }
.step-in {
  position: absolute; inset: 2px; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; background: var(--fill);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.step-icon { grid-area: 1 / 1; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity 0.15s; }
.step-text { grid-area: 1 / 1; min-width: 0; width: 100%; display: grid; justify-items: center; gap: 0.2rem; padding: 0 1rem; text-align: center; opacity: 0; transition: opacity 0.15s; }
.step-text b { font: 700 1.2rem/1.05 var(--display); color: var(--ink-step); }
.step-status { font: 600 0.9rem/1.2 var(--body); color: var(--ink); }
.step[aria-selected="true"] .step-icon, .step:hover .step-icon, .step:focus-visible .step-icon { opacity: 0; }
.step[aria-selected="true"] .step-text, .step:hover .step-text, .step:focus-visible .step-text { opacity: 1; transition-delay: 0.12s; }
/* The line into each step: cyan once approved, solid grey while work is in
   progress, dashed while there's been no work. */
/* Each line runs from slot centre to slot centre, behind the steps, so it
   meets a step's edge whatever the step's size. */
.step-line { justify-self: stretch; margin: 0 calc(var(--large) / -2); border-top: 2px solid var(--line); }
.step-line.done { border-top-color: var(--circuit-edge); }
.step-line.none { border-top-style: dashed; }
/* Discovery (Q82). Small with new items: the icon becomes a yellow number. */
.step-count { grid-area: 1 / 1; font: 800 1.25rem/1 var(--display); color: var(--honey); transition: opacity 0.15s; }
.step[aria-selected="true"] .step-count, .step:hover .step-count, .step:focus-visible .step-count { opacity: 0; }
.materials { display: grid; gap: 1rem; }
/* The upload form, in a pop-up (review 2026-10-13). */
.mat-pop-box.form { width: min(560px, 100%); height: auto; max-height: calc(100dvh - 32px); grid-template-rows: auto minmax(0, 1fr); background: var(--paper); }
.upload-body { display: grid; gap: 0.9rem; padding: 1rem 1.1rem 1.2rem; overflow: auto; }
.mat-empty { display: grid; gap: 0.6rem; justify-items: start; }
.upload-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; }
/* Our file button (review 2026-10-13): the real input is hidden but still takes
   keyboard focus and clicks through its label. */
.file-pick { display: flex; align-items: center; gap: 0.8rem; min-width: 0; cursor: pointer; }
.file-pick .btn { flex: none; }
.file-pick:focus-within .btn { border-color: var(--honey); }
/* File names on one line, cut with "…"; the full name is in a hover/tap tip (review 2026-10-13). */
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.mat { display: grid; gap: 0.35rem; align-content: start; padding: 0.9rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
/* New to this person: highlighted until they open, open in a new tab, or download it. */
.mat.is-new { border-color: var(--honey); box-shadow: inset 3px 0 0 var(--honey); }
.mat-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; min-width: 0; }
.mat-name { min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-new { flex: none; padding: 0.15rem 0.45rem; border-radius: 4px; background: var(--honey); color: var(--on-honey); font: 700 0.7rem/1.2 var(--body); letter-spacing: 0.06em; text-transform: uppercase; }
.mat-desc { margin: 0; color: var(--ink); }
.mat-meta { margin: 0; color: var(--muted); font: 400 0.78rem/1.3 var(--mono); }
.mat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-top: 0.3rem; min-height: 2rem; }
/* Tile previews (review 2026-10-13): images and video frames, or a file-type icon. */
.mat-thumb { display: grid; place-items: center; height: 150px; margin: -0.9rem -1rem 0.3rem; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; background: var(--ground); overflow: hidden; color: var(--muted); }
button.mat-thumb { cursor: zoom-in; }
/* The whole image or frame, never cropped — in project files the edges often matter. */
.mat-thumb img, .mat-thumb video { width: 100%; height: 100%; object-fit: contain; }
.mat-icon { display: grid; justify-items: center; gap: 0.3rem; }
.mat-icon svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.mat-icon b { font: 700 0.8rem/1 var(--mono); letter-spacing: 0.06em; color: var(--circuit); }
.mat-pop-box video { width: 100%; height: 100%; background: #000; }
/* File actions as icons; Delete sits apart on the right. */
.icon-btn { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--circuit); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--honey); color: var(--honey); outline: none; }
.icon-btn.danger { margin-left: auto; color: var(--muted); }
.icon-btn.danger:hover, .icon-btn.danger:focus-visible { border-color: var(--bug); color: var(--bug); }
/* The pop-up: PDFs in a frame, images as images, videos with controls. */
.mat-pop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.75); }
.mat-pop-box { width: min(1000px, 100%); height: min(85dvh, 100%); display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mat-pop-box header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
.mat-pop-box header b { overflow-wrap: anywhere; }
.mat-pop-box header button { background: none; border: 0; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.mat-pop-box header button:hover, .mat-pop-box header button:focus-visible { color: var(--honey); }
.mat-pop-box iframe, .mat-pop-box img { width: 100%; height: 100%; border: 0; background: #fff; }
.mat-pop-box img { object-fit: contain; background: var(--ground); }
/* Always as tall as the Print button, so the content doesn't shift on steps without it. */
.tab-tools { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; min-height: 2.2rem; }
/* The status line (approvals, Q39–Q44): where the step stands, and the one
   action this person can take. A fixed height on every step, so switching steps
   never moves the content. */
.step-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  min-height: 3.2rem; margin-bottom: -0.3rem; padding: 0.45rem 0.9rem; background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
}
.step-bar.ready { border-left: 3px solid var(--honey); }
.step-bar.approved { border-left: 3px solid var(--circuit); }
.history { list-style: none; margin: 0; display: grid; gap: 0.6rem; }
.history li { display: grid; gap: 0.2rem; justify-items: start; }
/* Between the steps and the content: the open step's version and date (left),
   Print and Open (right); the right side wraps under on narrow screens. */
.step-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: -0.3rem; }
.step-when { display: flex; gap: 0.5rem; font: 400 0.8rem/1.3 var(--mono); color: var(--muted); }
.step-when > span + span::before { content: "· "; }
#tab-frame { width: 100%; height: calc(100dvh - 15rem); min-height: 480px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
@media (max-width: 640px) {
  /* Phones keep the flexible row: fixed slots don't fit narrow screens, and
     the shift they prevent isn't noticeable at this size (review 2026-10-13). */
  .steps { --small: 44px; --large: 112px; display: flex; }
  .step-line { flex: 1; min-width: 12px; margin: 0; }
  /* Phones: the access badge and Chat sit above the title, on the right (review 2026-10-13). */
  .room-badges { order: -1; }
  .room-head h1 { flex-basis: 100%; }
  /* Phones: version over date on the left; the icons stay in a row on the right. */
  .step-meta { flex-wrap: nowrap; align-items: flex-end; min-height: 2.4rem; }
  /* Tall enough for the longest line (3 lines, or 2 plus a button) on every step. */
  .step-bar { min-height: 6.4rem; }
  .step-when { flex-direction: column; gap: 0.2rem; }
  .step-when > span + span::before { content: none; }
}
/* The smallest phones (320px wide): smaller steps, or the row runs off the side. */
@media (max-width: 359px) {
  .steps { --small: 40px; --large: 100px; }
  .step-line { min-width: 6px; }
}
@media (prefers-reduced-motion: reduce) { .step, .step-icon, .step-text { transition: none; } }
.outbox article { border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem 1.1rem; margin: 1rem 0; background: var(--paper); }
.outbox h2 { margin: 0.2rem 0 0.5rem; font-size: 1.2rem; }
.outbox iframe.mail { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 6px; background: #050708; margin-bottom: 0.6rem; }
.outbox pre { white-space: pre-wrap; font: 400 0.9rem/1.5 var(--mono); margin: 0 0 0.8rem; }
.outbox .meta { margin: 0; color: var(--muted); font: 400 0.8rem/1.3 var(--mono); }

/* Contact pop-up (Q77). */
.pop {
  width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
  padding: 1.6rem 1.8rem 1.2rem;
}
.pop::backdrop { background: rgba(0, 0, 0, 0.7); }
.pop h2 { margin: 0 2rem 0.4rem 0; }
.pop .lede { margin-top: 0; }
.pop-close { position: absolute; top: 0.6rem; right: 0.6rem; }
.pop-close button {
  background: none; border: 0; color: var(--muted); font: 400 1.8rem/1 var(--body);
  width: 2.2rem; height: 2.2rem; cursor: pointer; border-radius: 4px;
}
.pop-close button:hover, .pop-close button:focus-visible { color: var(--honey); }
@media (max-width: 560px) { .pop { padding: 1.2rem 1rem 1rem; } }
.status.err { color: var(--bug); }

.foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.2rem var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

@media (max-width: 860px) {
  .hero, .project .split { grid-template-columns: minmax(0, 1fr); }
  .project .split .deck { order: -1; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .pair { grid-template-columns: minmax(0, 1fr); }
  .badge-hex { width: 200px; }
}
@media (max-width: 560px) {
  .grid.three { grid-template-columns: minmax(0, 1fr); }
  .pcard { grid-template-columns: minmax(0, 1fr); }
  .pmedia { flex-direction: row; justify-content: center; }
  .top nav { order: 3; width: 100%; gap: 0.9rem; }
}

/* The build process (home) */
.process .steps { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; counter-reset: none; }
.process .steps li { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem; display: grid; gap: 0.55rem; align-content: start; }
.process .steps li:not(:last-child)::after {
  content: ""; position: absolute; right: -1rem; top: 2.1rem; width: 1rem; height: 2px; background: var(--circuit);
}
.process .steps p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 860px) { .process .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .process .steps li::after { display: none; } }
@media (max-width: 560px) { .process .steps { grid-template-columns: minmax(0, 1fr); } }

/* Home: compact recent work and a one-line services list (review 2026-10-11) */
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.mini {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0.7rem; row-gap: 0.35rem; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 0.7rem 0.8rem; color: var(--ink); text-decoration: none;
}
.mini:hover { border-color: var(--honey); color: var(--ink); }
.mini .deck { grid-row: span 2; width: 52px; height: 52px; }
.mini .deck i { left: 14px; top: 5px; width: 26px; height: 40px; }
.mini:hover .deck i:nth-child(1) { transform: rotate(-22deg); }
.mini:hover .deck i:nth-child(3) { transform: rotate(22deg); }
.mini b { font: 700 1.05rem/1.1 var(--display); }
.mini .hx { justify-self: start; }
.mini .shex { width: 34px; height: 38px; font-size: 0.6rem; }
.services-line { gap: 0.8rem; }
.services-line h2 { font-size: 1.4rem; }
.services-line .chips a { color: var(--ink); text-decoration: none; }
.services-line .chips li:hover { border-color: var(--honey); }
.pcard { scroll-margin-top: 90px; }
/* My projects: a solid footer across the card's bottom — access level on the left,
   project notifications (later) on the right (review 2026-10-13). Yellow for the
   levels that act on a project (approving client, developer), cyan for client,
   grey for non-client. */
.pfoot {
  grid-column: 1 / -1; margin: 0.2rem -1.1rem -1.1rem; padding: 0.5rem 1.1rem; border-radius: 0 0 6px 6px;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font: 700 0.8rem/1.2 var(--body); letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--line); color: var(--ink);
}
.pfoot:has(.access.approving), .pfoot:has(.access.developer) { background: var(--honey); color: var(--on-honey); }
.pfoot:has(.access.client) { background: var(--circuit); color: var(--on-honey); }
@media (max-width: 860px) { .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .minis { grid-template-columns: minmax(0, 1fr); } }
/* A single row: whatever doesn't fit is hidden, never wrapped. */
.chips.one-row { flex-wrap: nowrap; overflow: hidden; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.chips.one-row li { flex: none; }

/* The build process as honeycomb cells (reviews 2026-10-11). Small cells show
   only the title; hover, focus, a tap, or the idle sequence (process.ts)
   lifts one cell and grows it to show its description. Cells are absolutely
   placed, so growing never moves anything else. A zig-zag sideways on wide
   screens, downward on phones; arrows (cell = 100 units) guide the eye, each
   in the colour of the cell it leaves. */
@property --cw { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --lift { syntax: "<length>"; inherits: true; initial-value: 0px; }
.process { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 4.5rem; }
.process .intro { display: grid; gap: 1rem; align-content: center; }
.combs {
  --w: 172px; --big: 262px; --h: calc(var(--w) * 1.1547); --gap: calc(var(--w) * 0.024);
  position: relative; justify-self: center; margin-block: 2.5rem;
  width: calc(var(--w) * 2.572); height: calc(var(--w) * 2.045);
}
.combs ol { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.combs li {
  --cw: var(--w); --lift: 0px;
  --L: calc(var(--i) * (var(--w) / 2 + var(--gap)));
  --T: calc(var(--odd) * (var(--h) * 0.75 + var(--gap)));
  position: absolute; z-index: 0; cursor: pointer;
  width: var(--cw); height: calc(var(--cw) * 1.1547);
  left: calc(var(--L) - (var(--cw) - var(--w)) / 2);
  top: calc(var(--T) - (var(--cw) - var(--w)) * 0.57735 - var(--lift));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: color-mix(in srgb, var(--circuit) 55%, var(--line));
  transition: --cw 0.35s ease, --lift 0.35s ease;
}
.combs li:nth-child(odd) { background: color-mix(in srgb, var(--honey) 60%, var(--line)); }
.combs li:focus-visible { outline: none; background: var(--ink); }
.combs li:hover, .combs li:focus-visible, .combs li.on { --cw: var(--big); --lift: 12px; z-index: 3; }
.combs li > div {
  position: absolute; inset: 2px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: color-mix(in srgb, var(--circuit-soft) 45%, var(--paper));
  display: grid; align-content: center; justify-items: center; gap: 0.45rem;
  padding: 22% 15%; text-align: center;
}
.combs li:nth-child(odd) > div { background: color-mix(in srgb, var(--honey-soft) 60%, var(--paper)); }
.combs h3 { font-size: 1.2rem; color: var(--honey); transition: font-size 0.35s ease; }
.combs li:nth-child(even) h3 { color: var(--circuit); }
.combs p { font-size: 0.86rem; line-height: 1.4; color: var(--muted); opacity: 0; max-height: 0; overflow: hidden; transition: opacity 0.25s ease, max-height 0.35s ease; }
.combs li:hover h3, .combs li:focus-visible h3, .combs li.on h3 { font-size: 1.45rem; }
.combs li:hover p, .combs li:focus-visible p, .combs li.on p { opacity: 1; max-height: 9em; transition-delay: 0.12s; }
.arrows { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.arrows.down { display: none; }
@media (max-width: 1140px) {
  .process { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .combs { --w: min(160px, 42vw); --big: min(262px, 72vw); width: calc(var(--w) * 1.524); height: calc(var(--w) * 3.825); }
  .combs li { --L: calc(var(--odd) * (var(--w) / 2 + var(--gap))); --T: calc(var(--i) * (var(--h) * 0.75 + var(--gap))); }
  .arrows.across { display: none; }
  .arrows.down { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .combs li, .combs h3, .combs p { transition: none; }
}
/* All arrows step aside while any cell is open (review 2026-10-11). */
.arrows { transition: opacity 0.2s ease; }
.combs:has(li:hover, li:focus-visible, li.on) .arrows { opacity: 0; }

/* Cell colours, shared by the cells, their arrows and the project tabs. */
:root {
  --honey-edge: color-mix(in srgb, var(--honey) 60%, var(--line));
  --honey-fill: color-mix(in srgb, var(--honey-soft) 60%, var(--paper));
  --circuit-edge: color-mix(in srgb, var(--circuit) 55%, var(--line));
  --circuit-fill: color-mix(in srgb, var(--circuit-soft) 45%, var(--paper));
}
.combs li { background: var(--circuit-edge); }
.combs li:nth-child(odd) { background: var(--honey-edge); }
.combs li > div { background: var(--circuit-fill); }
.combs li:nth-child(odd) > div { background: var(--honey-fill); }
.arrows .tab polygon { stroke: none; }
.arrows .tab path { fill: none; stroke-width: 2px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.arrows .tab.honey polygon { fill: var(--honey-fill); }
.arrows .tab.honey path { stroke: var(--honey-edge); }
.arrows .tab.circuit polygon { fill: var(--circuit-fill); }
.arrows .tab.circuit path { stroke: var(--circuit-edge); }

/* The comb on the left, "How I build" on the right (review 2026-10-11). */
@media (min-width: 1141px) {
  .process { grid-template-columns: auto minmax(0, 1fr); }
  .process .combs { order: -1; }
}

/* Home fits a standard desktop window without scrolling (review 2026-10-11).
   Home only — other pages keep their spacing. */
@media (min-width: 1141px) {
  main.home { gap: 1.6rem; padding-block: 1.4rem 1.2rem; }
  main.home .hero { padding-top: 0; gap: 2rem; }
  main.home .hero > div { gap: 0.8rem; }
  main.home .hero h1 { font-size: clamp(2.2rem, 3.4vw, 3.3rem); }
  main.home .badge-hex { width: 190px; }
  main.home .band { gap: 0.8rem; }
  main.home .band h2 { font-size: 1.8rem; }
  main.home .combs { --w: 160px; margin-block: 0.4rem; }
  main.home .process .intro { gap: 0.9rem; }
  body:has(main.home) .foot { padding-block: 0.8rem; }
}
/* Bigger logo that hangs down into the process section without taking space
   (review 2026-10-11); the process text stays above it. */
@media (min-width: 1141px) {
  main.home .hero { align-items: start; }
  main.home .badge-hex { width: 290px; margin-bottom: -110px; position: relative; z-index: 0; }
  main.home .process { position: relative; z-index: 1; }
}
/* Header: "Contact Me" stays in the menu, in yellow (review 2026-10-11). */
.top nav a.cta { color: var(--honey); }
.top nav a.cta:hover, .top nav a.cta[aria-current="page"] { color: var(--honey); }

/* Phones, portrait (review 2026-10-11): the whole menu on one line, and on
   Home the logo comes first, above the name and title. */
@media (max-width: 560px) {
  .top nav { gap: 0.75rem; flex-wrap: nowrap; }
  .top nav a { font-size: 0.82rem; white-space: nowrap; }
}
@media (max-width: 860px) {
  main.home .badge-hex { order: -1; width: 170px; }
}
@media (max-width: 380px) {
  .top nav { gap: 0.55rem; }
  .top nav a { font-size: 0.76rem; }
}
/* The smallest phones: the Spanish menu ran 20px off the side at 320px. */
@media (max-width: 359px) {
  .top nav { gap: 0.4rem; }
  .top nav a { font-size: 0.71rem; }
}

/* Bottom row of the sideways comb sits 2px lower, evening out the visible
   gaps between the rows and within them (review 2026-10-11). The arrow that
   starts on a bottom cell moves with it (≈2px in cell units). Not on phones,
   where the comb runs downward. */
@media (min-width: 641px) {
  .combs { height: calc(var(--w) * 2.045 + 2px); }
  .combs li { --T: calc(var(--odd) * (var(--h) * 0.75 + var(--gap) + 2px)); }
  .arrows.across .tab.circuit { translate: 0 1.2px; }
}
/* Phones: language switch and Sign in pushed to the right edge (review 2026-10-11). */
@media (max-width: 560px) {
  .top .tools { margin-left: auto; }
}

/* Admin's authenticator code (Q55, Q113). The QR code keeps its own white
   background so phones can read it on the dark page. */
.totp-qr { width: min(15rem, 100%); margin: 1rem 0; }
.totp-qr svg { display: block; width: 100%; height: auto; border-radius: 6px; }
.totp-key { word-spacing: 0.3em; overflow-wrap: anywhere; }
.verify-form { display: grid; gap: 0.7rem; max-width: 18rem; margin-top: 1rem; }
.verify-form input { font: 700 1.3rem/1.2 var(--body); letter-spacing: 0.15em; }
.backup-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0.5rem; }
.backup-codes code { display: block; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 4px; font-size: 1rem; }

/* The Privacy page (Q119): the draft notice as plain reading text. */
.privacy .prose h2 { margin-top: 2rem; }
.privacy .prose h3 { margin: 1.2rem 0 0.3rem; font-size: 1.05rem; }
.privacy .prose ul { padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.foot a { color: inherit; }
.foot a:hover, .foot a:focus-visible { color: var(--honey); }
