/* ==========================================================================
   CTRLbot.io — SIGNAL GRID
   Black and white, with CTRLbot blue used as a restrained accent. The app's
   red / green / yellow / blue signal palette is reserved for live graphics.
   Audiowide is reserved for the largest, shortest display moments.

   ONE LAYOUT GRAMMAR, EVERYWHERE — the ".unit":
     media cell (image / video / css graphic)  →  tag strip  →  text body
   Desktop alternates the media left/right (.flip). Mobile always stacks
   media above text, because source order is always media-then-text.
   The homepage carries no tag strips at all — its four section bars hold
   every label — so there media runs straight into copy on a phone.

   Copy source of truth:
     ctrlbot.ai/docs/about/About_CTRLbot.md      — the company
     ctrlbot.ai/docs/about/About_CTRLbot_IoT.md  — the app
     ctrlbot.ai/docs/about/About_CTRLbot_AI.md   — the ai
   Guardrail: never publish a city, state, or physical address.
   ========================================================================== */
:root{
  /* Blue is the site's one general accent. The pri-* values mirror CTRLbot IoT
     Android ARGB resources; their leading FF alpha byte is omitted for CSS. */
  --accent:#008FD4;
  --pri-red:#FF0000;
  --pri-green:#00FF00;
  --pri-yellow:#FFFF00;

  --bg:#fff;
  --bg-2:#fff;
  --ink:#000;
  --mute:#000;
  --faint:#000;
  --line:rgba(0,0,0,.16);
  --grid-ink:rgba(0,0,0,.065);
  --plate:rgba(0,0,0,.035);
  --shot-bd:#080c16;
  --frame-max:1036px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#000;
    --bg-2:#000;
    --ink:#fff;
    --mute:#fff;
    --faint:#fff;
    --line:rgba(255,255,255,.2);
    --grid-ink:rgba(255,255,255,.075);
    --plate:rgba(255,255,255,.045);
    color-scheme:dark;
  }
  :root:not([data-theme="light"]) .nav-logo img,
  :root:not([data-theme="light"]) .badge img,
  :root:not([data-theme="light"]) .foot-cell img{
    filter:invert(1);
  }
  :root:not([data-theme="light"]) .nav-logo img{
    filter:invert(1) brightness(1.05);
  }
}
[data-theme="dark"]{
  --bg:#000;
  --bg-2:#000;
  --ink:#fff;
  --mute:#fff;
  --faint:#fff;
  --line:rgba(255,255,255,.2);
  --grid-ink:rgba(255,255,255,.075);
  --plate:rgba(255,255,255,.045);
  color-scheme:dark;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:"Archivo",system-ui,sans-serif;
  color:var(--ink);
  background:
    linear-gradient(var(--grid-ink) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid-ink) 1px,transparent 1px),
    linear-gradient(var(--grid-ink) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid-ink) 1px,transparent 1px),
    var(--bg);
  background-size:112px 112px,112px 112px,28px 28px,28px 28px,auto; /* graph paper */
  /* At the capped desktop width, the vertical graph lines land on both
     frame edges. The two offsets compensate for each layer's tile width. */
  background-position:0 0,calc(50% + 70px) 0,0 0,calc(50% + 28px) 0,0 0;
  transition:background-color .25s,color .25s;
  overflow-x:hidden;
}
img,video{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
::selection{background:var(--ink);color:var(--bg)}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

.display{font-family:"Archivo",sans-serif;font-weight:600;line-height:.98;letter-spacing:-.035em}
.mono{font-family:"Space Mono",monospace;font-size:11px;letter-spacing:.12em;text-transform:uppercase}
.mute{color:var(--mute)}
.skip{position:absolute;left:-9999px;top:0;z-index:200;background:var(--ink);color:var(--bg);padding:10px 16px}
.skip:focus{left:0}

.frame{width:min(100%,var(--frame-max));margin-inline:auto;border-inline:1px solid var(--line);position:relative;container:site-frame / inline-size}

/* ---- nav -------------------------------------------------------------- */
.nav{position:sticky;top:0;z-index:50;display:flex;align-items:stretch;height:112px;border-bottom:1px solid var(--line);background:var(--bg)}
.nav-cell{display:flex;align-items:flex-end;padding:10px 16px 12px;border-right:1px solid var(--line);font-family:"Space Mono",monospace;font-size:11px;letter-spacing:.12em;text-transform:uppercase;position:relative;white-space:nowrap}
.nav-logo{align-items:center;padding:0 1px;flex:0 0 111px}
.nav-logo img{height:108px;width:108px;max-width:none;flex:none}
[data-theme="dark"] .nav-logo img{filter:invert(1) brightness(1.05)}
.nav-spacer{flex:1;border-right:1px solid var(--line)}
.nav-link{padding-bottom:18px}
.nav-link:hover{color:var(--mute);background:var(--bg-2)}
.nav-cta{background:var(--ink);color:var(--bg);font-weight:700;padding:10px 20px 12px;border-right:0;align-items:flex-end}
.nav-cta:hover{opacity:.85}
.nav-cta:disabled{cursor:not-allowed;opacity:.45}
/* Whatever ends the bar owns no right rule. `.nav-cta` carried `border-right:0` itself, so this
   was invisible until sign in was hidden and the theme toggle became last — its own right border
   then landed a pixel from the frame's, drawing a double line at the masthead's edge. */
.nav>:last-child{border-right:0}
.nav-theme{align-items:flex-end;padding:10px 15px 12px;font-size:15px;line-height:1;font-family:"Archivo"}
.nav-theme:hover{background:var(--bg-2)}

.nav-burger{display:none;align-items:flex-end;padding:10px 16px 15px;font-size:15px;line-height:1}
.m-menu{display:none;border-bottom:1px solid var(--line);background:var(--bg)}
.m-menu.open{display:block}
.m-menu a{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:15px 18px;border-bottom:1px solid var(--line);font-family:"Space Mono",monospace;font-size:12px;letter-spacing:.12em;text-transform:uppercase}
.m-menu a span{color:var(--faint);font-size:10px}
.m-menu a:last-child{border-bottom:0}

/* ---- mega headline ---------------------------------------------------- */
.mega-band{display:flex;align-items:center;justify-content:center;border-bottom:1px solid var(--line);padding:clamp(8px,1.2vw,18px) clamp(8px,1vw,16px) clamp(6px,.9vw,14px);overflow:hidden;--mega-max-h:0px}
.mega{display:block;width:max-content;margin:0 auto;text-align:center;white-space:nowrap;user-select:none;line-height:.94;font-family:"Audiowide","Archivo",sans-serif;font-weight:400;letter-spacing:0}
/* A masthead that names a product links to it (/app/: CTRLbot IoT to Google Play). */
.mega a{color:inherit;text-decoration:none}
.mega a:is(:hover,:focus-visible){color:var(--accent)}
.mega-sub{display:flex;justify-content:center;align-items:center;gap:14px;padding:10px 18px 14px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.badge{display:inline-flex;align-items:center;gap:10px;border:1px solid var(--ink);border-radius:999px;padding:6px 18px}
.badge img{height:18px;width:18px}
[data-theme="dark"] .badge img{filter:invert(1)}

/* Homepage menu-section dividers: opaque two-square panels, and the only horizontal
   divisions on that page. No homepage row carries a tag strip, so every functional label
   a section needs is on its bar.

   The bar is divided into blocks on the same column line the row beneath it already
   uses — `16fr 10fr`, the checkerboard's own split. The title takes the wide block and
   the row's labels share the narrow one, so on THE CTRLbot and THE LIBRARY the title sits
   over the video and the labels over the copy. THE APP and THE AI reverse their row, and
   the title deliberately keeps the wide block rather than following the media: four
   titles on one line beats four titles that alternate sides. */
.home-section-bar{height:56px;display:grid;grid-template-columns:4fr 3fr;background:var(--bg);color:var(--ink);border-bottom:1px solid var(--line)}
.home-section-bar#ai{border-top:1px solid var(--line)}
.home-section-bar>*{display:flex;align-items:center;justify-content:center;min-width:0;padding:0 12px;overflow:hidden;white-space:nowrap}
.home-section-bar h2{font-family:"Space Mono",monospace;font-size:11px;font-weight:400;line-height:1;letter-spacing:.12em}
/* The labels split their block between them, each one its own cell with the same grey
   rule the rest of the grid uses. One label takes the whole block. */
.home-section-bar .bar-meta{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);padding:0;border-left:1px solid var(--line)}
.home-section-bar .bar-meta>*{display:flex;align-items:center;justify-content:center;min-width:0;padding:0 10px;overflow:hidden;white-space:nowrap;color:var(--mute)}
.home-section-bar .bar-meta>*+*{border-left:1px solid var(--line)}
.home-section-bar .bar-state::after{content:"";display:inline-block;width:1em;height:1em;margin-left:8px;background:var(--pri-green)}
/* The app's own casing, not the mono strip's uppercase. */
.home-section-bar#app .fn{text-transform:none}
.home-section-bar[id]{scroll-margin-top:112px}
/* ---- DUAL TICKERS — both rails share one clock ------------------------- */
.ticker{overflow:hidden;border-bottom:1px solid var(--line);padding:9px 0;background:var(--bg)}
.tick-track{display:flex;gap:26px;width:max-content;animation:tick 26s linear infinite}
.tick-track span{white-space:nowrap;color:var(--mute)}
.tick-track .sl{color:var(--ink);font-weight:700}
@keyframes tick{to{transform:translateX(-50%)}}

.drive-ticker{overflow:hidden;border-bottom:1px solid var(--line);background:var(--bg)}
.drive-track{display:flex;width:max-content;animation:tick 26s linear infinite;will-change:transform}
.drive-set{display:flex;width:max-content}
.drive-card{position:relative;width:clamp(250px,27vw,420px);min-height:200px;padding:18px;display:flex;flex-direction:column;justify-content:flex-end;gap:8px;border-right:1px solid var(--line);transition:background .14s,color .14s}
.drive-card .no{position:absolute;top:16px;left:18px;color:var(--faint)}
.drive-card b{font-family:"Archivo",sans-serif;font-weight:600;font-size:clamp(16px,1.65vw,24px);letter-spacing:-.02em}
.drive-card small{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--mute)}
.drive-card:hover{background:var(--ink);color:var(--bg)}
.drive-card:hover .no,.drive-card:hover small{color:var(--bg)}
.drive-card[href]::after{content:"→";position:absolute;right:18px;top:14px;font-size:18px}

/* ---- hero ------------------------------------------------------------- */
.hero{display:grid;grid-template-columns:1.55fr 1fr;border-bottom:1px solid var(--line);position:relative}
.hero-video{border-right:1px solid var(--line);background:#000;position:relative;min-height:320px}
.hero-video video,.hero-video>img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}
.hero-video .vid-tag{position:absolute;left:14px;bottom:12px;color:#fff;z-index:2;background:rgba(0,0,0,.55);padding:4px 8px}
:is(.hero-video, .media) .vid-btn{position:absolute;right:12px;bottom:12px;z-index:3;color:#fff;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.4);padding:5px 12px;font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;cursor:pointer;transition:background .14s,color .14s}
:is(.hero-video, .media) .vid-btn:hover{background:#fff;color:#000}
.hero-info{display:flex;flex-direction:column}
.hero-meta{display:flex;justify-content:space-between;gap:16px;padding:12px 18px;border-bottom:1px solid var(--line)}
.hero-meta .live::after{content:"■";color:var(--pri-green);margin-left:8px}
.hero-copy{padding:20px 18px;font-size:clamp(16px,1.4vw,19px);line-height:1.45}
.hero-meter{flex:1;min-height:140px;border-top:1px solid var(--line);position:relative;padding:34px 18px 10px}
.meter-label{position:absolute;top:10px;left:18px}
.meter-label b{color:var(--ink);font-weight:400}
.meter{display:flex;align-items:flex-end;gap:3px;height:100%;min-height:96px;cursor:crosshair}
.meter i{flex:1;min-width:3px;height:12%;transition:height .12s linear}
.hero-cta{border-top:1px solid var(--line);padding:14px 18px;display:grid;gap:10px}
.btn{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;border:1px solid var(--ink)}
.btn-solid{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.btn-solid:hover{opacity:.85}
.btn-ghost:hover{background:var(--bg-2)}

/* Homepage opening pass: the 4:3 media and 1:1 copy are the same height because their
   desktop columns are 4fr 3fr. The intro reuses the site's panel grammar.
   MEDIA RATIO RULE: a media cell takes the ratio of its row slot (4:3 in the wide slot,
   1:1 in the square slot) on desktop and keeps it when stacked on phones. */
.home-hero{grid-template-columns:4fr 3fr}
.home-hero .hero-video{aspect-ratio:4/3;min-height:0}
.home-hero .hero-info{aspect-ratio:1;min-width:0;min-height:0;overflow:hidden}
/* The opening film sits under the company row, which is media-left, so it is flipped the
   way an even board row is: 4:3 copy in the wide column, the film square in the narrow one,
   so the column line runs straight down from the row above. The 16:10 film is cropped to
   the square by `object-fit:cover`, and stays square when stacked. */
.home-hero.flip .hero-video{aspect-ratio:1}
@media (min-width:801px) and (orientation:landscape){
  .home-hero.flip .hero-video{order:2;border-right:0;border-left:1px solid var(--line)}
  .home-hero.flip .hero-info{aspect-ratio:4/3}
}
/* The square is the copy and nothing else. Its tag strip — two 11px labels in a box that
   ran to 140px — is in the THE CTRLbot bar above the row, so the whole square is the beats'
   now and the phone layout runs the film straight into the words. */
.home-intro .panel-body{justify-content:center;align-items:flex-start;gap:clamp(9px,3cqi,16px);padding:clamp(20px,4cqi,36px) clamp(32px,10cqi,64px)}

/* Homepage-only continuous checkerboard. Source order is media then text; nth-child or
   .flip owns the reversal. Rows pair a 4:3 cell with a 1:1 cell (4fr 3fr) and the shapes
   swap on alternate rows, so media is 4:3 or 1:1 per slot. A square render is its own
   composition, not a crop of the wide one. The cells agree on row height by arithmetic:
   4:3 of 4W/7 is 3W/7, the square column's width. */
.loop-board .unit{grid-template-columns:minmax(0,4fr) minmax(0,3fr)}
.loop-board .unit>.media{aspect-ratio:4/3;min-height:0}
.loop-board .unit>.panel{aspect-ratio:1;min-height:0;overflow:hidden}
.loop-board .unit.flip>.media{aspect-ratio:1}
.loop-board .unit.flip>.panel{aspect-ratio:4/3}
/* The cell and the render share an aspect, so `cover` crops nothing here — it is what
   makes the video fill a box whose height comes from the grid rather than from the
   file, which is the opposite of how `.media.loop` behaves on its own. */
:is(.loop-board,.home-board) .media.loop>video{width:100%;height:100%;object-fit:cover;max-height:none}

/* Homepage product showcase: THE APP and THE AI use wide text-left and square
   media-right around the three synchronized EUI rows. */
.home-app-showcase .home-wide-copy{width:100%;grid-template-columns:minmax(0,4fr) minmax(0,3fr)}
.home-app-showcase .home-wide-copy>.media{order:2;aspect-ratio:1;border-right:0;border-left:1px solid var(--line)}
.home-app-showcase .home-wide-copy>.panel{aspect-ratio:4/3;min-height:0;overflow:hidden}
.home-app-showcase .unit>.panel .panel-body{justify-content:center;align-items:flex-start;gap:clamp(9px,3cqi,16px);padding:clamp(20px,4cqi,36px) clamp(32px,10cqi,64px)}
.home-board .unit{grid-template-columns:4fr 3fr}
.home-board .unit:nth-child(even){grid-template-columns:4fr 3fr}
.home-board .unit>.media{aspect-ratio:4/3;min-height:0}
.home-board .unit>.panel{aspect-ratio:1;min-height:0;overflow:hidden}
.home-board .unit:nth-child(even)>.media{order:2;aspect-ratio:1;border-right:0;border-left:1px solid var(--line)}
.home-board .unit:nth-child(even)>.panel{aspect-ratio:4/3}
/* A row in a wall of its own still has to alternate with the row next to it, which
   `:nth-child` cannot see, so it takes `.flip`: the same shapes as an even row. */
.home-board .unit.flip>.media{aspect-ratio:1}
.home-board .unit.flip>.panel{aspect-ratio:4/3}
.home-board .unit>.panel .panel-body{justify-content:center;align-items:flex-start;gap:clamp(9px,3cqi,16px);padding:clamp(20px,4cqi,36px) clamp(32px,10cqi,64px)}
.home-board .panel-body .sub{font-size:clamp(14px,4cqi,17px)}
.home-board .arrow-btn{padding:10px 16px;font-size:13px}
.panel-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.home-board .home-signal{border-top:0;display:flex;flex-direction:column;background:transparent;color:var(--ink)}
.home-signal .meter{min-height:0;flex:1}
/* The three levels, at homepage sizes. The timed `.lc-*` beats are in here with the static
   `.home-block-*` blocks because on this page they are the same block — but only here: the
   bare `.loop-copy .lc-*` rules further down still serve `/app/`, whose loop panels give a
   third of their height to a tag strip and cannot take these sizes.

   Sizing is `cqi`, off the cell's own width, which left the square cells stuck on the clamp
   FLOOR — 12px body in a cell that was 31% full — while the wide cells sat on the ceiling.
   The coefficients are what moved (3->4.4, 4.3->5.6, 8.2->10.2), so the squares gained the
   most; the ceilings moved far less, because the wide cells were never the problem.
   `:is()` keeps these at three classes, ahead of `.loop-copy .lc-*`'s two. */
/* The headline is the block's one heading: the old Audiowide title and bold thought merged
   (2 November 2026), 5-12 words, so it wraps, balanced, rather than holding one line. */
:is(.home-intro,.home-app-showcase,.home-board,.loop-board) .panel-body :is(.home-block-title,.lc-title){font-family:"Archivo",sans-serif;font-weight:700;line-height:1.08;letter-spacing:-.01em;white-space:normal;text-wrap:balance;width:100%;max-width:100%;hyphens:none;-webkit-hyphens:none;font-size:clamp(16px,min(2.2vw,5cqi),26px)}
/* A product block names the product in its own wordmark face: Audiowide, large, one line
   (`product()` in tools/blocks.py). Four classes, so it beats the headline rule above
   and its phone override. */
:is(.home-intro,.home-app-showcase,.home-board,.loop-board) .panel-body .home-block-title.home-block-product{font-family:"Audiowide","Archivo",sans-serif;font-weight:400;letter-spacing:0;line-height:1.05;font-size:clamp(28px,min(4.4vw,10cqi),52px);white-space:nowrap;text-wrap:nowrap}
:is(.home-intro,.home-app-showcase,.home-board,.loop-board) .panel-body :is(.home-block-copy,.lc-body){font-size:clamp(13px,3.2cqi,16px);line-height:1.45;width:100%;max-width:100%;hyphens:none;-webkit-hyphens:none;word-break:normal;overflow-wrap:normal;text-align:justify;text-justify:inter-word;text-align-last:left}
.inline-link{font-weight:700;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.inline-link:hover{color:var(--mute)}

/* ==========================================================================
   THE UNIT — the site's only content layout
   ========================================================================== */
section{border-bottom:1px solid var(--line);position:relative}
section,.unit[id]{scroll-margin-top:112px}

/* left-aligned band that opens each wall */
.wall-head{display:grid;grid-template-columns:minmax(260px,.85fr) 1.15fr;align-items:end;border-bottom:1px solid var(--line)}
.wall-head .wh-title{padding:26px 20px 22px;display:flex;flex-direction:column;gap:12px}
.wall-head .way{color:var(--faint)}
.wall-head h2{font-size:clamp(26px,3.6vw,54px);line-height:1.02}
.wall-head .wh-copy{padding:26px 20px 22px;border-left:1px solid var(--line);font-size:clamp(15px,1.25vw,18px);line-height:1.5;color:var(--mute)}
.wall-head .wh-copy p{max-width:62ch}
.wall-head .chip{margin-top:14px}
.chip{border:1px solid var(--ink);padding:6px 16px;display:inline-block;font-family:"Space Mono",monospace;font-size:11px;letter-spacing:.12em;text-transform:uppercase}

/* the wall is just a stack of units; every border comes from the unit */
.wall{display:flex;flex-direction:column}

.unit{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line)}
.wall .unit:last-child{border-bottom:0}
.unit>.media{border-right:1px solid var(--line)}
.unit.flip>.media{order:2;border-right:0;border-left:1px solid var(--line)}

/* --- the media cell: image, video, or css graphic --- */
.media{position:relative;overflow:hidden;background:var(--shot-bd);min-height:clamp(230px,28vw,400px)}
.media>img,.media>video{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}
/* UI screenshots must not be cropped */
.media.fit{background:var(--shot-bd);display:grid;place-items:center;padding:18px}
.media.fit>img{position:static;width:100%;height:auto;max-height:100%;object-fit:contain}
.home-mirror-intro>.media.fit{background:#002334;padding:0}
/* Motion-graphic loops from CTRLbot-Remotion. This base rule preserves each render's
   intrinsic shape (16:10 wide or 1:1 square) when it is used outside a shaped wall.
   `.loop-board` below supplies matching 16:10 and 1:1 cells, including the deliberate
   mobile crop for the square composition. Keep adjacent copy concise so it remains
   comfortable inside the checkerboard shape. */
.media.loop{min-height:0;display:grid;place-items:center;background:#000}
.media.loop>video{position:static;width:100%;height:auto;max-height:100%;object-fit:contain}
/* Held in greyscale until the unit is scrolled to, then it takes colour as the loop
   starts and the copy streams in beside it. `[data-gated]` is set by site.js, so the
   video is never left desaturated for someone whose JS did not run. */
.media.loop>video[data-gated]{filter:grayscale(1) contrast(.92);transition:filter .9s ease}
.unit.lit .media.loop>video[data-gated]{filter:none}
/* The opening film takes colour the moment it is on screen rather than on the centre
   band, so it is never held grey on a page nobody has scrolled yet — see `eager` in
   site.js. It still desaturates behind you and lights again on the way back up. */
.hero-loop>video[data-gated]{filter:grayscale(1) contrast(.92);transition:filter .9s ease}
.hero.lit .hero-loop>video[data-gated]{filter:none}
/* Static homepage rows use the same visual gate as the loop panels. They remain in
   full colour without JavaScript; data-stream-once is the progressive enhancement. */
.unit[data-stream-once]>.media{filter:grayscale(1) contrast(.92);transition:filter .9s ease}
.unit[data-stream-once].media-lit>.media{filter:none}
.media .cap{position:absolute;left:14px;bottom:12px;z-index:2;color:#fff;background:rgba(0,0,0,.6);padding:4px 8px;font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase}
.media .cap .caret{background:#fff;height:11px}

/* --- copy that runs beside a loop ---------------------------------------------
   The same two levels as every other square block on the wall: a 5-12 word bold Archivo
   headline, then three to four sentences of body. These panels sit
   in the checkerboard, so they take the checkerboard's block format; what is particular
   to them is only that the block is timed, arriving with the loop and changing on the
   beat.

   It is black and white. This cell was briefly the exception to "colour lives in exactly
   two places" — a blue eyebrow rule and a CTRLbot-blue run inside the body, so it would
   read as the other half of the video's own frame — which made three panels the only
   coloured body text on the homepage and the only ones not in the block format. Both went
   on 2026-08-06 along with the eyebrow itself; see README.

   Timings are the video's, converted once: PromoCopy holds a word for 14 frames with
   a 2.4-frame stagger after a 16-frame delay, at 30fps. Do not tune these to taste
   here — the point is that the two halves move together. */
/* `.panel-body.loop-copy`, not `.loop-copy` — .panel-body sets display:flex further
   down this file at equal specificity, so a single class loses on source order and the
   beats stack vertically instead of overlapping. That reads as the cell being twice as
   tall as it should be, which pushes the row past the video's height and letterboxes
   the loop. Keep both classes on this selector. */
/* The explicit column is load-bearing. `.panel-body` further down sets
   `justify-content:center`, which in the flex column it was written for means "centre
   vertically" and in this grid means "centre the tracks horizontally". With no declared
   column the implicit one is content-sized, so on the wide 16:10 copy cell the whole
   block sat 169px in from the tag strip above it while the narrow cells looked fine.
   A 1fr track has nothing left to centre. */
.panel-body.loop-copy{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;padding:clamp(20px,4cqi,36px) clamp(32px,10cqi,64px)}
.panel-body.loop-copy>.arrow-btn{justify-self:start}
.loop-copy>.lc-beat{grid-area:1/1;display:flex;flex-direction:column;
  gap:clamp(9px,3cqi,16px);
  opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s}
.loop-copy>.lc-beat.is-live{opacity:1;visibility:visible}
/* Before JS pairs this with a video — and for anyone without it — the first beat
   stands, so the cell is never an empty box. */
.loop-copy:not([data-synced])>.lc-beat:first-child{opacity:1;visibility:visible}

/* Deliberately the same declarations as `.home-block-*` above rather than a shared
   selector list: those are scoped to the homepage wrappers, and these three panels also
   run on `/app/`, which has no `.home-` ancestor. Two classes, so they clear
   `.panel-body h3` and `.panel-body p` further down — both of which are one class plus
   one type and would otherwise win on specificity. `max-width` is left to `.panel-body p`
   for the same 48ch measure the static blocks get. */
.loop-copy .lc-title{font-family:"Archivo",sans-serif;font-weight:700;line-height:1.08;letter-spacing:-.01em;white-space:normal;text-wrap:balance;width:100%;max-width:100%;hyphens:none;-webkit-hyphens:none;
  font-size:clamp(16px,min(2.2vw,5cqi),26px)}
.loop-copy .lc-body{font-size:clamp(12px,3cqi,15px);line-height:1.45;
  width:100%;max-width:100%;hyphens:none;-webkit-hyphens:none;word-break:normal;overflow-wrap:normal;
  text-align:justify;text-justify:inter-word;text-align-last:left}

/* The animated state is scoped to [data-synced] — the attribute site.js sets once it
   has actually paired this cell with a video. Everything above is the resting, fully
   arrived block, so a reader with no JS gets a whole text block rather than an empty
   column that was waiting for an animation that never ran. */
/* The cell is empty until the unit lights. Both levels are held, not just the body:
   holding only the body left the headline sitting there in greyscale company, which
   gave the whole beat away before the block had arrived. */
.loop-copy[data-synced] .lc-title{opacity:0;translate:0 18px}
.loop-copy[data-synced] .lc-body{opacity:0;translate:0 12px}

/* `.unit.lit` gates the entry on the unit having reached the middle of the viewport,
   so nothing has finished arriving before anybody looks at it. Two steps, headline then
   the body as one block:

     headline  rising from 18px  0.00s + 0.50s
     body      rising from 12px  0.25s + 0.60s

   Until 2 November 2026 the body streamed a word at a time after a separate title and
   thought. It now fades in whole, so the whole beat window is reading time. */
/* `.hero` alongside `.unit` because the homepage opening runs the same timed cell from
   the hero grid rather than from a wall unit. One gate, two containers — do not let the
   two drift, or the opening block arrives on different rules from the ones below it. */
:is(.unit.lit,.hero.lit,.unit[data-streamed]) .loop-copy[data-synced] .lc-beat.is-live .lc-title{
  animation:lc-in .5s cubic-bezier(.16,1,.3,1) forwards}
:is(.unit.lit,.hero.lit,.unit[data-streamed]) .loop-copy[data-synced] .lc-beat.is-live .lc-body{
  animation:lc-in .6s cubic-bezier(.16,1,.3,1) .25s forwards}
/* Static homepage blocks share the loop choreography, but have only one block and no
   media clock. JavaScript adds data-stream-copy before observing them. */
.panel-body[data-stream-copy] .home-block-title{opacity:0;translate:0 18px}
.panel-body[data-stream-copy] .home-block-copy{opacity:0;translate:0 12px}
.panel-body[data-stream-copy]>.arrow-btn{opacity:0;translate:0 12px}
.unit[data-streamed] .panel-body[data-stream-copy] .home-block-title{
  animation:lc-in .5s cubic-bezier(.16,1,.3,1) forwards}
.unit[data-streamed] .panel-body[data-stream-copy] .home-block-copy{
  animation:lc-in .6s cubic-bezier(.16,1,.3,1) .25s forwards}
.unit[data-streamed] .panel-body[data-stream-copy]>.arrow-btn{
  animation:lc-in .5s cubic-bezier(.16,1,.3,1) .6s forwards}
@keyframes lc-in{to{opacity:1;translate:0 0}}

/* Speech-synchronized statement on Nathan portfolio */
.nathan-speech{font-family:"Archivo",sans-serif;font-size:clamp(20px,min(2.5vw,5.2cqi),32px);font-weight:700;line-height:1.24;letter-spacing:-.01em;color:var(--ink);margin:0;display:flex;flex-wrap:wrap;gap:clamp(5px,1.2cqi,8px) clamp(8px,1.6cqi,12px);align-items:baseline}
.nathan-speech>span{display:inline-block;opacity:0;translate:0 14px}
.nathan-speech .nathan-brand{font-family:"Audiowide","Archivo",sans-serif;font-weight:400;letter-spacing:0}
:is(.unit.lit,.hero.lit,.unit[data-streamed]) .loop-copy[data-synced] .lc-beat.is-live .nathan-speech>span{animation:lc-in .47s cubic-bezier(.16,1,.3,1) forwards;animation-delay:var(--delay,.53s)}
.nathan-cta{opacity:0;translate:0 12px;align-self:flex-start;margin-top:clamp(14px,3cqi,24px)}
:is(.unit.lit,.hero.lit,.unit[data-streamed]) .loop-copy[data-synced] .lc-beat.is-live .nathan-cta{animation:lc-in .5s cubic-bezier(.16,1,.3,1) 5.6s forwards}
.loop-copy:not([data-synced])>.lc-beat:last-child:not(:first-child){opacity:1;visibility:visible}
.loop-copy:not([data-synced]) .nathan-speech>span,
.loop-copy:not([data-synced]) .nathan-cta{opacity:1;translate:none}

/* 1:1 Mark Media block on Nathan portfolio */
.media.nathan-mark-media{display:grid;place-items:center;background:var(--ink);padding:clamp(24px,5vw,48px)}
.media.nathan-mark-media img{position:static;width:clamp(110px,20cqi,180px);height:auto;max-width:100%;object-fit:contain}
/* Holding the Connect-Diagram build rather than the static mark: the render is a whole
   1:1 picture with its own margins, not a logo that needs framing, so the tile gives up
   its padding and the video fills the cell. `contain` rather than `cover` because a build
   that loses its outer ring to a crop has lost the thing it is about — and letterboxing
   costs nothing here, since the render's ground and the tile are the same colour in both
   themes. */
.media.nathan-mark-media:has(>video){padding:0}
.media.nathan-mark-media>video{position:absolute;inset:0;width:100%;height:100%;max-width:100%;object-fit:contain}
/* The mark is white-on-black in the file and the tile is `--ink`, which flips with the
   theme — so the render flips with it. Inverting the whole frame is right rather than
   merely convenient: it is two tones and nothing else, so an invert is exactly the
   black-on-white cut of the same picture. */
[data-theme="dark"] .media.nathan-mark-media img,
[data-theme="dark"] .media.nathan-mark-media>video,
:root:not([data-theme="light"]) .media.nathan-mark-media img,
:root:not([data-theme="light"]) .media.nathan-mark-media>video{filter:invert(1)}

/* Connect card face on Nathan portfolio. Replaced the signal meter, which was
   decoration left over from the homepage hero: this is the page a business card
   QR lands on, so the cell carries the contact details themselves. Label/value
   pairs, not links, the panel beside it holds the buttons. */
.media.nathan-contact-media{
  display:flex;flex-direction:column;justify-content:center;
  background:var(--ink);color:var(--bg);border-top:1px solid var(--line);
  padding:44px clamp(18px,4cqi,34px) clamp(18px,4cqi,30px);
  container-type:inline-size;
}
.media.nathan-contact-media .meter-label{position:absolute;top:10px;left:18px}
.media.nathan-contact-media .meter-label b{color:inherit;font-weight:400}
.contact-rail{margin:0;display:flex;flex-direction:column;gap:clamp(7px,1.6cqi,13px)}
.contact-rail>div{
  display:grid;grid-template-columns:minmax(58px,26%) 1fr;
  gap:clamp(8px,2cqi,16px);align-items:baseline;
  padding-bottom:clamp(6px,1.4cqi,11px);border-bottom:1px solid currentColor;
}
.contact-rail>div:last-child{border-bottom:0;padding-bottom:0}
.contact-rail dt{
  color:inherit;font-size:clamp(11px,2.5cqi,13px);font-weight:600;
  letter-spacing:.06em;text-transform:uppercase;
}
/* Archivo, not the mono of the `connect // direct` label above them: these are literal
   identifiers someone has to read off a screen and type. The labels stay upper case;
   the values do not, since NATHAN@CTRLBOT.IO is harder to read and get right than the
   address as it is actually written. */
.contact-rail dd{
  margin:0;color:inherit;font-size:clamp(13px,3.2cqi,16px);
  overflow-wrap:anywhere;text-transform:none;
}
.contact-rail .brand-icon{width:1em;height:1em;vertical-align:-.12em;margin-right:.45em}
.contact-rail dd a:hover{opacity:.7}

/* Mirror window media on Nathan portfolio */
.media.nathan-mirror-media{background:#002334;overflow:hidden}
.media.nathan-mirror-media img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}


/* --- the text cell: tag strip over body ---------------------------------------
   The strip is `fn=None` on every homepage row, where the four section bars carry the
   labels instead and the whole cell is copy. Detail pages have no section bars, so the
   strip stays with the row it names. */
.panel{display:flex;flex-direction:column;background:var(--bg);min-width:0;container-type:inline-size}
.panel-top{position:relative;min-height:clamp(96px,11vw,150px);border-bottom:1px solid var(--line);flex:0 0 auto;overflow:hidden}
.panel-top::after{content:"";position:absolute;top:0;bottom:0;left:55%;width:1px;background:var(--line)}
.panel-top .fn{position:absolute;left:20px;bottom:12px;z-index:2;color:var(--mute)}
.panel-body{padding:clamp(20px,4cqi,36px) clamp(32px,10cqi,64px);display:flex;flex-direction:column;gap:clamp(9px,3cqi,16px);flex:1;justify-content:center}
.panel-body h3{font-family:"Archivo",sans-serif;font-weight:600;font-size:clamp(17px,1.9vw,26px);line-height:1.08;letter-spacing:-.02em}
.panel-body p{font-size:clamp(15px,1.25vw,19px);line-height:1.45;max-width:48ch}
.panel-body .sub{font-size:clamp(13px,1vw,15px);color:var(--mute);max-width:52ch;line-height:1.5}
.panel-body .chip{align-self:flex-start}

/* dense content still lives inside the text cell, so the rhythm holds */
.panel-list{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.panel-list div{display:flex;justify-content:space-between;align-items:baseline;gap:18px;padding:11px 0;border-bottom:1px solid var(--line)}
.panel-list div:last-child{border-bottom:0}
.panel-list b{font-family:"Archivo",sans-serif;font-weight:600;font-size:14px;white-space:nowrap}
.panel-list span{font-size:13px;line-height:1.45;color:var(--mute);text-align:right}

.arrow-btn{align-self:flex-start;border:1px solid var(--ink);padding:11px 17px;font-size:13px;font-weight:600;display:inline-flex;gap:10px;align-items:center;background:var(--bg)}
.arrow-btn:hover{background:var(--ink);color:var(--bg)}

/* a whole unit can be a link */
a.unit .panel-body h3{transition:color .14s}
a.unit:hover>.panel{background:var(--ink);color:var(--bg)}
a.unit:hover>.panel .fn,a.unit:hover>.panel .sub,a.unit:hover>.panel .panel-list span{color:var(--bg)}
a.unit:hover>.panel .arrow-btn{background:var(--bg);color:var(--ink)}
/* Homepage template rows remain theme-coloured when the linked block is hovered. */
.home-board a.unit:hover>.panel,
.home-app-showcase a.unit:hover>.panel{background:var(--bg);color:var(--ink)}
.home-board a.unit:hover>.panel .fn,
.home-board a.unit:hover>.panel .sub,
.home-board a.unit:hover>.panel .panel-list span,
.home-app-showcase a.unit:hover>.panel .fn,
.home-app-showcase a.unit:hover>.panel .sub,
.home-app-showcase a.unit:hover>.panel .panel-list span{color:var(--mute)}
.home-board a.unit:hover>.panel .arrow-btn,
.home-app-showcase a.unit:hover>.panel .arrow-btn{background:var(--bg);color:var(--ink)}

/* ---- CSS graphics for media cells with no photo ------------------------ */
.plate{display:grid;place-items:center;background:
  linear-gradient(var(--grid-ink) 1px,transparent 1px),
  linear-gradient(90deg,var(--grid-ink) 1px,transparent 1px),
  var(--plate);
  background-size:28px 28px,28px 28px,auto;color:var(--ink)}
.plate .cap{background:var(--ink);color:var(--bg)}

/* rack elevation — the hardware you no longer need */
.pl-rack{display:flex;flex-direction:column;gap:9px;width:min(56%,300px)}
.pl-rack i{height:26px;border:1px solid currentColor;position:relative;opacity:.9}
.pl-rack i::before,.pl-rack i::after{content:"";position:absolute;top:50%;width:5px;height:5px;background:currentColor;transform:translateY(-50%)}
.pl-rack i::before{left:9px}.pl-rack i::after{right:9px}

/* big signal bars */
.pl-bars{display:flex;align-items:flex-end;gap:7px;height:min(46%,150px)}
.pl-bars i{width:14px;background:currentColor;animation:mm 1s ease-in-out infinite alternate}
.pl-bars i:nth-child(2){animation-delay:.1s}
.pl-bars i:nth-child(3){animation-delay:.2s}
.pl-bars i:nth-child(4){animation-delay:.3s}
.pl-bars i:nth-child(5){animation-delay:.4s}
.pl-bars i:nth-child(6){animation-delay:.5s}
.pl-bars i:nth-child(7){animation-delay:.6s}
@keyframes mm{from{height:14px}to{height:100%}}

/* routing matrix — inputs crossing to outputs */
.pl-matrix{display:grid;grid-template-columns:repeat(4,26px);gap:9px}
.pl-matrix i{aspect-ratio:1;border:1px solid currentColor;opacity:.45}
.pl-matrix i.on{background:currentColor;opacity:1}

/* padlock */
.pl-lock{width:74px;height:60px;border:3px solid currentColor;position:relative;margin-top:30px;border-radius:3px}
.pl-lock::before{content:"";position:absolute;left:50%;top:-31px;transform:translateX(-50%);width:44px;height:32px;border:3px solid currentColor;border-bottom:0;border-radius:22px 22px 0 0}
.pl-lock::after{content:"";position:absolute;left:50%;top:20px;transform:translateX(-50%);width:8px;height:18px;background:currentColor}

/* oversized glyph — ? ✕ etc */
.pl-glyph{font-family:"Audiowide","Archivo",sans-serif;font-size:clamp(72px,11vw,150px);line-height:1;user-select:none}

/* stacked driver profiles */
.pl-stack{display:flex;flex-direction:column;width:min(62%,320px)}
.pl-stack i{height:38px;border:1px solid currentColor;margin-bottom:-1px;position:relative;background:var(--bg)}
.pl-stack i::before{content:"";position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;border:1px solid currentColor}
.pl-stack i::after{content:"";position:absolute;right:12px;top:50%;transform:translateY(-50%);width:44%;height:1px;background:currentColor;opacity:.5}

/* the mark, large */
.pl-mark{width:min(52%,220px);height:auto}
[data-theme="dark"] .pl-mark{filter:invert(1)}

/* the assistant's blank page, rendered */
.pl-blank{background:#000;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:36px 24px}
.pl-blank img{width:56px;height:56px}
.pl-blank .box{width:min(100%,400px);border:1px solid rgba(255,255,255,.35);padding:14px 15px;display:flex;align-items:center;gap:9px;font-family:"Space Mono",monospace;font-size:12px;color:rgba(255,255,255,.6)}
.pl-blank .box .caret{background:#fff;height:14px;flex:0 0 auto}
.pl-blank .box span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pl-blank .note{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.45);text-align:center}

/* CTRLbot.AI homepage tile: the character sits in the composition instead of
   inheriting the direct-child image rule that pinned the old tricon to a corner. */
.pl-ai{background:var(--ink);color:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,1.5vw,22px);padding:clamp(24px,3vw,46px);transition:background-color .25s,color .25s}
.pl-ai .ai-mark{width:clamp(82px,8vw,128px);aspect-ratio:152/151;display:grid;place-items:center}
.pl-ai .ai-mark img{width:100%;height:100%;object-fit:contain;transition:filter .25s}
[data-theme="dark"] .pl-ai .ai-mark img{filter:invert(1)}
.pl-ai .box{width:min(100%,450px);border:1px solid currentColor;padding:14px 15px;display:flex;align-items:center;gap:9px;font-family:"Space Mono",monospace;font-size:12px;color:currentColor;opacity:.62}
.pl-ai .box .caret{background:currentColor;height:14px;flex:0 0 auto}
.pl-ai .box span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pl-ai .note{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:currentColor;opacity:.48;text-align:center}
.home-ai-intro .arrow-btn{margin-top:2px}

/* CTRLbot.AI itself, framed in the cell — see blocks.py `frame_ai`.

   Black behind the iframe rather than var(--ink): the embedded app opens on its DOS
   theme, whose own background is #000 in both site themes, so anything else here
   would show as a seam around it for the moment before it paints.

   The iframe fills the cell and the app lays itself out responsively inside it. It is
   deliberately not scaled down from a larger logical viewport: the app's own layout at
   this width is the same centred column, and a transform would only make its type
   fractional. */
.pl-ai-frame{background:#000;padding:0;overflow:hidden}
.pl-ai-frame iframe{display:block;width:100%;height:100%;border:0}

/* Dark mode keeps the checkerboard through the AI section.

   Every cell of both AI rows is black in dark mode: the loop is a black page by
   design, the frame is CTRLbot.AI's own DOS theme, and `.panel` carries no background
   of its own so it shows the black body through. Four black cells running is not a
   checkerboard, it is a slab — the alternation the whole wall is built on disappears
   exactly where the two media cells are darkest.

   Re-declaring the light palette on those two panels, rather than restyling their
   contents, is what keeps this to four lines. The headline, the body and the arrow
   button all already read these variables, so scoping them
   here flips the entire cell and nothing inside needs to know. `--line` is redeclared
   too, so the rules the panel draws *inside* itself stay dark-on-white; the unit's own
   grid borders are drawn by the unit and keep the page's theme.

   The media cells are deliberately untouched — the video and the framed app stay
   exactly as they are in both themes. */
[data-theme="dark"] #loop-ai>.panel,
[data-theme="dark"] .home-ai-intro>.panel{
  --bg:#fff;--bg-2:#fff;--ink:#000;--mute:#000;--faint:#000;
  --line:rgba(0,0,0,.16);--grid-ink:rgba(0,0,0,.065);--plate:rgba(0,0,0,.035);
  background:var(--bg);color:var(--ink);color-scheme:light
}

/* terminal workbench, as a media cell */
.pl-term{padding:clamp(18px,2.4vw,34px)}
.term{border:1px solid var(--ink);background:var(--bg);width:100%;max-width:520px}
.term-bar{display:flex;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--ink)}
.term-body{padding:14px 12px 18px;font-family:"Space Mono",monospace;font-size:12px;min-height:110px}
.term-body .prompt{color:var(--ink);font-weight:700}
.term-out{color:var(--mute);margin-top:8px}
.caret{display:inline-block;width:7px;height:13px;background:var(--ink);animation:blink 1s steps(1) infinite;vertical-align:-2px}
@keyframes blink{50%{opacity:0}}

/* the question demo, as a media cell */
.pl-qa{padding:clamp(18px,2.4vw,34px)}
.qa{border:1px solid var(--ink);background:var(--bg);width:100%;max-width:520px}
.qa-bar{display:flex;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--ink)}
.qa-body{padding:16px 14px 18px;display:flex;flex-direction:column;gap:12px}
.qa-line{font-size:14px;line-height:1.45}
.qa-line .who{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint);display:block;margin-bottom:4px}
.qa-opts{display:flex;gap:8px;flex-wrap:wrap}
.qa-opts button{border:1px solid var(--ink);padding:7px 16px;font-family:"Space Mono",monospace;font-size:11px;letter-spacing:.12em;text-transform:uppercase}
.qa-opts button:hover,.qa-opts button.on{background:var(--ink);color:var(--bg)}

/* small marks that sit inside a panel-top */
.panel-top .mini-meter{position:absolute;left:20px;top:18px;display:flex;align-items:flex-end;gap:2px;height:26px;z-index:2}
.panel-top .mini-meter i{width:4px;background:var(--ink);animation:mm2 1s ease-in-out infinite alternate}
.panel-top .mini-meter i:nth-child(2){animation-delay:.12s}
.panel-top .mini-meter i:nth-child(3){animation-delay:.24s}
.panel-top .mini-meter i:nth-child(4){animation-delay:.36s}
.panel-top .mini-meter i:nth-child(5){animation-delay:.48s}
.panel-top .mini-meter i:nth-child(6){animation-delay:.6s}
@keyframes mm2{from{height:5px}to{height:26px}}

/* ---- auth form (lives inside a panel) ---------------------------------- */
.auth-form{display:flex;flex-direction:column;gap:14px;width:100%}
.field{display:flex;flex-direction:column;gap:7px}
.field label{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint)}
.field input,.field textarea{font-family:"Space Mono",monospace;font-size:13px;padding:13px 14px;border:1px solid var(--line);background:var(--bg);color:var(--ink);width:100%;border-radius:0}
.field textarea{min-height:150px;resize:vertical;line-height:1.5}
.field input:focus,.field textarea:focus{outline:0;border-color:var(--ink)}
.auth-note{font-size:12px;line-height:1.55;color:var(--mute);border-top:1px solid var(--line);padding-top:14px}
.auth-msg{font-family:"Space Mono",monospace;font-size:11px;letter-spacing:.06em;border:1px solid var(--ink);padding:11px 14px;display:none}
.auth-msg.on{display:block}

/* ---- connect page ------------------------------------------------------ */
.connect-grid{display:grid;grid-template-columns:1fr 1fr;background:var(--bg);border-bottom:1px solid var(--line)}
.connect-col{padding:clamp(28px,4vw,48px);display:flex;flex-direction:column;gap:18px;background:var(--bg)}
.connect-col:first-child{border-right:1px solid var(--line)}
.connect-col h2,.connect-col h3{font-family:"Audiowide","Archivo",sans-serif;font-weight:400;font-size:clamp(18px,2.2vw,24px);letter-spacing:0;text-transform:uppercase}
.connect-thought{font-family:"Archivo",sans-serif;font-weight:700;font-size:clamp(12px,1.4vw,15px);letter-spacing:.04em;text-transform:uppercase;color:var(--ink)}
.connect-body{font-size:clamp(13px,1.3vw,15px);line-height:1.5;color:var(--ink)}
.connect-meta{display:flex;flex-direction:column;gap:12px;margin-top:auto;padding-top:18px;border-top:1px solid var(--line)}
.connect-meta-item{display:flex;flex-direction:column;gap:4px}
.connect-meta-item span{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint)}
.connect-meta-item b{font-family:"Space Mono",monospace;font-size:12px;font-weight:400;color:var(--ink)}
.connect-col .arrow-btn{margin-top:4px}

/* ---- privacy policy page ----------------------------------------------- */
.policy-doc{background:var(--bg);padding:clamp(28px,5vw,60px) clamp(24px,5vw,56px);display:flex;flex-direction:column;gap:36px;border-bottom:1px solid var(--line)}
.policy-header{display:flex;flex-direction:column;gap:12px;padding-bottom:24px;border-bottom:1px solid var(--line)}
.policy-header .policy-meta{display:flex;flex-wrap:wrap;gap:8px 20px;font-family:"Space Mono",monospace;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint)}
.policy-lead{font-size:clamp(15px,1.4vw,17px);line-height:1.6;color:var(--ink)}

.policy-body{display:flex;flex-direction:column;gap:32px}
.policy-section{display:flex;flex-direction:column;gap:10px}
.policy-section h2{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:700;font-size:clamp(16px,1.8vw,20px);letter-spacing:.02em;text-transform:uppercase;color:var(--ink);margin:0}
.policy-section p{font-size:clamp(14px,1.3vw,16px);line-height:1.6;color:var(--ink);margin:0}
.policy-section p+p{margin-top:8px}
.policy-doc code{font-family:"Space Mono",monospace;font-size:12px;padding:2px 6px;border:1px solid var(--line);background:var(--plate)}

/* ---- nathan portfolio page --------------------------------------------- */
.portfolio-grid{display:grid;grid-template-columns:1.5fr 1fr;background:var(--bg);border-bottom:1px solid var(--line)}
.portfolio-col{padding:clamp(28px,4vw,48px);display:flex;flex-direction:column;gap:18px;background:var(--bg)}
.portfolio-col:first-child{border-right:1px solid var(--line)}
.portfolio-col h2,.portfolio-col h3{font-family:"Audiowide","Archivo",sans-serif;font-weight:400;font-size:clamp(18px,2.2vw,24px);letter-spacing:0;text-transform:uppercase}
.portfolio-thought{font-family:"Archivo",sans-serif;font-weight:700;font-size:clamp(12px,1.4vw,15px);letter-spacing:.04em;text-transform:uppercase;color:var(--ink)}
.portfolio-body{font-size:clamp(13px,1.3vw,15px);line-height:1.6;color:var(--ink);display:flex;flex-direction:column;gap:12px}
.portfolio-body p{margin:0}
.portfolio-body strong{color:var(--ink);font-weight:700}
.portfolio-meta{display:flex;flex-direction:column;gap:16px;background:var(--plate);padding:clamp(18px,2.5vw,24px);border:1px solid var(--line)}
.portfolio-meta-item{display:flex;flex-direction:column;gap:4px}
.portfolio-meta-item span{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint)}
.portfolio-meta-item b{font-family:"Space Mono",monospace;font-size:12px;font-weight:400;color:var(--ink)}
.portfolio-col .arrow-btn{margin-top:auto}

.platform-grid{display:grid;grid-template-columns:repeat(3,1fr);background:var(--bg);border-bottom:1px solid var(--line)}
.platform-card{padding:clamp(24px,3.5vw,36px);display:flex;flex-direction:column;gap:14px;background:var(--bg);border-right:1px solid var(--line)}
.platform-card:last-child{border-right:0}
.platform-card .card-tag{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint)}
.platform-card h3{font-family:"Audiowide","Archivo",sans-serif;font-weight:400;font-size:clamp(16px,1.8vw,20px);letter-spacing:0;text-transform:uppercase;color:var(--ink)}
.platform-card .card-thought{font-family:"Archivo",sans-serif;font-weight:700;font-size:clamp(11px,1.2vw,13px);letter-spacing:.04em;text-transform:uppercase;color:var(--ink)}
.platform-card p{font-size:clamp(13px,1.25vw,14px);line-height:1.55;color:var(--ink);flex-grow:1;margin:0}
.platform-card .arrow-btn{margin-top:auto}

.channel-grid{display:grid;grid-template-columns:repeat(4,1fr);background:var(--bg);border-bottom:1px solid var(--line)}
.channel-card{padding:clamp(20px,2.5vw,28px);display:flex;flex-direction:column;gap:8px;background:var(--bg);border-right:1px solid var(--line);text-decoration:none;color:var(--ink);transition:background .15s}
.channel-card:last-child{border-right:0}
.channel-card:hover{background:var(--plate)}
.channel-card .ch-label{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint)}
.channel-card .ch-val{font-family:"Space Mono",monospace;font-size:clamp(12px,1.2vw,13px);color:var(--ink);display:flex;align-items:center;justify-content:space-between;word-break:break-all}
.channel-card .ch-val span{color:var(--accent)}

/* ---- status strip ------------------------------------------------------ */
.status{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px 24px;padding:12px 18px;background:var(--ink);color:var(--bg);border-bottom:1px solid var(--line)}
.status .dot{color:var(--pri-green);animation:pulse 1.6s infinite}
@keyframes pulse{50%{opacity:.25}}

/* ---- manifesto --------------------------------------------------------- */
.creed{padding:clamp(28px,4vw,60px) 18px;text-align:center;display:flex;flex-direction:column;gap:10px}
.creed h3{font-size:clamp(18px,3vw,44px)}
.creed h3 em{font-style:normal;color:var(--faint)}
.creed .sig{margin-top:18px;color:var(--mute)}

/* ---- contact + footer -------------------------------------------------- */
.contact{display:block;background:var(--ink);color:var(--bg);padding:clamp(36px,6vw,90px) 18px;text-align:center;position:relative;overflow:hidden}
.contact .mono{color:var(--faint)}
.contact b{display:block;font-family:"Audiowide","Archivo",sans-serif;font-weight:400;font-size:clamp(20px,4.4vw,70px);line-height:1.05;margin-top:14px;transition:letter-spacing .3s}
.contact:hover b{letter-spacing:.02em}
.foot-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;border-bottom:1px solid var(--line)}
.foot-cell{border-right:1px solid var(--line);padding:20px 18px;display:flex;flex-direction:column;gap:10px}
.foot-cell:last-child{border-right:0}
.foot-logo{display:block;line-height:0}
.foot-cell img{max-width:min(382px,100%);height:auto}
.foot-tagline{margin-left:14px}
[data-theme="dark"] .foot-cell img{filter:invert(1)}
.foot-cell a:hover{color:var(--mute)}
.foot-cell .hd{color:var(--faint)}
.legal{display:flex;justify-content:space-between;gap:16px;padding:12px 18px}

/* ---- motion ------------------------------------------------------------ */
.reveal{transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1)}
html.js .reveal:not(.in){opacity:0;transform:translateY(26px)}
.reveal-img{transition:clip-path .9s cubic-bezier(.16,1,.3,1)}
html.js .reveal-img:not(.in){clip-path:inset(100% 0 0 0)}
@media (prefers-reduced-motion:reduce){
  .reveal,.reveal-img{opacity:1;transform:none;clip-path:none;transition:none}
  .tick-track,.drive-track,.mini-meter i,.pl-bars i{animation:none}
  .pl-bars i{height:60%}
  html{scroll-behavior:auto}
}
#mf{position:fixed;inset:0;pointer-events:none;z-index:90}
.mf{position:absolute;top:0;left:0;display:grid;place-items:center;font-family:"Space Mono",monospace;font-size:9px;color:var(--ink);will-change:transform;opacity:0;transition:opacity .4s}

/* ---- responsive -------------------------------------------------------- */
@container site-frame (min-width:1034px){
  .mega-band{height:140px;padding:0 16px;--mega-max-h:116px}
  .loop-board .panel-top{min-height:150px;flex-basis:150px}   /* /app/ only — the homepage has none */
  .home-ai-intro .pl-ai{gap:22px;padding:46px}
  .home-ai-intro .ai-mark{width:128px}
  .home-board .pl-term,.home-board .pl-qa{padding:34px}
  .home-board .pl-glyph{font-size:150px}
}
@media (min-width:801px) and (max-width:979px) and (orientation:landscape){
  .home-intro .panel-body{padding:10px clamp(20px,5cqi,36px);gap:4px}
  .loop-board .panel-top{min-height:32px}
  .home-app-showcase .home-wide-copy>.panel .panel-body,
  .home-board .unit>.panel .panel-body,
  .loop-board .panel-body{padding:8px clamp(18px,4.5cqi,32px);gap:4px}
  .loop-copy>.lc-beat{gap:4px}
}
@media (max-width:800px){
  .nav{height:112px}
  .nav-cell{padding:10px clamp(8px,2vw,14px) 18px;font-size:clamp(9px,2.2vw,11px);letter-spacing:.08em}
  .nav-logo{flex:0 0 auto;padding:0 2px}
  .nav-logo img{height:clamp(68px,16vw,108px);width:clamp(68px,16vw,108px)}
  .nav-theme{padding:10px clamp(8px,2vw,15px) 12px;font-size:14px}
  .nav-cta{padding-inline:8px}
  .nav-burger,.m-menu{display:none}
}
/* Keep the complete navigation visible on narrow phones. */
@media (max-width:375px){
  .nav-link{padding-inline:3px;letter-spacing:0}
  .nav-theme,.nav-cta{padding-inline:4px}
  .nav-cta{letter-spacing:0}
}
@media (max-width:800px), (orientation:portrait){
  .hero{grid-template-columns:1fr}
  .hero-video{border-right:0;border-bottom:1px solid var(--line);min-height:240px}
  .home-hero .hero-video{min-height:0}
  .home-hero .hero-info{aspect-ratio:auto;min-height:0;overflow:visible}
  .home-intro .panel-body{padding:16px clamp(24px,6vw,40px) 18px;gap:8px}
  .foot-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .foot-cell{min-width:0;border-bottom:1px solid var(--line)}
  .foot-cell:first-child{grid-column:1 / -1}
  .drive-card{width:min(78vw,340px);min-height:180px}
  .wall-head{grid-template-columns:1fr}
  .wall-head .wh-copy{border-left:0;border-top:1px solid var(--line)}

  /* THE RULE: media always sits above its text box */
  .unit{grid-template-columns:1fr}
  .unit>.media,.unit.flip>.media{order:0;border-right:0;border-left:0;border-bottom:1px solid var(--line)}
  .media{min-height:clamp(220px,58vw,420px)}

  /* The stacked layout keeps each media cell's desktop slot ratio (4:3 wide, 1:1 square;
     no override here), so a render authored for its slot is never re-cropped.
     Copy gives up its desktop aspect and grows to the height its words need. */
  .loop-board .unit,.loop-board .unit.flip{grid-template-columns:1fr}
  .loop-board .unit>.media,.loop-board .unit.flip>.media{order:0}
  .loop-board .unit>.panel,.loop-board .unit.flip>.panel{aspect-ratio:auto;overflow:visible}
  .home-app-showcase .home-wide-copy{grid-template-columns:1fr}
  .home-app-showcase .home-wide-copy>.media{order:0;border-right:0;border-left:0;border-bottom:1px solid var(--line)}
  .home-app-showcase .home-wide-copy>.panel{aspect-ratio:auto;overflow:visible}
  .home-app-showcase .home-wide-copy>.panel .panel-body{padding:16px clamp(24px,6vw,40px) 18px;gap:8px}
  .media.fit{min-height:0;padding:14px}
  /* The row below has become one column, so there is no `16fr 10fr` line left to meet.
     The blocks size to their labels and the title takes what is left, which is what keeps
     three of them on one line on a 320px phone. */
  .home-section-bar{height:44px;grid-template-columns:minmax(0,1fr) auto}
  .home-section-bar .bar-meta{grid-auto-columns:auto}
  .panel-top{min-height:44px}
  .panel-body{padding:16px clamp(24px,6vw,40px) 18px;gap:8px}
  .panel-list span{text-align:left}
  .panel-list div{flex-direction:column;gap:4px;align-items:flex-start}
  .connect-grid{grid-template-columns:1fr}
  .connect-col:first-child{border-right:0;border-bottom:1px solid var(--line)}
  .connect-col{padding:clamp(20px,5vw,32px);gap:14px}
  .policy-doc{padding:clamp(20px,5vw,36px) clamp(16px,4vw,24px);gap:28px}
  .policy-body{gap:26px}
  .portfolio-grid{grid-template-columns:1fr}
  .portfolio-col:first-child{border-right:0;border-bottom:1px solid var(--line)}
  .portfolio-col{padding:clamp(20px,5vw,32px);gap:14px}
  .platform-grid{grid-template-columns:1fr}
  .platform-card{border-right:0;border-bottom:1px solid var(--line);padding:clamp(20px,5vw,32px)}
  .platform-card:last-child{border-bottom:0}
  .channel-grid{grid-template-columns:1fr 1fr}
  .channel-card{border-bottom:1px solid var(--line)}
  .channel-card:nth-child(2n){border-right:0}
  .channel-card:nth-last-child(-n+2){border-bottom:0}
}
@media (max-width:560px){
  .channel-grid{grid-template-columns:1fr}
  .channel-card{border-right:0!important;border-bottom:1px solid var(--line)!important}
  .channel-card:last-child{border-bottom:0!important}
}
/* Keep the complete navigation visible on narrow phones. */
@media (max-width:375px){
  .nav-link{padding-inline:3px;letter-spacing:0}
  .nav-theme,.nav-cta{padding-inline:4px}
  .nav-cta{letter-spacing:0}
}
@media (max-width:800px), (orientation:portrait){
  .home-board .unit,.home-board .unit:nth-child(even){grid-template-columns:1fr}
  .home-board .unit>.media,.home-board .unit:nth-child(even)>.media{
    order:0;border-right:0;border-left:0;border-bottom:1px solid var(--line)}
  .home-board .unit>.panel{aspect-ratio:auto;min-height:0;overflow:visible}
  .home-board .unit>.panel .panel-body{padding:14px clamp(24px,6vw,40px) 16px;gap:7px}
  .home-board .panel-body h3{font-size:clamp(18px,5vw,24px)}
  .home-board .panel-body p,.home-board .panel-body .sub{font-size:clamp(14px,3.9vw,17px);line-height:1.32}
  .home-board .arrow-btn{padding:9px 13px;font-size:12px}
  /* `/app/`'s loop beats, phone — unchanged. Two classes, so the homepage rule below wins
     wherever both match. */
  .loop-copy .lc-title{font-size:clamp(16px,4.6vw,22px)}
  .loop-copy .lc-body{font-size:clamp(11px,3vw,14px);line-height:1.36;width:100%;max-width:100%;hyphens:none;-webkit-hyphens:none;word-break:normal;overflow-wrap:normal;text-align:justify;text-justify:inter-word;text-align-last:left}
  /* Homepage sizes, phone. The panel has given up its aspect lock and grows to fit the
     copy, so these are set for reading rather than for fitting a box.

     The `.lc-*` selectors have to carry the same three classes as the desktop rule further
     up the file. `.loop-copy .lc-title` on its own is two classes and would lose to it,
     leaving the opening film and the EUI beats at desktop sizes on a phone. */
  :is(.home-intro,.home-app-showcase,.home-board,.loop-board) .panel-body :is(.home-block-title,.lc-title){font-size:clamp(16px,4.6vw,22px)}
  :is(.home-intro,.home-app-showcase,.home-board,.loop-board) .panel-body :is(.home-block-copy,.lc-body){font-size:clamp(12px,3.2vw,15px);line-height:1.36;width:100%;max-width:100%;hyphens:none;-webkit-hyphens:none;word-break:normal;overflow-wrap:normal;text-align:justify;text-justify:inter-word;text-align-last:left}
}
@media (max-width:620px){
  .pl-glyph{font-size:88px}
  .pl-lock{transform:scale(.85)}
  /* THE CTRLbot's three blocks are the widest the bar ever gets. Tightened rather than
     wrapped, so the bar stays one strip two graph squares tall. */
  .home-section-bar>*{padding-inline:8px}
  .home-section-bar .bar-meta>*{padding-inline:8px}
  .home-section-bar h2,.home-section-bar .bar-meta>*{font-size:10px;letter-spacing:.06em}
}
