/* ════════════════════════════════════════════════
   Hexvor — Design System
   ════════════════════════════════════════════════ */

/* The hidden attribute wins.
   It is defined in the browser's own stylesheet as display:none, which any
   class of ours that sets display beats on specificity — silently, and only
   for the elements that happen to have such a class. That is how the project
   visibility radios ended up on every dialogue that never asked for them:
   .prompt-choice sets display:flex, so `hidden` did nothing. Anything that
   needs to lay itself out while hidden must say so on its own selector. */
[hidden] { display: none !important; }

:root {
  /* Near-black, and one blue.
     The brand was orange and is now this: the decision was made looking at
     the design, and a brand colour is settled by whoever owns the brand, not
     argued from a stylesheet. Everything that was orange moved together —
     the fills, the gradients, the tints, the text on the fills — because a
     half-migrated palette is worse than either colour.
     The neutrals still lean warm by a hair, which under a cool accent reads
     as chosen rather than as a default grey. */
  --bg: #0a0908;
  --bg-1: #100e0d;
  --bg-2: #171513;
  --bg-3: #221f1c;
  --border: #302b27;
  --border-soft: #1f1c19;

  --text: #f0ebe6;
  --text-dim: #b3aaa2;
  --text-mute: #857c74;

  --brand: #1b4dd8;
  --brand-2: #4d7cf5;
  /* Text that sits on the brand fill. On the orange this had to be
     near-black — white on orange fails contrast at small sizes. On the blue
     it is the other way round, and it is the same reasoning, not a
     preference. */
  --on-brand: #ffffff;
  --accent: #9dbaff;
  --pink: #f472b6;
  --grad: linear-gradient(120deg, #1b4dd8 0%, #4d7cf5 60%, #9dbaff 120%);
  --grad-warm: linear-gradient(120deg, #4d7cf5, #1b4dd8 55%, #153fb4);
  --grad-soft: linear-gradient(120deg, rgba(27,77,216,0.16), rgba(157,186,255,0.12));

  /* Semantic colours, kept clear of the brand.
     Orange now means "this is the thing to press", so it cannot also mean
     "careful". Notices moved to a cool blue — the one hue nothing else here
     uses — and danger moved towards rose, because a red sitting next to a
     red-orange brand is two shades of the same warning. */
  --success: #3fbf7f;
  --warning: #58a6f0;
  --danger: #ff5f7e;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 12px 44px -14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 0 1px rgba(27,77,216,0.22), 0 24px 70px -20px rgba(27,77,216,0.3);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; line-height: 1.55; }
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ══════════ Buttons ══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 1px solid var(--border); background: var(--bg-3); color: var(--text);
  padding: 0.6rem 1.15rem; border-radius: var(--radius); font-size: 0.92rem; font-weight: 500;
  transition: transform 0.12s ease, background 0.18s, border-color 0.18s, box-shadow 0.18s; white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--grad); border: none; color: var(--on-brand); font-weight: 600; box-shadow: 0 8px 24px -8px rgba(27,77,216, 0.45); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 14px 34px -8px rgba(27,77,216, 0.6); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); border-color: var(--brand); }
.btn-success { background: var(--success); border-color: var(--success); color: var(--on-brand); font-weight: 600; }
.btn-lg { padding: 0.9rem 1.7rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.82rem; }
.btn-block { width: 100%; padding: 0.8rem; font-size: 0.98rem; }

.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--bg-3); color: var(--text); border-radius: 9px; font-size: 1.1rem; line-height: 1; transition: border-color 0.15s, background 0.15s; }
.icon-btn:hover { border-color: var(--brand); background: var(--bg-2); }
.logo-mark { display: inline-grid; place-items: center; filter: drop-shadow(0 2px 10px rgba(27,77,216, 0.45)); }
.logo-mark.lg { font-size: 2rem; }

/* ════════════════════════════════════════════════
   LANDING
   Scoped to .landing so the workspace keeps its own palette.
   ════════════════════════════════════════════════ */
/* The sign-in modal is a sibling of the landing, not a child of it, so it
   was reading none of these and painting itself in browser defaults — a blue
   checkbox on a product with its own accent. The palette belongs to both
   rooms. */
.landing, .auth-overlay {
  /* The same near-black and the same accent as the workspace: a landing page
     that looks like a different product from the thing it sells is the
     cheapest way to lose someone between the two. */
  /* The landing is light and the workspace is dark, deliberately.
     They are two different rooms: one is a shop window, read once by somebody
     deciding; the other is a workbench, looked at for an hour. A shop window
     that is dark asks a stranger to adjust to it before it has earned that.
     The accent is the brand blue, which is what the design asked for. The
     supplied mark files are still orange; they are images, so they change
     when somebody exports new ones — the logo, the
     favicon, the app and every screenshot already are this orange. */
  --l-bg: #ffffff;
  --l-surface: #f7f8fa;
  --l-s1: #ffffff;
  --l-s2: #f2f4f7;
  --l-s3: #eaedf2;
  --l-line: rgba(16, 20, 28, 0.12);
  --l-line-soft: rgba(16, 20, 28, 0.07);
  --l-text: #0b0d12;
  --l-dim: #3d4551;
  --l-muted: #6b7280;
  --l-mint: #1b4dd8;
  --l-mint-hi: #153fb4;
  --l-on-mint: #ffffff;
  --l-indigo: #c2410c;
  /* Two shadows, because on a light ground depth is the only thing that
     separates a card from the page — on a dark one the surface colour did it. */
  --l-shadow: 0 1px 2px rgba(16,20,28,0.04), 0 8px 24px -12px rgba(16,20,28,0.10);
  --l-shadow-lg: 0 2px 4px rgba(16,20,28,0.04), 0 24px 60px -24px rgba(16,20,28,0.16);
  --l-display: "Manrope", var(--font);
  --l-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  background: var(--l-bg);
  color: var(--l-text);
  font-family: var(--font);
}
.landing .hidden { display: none !important; }
/* The landing is light and the app shell behind it is dark. Anything the
   landing does not cover — a short page, the overscroll area — shows that
   dark shell as a band under the footer. The page under a light landing is
   light. */
body:has(#landing-screen:not(.hidden)) { background: var(--l-bg); }
.landing { min-height: 100vh; }

.l-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.landing h1, .landing h2, .landing h3, .landing h4 { font-family: var(--l-display); }

/* ── Header ── */
.l-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.l-nav.scrolled { border-bottom-color: var(--l-line-soft); }
.l-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.l-brand {
  display: flex; align-items: center; gap: 0.5rem; text-decoration: none;
  font-family: var(--l-display); font-weight: 800; font-size: 1.2rem; color: var(--l-text);
}
.l-hex { width: 22px; height: 22px; fill: var(--l-mint); flex-shrink: 0; }
/* A supplied logo replaces the drawn mark; until one loads it stays out of
   the layout entirely, so nothing shifts and nothing shows as broken. */
.l-logo { display: none; height: 26px; width: auto; flex-shrink: 0; }
.l-brand.has-logo .l-hex { display: none; }
.l-brand.has-logo .l-logo { display: block; }
/* A lockup is the icon and the word already drawn together, so the word next
   to it would be the name printed twice — the tell that nobody looked at the
   file. It replaces both. */
.l-lockup { height: 30px; width: auto; display: block; }
.l-brand.has-lockup .l-hex,
.l-brand.has-lockup .l-logo,
.l-brand.has-lockup .l-brand-name { display: none; }
.l-brand-lg .l-lockup { height: 38px; }
.l-links { display: flex; gap: 2rem; }
.l-links a {
  color: var(--l-dim); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding-bottom: 3px; border-bottom: 2px solid transparent; transition: color 0.18s;
}
.l-links a:hover { color: var(--l-mint); }
.l-links a.active { color: var(--l-mint); font-weight: 600; border-bottom-color: var(--l-mint); }
.l-nav-actions { display: flex; align-items: center; gap: 1rem; }
.l-link-btn { background: none; border: none; color: var(--l-text); font-size: 0.95rem; transition: color 0.18s; }
.l-link-btn:hover { color: var(--l-mint); }

.l-pill {
  background: var(--l-mint); color: var(--l-on-mint); border: none;
  padding: 0.6rem 1.5rem; border-radius: 999px; font-size: 0.95rem; font-weight: 600;
  box-shadow: 0 0 14px rgba(27,77,216, 0.18); transition: filter 0.18s, transform 0.18s;
}
.l-pill:hover { filter: brightness(1.1); }
.l-pill:active { transform: scale(0.97); }
.l-pill-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.l-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  border: 1px solid var(--l-line); border-radius: 999px; color: var(--l-text);
  text-decoration: none; font-size: 1.05rem; font-weight: 500; background: none;
  transition: background 0.18s;
}
.l-ghost:hover { background: var(--l-s3); }
.l-ghost svg { width: 20px; height: 20px; fill: var(--l-indigo); }

/* ── Hero ── */
.l-hero {
  position: relative; padding: 8.5rem 0 6rem; overflow: hidden;
  background: var(--l-bg);
}
/* Two lights, not one. A single radial reads as a spotlight someone forgot to
   turn off; a warm one above and a dimmer one low and off-centre gives the
   page a direction. */
.l-hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60rem 34rem at 50% -6rem, rgba(27,77,216,0.07), transparent 62%),
    radial-gradient(38rem 24rem at 82% 78%, rgba(27,77,216,0.04), transparent 70%);
}
/* ── Light behind the words ────────────────────────────────
   Three blurred shapes drifting on long, unequal cycles. Unequal on purpose:
   matched periods sync up within a minute and the whole thing starts reading
   as a loop, which is where ambience turns into an animation someone has to
   watch. Blur does the work — hard edges here would look like shapes rather
   than light. */
.l-aurora { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.l-aurora i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(120px); opacity: 0; mix-blend-mode: screen;
  animation: l-aurora-in 1.6s ease-out 0.2s forwards, var(--drift) linear infinite;
}
/* Sat over the headline and took the crispness out of it. Lifted so the wash
   crowns the type instead of covering it — the light should look like it is
   coming from somewhere, not like haze on the lens. */
.l-aurora-a {
  width: 46rem; height: 24rem; top: -13rem; left: 50%; margin-left: -23rem;
  background: radial-gradient(circle, rgba(27,77,216,0.16), transparent 66%);
  --drift: l-drift-a 34s;
}
.l-aurora-b {
  width: 32rem; height: 22rem; top: 6rem; left: 4%;
  background: radial-gradient(circle, rgba(27,77,216,0.10), transparent 70%);
  --drift: l-drift-b 47s;
}
.l-aurora-c {
  width: 28rem; height: 20rem; top: 14rem; right: 2%;
  background: radial-gradient(circle, rgba(27,77,216,0.08), transparent 72%);
  --drift: l-drift-c 41s;
}
@keyframes l-aurora-in { to { opacity: 1; } }
@keyframes l-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(-3rem, 1.5rem, 0) scale(1.08); }
  66% { transform: translate3d(2.5rem, -1rem, 0) scale(0.96); }
}
@keyframes l-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4rem, 2.5rem, 0) scale(1.14); }
}
@keyframes l-drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  40% { transform: translate3d(-3.5rem, 2rem, 0) scale(0.94); }
  70% { transform: translate3d(-1rem, -1.5rem, 0) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .l-aurora i { animation: l-aurora-in 0.01s forwards; }
}
/* A phone renders three large blurs at a real cost, and the hero is mostly
   type there anyway. */
@media (max-width: 620px) {
  .l-aurora-b, .l-aurora-c { display: none; }
  .l-aurora i { filter: blur(70px); }
}

/* The network behind the words. Drawn rather than tiled so it can drift
   without a repeating seam — a tile shows its seam, and the seam is the first
   thing the eye finds. */
.l-hero-field {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.85;
  /* Pulled back from the middle and faded at the edges. The pattern belongs
     around the words, not behind them — texture under type is the difference
     between atmosphere and noise. */
  -webkit-mask-image:
    radial-gradient(64% 46% at 50% 44%, transparent 20%, #000 78%),
    linear-gradient(#000 65%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(64% 46% at 50% 44%, transparent 20%, #000 78%),
    linear-gradient(#000 65%, transparent);
  mask-composite: intersect;
}
.l-hero-inner { position: relative; text-align: center; }

/* Everything arrives in order, closely spaced: a sequence, not a slideshow. */
/* Written so the finished state is the default and the animation only ever
   takes it away for a moment. Declared the other way round — starting at
   opacity 0 with `both` — the hero is invisible to anything that does not run
   the animation: a print, a screenshot, a browser that skipped it, an
   animation that never started because of a delay it never reached. The page
   must be readable with the animation deleted. */
.l-rise { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .l-rise { animation: l-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--d, 0ms); }
}
@keyframes l-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.l-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.6rem;
  padding: 0.4rem 0.95rem 0.4rem 0.75rem; border-radius: 999px;
  border: 1px solid var(--l-line); background: rgba(27,77,216,0.06);
  font-size: 0.8rem; color: var(--l-dim);
}
.l-badge {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 2rem;
  padding: 0.35rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--l-line); background: rgba(18, 33, 49, 0.5);
  font-family: var(--l-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--l-dim);
}
.l-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--l-mint);
  box-shadow: 0 0 0 3px rgba(27,77,216,0.18);
  animation: l-pulse 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .l-dot { animation: none; } }
@keyframes l-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.l-h1 {
  font-size: clamp(2.6rem, 7.2vw, 4.6rem); line-height: 1.04; font-weight: 700;
  /* Tighter as it gets bigger — display type set at body tracking looks
     loose, which is most of what makes a large headline feel unfinished. */
  letter-spacing: -0.035em; margin: 0 auto 1.4rem; max-width: 18ch;
  text-wrap: balance;
}
.l-grad {
  background: linear-gradient(90deg, var(--l-mint), var(--l-indigo));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.l-lead {
  font-size: 1.08rem; line-height: 1.65; color: var(--l-dim);
  max-width: 58ch; margin: 0 auto 2.6rem;
}
.l-cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 5rem; }

/* The hero shows the product being used: a prompt is typed, a reply arrives,
   and a portfolio assembles itself. It runs once on arrival and settles on
   the finished page — a loop would pull attention off the copy. */
.l-shot {
  max-width: 1000px; margin: 0 auto; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--l-line); background: var(--l-s3);
  box-shadow: var(--l-shadow-lg);
}
.l-shot-bar {
  height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  background: rgba(16, 14, 13, 0.62); border-bottom: 1px solid var(--l-line-soft);
}
.l-shot-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(16, 20, 28, 0.16); }
.l-shot-body { display: grid; grid-template-columns: 320px 1fr; min-height: 430px; text-align: left; }
/* A grid item defaults to min-content, and the typed prompt is one unbroken
   line — without this it holds the column open to the width of the sentence
   and the demo spills past its own frame on a phone. */
.l-shot-body > * { min-width: 0; }

/* ── The conversation ── */
.l-shot-chat {
  padding: 1.1rem; border-right: 1px solid var(--l-line-soft); background: var(--l-s1);
  display: flex; flex-direction: column; gap: 0.7rem;
}
.l-shot-label {
  font-family: var(--l-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--l-muted);
}
.l-bubble {
  background: var(--l-s2); border: 1px solid var(--l-line-soft); border-radius: 10px;
  padding: 0.7rem 0.85rem; font-size: 0.8rem; line-height: 1.5; color: var(--l-dim);
}
.l-bubble-you { background: var(--l-s3); color: var(--l-text); align-self: flex-end; max-width: 92%; }
.l-bubble strong { display: block; color: var(--l-mint); font-size: 0.72rem; margin-bottom: 0.3rem; }
.l-bubble em {
  display: block; margin-top: 0.5rem; font-family: var(--l-mono); font-style: normal;
  font-size: 0.68rem; color: var(--l-muted);
}

.l-shot-input {
  position: relative; margin-top: auto; padding: 0.65rem 0.9rem; min-height: 42px;
  border: 1px solid var(--l-line); border-radius: 999px;
  font-size: 0.76rem; color: var(--l-dim); overflow: hidden; white-space: nowrap;
}
/* Typed with steps() so the characters land one at a time. */
.l-typed {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  max-width: 0; white-space: nowrap;
  animation: l-type 2.6s steps(38, end) 0.6s both, l-clear 0.01s linear 4.4s both;
}
.l-caret {
  display: inline-block; width: 1px; height: 0.95em; vertical-align: text-bottom;
  background: var(--l-mint); margin-left: 1px;
  animation: l-blink 0.9s step-end infinite, l-clear 0.01s linear 4.4s both;
}
.l-placeholder {
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  color: var(--l-muted); opacity: 0; animation: l-fade-in 0.4s ease 4.5s both;
}

/* ── The site it builds ──
   The Creative Agency template, at demo scale. Keeping the two in step means
   what the hero promises is a thing a visitor can actually pick from the
   template list a minute later. */
.l-shot-preview {
  background: #0a0a0a; color: #f4f2ed; padding: 1.5rem 1.7rem 1.3rem;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.p-nav { display: flex; align-items: center; justify-content: space-between; }
.p-mark {
  font-size: 0.62rem; letter-spacing: 0.18em; font-weight: 800;
  text-transform: uppercase; color: #f4f2ed;
}
.p-mark em { font-style: normal; color: #d4f34a; }
.p-links { display: flex; gap: 0.5rem; }
.p-links b { width: 26px; height: 4px; border-radius: 2px; background: #2a2a26; }
.p-hero { padding: 1.5rem 0 0.4rem; }
.p-kicker {
  display: block; font-family: var(--l-mono); font-size: 0.55rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: #d4f34a; margin-bottom: 0.7rem;
}
.p-title {
  margin: 0; font-weight: 800; font-size: 2.05rem; line-height: 1.0;
  letter-spacing: -0.045em; text-transform: uppercase; color: #f4f2ed;
}
.p-outline { -webkit-text-stroke: 1px #f4f2ed; color: transparent; }
.p-sub { margin: 0.8rem 0 0; font-size: 0.68rem; line-height: 1.6; color: #8a8880; max-width: 34ch; }
.p-cta {
  display: inline-block; margin-top: 1rem; padding: 0.42rem 0.95rem; border-radius: 999px;
  background: #d4f34a; color: #0a0a0a;
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: auto; }
/* The case-study frames, as the template draws them. */
.p-tile { margin: 0; height: 92px; border-radius: 8px; position: relative; overflow: hidden; }
.p-tile::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120px 70px at 70% 30%, rgba(212, 243, 74, 0.16), transparent 70%);
}
.p-tile.t1 { background: linear-gradient(140deg, #2a2f18, #1a1a17); }
.p-tile.t2 { background: linear-gradient(140deg, #1d2530, #17171a); }
.p-tile.t3 { background: linear-gradient(140deg, #2c1f24, #18181a); }
.p-foot {
  display: flex; justify-content: space-between; padding-top: 0.7rem;
  border-top: 1px solid #232320; font-size: 0.6rem; letter-spacing: 0.08em; color: #8a8880;
}

/* ── Timeline ── */
@keyframes l-type { to { max-width: 100%; } }
@keyframes l-clear { to { opacity: 0; max-width: 0; } }
@keyframes l-blink { 50% { opacity: 0; } }
@keyframes l-fade-in { to { opacity: 1; } }
@keyframes l-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes l-tile-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

.s-sent  { animation: l-rise 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) 3.5s both; }
.s-reply { animation: l-rise 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) 4.9s both; }

.s-nav    { animation: l-rise 0.5s ease 5.3s both; }
.s-kicker { animation: l-rise 0.5s ease 5.7s both; }
.s-title  { animation: l-rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) 6.0s both; }
.s-sub    { animation: l-rise 0.5s ease 6.5s both; }
.s-t1     { animation: l-tile-in 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) 6.9s both; }
.s-t2     { animation: l-tile-in 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) 7.1s both; }
.s-t3     { animation: l-tile-in 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) 7.3s both; }
.s-foot   { animation: l-rise 0.5s ease 7.7s both; }

/* Anyone who asked for less movement gets the finished page straight away. */
@media (prefers-reduced-motion: reduce) {
  .l-typed, .l-caret { display: none; }
  .l-placeholder, .s-sent, .s-reply, .s-nav, .s-kicker, .s-title,
  .s-sub, .s-t1, .s-t2, .s-t3, .s-foot { animation: none; opacity: 1; transform: none; }
}

/* ── Sections ── */
.l-section { padding: 6rem 0; background: var(--l-surface); }
.l-section-alt { background: var(--l-bg); border-top: 1px solid var(--l-line-soft); }
.l-head { text-align: center; max-width: 640px; margin: 0 auto 4rem; }
.l-head-left { text-align: left; margin-left: 0; }
.l-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.1rem); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.9rem; }
.l-head p { color: var(--l-dim); font-size: 1rem; line-height: 1.65; margin: 0; }

/* ── Bento ──
   Each cell carries a small piece of the product above its text, so the grid
   shows what the thing does instead of four paragraphs in four boxes. The art
   is all CSS: nothing to load, nothing to go stale. */
.l-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.l-cell {
  position: relative; overflow: hidden;
  border: 1px solid var(--l-line); border-radius: 14px; background: var(--l-s1);
  padding: 2rem; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 290px; transition: border-color 0.18s, transform 0.18s;
}
/* A tint anchored to the corner, so no cell reads as an empty box. */
.l-cell::before {
  content: ""; position: absolute; width: 420px; height: 420px;
  top: -230px; right: -180px; pointer-events: none;
  background: radial-gradient(circle, rgba(27,77,216,0.07), transparent 66%);
}
.l-cell-design::before { background: radial-gradient(circle, rgba(27,77,216,0.05), transparent 66%); }
.l-cell:hover { border-color: rgba(27,77,216, 0.35); transform: translateY(-3px); }
.l-cell-wide { grid-column: span 2; background: var(--l-s3); }
.l-cell > * { position: relative; }

/* The art sits above the text and takes the slack, so cells of different
   heights still line their headings up near the bottom. */
.l-art { margin-bottom: auto; padding-bottom: 1.6rem; }
/* A wide cell is twice as wide as the art needs; without a cap the two chat
   bubbles drift to opposite ends and stop reading as one conversation. */
.l-cell-chat .l-art { max-width: 480px; }

/* Chat cell */
.l-msg {
  max-width: 330px; padding: 0.7rem 0.95rem; border-radius: 12px;
  font-size: 0.86rem; line-height: 1.5; border: 1px solid var(--l-line);
}
.l-msg-you {
  background: var(--l-surface); color: var(--l-text);
  border-bottom-right-radius: 4px; margin-left: auto;
}
.l-msg-ai {
  display: flex; align-items: center; gap: 0.55rem; margin-top: 0.7rem;
  background: rgba(27,77,216,0.08); border-color: rgba(27,77,216,0.28);
  color: var(--l-mint); font-family: var(--l-mono); font-size: 0.78rem;
  border-bottom-left-radius: 4px;
}
.l-dots { display: inline-flex; gap: 3px; }
.l-dots i {
  width: 4px; height: 4px; border-radius: 50%; background: var(--l-mint);
  animation: l-blink 1.4s infinite;
}
.l-dots i:nth-child(2) { animation-delay: 0.2s; }
.l-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes l-blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* Speed cell */
.l-cell-speed .l-art { display: flex; flex-direction: column; align-items: center; }
.l-track {
  width: 100%; max-width: 180px; height: 4px; border-radius: 99px;
  background: var(--l-surface); overflow: hidden; margin-top: 1rem;
}
.l-track span {
  display: block; height: 100%; width: 62%; border-radius: 99px;
  background: linear-gradient(90deg, var(--l-mint), var(--l-indigo));
}

/* Design cell */
.l-swatches { display: flex; gap: 0.5rem; }
.l-swatches i {
  width: 30px; height: 30px; border-radius: 9px; background: var(--c);
  border: 1px solid var(--l-line-soft);
}
.l-specimen { display: flex; align-items: baseline; gap: 0.6rem; margin-top: 1.1rem; }
.l-specimen b {
  font-family: var(--l-display); font-size: 2.4rem; font-weight: 800;
  letter-spacing: -0.04em; line-height: 1; color: var(--l-text);
}
.l-specimen span { font-family: var(--l-mono); font-size: 0.72rem; color: var(--l-muted); }

/* History cell */
.l-timeline { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.l-node { display: flex; align-items: center; gap: 0.5rem; }
.l-node::after {
  content: ""; width: 42px; height: 1px; margin: 0 0.7rem;
  background: var(--l-line);
}
.l-node:last-child::after { display: none; }
.l-node i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--l-s3); border: 1px solid var(--l-line); flex: none;
}
.l-node span { font-family: var(--l-mono); font-size: 0.74rem; color: var(--l-muted); }
.l-node.on i { background: var(--l-mint); border-color: var(--l-mint); box-shadow: 0 0 0 4px rgba(27,77,216,0.16); }
.l-node.on span { color: var(--l-mint); }
.l-node.off i { border-style: dashed; }
.l-diff { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.l-diff span {
  font-family: var(--l-mono); font-size: 0.72rem; padding: 0.4rem 0.7rem;
  border-radius: 7px; border: 1px solid var(--l-line); background: var(--l-surface);
}
.l-diff .add { color: var(--l-mint); border-color: rgba(27,77,216,0.28); background: rgba(27,77,216,0.07); }
.l-diff .del { color: var(--l-muted); text-decoration: line-through; }
.l-ico {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: var(--l-surface); border: 1px solid var(--l-line); margin-bottom: 1.1rem;
}
.l-ico svg { width: 21px; height: 21px; fill: var(--l-mint); }
.l-ico-indigo svg { fill: var(--l-indigo); }
.l-cell h3 { font-size: 1.35rem; font-weight: 600; margin: 0 0 0.5rem; }
.l-cell p { color: var(--l-dim); font-size: 0.95rem; line-height: 1.65; margin: 0; max-width: 440px; }
.l-figure {
  font-family: var(--l-display); font-size: 4.6rem; font-weight: 800; letter-spacing: -0.04em;
  line-height: 1; margin: 0;
  background: linear-gradient(140deg, var(--l-mint) 10%, var(--l-indigo) 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Works with ──
   A wordmark set in type by default. An official logo file dropped into
   public/integrations/ replaces it at load; nothing here redraws or recolours
   anyone's mark, which is the thing every brand guideline forbids. */
.l-uses {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem;
}
.l-use {
  border: 1px solid var(--l-line); border-radius: 14px;
  background: var(--l-s1); padding: 1.6rem 1.5rem;
  transition: border-color 0.18s, transform 0.18s;
}
.l-use:hover { border-color: rgba(27,77,216, 0.3); transform: translateY(-3px); }
.l-use-mark {
  display: flex; align-items: center; min-height: 30px; margin-bottom: 0.9rem;
  font-family: var(--l-display); font-size: 1.15rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--l-text);
}
.l-use-mark img { max-height: 28px; width: auto; display: block; }
.l-use p { margin: 0; color: var(--l-dim); font-size: 0.9rem; line-height: 1.6; }
.l-uses-note {
  margin: 2rem 0 0; text-align: center;
  font-size: 0.78rem; line-height: 1.6; color: var(--l-muted);
}

/* ── Team ── */
.l-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.l-portrait {
  aspect-ratio: 1; border-radius: 14px; margin-bottom: 1.3rem;
  border: 1px solid var(--l-line-soft); background: var(--l-s3);
  display: grid; place-items: center; overflow: hidden;
}
/* The photograph covers the monogram once one exists. It stays invisible
   until it has actually loaded, so a file that is not there yet never shows
   as a broken image over the monogram. */
.l-portrait { position: relative; }
.l-portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.35s ease;
}
.l-portrait img.loaded { opacity: 1; }

/* A monogram, not a stock face: nobody's likeness is invented here. */
.l-portrait span {
  font-family: var(--l-display); font-size: 2.6rem; font-weight: 700; letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--l-mint), var(--l-indigo));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.l-member h4 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.l-role {
  margin: 0.35rem 0 0; font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--l-mint);
}
.l-bio { margin: 0.7rem 0 0; font-size: 0.88rem; line-height: 1.6; color: var(--l-dim); }

/* A line worth reading before the four cards, set wide enough to carry it. */
.l-quote {
  margin: 0 0 3.4rem; padding: 2rem 0 0 2rem; max-width: 760px;
  border-left: 2px solid var(--l-mint);
}
.l-quote blockquote {
  margin: 0; font-family: var(--l-display); font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.4;
  letter-spacing: -0.01em; color: var(--l-text);
}
.l-quote figcaption { margin-top: 1.1rem; display: flex; align-items: baseline; gap: 0.6rem; }
.l-quote figcaption b { font-size: 0.92rem; font-weight: 600; }
.l-quote figcaption span { font-size: 0.8rem; color: var(--l-muted); }

/* ── Pricing ── */
.l-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1000px; margin: 0 auto; }
.l-plan {
  position: relative; border: 1px solid var(--l-line); border-radius: 14px;
  background: var(--l-s1); padding: 2rem; display: flex; flex-direction: column;
}
.l-plan-hot {
  border-color: rgba(27,77,216, 0.5); background: var(--l-s3);
  transform: translateY(-16px); box-shadow: var(--l-shadow-lg);
}
.l-tag {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  background: var(--l-mint); color: var(--l-on-mint); border-radius: 999px;
  padding: 0.28rem 0.8rem; font-family: var(--l-mono); font-size: 0.62rem;
  letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
}
.l-plan h3 { font-size: 1.35rem; font-weight: 600; margin: 0 0 0.7rem; }
.l-plan-hot h3 { color: var(--l-mint); }
.l-price { display: flex; align-items: baseline; gap: 0.35rem; margin-bottom: 1.3rem; }
.l-price span { font-family: var(--l-display); font-size: 2.8rem; font-weight: 700; letter-spacing: -0.02em; }
.l-price em { font-style: normal; font-size: 0.85rem; color: var(--l-dim); }
/* Prices are hidden until they are real. A number nobody can pay is worse
   than no number: it sets an expectation we might not keep. */
.l-soon {
  font-size: 2rem !important; letter-spacing: -0.01em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* ── Points on their own ──
   Sits under the three plans as one row rather than a fourth card: it is not
   a plan, and giving it a plan's shape would read as one. */
.l-topup {
  max-width: 1000px; margin: 3.5rem auto 0; padding: 1.8rem 2rem;
  border: 1px solid var(--l-line); border-radius: 14px; background: var(--l-s1);
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.l-topup-head { flex: 1 1 260px; min-width: 0; }
.l-topup-head h3 { margin: 0 0 0.35rem; font-size: 1.1rem; font-weight: 600; }
.l-topup-head p { margin: 0; font-size: 0.86rem; line-height: 1.55; color: var(--l-dim); }
.l-topup-packs { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.l-pack {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 68px; padding: 0.6rem 0.8rem;
  border: 1px solid var(--l-line-soft); border-radius: 10px; background: var(--l-s2);
}
.l-pack strong { font-family: var(--l-display); font-size: 1.35rem; letter-spacing: -0.02em; }
/* No price on the tiles. The ladder is set in plans.js and shown the day
   payments open; until then a number here is a promise with no checkout. */
.l-pack span { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--l-muted); }
.l-topup .l-plan-btn { flex: 0 0 auto; }
@media (max-width: 720px) {
  .l-topup { flex-direction: column; align-items: stretch; text-align: center; }
  .l-topup-packs { justify-content: center; }
}

.l-plan-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.l-plan-btn[disabled]:hover { transform: none; }
.l-plan-note { color: var(--l-dim); font-size: 0.88rem; line-height: 1.55; margin: 0 0 1.8rem; min-height: 2.6rem; }
.l-plan ul { list-style: none; padding: 0; margin: 0 0 1.8rem; display: flex; flex-direction: column; gap: 0.85rem; flex: 1; }
.l-plan li { position: relative; padding-left: 1.7rem; font-size: 0.9rem; color: var(--l-text); }
.l-plan li::before {
  content: ""; position: absolute; left: 0; top: 0.32rem; width: 12px; height: 7px;
  border-left: 2px solid var(--l-muted); border-bottom: 2px solid var(--l-muted);
  transform: rotate(-45deg);
}
.l-plan-hot li::before { border-color: var(--l-mint); }
.l-plan-btn {
  width: 100%; padding: 0.85rem; border-radius: 9px; font-size: 0.95rem; font-weight: 500;
  border: 1px solid var(--l-line); background: none; color: var(--l-text); transition: background 0.18s;
}
.l-plan-btn:hover { background: var(--l-s3); }
.l-plan-btn-hot {
  background: var(--l-mint); color: var(--l-on-mint); border-color: transparent; font-weight: 600;
  box-shadow: 0 0 14px rgba(27,77,216, 0.18);
}
.l-plan-btn-hot:hover { filter: brightness(1.1); background: var(--l-mint); }

/* ── Closing CTA ── */
.l-cta { padding: 8rem 0; text-align: center; background: linear-gradient(180deg, var(--l-surface), var(--l-bg)); }
.l-cta h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 1.2rem; }
.l-cta p { color: var(--l-dim); font-size: 1.05rem; max-width: 560px; margin: 0 auto 2.5rem; }

/* ── Footer ── */
.l-foot { background: var(--l-bg); border-top: 1px solid var(--l-line-soft); padding: 4rem 0; }
/* One track per child, counted rather than guessed — declaring fewer than
   there are children is what dropped Legal onto a row of its own, twice.
   The landing footer has five children: the brand, three lists and the
   "Built with" line. Every other page adds a sixth, the list of trade pages,
   which is how those pages stay reachable now that the landing does not
   carry them. */
.l-foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 2rem 1.6rem; align-items: start; }
.l-foot-grid:has(.l-foot-col--trades) { grid-template-columns: 1.6fr repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .l-foot-grid, .l-foot-grid:has(.l-foot-col--trades) { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  /* Not one column. Stacked, three short lists of four links became one
     column half a screen tall, scrolled past rather than read. Two columns
     with the brand across the top is the same footer at a third of the
     height. */
  .l-foot { padding: 2.75rem 0 2.25rem; }
  .l-foot-grid, .l-foot-grid:has(.l-foot-col--trades) {
    grid-template-columns: 1fr 1fr; gap: 1.9rem 1rem;
  }
  .l-foot-brand { grid-column: 1 / -1; }
  .l-foot-brand p { margin-top: 0.7rem; }
  .l-foot-col { gap: 0.55rem; }
}
.l-foot-brand p { margin: 1.2rem 0 0; font-size: 0.85rem; color: var(--l-muted); }
.l-foot-col { display: flex; flex-direction: column; gap: 0.75rem; }

/* What this runs on. Quiet, at the bottom, under everything else — on the
   hero it would read as advertising somebody else's product; here it reads as
   an infrastructure note, which is what it is.
   The marks are never recoloured or filtered: a monochrome variant is
   something a brand supplies, and making one ourselves is a modification. */
.l-foot-col span {
  font-family: var(--l-mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--l-muted); margin-bottom: 0.3rem;
}
.l-foot-col a { color: var(--l-dim); text-decoration: none; font-size: 0.88rem; transition: color 0.18s; }
.l-foot-col a:hover { color: var(--l-mint); }

/* ── Narrow screens ── */
@media (max-width: 900px) {
  .l-links, .l-nav-actions .l-link-btn { display: none; }
  /* The footer is not in this list: its own rules above put it on two
     columns here and keep it on two on a phone. Stacking it made a
     column of twelve links nobody reaches the bottom of. */
  .l-bento, .l-plans, .l-team, .l-uses { grid-template-columns: 1fr; }
  .l-cell-wide { grid-column: span 1; }
  /* Stacked, the connectors point at nothing. */
  .l-timeline { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .l-node::after { display: none; }
  .l-quote { padding-left: 1.3rem; margin-bottom: 2.4rem; }
  .l-plan-hot { transform: none; }
  .l-plans { max-width: 420px; }
  .l-team, .l-uses { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .l-shot-body { grid-template-columns: 1fr; }
  .l-shot-chat { border-right: none; border-bottom: 1px solid var(--l-line-soft); }
  .l-hero { padding: 4rem 0 3.5rem; }
  .l-section, .l-cta { padding: 4rem 0; }
  .l-cta-row .l-pill-lg, .l-cta-row .l-ghost { width: 100%; }
}

/* ════════════════════════════════════════════════
   AUTH MODAL
   ════════════════════════════════════════════════ */
/* The overlay scrolls, not the card.
   Centring with grid or flex makes anything taller than the viewport
   unreachable at the top — the scroll container cannot go above the centred
   item. `margin: auto` on the card centres it while it fits and behaves like
   a normal block once it does not, which is what lets a long panel scroll all
   the way to both ends. */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem; background: rgba(5, 6, 10, 0.74); backdrop-filter: blur(8px); animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { position: relative; width: min(420px, 100%); margin: auto; background: var(--bg-2); border: 1px solid var(--border); border-radius: 20px; padding: 2rem; box-shadow: var(--shadow-glow); animation: popIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 0.9rem; right: 1rem; background: none; border: none; color: var(--text-mute); font-size: 1.6rem; line-height: 1; transition: color 0.15s; }
.modal-close:hover { color: var(--text); }
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-head h2 { font-size: 1.5rem; margin: 0.6rem 0 0.4rem; }
.auth-sub { color: var(--text-dim); font-size: 0.9rem; margin: 0; }
.tabs { display: flex; gap: 0.4rem; background: var(--bg-1); padding: 0.3rem; border-radius: 12px; margin-bottom: 1.3rem; }
.tab { flex: 1; background: transparent; border: none; color: var(--text-dim); padding: 0.55rem; border-radius: 9px; font-weight: 500; font-size: 0.9rem; transition: all 0.18s; }
.tab.active { color: var(--text); background: var(--bg-3); box-shadow: 0 2px 8px -3px rgba(0,0,0,0.4); }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field > span { font-size: 0.82rem; color: var(--text-dim); font-weight: 500; }
.field > span em { color: var(--text-mute); font-style: normal; }
input, select { font-family: inherit; font-size: 0.94rem; background: var(--bg-1); border: 1px solid var(--border); color: var(--text); padding: 0.7rem 0.85rem; border-radius: 10px; width: 100%; transition: border-color 0.15s, box-shadow 0.15s; }
input::placeholder { color: var(--text-mute); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,77,216, 0.2); }
.error-msg { color: var(--danger); font-size: 0.85rem; min-height: 1.1rem; margin: 1rem 0 0; text-align: center; }

/* ── Pages rail ──
   What the file tree becomes when someone is looking at their site rather
   than its code. */
.page-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  width: 100%; padding: 0.6rem 0.7rem; margin-bottom: 0.15rem;
  background: none; border: none; border-radius: 9px; cursor: pointer;
  color: var(--text-dim); font: inherit; font-size: 0.9rem; text-align: left;
  transition: background 0.14s, color 0.14s;
}
.page-row:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.page-row.active { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(27,77,216, 0.28); }
.page-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-tag {
  flex: none; padding: 0.1rem 0.45rem; border-radius: 999px;
  background: var(--bg-3); color: var(--text-mute);
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.page-row.active .page-tag { background: var(--brand); color: var(--on-brand); }
.page-rail-empty { padding: 0.7rem; margin: 0; color: var(--text-mute); font-size: 0.85rem; }

/* ════════════════════════════════════════════════
   PROJECT CARDS
   ════════════════════════════════════════════════ */
.pc-bar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.4rem;
}
.pc-bar-actions { display: flex; align-items: center; gap: 0.6rem; }
.pc-search {
  width: 220px; padding: 0.5rem 0.75rem; font: inherit; font-size: 0.88rem;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text);
}
.pc-search:focus { outline: none; border-color: var(--brand); }
.pc-head { display: flex; align-items: center; justify-content: space-between; margin: 1.6rem 0 0.2rem; }
.pc-head h3 { font-size: 1.02rem; margin: 0; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }

.pcard { cursor: pointer; }
.pc-shot {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px;
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.pcard:hover .pc-shot { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
/* Sized as a multiple of the card and scaled back by the same multiple, so a
   project fills its card whatever the grid decides the card should be. */
.pc-thumb {
  position: absolute; top: 0; left: 0;
  width: 350%; height: 350%; border: none; background: #fff;
  transform: scale(calc(1 / 3.5)); transform-origin: top left;
  pointer-events: none;
}
.pc-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-mute); font-size: 0.85rem;
}
.pc-badge {
  position: absolute; left: 0.6rem; bottom: 0.6rem; z-index: 2;
  padding: 0.25rem 0.6rem; border-radius: 999px;
  background: var(--brand); color: var(--on-brand);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
}
.pc-badge-soft { left: auto; right: 0.6rem; background: var(--bg-3); color: var(--text-dim); }
.pc-meta { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.7rem 0.2rem 0; }
.pc-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.pc-meta strong { font-size: 0.94rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-meta span { font-size: 0.78rem; color: var(--text-mute); }
/* Shown on hover so a grid of projects is not a grid of delete buttons, but
   always reachable by keyboard. */
.pc-del {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 8px;
  cursor: pointer; opacity: 0; transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}
.pc-del svg { width: 15px; height: 15px; fill: var(--text-mute); }
.pcard:hover .pc-del, .pc-del:focus-visible { opacity: 1; }
.pc-del:hover { background: rgba(255, 143, 135, 0.12); border-color: var(--danger); }
.pc-del:hover svg { fill: var(--danger); }

/* ── Confirm dialog ── */
.confirm-card { width: min(440px, 100%); }
.confirm-card h2 { font-size: 1.2rem; margin: 0 0 0.6rem; }
.confirm-card p { margin: 0 0 0.5rem; color: var(--text-dim); font-size: 0.94rem; line-height: 1.6; }
.confirm-warn {
  padding: 0.7rem 0.85rem; border-radius: 10px;
  background: rgba(255, 143, 135, 0.08); border: 1px solid rgba(255, 143, 135, 0.28);
  color: var(--danger) !important; font-size: 0.88rem !important;
}
.confirm-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.3rem; }

/* ── Home hero ──
   Nearly the whole first screen. This is the only thing on the page worth
   doing, and at the old size it read as a search box above a dashboard. */
.home-hero {
  position: relative; overflow: hidden;
  min-height: min(72vh, 620px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  margin: -2.2rem -1.6rem 2.4rem;   /* out to the pane edges */
  padding: 3.5rem 1.6rem 0;
  border-bottom: 1px solid var(--border-soft);
}
/* The colour is behind the words, not on them. */
.home-glow {
  position: absolute; inset: -40% -20% auto -20%; height: 130%;
  background:
    radial-gradient(58% 46% at 50% 6%, rgba(27,77,216, 0.28), transparent 68%),
    radial-gradient(46% 40% at 84% 24%, rgba(192, 193, 255, 0.22), transparent 68%),
    radial-gradient(42% 36% at 12% 30%, rgba(111, 251, 190, 0.16), transparent 68%);
  pointer-events: none;
}
.home-hero-inner { position: relative; width: 100%; max-width: 720px; }

.home-badge {
  display: inline-block; margin-bottom: 1.4rem;
  padding: 0.34rem 0.85rem; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid rgba(27,77,216, 0.28);
  color: var(--brand-2); font-size: 0.78rem; font-weight: 600;
}
.home-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.08;
  letter-spacing: -0.035em; margin: 0 0 0.9rem;
}
.home-hero > .home-hero-inner > p {
  color: var(--text-dim); margin: 0 0 2rem; font-size: 1.05rem;
}
.home-ask {
  display: flex; gap: 0.6rem; align-items: center;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 0.65rem 0.65rem 0.65rem 1.3rem;
  box-shadow: var(--shadow);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.home-ask:focus-within { border-color: var(--brand); box-shadow: var(--shadow-glow); }
.home-ask input {
  flex: 1; min-width: 0; border: none; background: none; color: var(--text);
  font: inherit; font-size: 1.05rem; padding: 0.6rem 0;
}
.home-ask input:focus { outline: none; }
.home-ask .btn { padding: 0.7rem 1.6rem; font-size: 0.95rem; }

/* ── The four kinds ──
   Under the field, because they are a way of starting the sentence rather
   than an alternative to it. Deliberately not four equal buttons: the label
   is the answer and the note underneath is why you would pick it. */
.home-kinds {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem;
  margin-top: 1.2rem;
}
.home-kind {
  display: grid; justify-items: center; gap: 0.15rem;
  padding: 0.95rem 0.6rem 0.85rem; cursor: pointer;
  border: 1px solid var(--border-soft); border-radius: 14px;
  background: var(--bg-2); color: var(--text-dim); font: inherit; text-align: center;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.home-kind svg { width: 20px; height: 20px; margin-bottom: 0.3rem; color: var(--text-mute); transition: color 0.15s; }
.home-kind strong { font-size: 0.86rem; color: var(--text); font-weight: 600; }
.home-kind em { font-style: normal; font-size: 0.72rem; color: var(--text-mute); line-height: 1.3; }
.home-kind:hover { border-color: var(--brand); transform: translateY(-2px); background: var(--bg-1); }
.home-kind:hover svg { color: var(--brand); }

/* ── The other two ways in ──
   Templates and a blank page both existed, behind a button labelled "New
   Project" — which is not where anyone looks for them. */
.home-from {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem; margin-top: 1.4rem;
  font-size: 0.82rem; color: var(--text-mute);
}
.home-from-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.36rem 0.8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-soft); background: var(--bg-2);
  color: var(--text-dim); font: inherit; font-size: 0.82rem;
  transition: border-color 0.15s, color 0.15s;
}
.home-from-btn svg { width: 14px; height: 14px; }
.home-from-btn:hover { border-color: var(--brand); color: var(--text); }

/* ── Nothing built yet ──
   The grid of projects is what normally sits under the hero. With none, the
   page ended in white space directly beneath the thing we are asking someone
   to trust. */
.home-first {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1rem; margin-top: 0.5rem;
}
.hf-step {
  position: relative; padding: 1.3rem 1.2rem 1.4rem;
  border: 1px solid var(--border-soft); border-radius: 16px; background: var(--bg-2);
}
.hf-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-bottom: 0.7rem; border-radius: 50%;
  background: var(--grad-soft); border: 1px solid rgba(27,77,216, 0.3);
  color: var(--brand-2); font-size: 0.76rem; font-weight: 700;
}
.hf-step strong { display: block; margin-bottom: 0.3rem; font-size: 0.95rem; }
.hf-step em { font-style: normal; font-size: 0.84rem; line-height: 1.6; color: var(--text-mute); }
.hf-more {
  grid-column: 1 / -1; justify-self: center; margin-top: 0.4rem;
  color: var(--text-mute); font-size: 0.85rem; text-decoration: none;
}
.hf-more:hover { color: var(--brand); }

@media (prefers-reduced-motion: no-preference) {
  /* They arrive in the order they happen, once, on the way in. */
  .hf-step { animation: hf-in 0.5s ease both; animation-delay: calc(var(--i) * 0.12s); }
  @keyframes hf-in { from { opacity: 0; transform: translateY(10px); } }
}

.home-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.1rem; }
.home-chip {
  padding: 0.45rem 1rem; border-radius: 999px; cursor: pointer;
  background: var(--bg-1); border: 1px solid var(--border-soft);
  color: var(--text-dim); font: inherit; font-size: 0.85rem;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.home-chip:hover { border-color: var(--brand); color: var(--text); transform: translateY(-1px); }

/* Three of the person's own sites, half off the bottom edge — enough to say
   "your work is down here" without becoming a second thing to read. */
.home-peek {
  position: relative; display: flex; justify-content: center; gap: 1.2rem;
  width: 100%; margin: auto 0 -70px; padding-top: 3rem;
  mask-image: linear-gradient(to bottom, #000 46%, transparent);
  pointer-events: none;
}
/* Cut off by the hero's own edge — the point is that there is more below. */
.hp-card {
  position: relative; width: 280px; height: 200px; flex: none; overflow: hidden;
  border: 1px solid var(--border); border-top-left-radius: 14px; border-top-right-radius: 14px;
  background: var(--bg-1);
}
.hp-card:first-child, .hp-card:last-child { transform: translateY(22px); opacity: 0.7; }

@media (max-width: 860px) {
  .home-hero { min-height: auto; padding-bottom: 2rem; }
  .home-peek { display: none; }
  /* Four across becomes unreadable long before the screen runs out. */
  .home-kinds { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .pc-bar { flex-direction: column; align-items: stretch; }
  .pc-bar-actions { flex-direction: column; align-items: stretch; }
  .pc-search { width: 100%; }
}

/* ════════════════════════════════════════════════
   TEMPLATE GALLERY
   ════════════════════════════════════════════════ */
/* The panel is wider than a dialog because it is a gallery: at 860px six
   templates plus two starting points came out as small cards with the last
   row below the fold. */
.tpl-panel {
  width: min(1180px, 100%);
  max-height: min(88vh, 900px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header holds still while the gallery scrolls under it. */
.tpl-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.8rem 2rem 1.4rem;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-2);
}
.tpl-head h2 { font-size: 1.35rem; margin: 0 0 0.3rem; }
.tpl-head p { margin: 0; color: var(--text-mute); font-size: 0.92rem; }
.tpl-head .modal-close { position: static; flex: none; font-size: 1.5rem; }

.tpl-body {
  padding: 1.6rem 2rem 2rem; overflow-y: auto;
  /* A soft edge at the bottom so a cut-off row reads as "keep scrolling"
     rather than as the end of the list. */
  mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent);
}

/* ── Starting from nothing ── */
.tpl-starts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.tpl-start {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 1.2rem; text-align: left; cursor: pointer;
  background: var(--bg-1); border: 1px dashed var(--border); border-radius: 14px;
  color: var(--text); font: inherit;
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
}
.tpl-start:hover {
  border-color: var(--brand); border-style: solid;
  background: var(--bg-3); transform: translateY(-2px);
}
.tpl-start-ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--border-soft);
}
.tpl-start-ico svg { width: 19px; height: 19px; fill: var(--brand-2); }
.tpl-start-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.tpl-start-text strong { font-size: 0.96rem; font-weight: 600; }
.tpl-start-text em { font-style: normal; font-size: 0.82rem; color: var(--text-mute); }

/* ── Section rule ── */
.tpl-label {
  display: flex; align-items: center; gap: 0.9rem;
  margin: 1.9rem 0 1.1rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-mute);
}
.tpl-label::after {
  content: ""; flex: 1; height: 1px; background: var(--border-soft);
}

/* ── The gallery ── */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.tpl-card {
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  cursor: pointer; background: var(--bg-1);
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.tpl-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow); }
/* A template renders at desktop width and is scaled down, so the thumbnail
   shows the layout people will actually get rather than its mobile fallback. */
.tpl-shot {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff;
  border-bottom: 1px solid var(--border-soft);
}
/* The frame is sized as a multiple of the card and scaled back by exactly
   that multiple, so it fills the card at any width — a fixed pixel width with
   a hand-picked scale only lines up at one card size. 3.5x puts the template
   at roughly 1250px, which is a desktop layout. */
.tpl-thumb {
  position: absolute; top: 0; left: 0;
  width: 350%; height: 350%; border: none;
  transform: scale(calc(1 / 3.5)); transform-origin: top left;
  pointer-events: none;
}
.tpl-meta { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: 0.25rem; }
.tpl-cat { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-2); }
.tpl-meta strong { font-size: 1.02rem; font-weight: 600; }
.tpl-meta em { font-style: normal; font-size: 0.85rem; line-height: 1.55; color: var(--text-mute); }
.tpl-files {
  margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--border-soft);
  font-size: 0.74rem; color: var(--text-dim);
}

@media (max-width: 940px) {
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .tpl-panel { max-height: 92vh; }
  .tpl-head { padding: 1.3rem 1.2rem 1.1rem; }
  .tpl-body { padding: 1.2rem 1.2rem 1.6rem; }
  .tpl-grid, .tpl-starts { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════
   CUSTOM DOMAIN
   ════════════════════════════════════════════════ */
.domain-status { display: flex; flex-direction: column; gap: 0.9rem; }
.domain-row { display: flex; align-items: center; justify-content: space-between; }
.domain-name { font-weight: 600; font-size: 1rem; }
.domain-badge { font-size: 0.74rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; text-transform: capitalize; }
.domain-badge.pending { background: rgba(88,166,240,0.15); color: #58a6f0; }
.domain-badge.active { background: rgba(63,191,127,0.15); color: var(--success); }
.domain-badge.none { background: var(--bg-3); color: var(--text-mute); }
.domain-help { font-size: 0.86rem; color: var(--text-dim); margin: 0; }
.dns-record { display: grid; gap: 0.5rem; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem; }
.dns-cell { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.dns-cell span { font-size: 0.78rem; color: var(--text-mute); }
.dns-cell code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.82rem; color: var(--text); background: var(--bg-3); padding: 0.2rem 0.55rem; border-radius: 6px; overflow-x: auto; }
.domain-actions { display: flex; gap: 0.6rem; }
.domain-note { font-size: 0.78rem; color: var(--text-mute); margin: 0; }

/* ════════════════════════════════════════════════
   APP
   ════════════════════════════════════════════════ */
/* 100vh on iOS is the height with the browser chrome hidden, which it is not
   until you scroll — so the app is taller than the screen and the top slides
   away under the status bar. 100dvh is the height actually visible. */
.app {
  display: grid; grid-template-columns: 236px 1fr 1.2fr;
  height: 100vh; height: 100dvh; overflow: hidden;
  /* A grid item is a min-height: auto box too, so a tall column stretches the
     row and the height above stops meaning anything. */
  grid-template-rows: minmax(0, 1fr);
}
/* And the document itself must not scroll while the workspace is open. The
   landing page below it does scroll, so this is scoped to the app being
   visible rather than set on body outright. */
body:has(.app:not(.hidden)) { overflow: hidden; }
.sidebar { background: var(--bg-1); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 0.9rem 0.7rem; }

/* Brand */
/* The workspace sits at the top, where the identity belongs; the account
   controls moved to the bottom of the rail. */
/* ── Account row ──
   The whole row is the menu. An account block that only displays who you are
   wastes the most reachable corner of the screen. */
.side-account { position: relative; margin-bottom: 0.85rem; }
.side-user {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.5rem 0.55rem; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 10px;
  color: var(--text); font: inherit; text-align: left;
  transition: background 0.14s, border-color 0.14s;
}
.side-user:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border-soft); }
.side-user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.side-user-meta strong {
  font-size: 0.88rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Quiet by default: on the free tier this is the absence of a plan, which is
   not news. A paid plan is something the account has, so it carries the
   accent. */
.side-tier { font-size: 0.7rem; letter-spacing: 0.04em; color: var(--text-mute); }
.side-tier.paid { color: var(--brand-2); font-weight: 600; }
.side-plan {
  flex: none; padding: 0.12rem 0.5rem; border-radius: 999px;
  background: var(--bg-3); color: var(--text-dim);
  font-size: 0.7rem; font-weight: 600;
}
.side-plan.is-empty { background: rgba(255, 143, 135, 0.14); color: var(--danger); }
.side-chev { width: 15px; height: 15px; flex: none; fill: var(--text-mute); }

.side-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  padding: 0.3rem; border-radius: 11px;
  background: var(--bg-2); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.side-menu-item {
  display: block; width: 100%; padding: 0.5rem 0.6rem;
  background: none; border: none; border-radius: 8px; cursor: pointer;
  color: var(--text-dim); font: inherit; font-size: 0.88rem; text-align: left;
  transition: background 0.14s, color 0.14s;
}
.side-menu-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }

/* Splits the rail into what you do and what you look up. */
.side-sep { height: 1px; margin: 0.7rem 0.2rem; background: var(--border-soft); }
.side-new {
  width: 100%; justify-content: center; gap: 0.5rem; margin-bottom: 1.1rem;
  display: flex; align-items: center; font-size: 0.92rem; padding: 0.7rem 0.9rem;
}
.side-new svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.side-foot {
  margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 0.1rem;
}

.side-brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.5rem 1rem; }
.side-logo { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--grad); color: var(--on-brand); font-family: var(--font-display); font-weight: 800; font-size: 1rem; box-shadow: 0 6px 16px -6px rgba(27,77,216,0.6); }
.side-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }

/* Nav */
.side-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.side-item { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.6rem 0.7rem; border: none; background: none; color: var(--text-dim); font-size: 0.92rem; font-weight: 500; border-radius: 10px; text-align: left; transition: background 0.14s, color 0.14s; }
.side-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
/* Drawn as outlines: at this size a filled glyph turns into a blob. */
.si-ico[stroke] { fill: none; stroke: currentColor; opacity: 0.85; }
.side-item.active .si-ico[stroke] { stroke: var(--brand-2); opacity: 1; }
.side-item.active { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(27,77,216,0.3); }
.si-ico { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; opacity: 0.9; }
.side-item.active .si-ico { fill: var(--brand-2); opacity: 1; }

/* Projects list */
.side-projects { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 1rem; }
.side-projects-head { display: flex; align-items: center; justify-content: space-between; padding: 0.3rem 0.7rem 0.5rem; }
.side-projects-head span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.project-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.1rem; }
.project-list li { padding: 0.55rem 0.7rem; border-radius: 9px; cursor: pointer; font-size: 0.88rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.5rem; transition: background 0.14s, color 0.14s; }
.project-list li:hover { background: var(--bg-3); color: var(--text); }
.project-list li.active { background: var(--bg-3); color: var(--text); }
.project-list li .dot { color: var(--success); font-size: 0.7rem; }
.project-list li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-empty { padding: 0.6rem 0.7rem; font-size: 0.82rem; color: var(--text-mute); }
.shared-tag { margin-left: auto; flex-shrink: 0; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-2); background: rgba(27,77,216,0.2); padding: 0.1rem 0.4rem; border-radius: 5px; }

/* User card */
.side-user { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.8rem; padding: 0.6rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border-soft); }
.side-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--grad); color: var(--on-brand); font-weight: 700; font-size: 0.95rem; flex-shrink: 0; text-transform: uppercase; }
.side-user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.side-user-meta strong { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-meta span { font-size: 0.74rem; color: var(--brand-2); }
.side-logout { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; background: none; border: none; border-radius: 8px; color: var(--text-mute); transition: background 0.14s, color 0.14s; }
.side-logout svg { width: 17px; height: 17px; fill: currentColor; }
.side-logout:hover { background: var(--bg-3); color: var(--text); }
/* min-height: 0 is load-bearing, not tidying.
   A flex item defaults to min-height: auto, which means it refuses to shrink
   below its own content. So a long conversation pushed this column past the
   bottom of the screen, the whole document started scrolling instead of the
   message list, and there was no way back up to the top of the chat — the
   composer went with it. The same applies to every column in the chain: the
   pane inside the grid, and the list inside the pane. */
.chat-pane {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  min-width: 0; min-height: 0;
  background: var(--bg);
}
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); }
.project-title { font-family: var(--font-display); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ── Model picker ──
   Custom rather than a <select> because the status dot has to be coloured,
   and nothing inside a native select can be. */
.msel { position: relative; }
.msel-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.6rem; font-size: 0.82rem; font: inherit; font-size: 0.82rem;
  background: var(--bg-1); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; cursor: pointer;
  transition: border-color 0.15s;
}
.msel-btn:hover { border-color: var(--brand); }
.msel-chev { width: 15px; height: 15px; fill: var(--text-mute); flex: none; }

.msel-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--text-mute);
}
/* The state lands on the button's dot directly, and on the row in the list. */
.msel-dot.state-ok,
.msel-opt.state-ok .msel-dot { background: var(--success); box-shadow: 0 0 0 3px rgba(27,77,216, 0.18); }
.msel-dot.state-down,
.msel-opt.state-down .msel-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 143, 135, 0.18); }
.msel-dot.state-unconfigured,
.msel-opt.state-unconfigured .msel-dot { background: var(--text-mute); box-shadow: none; }

.msel-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 240px; margin: 0; padding: 0.35rem; list-style: none;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
}
.msel-list[hidden] { display: none; }
.msel-opt {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.55rem 0.6rem; border-radius: 8px; cursor: pointer;
  transition: background 0.14s;
}
.msel-opt .msel-dot { margin-top: 0.38rem; }
.msel-opt:hover { background: rgba(255, 255, 255, 0.04); }
.msel-opt.selected { background: var(--grad-soft); }
/* Not selectable, and it says why rather than just refusing. */
.msel-opt.disabled { cursor: not-allowed; opacity: 0.55; }
.msel-opt.disabled:hover { background: none; }
.msel-opt-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.msel-opt-text strong { font-size: 0.86rem; font-weight: 600; }
.msel-opt-text em { font-style: normal; font-size: 0.74rem; color: var(--text-mute); }
.chat-messages {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 1.2rem; display: flex; flex-direction: column; gap: 0.8rem;
  /* A scroll that reaches the end of this list stays in it rather than
     carrying on into the page behind. */
  overscroll-behavior: contain;
}
input, textarea { caret-color: var(--brand); }
.msg { max-width: 85%; padding: 0.7rem 0.9rem; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; }
.msg.user { align-self: flex-end; background: var(--grad); color: var(--on-brand); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.bot.pending { color: var(--text-dim); font-style: italic; }
/* Three dots, drawn rather than written, so an empty bubble is still empty to
   the code that removes orphaned ones. Without this the wait before a thinking
   model says anything is a blank grey pill, which reads as broken. */
.msg.bot.pending:empty::after,
.msg.bot.pending:not(:has(*))::after {
  content: "•••";
  letter-spacing: 0.18em;
  animation: pending-dots 1.4s ease-in-out infinite;
}
@keyframes pending-dots { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.75; } }
@media (prefers-reduced-motion: reduce) {
  .msg.bot.pending:empty::after, .msg.bot.pending:not(:has(*))::after { animation: none; opacity: 0.5; }
}

/* The model's reasoning while it is arriving. Above the answer, never inside
   it, and folded away the moment the answer starts — reassurance while there
   is nothing to read, clutter the moment there is. */
/* The two ways to build a settled brief. Stacked label and note, because the
   price is the thing being compared and the note is what it buys. */
/* The one that was pressed stays legible after everything is disabled — a
   greyed-out panel is still the record of which choice was made. */
.build-it-go.chosen { opacity: 1; }
.build-it-go.chosen strong::after { content: " ✓"; }
.build-it-row button:disabled:not(.chosen) { opacity: 0.4; }

.build-it-go { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; line-height: 1.25; text-align: left; }
.build-it-go strong { font-weight: 600; }
.build-it-go small { font-size: 0.72rem; opacity: 0.75; font-weight: 400; }
.build-it-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: stretch; }

/* How a failed build ended, verbatim. Monospace and wrapping, because the
   question it answers is whether the text stops in the middle of a tag. */
.msg.bot.ended code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0.8;
  max-height: 30vh;
  overflow-y: auto;
}

.msg.bot.thinking {
  align-self: flex-start;
  background: none;
  border: 1px dashed var(--border-soft, var(--border));
  color: var(--text-dim);
  font-size: 0.82rem;
  max-width: 100%;
}
.msg.bot.thinking summary {
  cursor: pointer;
  list-style: none;
  opacity: 0.8;
  font-style: italic;
}
.msg.bot.thinking summary::-webkit-details-marker { display: none; }
.msg.bot.thinking summary::before { content: "▸ "; display: inline-block; transition: transform 0.15s; }
.msg.bot.thinking[open] summary::before { content: "▾ "; }
.thinking-body {
  margin-top: 0.5rem;
  white-space: pre-wrap;
  line-height: 1.5;
  max-height: 40vh;
  overflow-y: auto;
  opacity: 0.75;
}
.msg.error { align-self: flex-start; background: rgba(255,95,126,0.1); border: 1px solid var(--danger); color: #ff9aae; }
.msg.warn { align-self: flex-start; background: rgba(88,166,240,0.10); border: 1px solid rgba(88,166,240,0.45); color: #8cc3f7; }
.msg-action { display: block; margin-top: 8px; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(88,166,240,0.5); background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.msg-action:hover { background: rgba(88,166,240,0.16); }
/* ── THE COMPOSER ──
   One box. The field, what the next message will cost, and the button that
   spends it are one decision — they were laid out as three unrelated rows on
   a bare background, which is why the panel read as unfinished. */
.composer {
  margin: 0.9rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-3);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.composer:focus-within { border-color: var(--brand); box-shadow: var(--shadow-glow); }

#chat-input {
  display: block; width: 100%; resize: none; overflow-y: auto;
  /* Two lines, not a slot shorter than the line inside it. At 26px the box
     was smaller than one line of its own text, so the placeholder — and the
     first line of anything typed — was sliced along the top, and the whole
     composer read as a search field somebody had squashed. This is the thing
     the entire product is operated through; it is allowed to look like it. */
  min-height: 62px; max-height: 34vh; line-height: 1.55;
  padding: 0.9rem 1rem 0.5rem; font: inherit; font-size: 0.98rem;
  background: none; border: none; color: var(--text);
}
#chat-input:focus { outline: none; }
#chat-input::placeholder { color: var(--text-mute); }

/* Everything that acts on the field, on one line inside the same box. */
.composer-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.55rem 0.55rem 0.6rem;
}
.composer-hint {
  margin: 0 0 0 auto; font-size: 0.7rem; color: var(--text-mute); white-space: nowrap;
}
.composer-hint kbd {
  padding: 0.05rem 0.3rem; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg-1); font: inherit; font-size: 0.95em;
}

/* The send button. A circle with an arrow at rest, because the label is
   already implied by everything around it; the word comes back on a wide
   panel where there is room for it. */
.send {
  flex: none; display: inline-flex; align-items: center; gap: 0.4rem;
  height: 34px; padding: 0 0.55rem; min-width: 34px; justify-content: center;
  border: none; border-radius: 999px; cursor: pointer;
  background: var(--grad); color: var(--on-brand);
  font: inherit; font-size: 0.82rem; font-weight: 600;
  transition: opacity 0.15s, transform 0.15s;
}
.send svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.send-label { display: none; }
.send:hover:not(:disabled) { transform: translateY(-1px); }
.send:disabled { opacity: 0.5; cursor: default; }
@media (min-width: 1100px) { .send-label { display: inline; } }

.upload-btn {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-1);
  color: var(--text-mute); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.upload-btn svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.upload-btn:hover { color: var(--text); border-color: var(--brand); background: var(--bg-2); }
.upload-btn:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,77,216, 0.2); }

/* Desktop / phone preview. The frame is narrowed rather than the window, so
   what you see is the site's own responsive behaviour. */
.viewport-switch { display: flex; gap: 2px; padding: 2px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; margin-left: 0.35rem; }
.vp {
  display: flex; align-items: center; gap: 0.35rem; padding: 0.32rem 0.6rem;
  border: none; background: none; border-radius: 8px; color: var(--text-mute);
  font-size: 0.78rem; font-weight: 600; transition: background 0.14s, color 0.14s;
}
.vp svg { width: 14px; height: 14px; fill: currentColor; }
.vp:hover { color: var(--text-dim); }
.vp.active { background: var(--bg-3); color: var(--text); }
.preview-stage.vp-mobile { display: flex; justify-content: center; padding: 1.2rem 0; background: var(--bg); overflow: auto; }
.preview-stage.vp-mobile .preview-frame {
  width: 390px; flex: none; height: 100%; max-height: 844px;
  border: 1px solid var(--border); border-radius: 18px; background: #fff;
  box-shadow: var(--shadow);
}

/* ── Build progress ──
   The files as they are written. Real names from the real output — the only
   honest thing we can show, since this is one call and not an agent taking
   steps. */
/* The line somebody watches while a site is written: a spinner, the clock,
   what it has cost, and what it is doing. A wait with nothing moving in it is
   indistinguishable from a wait that has hung. */
.bp-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-style: normal; }
.bp-spark {
  width: 13px; height: 13px; flex: 0 0 auto; border-radius: 50%;
  background: var(--grad); animation: bp-pulse 1.1s ease-in-out infinite;
}
.bp-spark.still { animation: none; opacity: 0.4; }
@keyframes bp-pulse {
  0%, 100% { transform: scale(0.7); opacity: 0.55; }
  50% { transform: scale(1); opacity: 1; }
}
/* Tabular figures so the seconds do not shift the words beside them every
   time the number changes. */
.bp-meta {
  font-size: 0.78rem; color: var(--text-mute);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bp-label { font-size: 0.86rem; color: var(--text-dim); }
@media (prefers-reduced-motion: reduce) { .bp-spark { animation: none; } }
.bp-files { list-style: none; margin: 0.55rem 0 0; padding: 0; display: grid; gap: 0.2rem; }
.bp-files li {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: ui-monospace, Menlo, monospace; font-size: 0.78rem;
  color: var(--text); opacity: 1;
}
.bp-files li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--brand); animation: bp-pulse 1.1s ease-in-out infinite;
}
/* Finished the moment the next one starts. */
.bp-files li.done { color: var(--text-mute); }
.bp-files li.done::before { background: var(--text-mute); animation: none; }
@keyframes bp-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .bp-files li::before { animation: none; } }

/* ── Effort ──
   Two settings, with what each costs on the button. A choice that hides its
   price is not a choice. */
/* ── The mode ──
   Faster, Smarter, and the one that does not build at all. Inside the
   composer bar, so what the next message costs is next to the thing that
   sends it. */
.mode {
  display: inline-flex; gap: 0.1rem; padding: 0.12rem;
  background: var(--bg-1); border: 1px solid var(--border-soft); border-radius: 999px;
}
.eff {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.75rem; border-radius: 999px; cursor: pointer;
  background: none; border: none; color: var(--text-mute);
  font: inherit; font-size: 0.78rem; font-weight: 500;
  transition: background 0.14s, color 0.14s;
}
.eff:hover { color: var(--text-dim); }
.eff em {
  font-style: normal; font-size: 0.7rem; opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
/* Filled, not a slightly different grey. Which mode you are on decides what
   the next press costs, so it has to be readable at a glance rather than by
   comparison with the pill next to it. */
.eff.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.eff.on em { color: var(--on-brand); opacity: 0.8; }
/* The mode that does not build. Costing nothing is the whole reason somebody
   would pick it, so the price is where the eye already is rather than in a
   tooltip. */
/* A step up rather than another option: it costs double the one beside it,
   so the price is the part that has to be unmissable. */
.eff[data-id="deep"] em { color: var(--brand-2); opacity: 0.9; }
.eff[data-id="deep"].on { background: var(--grad-soft); color: var(--text); }
.eff[data-id="deep"].on em { color: var(--brand); opacity: 1; }

.eff[data-id="discuss"] em { color: var(--ok, #3fb27f); opacity: 0.85; }
.eff[data-id="discuss"].on { background: rgba(63, 178, 127, 0.14); color: var(--text); }
.eff[data-id="discuss"].on em { color: #3fb27f; opacity: 1; }


/* Collapsing the chat hands its column to the preview — useful once a site
   exists and the code is what you are looking at. */
.chat-toggle { padding: 0.35rem 0.5rem; display: grid; place-items: center; }
.chat-toggle svg { width: 16px; height: 16px; fill: currentColor; display: block; }
/* Two columns, not three with an empty one: a display:none grid item leaves
   the flow, so the preview would slide into the zero-width slot. */
.app.chat-collapsed { grid-template-columns: 236px 1fr; }
.app.chat-collapsed .chat-pane { display: none; }
.chat-toggle.active { background: var(--grad-soft); color: var(--text); }

/* Visible to screen readers only. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Same reasoning as the chat column: without min-height: 0 a tall preview
   stretches the row and takes the whole page with it. */
.preview-pane {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  background: var(--bg-1);
}
/* Wraps rather than overflowing. Eleven controls do not fit beside each other
   on a laptop, and the ones pushed off the end were Publish and the link to
   the published site — the two that matter most, invisible with no scrollbar
   to say so. */
.preview-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem 0.75rem;
  padding: 0.65rem 1rem; border-bottom: 1px solid var(--border);
}
.preview-tabs, .preview-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.ptab { background: transparent; border: 1px solid transparent; color: var(--text-dim); padding: 0.4rem 0.8rem; border-radius: 9px; font-size: 0.85rem; font-weight: 500; transition: all 0.15s; }
.ptab.active { color: var(--text); border-color: var(--border); background: var(--bg-3); }
.ptab.pick { margin-left: 0.5rem; border-color: var(--border); }
.ptab.pick.active { background: var(--grad); color: var(--on-brand); border-color: transparent; }

.selection-chip {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0 1rem; padding: 0.5rem 0.7rem; border-radius: 10px;
  background: var(--grad-soft); border: 1px solid rgba(139,123,255,0.3);
  font-size: 0.83rem; color: var(--text);
}
.selection-chip .sel-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); flex-shrink: 0;
}
.selection-chip span:nth-child(2) {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.78rem;
}
.selection-chip button {
  background: none; border: none; color: var(--text-mute); font-size: 1.1rem;
  line-height: 1; padding: 0 0.2rem;
}
.selection-chip button:hover { color: var(--text); }

/* The brief that was attached, above the field it will be built from.
   Beside the selection chip and shaped like it: both answer the same
   question, "what is going with the next message". */
.brief-chip {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0 1rem 0.4rem; padding: 0.5rem 0.7rem; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  font-size: 0.83rem; color: var(--text);
}
.brief-chip .brief-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex-shrink: 0;
}
#brief-name {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.78rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12rem;
}
.brief-summary { flex: 1; min-width: 0; color: var(--text-mute); font-size: 0.78rem; }
.brief-chip button {
  background: none; border: none; color: var(--text-mute); font-size: 1.1rem;
  line-height: 1; padding: 0 0.2rem;
}
.brief-chip button:hover { color: var(--text); }

/* ── File tree ── */
.preview-body { flex: 1; display: flex; min-height: 0; position: relative; }
.preview-stage { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.file-tree {
  width: 190px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--bg-2); border-right: 1px solid var(--border); overflow: hidden;
}
.tree-head {
  display: flex; align-items: center; gap: 0.1rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem; border-bottom: 1px solid var(--border-soft);
  font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-mute);
}
.tree-head > span:first-child { flex: 1; }
.tree-toggle, .tree-show {
  background: none; border: none; color: var(--text-mute); font-size: 0.95rem;
  line-height: 1; padding: 0.15rem 0.35rem; border-radius: 5px;
}
.tree-toggle:hover, .tree-show:hover { color: var(--text); background: var(--bg-3); }
.tree-show {
  position: absolute; left: 0; top: 0.45rem; z-index: 2;
  background: var(--bg-2); border: 1px solid var(--border); border-left: none;
  border-radius: 0 6px 6px 0; padding: 0.25rem 0.4rem;
}
.tree-list { flex: 1; overflow-y: auto; padding: 0.35rem; }
.tree-children { margin-left: 0.7rem; border-left: 1px solid var(--border-soft); padding-left: 0.3rem; }

.tree-dir, .tree-file {
  display: flex; align-items: center; gap: 0.4rem; width: 100%;
  background: none; border: none; color: var(--text-dim);
  padding: 0.32rem 0.45rem; border-radius: 6px; text-align: left;
  font-size: 0.78rem; white-space: nowrap; overflow: hidden;
  transition: background 0.13s, color 0.13s;
}
.tree-dir:hover, .tree-file:hover { background: var(--bg-3); color: var(--text); }
.tree-file.active { background: var(--grad-soft); color: var(--text); }
.tree-dir span:nth-child(2), .tree-file span:nth-child(2) {
  overflow: hidden; text-overflow: ellipsis;
}
.tree-caret { width: 0.7rem; flex-shrink: 0; font-size: 0.6rem; color: var(--text-mute); }
.tree-ext {
  flex-shrink: 0; width: 2rem; font-family: ui-monospace, Menlo, monospace;
  font-size: 0.6rem; text-transform: uppercase; color: var(--text-mute);
  letter-spacing: 0.03em;
}
.tree-file.active .tree-ext { color: var(--brand-2); }
/* The delete control sits over the row's right edge instead of in the layout,
   so rows do not reflow as it appears and file names keep their full width. */
.tpl-kind {
  display: inline-block; font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-2);
  background: rgba(27,77,216, 0.2); border-radius: 5px;
  padding: 0.15rem 0.45rem; margin-bottom: 0.55rem;
}

.tree-row { position: relative; }
.tree-del {
  position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%);
  display: none; background: var(--bg-3); border: none; border-radius: 5px;
  color: var(--text-mute); font-size: 0.95rem; line-height: 1;
  padding: 0.05rem 0.32rem 0.15rem;
}
.tree-row:hover .tree-del, .tree-del:focus-visible { display: block; }
.tree-del:hover { color: #ff6b6b; background: rgba(255, 107, 107, 0.14); }

.tree-entry {
  margin-left: auto; flex-shrink: 0; font-size: 0.58rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--brand-2); background: rgba(27,77,216,0.2);
  padding: 0.05rem 0.3rem; border-radius: 4px;
}

.preview-frame { flex: 1; border: none; background: #fff; width: 100%; }
.code-view { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.editor-bar {
  display: flex; align-items: center; gap: 0.55rem; flex: none;
  padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--border); background: var(--bg-2);
}
.editor-path {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.72rem; color: var(--text-2);
}
.editor-dirty {
  flex: none; font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: #f0b429; border: 1px solid rgba(240, 180, 41, 0.35);
  border-radius: 5px; padding: 0.1rem 0.35rem;
}
.editor-host { flex: 1; min-height: 0; }
.stream-view {
  flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 1.1rem;
  background: var(--bg); font-size: 0.8rem;
}
.stream-view code {
  white-space: pre-wrap; word-break: break-word; color: #d4d4d4;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ════════════════════════════════════════════════
   PROJECT MENU + VERSION HISTORY
   ════════════════════════════════════════════════ */
.chat-head-actions { display: flex; align-items: center; gap: 0.5rem; }
.menu-wrap { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 180px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px;
  box-shadow: var(--shadow-lg); padding: 0.3rem; display: flex; flex-direction: column;
}
.dropdown button {
  background: none; border: none; color: var(--text); text-align: left;
  padding: 0.55rem 0.7rem; border-radius: 8px; font-size: 0.88rem; transition: background 0.14s;
}
.dropdown button:hover:not(:disabled) { background: var(--bg-3); }
.dropdown button:disabled { opacity: 0.4; cursor: not-allowed; }
.dropdown button.danger { color: var(--danger); }
.dropdown button.danger:hover:not(:disabled) { background: rgba(255,95,126,0.1); }

.modal-mid { width: min(600px, 100%); max-height: 85vh; overflow-y: auto; }
.history-list { display: flex; flex-direction: column; }
.history-row {
  display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0.2rem;
  border-bottom: 1px solid var(--border-soft);
}
.history-row:last-child { border-bottom: none; }
.history-row.current { background: var(--grad-soft); border-radius: 10px; padding-left: 0.7rem; padding-right: 0.7rem; }
.history-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.history-meta strong { font-size: 0.9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-meta span { font-size: 0.76rem; color: var(--text-mute); }

/* ════════════════════════════════════════════════
   DATABASE PANEL
   ════════════════════════════════════════════════ */
/* Inline callout used for the security verdict. */
.note {
  border: 1px solid var(--border); border-left: 3px solid var(--tone, var(--brand));
  background: var(--tone-bg, var(--grad-soft));
  border-radius: 10px; padding: 0.9rem 1.05rem; margin: 1.2rem 0;
}
.note.warn { --tone: var(--danger); --tone-bg: rgba(248, 113, 113, 0.1); }
.note-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tone, var(--brand-2)); margin-bottom: 0.35rem;
}
.note p { margin: 0; font-size: 0.9rem; color: var(--text-dim); }

.db-step { margin-top: 1rem; }
.db-sql {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.9rem 1rem; margin: 0.7rem 0; max-height: 260px; overflow: auto;
}
.db-sql code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.78rem;
  white-space: pre; color: var(--text); line-height: 1.5;
}

/* ════════════════════════════════════════════════
   PAGE VIEWS (dashboard / settings / team / support)
   ════════════════════════════════════════════════ */
.page-pane { grid-column: 2 / -1; overflow-y: auto; background: var(--bg); }
.page-inner { max-width: 780px; margin: 0 auto; padding: 2.2rem 1.6rem 3rem; display: flex; flex-direction: column; gap: 1.2rem; }
/* Settings is a sidebar plus content, not prose: at the reading width the
   content column came out under 460px and the plan cards were squeezed to
   142px each. */
.page-inner-wide { max-width: 1040px; }
.page-loading { display: grid; place-items: center; height: 100%; color: var(--text-mute); }
.page-head h2 { font-size: 1.7rem; margin: 0 0 0.25rem; }
.page-head p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.stat { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-num em { font-style: normal; font-size: 1rem; color: var(--text-mute); }
.stat-label { font-size: 0.8rem; color: var(--text-dim); }
.meter { height: 5px; background: var(--bg-3); border-radius: 99px; margin-top: 0.5rem; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

.panel { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 1.3rem 1.4rem; }
.panel h3 { font-size: 1.02rem; margin: 0 0 1rem; }
.page-form { display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; }
.page-form .field { width: 100%; max-width: 380px; }
.page-form.inline { flex-direction: row; align-items: center; }
.page-form.inline input { max-width: 300px; }
.page-form textarea { font-family: inherit; font-size: 0.94rem; background: var(--bg-1); border: 1px solid var(--border); color: var(--text); padding: 0.7rem 0.85rem; border-radius: 10px; width: 100%; resize: vertical; }
.page-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,77,216,0.2); }
.page-note { font-size: 0.8rem; color: var(--text-mute); margin: 0.6rem 0 0; }
.page-empty { color: var(--text-mute); font-size: 0.9rem; margin: 0; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; padding: 0.65rem 0.2rem; border-bottom: 1px solid var(--border-soft); }
.row:last-child { border-bottom: none; }
.row[data-open] { cursor: pointer; border-radius: 8px; }
.row[data-open]:hover { background: rgba(255,255,255,0.03); }
/* Never below its own text: a long .row-sub used to shrink this to nothing,
   which hid the label the row exists to show. Below that width the sub wraps
   to its own line instead. */
.row-main { flex: 1 1 12ch; min-width: 0; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main .dot { color: var(--success); font-size: 0.7rem; }
.row-sub { flex: 0 1 auto; min-width: 0; font-size: 0.8rem; color: var(--text-mute); }
.row .badge { margin-left: auto; }
.badge { font-size: 0.72rem; font-weight: 600; padding: 0.18rem 0.6rem; border-radius: 999px; }
.badge.active { background: rgba(63,191,127,0.15); color: var(--success); }
.badge.pending { background: rgba(88,166,240,0.15); color: #58a6f0; }

@media (max-width: 720px) { .stat-grid { grid-template-columns: 1fr 1fr; } .page-pane { grid-column: 1 / -1; } }

/* Toast */
.toast { position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%) translateY(2rem); background: var(--bg-3); border: 1px solid var(--brand); color: var(--text); padding: 0.75rem 1.3rem; border-radius: 12px; font-size: 0.9rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all 0.28s cubic-bezier(0.2,0.9,0.3,1.2); z-index: 200; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--danger); }

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════
   TEAM
   ════════════════════════════════════════════════ */
.team-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.team-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.6rem 1.4rem; transition: border-color 0.16s, transform 0.16s;
}
.team-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.team-avatar {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad); color: var(--on-brand); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.02em; margin-bottom: 1rem;
}
.team-card h3 { font-size: 1.02rem; margin: 0 0 0.15rem; }
.team-role {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--brand-2); margin: 0 0 0.7rem;
}
.team-bio { font-size: 0.88rem; line-height: 1.6; color: var(--text-dim); margin: 0; }

/* ════════════════════════════════════════════════
   SETTINGS
   ════════════════════════════════════════════════ */
.set-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
/* A plain list, not a panel of its own: the panels on the right are the
   content, and a second bordered box beside them makes the page read as two
   competing columns. */
.set-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.set-tab {
  display: flex; align-items: center; gap: 0.75rem; text-align: left; width: 100%;
  padding: 0.7rem 0.9rem; border: none; background: none; border-radius: 10px;
  color: var(--text-dim); transition: background 0.14s, color 0.14s;
}
.set-tab svg { width: 18px; height: 18px; fill: currentColor; flex: none; opacity: 0.85; }
.set-tab strong { font-size: 0.92rem; font-weight: 500; color: inherit; }
.set-tab:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.set-tab.active { background: var(--grad-soft); color: var(--brand); }
.set-tab.active strong { font-weight: 600; }

.set-body { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.set-body .panel { padding: 1.7rem 1.8rem; }
.set-body .panel h3 { font-size: 1.25rem; font-family: var(--font-display); margin-bottom: 1.4rem; }
/* Title and explanation stacked on the left, the control on the right. Read
   as one line each, the explanation was competing with the thing it explains
   for the same horizontal space. */
.set-body .row { align-items: flex-start; gap: 0.9rem; padding: 1rem 0; }
.set-body .row-main { flex: 1 1 16ch; font-size: 0.95rem; font-weight: 500; white-space: normal; }
.set-body .row-sub { flex: 1 0 100%; order: 3; font-size: 0.82rem; color: var(--text-mute); }
.set-body .row > .btn, .set-body .row > .badge { order: 2; margin-left: auto; align-self: center; }

.set-profile { display: grid; grid-template-columns: 140px 1fr; gap: 2rem; align-items: start; }
.set-avatar { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; text-align: center; }
.set-avatar-img {
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: var(--on-brand); font-size: 2.6rem; font-weight: 700;
  overflow: hidden; font-family: var(--font-display);
}
.set-avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.set-avatar-change { color: var(--brand); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.set-avatar-change:hover { text-decoration: underline; }
.set-avatar em { font-size: 0.7rem; color: var(--text-mute); font-style: normal; line-height: 1.4; }
/* The one button that commits the form, at the end of it and on the side the
   eye leaves from. */
.set-actions { display: flex; justify-content: flex-end; width: 100%; max-width: 380px; }
/* The fields are capped so a name field is not a metre wide; the profile
   panel gives them the room that cap allows rather than a third of it. */
.set-profile .page-form .field { max-width: 480px; }
.set-profile .set-actions { max-width: 480px; }
/* Finding something that was said. A row that appears under the chat's own
   header, not a floating box: it belongs to this conversation and closes
   with it. */
.chat-find {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.85rem; border-bottom: 1px solid var(--border); background: var(--bg-2);
}
.chat-find input {
  flex: 1; min-width: 0; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.4rem 0.6rem; font-family: inherit; font-size: 0.85rem;
}
.chat-find input:focus { outline: none; border-color: var(--brand); }
.chat-find-count {
  font-size: 0.72rem; color: var(--text-mute); font-variant-numeric: tabular-nums;
  min-width: 2.5rem; text-align: right;
}
/* Hidden by the filter rather than removed, so nothing is rebuilt and the
   scroll position of what is left stays where it was. */
.chat-messages .msg-hidden { display: none; }

.set-remove { background: none; border: none; color: var(--danger); font-size: 0.78rem; }
.set-remove:hover { text-decoration: underline; }

/* The brand kit. A form of short fields, plus the two things worth seeing
   rather than reading: the colours as colours, and the logo as a logo. */
.set-note {
  color: var(--text-mute); font-size: 0.85rem; line-height: 1.55;
  max-width: 480px; margin: -0.2rem 0 1.1rem;
}
#brand-form .field { max-width: 480px; }
#brand-form .set-actions { max-width: 480px; }
.field-note { font-size: 0.72rem; color: var(--text-mute); font-style: normal; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: -0.5rem 0 0.9rem; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.55rem 0.25rem 0.3rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.72rem; color: var(--text-mute); font-variant-numeric: tabular-nums;
}
.brand-chip i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); }
.brand-logo { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.brand-logo-img {
  width: 132px; height: 64px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); overflow: hidden;
  font-size: 0.72rem; color: var(--text-mute);
}
.brand-logo-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

.pt-balance { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.4rem; }
.pt-num {
  font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pt-label { color: var(--text-dim); font-size: 0.95rem; }
.pt-delta { font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; font-weight: 600; }
.pt-delta.down { color: var(--text-mute); }
.pt-delta.up { color: var(--brand); }

.pt-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; margin-top: 1.2rem; }
.pt-plan {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-1);
}
.pt-plan.current { border-color: var(--brand); background: var(--grad-soft); }
.pt-plan strong { font-size: 0.95rem; }
.pt-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.pt-price em { font-style: normal; font-size: 0.8rem; font-weight: 400; color: var(--text-mute); }
.pt-pts { font-size: 0.8rem; color: var(--text-dim); }
.pt-lim { font-size: 0.74rem; color: var(--text-mute); line-height: 1.45; margin-bottom: 0.5rem; }

/* Points on their own, inside the app. One row under the balance rather than
   a panel of its own: it is an answer to "I have run out", not a section. */
.topup {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--border-soft);
}
.topup-label { font-size: 0.85rem; color: var(--text-dim); }
.topup-packs { display: flex; gap: 0.4rem; flex-wrap: wrap; flex: 1; }
.topup-pack {
  padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.76rem; color: var(--text-mute); white-space: nowrap;
}
.topup-pack strong { color: var(--text); font-size: 0.85rem; }
/* An empty balance is the reason the next request will fail — say so quietly. */
.side-user-meta span.is-empty { color: var(--danger); }

@media (max-width: 860px) { .pt-plans { grid-template-columns: 1fr; } }

.danger-panel { border-color: rgba(255, 143, 135, 0.3); }
.danger-panel h3 { color: var(--danger); }
.btn-danger { background: rgba(255, 143, 135, 0.12); border-color: rgba(255, 143, 135, 0.4); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: rgba(255, 143, 135, 0.2); border-color: var(--danger); }

textarea {
  font-family: inherit; font-size: 0.94rem; background: var(--bg-1);
  border: 1px solid var(--border); color: var(--text); padding: 0.7rem 0.85rem;
  border-radius: 10px; width: 100%; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,77,216, 0.18); }

@media (max-width: 860px) {
  .set-layout { grid-template-columns: 1fr; }
  /* Wrapped, not scrolled. Laid out as a row it kept the full-width rule
     from the sidebar, so the first tab filled the screen and the other four
     sat off the right-hand edge with nothing to say they were there — on a
     phone the settings screen had one section. */
  .set-nav { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.4rem; }
  .set-tab {
    flex: 0 0 auto; width: auto; gap: 0.5rem;
    padding: 0.55rem 0.85rem; border: 1px solid var(--border); border-radius: 999px;
  }
  .set-tab.active { border-color: transparent; }
  .set-tab strong { font-size: 0.88rem; }
  .set-profile { grid-template-columns: 1fr; justify-items: center; }
  .set-body .panel { padding: 1.3rem 1.2rem; }
}

/* ════════════════════════════════════════════════
   PUBLIC GALLERY
   ════════════════════════════════════════════════ */
.gallery-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gal-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.16s, transform 0.16s;
}
.gal-card:hover { border-color: var(--brand); transform: translateY(-2px); }
/* The published site is rendered at desktop width and scaled down, so a card
   shows the layout visitors actually get rather than its phone view. The
   scale depends on the card's width, so it is set from JS on render and on
   resize; these are the fallbacks until it is. */
/* Taller than it was, at 1200 x 1100 rather than 1200 x 850.
   850px of a generated page is the hero and nothing else — the headline, the
   paragraph and the buttons, on every card, which makes a row of them look
   like one site repeated. 1100 reaches the top of whatever comes next, which
   on most of these is the first band of photographs and is the part that
   makes one card different from another.
   It is a trade: the card is nearer square and everything in it is smaller.
   Worth it, because a thumbnail exists to be told apart, not to be read. */
.gal-thumb {
  width: 1200px; height: 1100px; border: none; background: #fff; display: block;
  transform: scale(0.24); transform-origin: 0 0;
  pointer-events: none;
}
.gal-thumb-wrap { aspect-ratio: 1200 / 1100; overflow: hidden; background: #fff; }
.gal-meta { padding: 0.8rem 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.15rem; }
.gal-name { font-weight: 650; font-size: 0.95rem; color: var(--text); }
.gal-author { font-size: 0.78rem; color: var(--text-mute); }
.gal-actions { display: flex; gap: 0.45rem; margin-top: 0.6rem; }
.gal-actions .btn { flex: 1; }
.gal-remixes {
  font-size: 0.72rem; color: var(--text-mute); align-self: center;
  white-space: nowrap; padding-left: 0.2rem;
}

.btn-github {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  background: #24292f; border: 1px solid #3d444d; color: #fff; text-decoration: none;
}
.btn-github:hover { background: #32383f; }
.gh-mark { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.auth-divider {
  display: flex; align-items: center; gap: 0.7rem; margin: 1rem 0 0.2rem;
  color: var(--text-mute); font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* Only ever visible on a narrow screen — see the responsive block. */
.mobile-switch { display: none; }

@media (max-width: 940px) {
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .features { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .plan.featured { transform: none; }
  .step-line { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  /* Two rows: the switch bar, then whichever pane is on. The rail is a
     drawer over the top of them — see the phone section further down. */
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }

  /* Below 16px, iOS zooms the page when a field is focused and never zooms
     back out — the layout is left scaled up and half off-screen. */
  input, select, textarea { font-size: 16px; }

  /* Clear of the home indicator, and of the rounded corners either side. */
  .composer {
    margin-bottom: max(0.7rem, env(safe-area-inset-bottom));
    margin-left: max(0.7rem, env(safe-area-inset-left));
    margin-right: max(0.7rem, env(safe-area-inset-right));
  }
  /* On a phone the row is already tight; the keyboard hint is the first
     thing to go, because there is no keyboard to hint about. */
  .composer-hint { display: none; }
  /* And with four modes the rail wraps rather than pushing the send button
     off the end — the two things that must never be unreachable are the
     field and the button that sends it. */
  .composer-bar { flex-wrap: wrap; }
  .mode { order: 3; flex-basis: 100%; }
  .composer-bar { gap: 0.35rem; }
  .send { margin-left: auto; }

  .mobile-switch {
    display: flex; gap: 0.3rem;
    padding: 0.5rem max(0.7rem, env(safe-area-inset-left));
    background: var(--bg-1); border-bottom: 1px solid var(--border);
  }
  .mswitch {
    flex: 1; padding: 0.55rem; border-radius: 9px; font-size: 0.85rem; font-weight: 600;
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim);
  }
  .mswitch.active { background: var(--grad-soft); border-color: var(--brand); color: var(--text); }

  /* One pane at a time; .mobile-hidden is set by the switch. */
  .chat-pane, .preview-pane { grid-column: 1; min-height: 0; }
  .chat-pane.mobile-hidden, .preview-pane.mobile-hidden { display: none; }

  /* The preview's own toolbar has more buttons than fit — let it scroll. */
  .preview-head { overflow-x: auto; gap: 0.5rem; }
  .preview-head::-webkit-scrollbar { display: none; }
  .preview-tabs, .preview-actions { flex-shrink: 0; }
  .file-tree { width: 150px; }
}
@media (max-width: 560px) {
  .nav-actions .btn-ghost { display: none; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

/* ── Custom domain: the steps someone follows at their DNS provider ── */
.domain-hint { margin: 6px 0 14px; font-size: 13px; color: var(--text-dim); }
.domain-hint code { background: var(--bg-3); padding: 1px 5px; border-radius: 4px; }
.domain-steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; }
.domain-steps > li { position: relative; padding: 0 0 18px 34px; counter-increment: step; }
.domain-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text-dim);
}
/* The line joining the steps, so they read as one sequence. */
.domain-steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 11px; top: 26px; bottom: 4px;
  width: 1px; background: var(--border);
}
.domain-steps strong { display: block; font-size: 14px; margin-bottom: 4px; }
.domain-steps p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.dns-cell { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.dns-cell > span { flex: 0 0 52px; font-size: 12px; color: var(--text-dim); }
.dns-cell > code { flex: 1; overflow-x: auto; white-space: nowrap; }
.dns-copy {
  flex: 0 0 auto; padding: 3px 9px; font-size: 12px; cursor: pointer;
  border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-3); color: var(--text-dim);
}
.dns-copy:hover { color: var(--text); border-color: var(--text-dim); }
.domain-badge.active { background: rgba(63,191,127,0.12); border-color: rgba(63,191,127,0.5); color: #7fd6a8; }

/* ── Site settings: search result, share image, tab icon ── */
.field-note { display:block; margin-top:6px; font-size:12px; color:var(--text-dim); line-height:1.5 }
.field-label { display:block; margin-bottom:6px; font-size:13px; color:var(--text-dim) }
#seo-description { resize:vertical; min-height:64px }

/* Shown the way Google shows it: a description is impossible to judge as a
   form field and obvious as a search result. */
.seo-preview { margin:4px 0 18px; padding:14px 16px; border:1px solid var(--border); border-radius:10px; background:var(--bg-2) }
.seo-preview-label { display:block; margin-bottom:10px; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-dim) }
.seo-serp { display:flex; flex-direction:column; gap:3px }
.seo-serp-url { font-size:12px; color:var(--text-dim) }
.seo-serp-title { font-size:17px; color:#8ab4f8; line-height:1.3 }
.seo-serp-desc { font-size:13px; color:var(--text-dim); line-height:1.55 }

.seo-images { display:grid; grid-template-columns:120px 1fr; gap:18px; margin-bottom:18px }
.seo-image { display:flex; flex-direction:column }
.seo-drop {
  display:flex; align-items:center; justify-content:center; text-align:center;
  height:88px; padding:8px; border:1px dashed var(--border); border-radius:10px;
  background:var(--bg-2); color:var(--text-dim); font-size:11px; line-height:1.4; overflow:hidden;
}
.seo-drop.wide { height:88px }
.seo-drop.has-image { border-style:solid; padding:0 }
.seo-drop.has-image .seo-drop-hint { display:none }
.seo-drop img { max-width:100%; max-height:100%; object-fit:contain }
.seo-image-actions { display:flex; gap:6px; margin-top:8px }
.seo-image-actions .btn { flex:1; text-align:center; cursor:pointer }

.seo-analytics { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:8px }
.seo-analytics select, .seo-analytics input {
  width:100%; padding:9px 11px; border-radius:8px; font:inherit; font-size:14px;
  background:var(--bg-3); border:1px solid var(--border); color:var(--text);
}
.seo-analytics input:disabled { opacity:.45 }
@media (max-width:520px){
  .seo-images { grid-template-columns:1fr }
  .seo-analytics { grid-template-columns:1fr }
}

.prompt-input {
  width:100%; margin:14px 0 4px; padding:11px 13px; font:inherit; font-size:15px;
  background:var(--bg-3); border:1px solid var(--border); border-radius:9px; color:var(--text);
}
.prompt-input:focus { outline:none; border-color:var(--accent) }

/* A page row and its delete button share one hover target. */
.page-item { display:flex; align-items:stretch; gap:2px }
.page-item .page-row { flex:1; min-width:0 }
.page-del {
  flex:0 0 auto; width:26px; border:none; border-radius:7px; cursor:pointer;
  background:transparent; color:var(--text-dim); font-size:16px; line-height:1;
  opacity:0; transition:opacity .12s, color .12s;
}
.page-item:hover .page-del, .page-del:focus-visible { opacity:1 }
.page-del:hover { color:var(--danger) }
/* Duplicate, beside delete and shaped the same: they are the two things a
   page row does, and they should read as one pair rather than two controls
   that happen to be next to each other. */
.page-dup {
  flex:0 0 auto; width:26px; border:none; border-radius:7px; cursor:pointer;
  background:transparent; color:var(--text-dim); line-height:1; padding:0;
  opacity:0; transition:opacity .12s, color .12s;
  display:grid; place-items:center;
}
.page-dup svg { width:14px; height:14px; fill:currentColor }
.page-item:hover .page-dup, .page-dup:focus-visible { opacity:1 }
.page-dup:hover { color:var(--accent) }
/* Page views. One series, so no legend — the heading names it. The colour is
   the product's own brand-2, which passes the lightness band and the 3:1
   contrast floor against this panel in both themes; the app's --accent does
   not, so it is not used here. */
.visits-body { display:flex; flex-direction:column; gap:6px }
.visits-top { margin-bottom:6px }
.visits-number {
  margin:0; font-family:var(--font-display); font-size:2.4rem; font-weight:700;
  line-height:1; color:var(--text); font-variant-numeric:tabular-nums;
}
.visits-unit { margin:4px 0 0; font-size:0.85rem; color:var(--text-dim) }
.visits-change { margin:6px 0 0; font-size:0.8rem; color:var(--text-mute, var(--text-dim)) }
.visits-figure { margin:10px 0 0 }
.visits-chart { width:100%; height:auto; display:block; overflow:visible }
.visits-bar { fill:#4d7cf5 }
.visits-bar:hover { fill:#7aa2ff }
.visits-base { stroke:var(--border); stroke-width:1 }
.visits-caption {
  display:flex; justify-content:space-between; margin-top:4px;
  font-size:0.7rem; color:var(--text-dim); font-variant-numeric:tabular-nums;
}
.visits-h { margin:16px 0 6px; font-size:0.9rem; color:var(--text) }
.visits-table { width:100%; border-collapse:collapse; font-size:0.85rem }
.visits-table th {
  text-align:left; font-weight:600; color:var(--text-dim); font-size:0.72rem;
  text-transform:uppercase; letter-spacing:0.06em; padding:0 0 6px;
}
.visits-table th:last-child, .visits-table td:last-child { text-align:right }
.visits-table td {
  padding:7px 0; border-top:1px solid var(--border); color:var(--text);
  font-variant-numeric:tabular-nums;
}

/* The menu, as rows to drag. Reads as a list of links rather than as a form:
   nothing here is typed, only moved. */
.menu-rail { display:flex; flex-direction:column; gap:2px }
.menu-row {
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px;
  padding:8px 10px; border-radius:8px; background:var(--bg-2);
  border:1px solid transparent; cursor:grab; user-select:none;
}
.menu-row:hover { border-color:var(--border) }
.menu-row:focus-visible { outline:none; border-color:var(--accent) }
.menu-row.over { border-color:var(--accent); background:var(--bg-3) }
.menu-grip { color:var(--text-dim); font-size:13px; line-height:1 }
.menu-label { font-size:13px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.menu-href { font-size:11px; color:var(--text-dim); font-family:var(--font-mono, monospace) }
.menu-rail-note { margin:10px 2px 0; font-size:11.5px; color:var(--text-dim); line-height:1.5 }

.domain-root-note {
  margin:10px 0 0; padding:9px 12px; border-radius:8px; font-size:12.5px; line-height:1.5;
  background:rgba(88,166,240,.10); border:1px solid rgba(88,166,240,.32); color:#8cc3f7;
}

/* Undo and redo sit together, apart from the named actions. */
.undo-pair { display:flex; gap:2px; margin-right:4px }
.undo-pair .icon-btn { width:30px; height:30px; padding:0; display:grid; place-items:center }
.undo-pair svg { width:17px; height:17px; fill:currentColor }
.undo-pair .icon-btn:disabled { opacity:.3; cursor:default }

/* One line, bottom of the screen, gone once acknowledged. */
.cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  max-width: 640px; margin: 0 auto; padding: 13px 16px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.cookie-notice p { margin: 0; flex: 1; min-width: 220px; font-size: 13px; line-height: 1.55; color: var(--text-dim); }
.cookie-notice a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.cookie-notice .btn { flex: 0 0 auto; }

/* ── Standalone pages: report, help, legal ── */
.doc-body { overflow: auto; background: var(--bg-1); }
.doc { max-width: 680px; margin: 0 auto; padding: 56px 24px 96px; }
.doc-back { display: inline-block; margin-bottom: 32px; font-size: 13px; color: var(--text-dim); text-decoration: none; }
.doc-back:hover { color: var(--text); }
.doc h1 { margin: 0 0 14px; font-size: clamp(1.9rem, 5vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.15; }
.doc h2 { margin: 40px 0 12px; font-size: 1.15rem; letter-spacing: -0.01em; }
.doc h3 { margin: 26px 0 8px; font-size: 0.98rem; }
.doc p, .doc li { color: var(--text-dim); line-height: 1.7; font-size: 15px; }
.doc-lede { font-size: 16px; margin-bottom: 32px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.doc-form { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.doc-form select, .doc-form textarea, .doc-form input {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 14px;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 9px; color: var(--text);
}
.doc-form textarea { resize: vertical; }
.doc-form .field em { font-style: normal; color: var(--text-dim); font-weight: 400; }
.doc-form .btn { margin-top: 14px; }
.doc-done h2 { margin-top: 0; }
.doc-updated { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim); }

/* Saved / unsaved, as a state rather than a message that appears and goes. */
.editor-dirty { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.editor-dirty.is-dirty { color: #8cc3f7; background: rgba(88,166,240,.12); }
.editor-dirty.is-saved { color: var(--text-dim); background: transparent; }

/* ── Touch: what hover was hiding ──────────────────────────
   Controls revealed on hover do not exist on a touch screen — there is no
   hover state to enter, so deleting a page was unreachable on a phone. */
@media (hover: none) {
  .page-del, .tree-del { opacity: 1; color: var(--text-dim); }
  /* Bigger than a mouse needs, because a fingertip is not a pointer. */
  .page-del { width: 34px; }
  .page-row, .tree-file, .tree-dir { min-height: 40px; }
}

@media (max-width: 640px) {
  /* Modals become sheets: several of them are taller than a phone, and a
     dialogue that cannot scroll hides its own confirm button. */
  .modal-overlay { padding: 0; }
  .modal-card {
    width: 100%; max-width: none;
    /* Pinned to the bottom while it fits, so the buttons are under the thumb
       and not at the top of a tall sheet. */
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
    padding-bottom: max(1.4rem, env(safe-area-inset-bottom));
  }
  #domain-modal .modal-card, #seo-modal .modal-card { width: 100%; }

  /* The toolbar scrolls, so the one button people are looking for should not
     be the one that scrolled off. */
  .preview-actions { position: relative; }
  #publish-btn { position: sticky; right: 0; }

  /* Two columns of settings do not fit; one does. */
  .seo-images, .seo-analytics, .dns-cell { grid-template-columns: 1fr; }
  .dns-cell { display: block; }
  .dns-cell > span { margin-bottom: 3px; }
  .dns-cell > code { display: block; margin-bottom: 6px; }
  .cookie-notice { left: 8px; right: 8px; bottom: 8px; }
}

/* Where a domain connection stands, step by step. */
.domain-checks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.dcheck { display: flex; gap: 11px; align-items: flex-start; padding: 9px 11px; border-radius: 8px; background: var(--bg-2); }
.dcheck-mark { flex: 0 0 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; line-height: 1; margin-top: 1px; }
.dcheck-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dcheck-body strong { font-size: 13px; font-weight: 600; }
.dcheck-body span { font-size: 12px; line-height: 1.5; color: var(--text-dim); }
.dcheck.ok .dcheck-mark { background: rgba(63,191,127,.15); color: #7fd6a8; }
.dcheck.wait .dcheck-mark { background: rgba(88,166,240,.15); color: #8cc3f7; }
.dcheck.fail .dcheck-mark { background: rgba(255,95,126,.15); color: #ff9aae; }
.dcheck.skip .dcheck-mark { background: var(--bg-3); color: var(--text-dim); }
.dcheck.fail { background: rgba(255,95,126,.06); }
.note.note-warn { background: rgba(88,166,240,.08); border-color: rgba(88,166,240,.35); }
.note.note-warn .note-label { color: #8cc3f7; }

/* Panels that walk someone through several steps: 420px turns each
   instruction into four lines and pushes the button that acts on them off the
   screen. */
#domain-modal .modal-card, #seo-modal .modal-card { width: min(560px, 100%); }

/* A second question inside the same dialogue, when it belongs there. */
.prompt-choice { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 4px; }
.choice { display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-3); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--text-dim); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--grad-soft); }
.choice input { margin-top: 3px; accent-color: var(--brand); flex: 0 0 auto; }
.choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-body strong { font-size: 13.5px; font-weight: 600; }
.choice-body span { font-size: 12px; line-height: 1.5; color: var(--text-dim); }

/* ── Explore: what other people made ──────────────────────
   The live site is the thumbnail. A screenshot of a site goes stale the moment
   its author changes anything, and the real one is already published. */
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.explore-card { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .15s, transform .15s; }
.explore-card:hover { border-color: var(--text-dim); transform: translateY(-2px); }
.ex-shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-3); }
/* Rendered wide and scaled back, so the thumbnail is a desktop layout rather
   than the site's phone breakpoint. */
.ex-shot iframe { width: 250%; height: 250%; border: 0; transform: scale(.4); transform-origin: 0 0; pointer-events: none; }
.ex-shot-none { width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-3), var(--bg-2)); }
.ex-body { display: flex; align-items: center; gap: 12px; padding: 13px 15px; }
.ex-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ex-meta strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-meta span { font-size: 12px; color: var(--text-dim); }
.ex-body .btn { flex: 0 0 auto; }
.explore-empty { max-width: 460px; margin: 48px auto; text-align: center; }
.explore-empty h3 { margin: 0 0 10px; font-size: 1.05rem; }
.explore-empty p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.65; }
/* ── The preview toolbar ───────────────────────────────────
   It was nine buttons across two lines, so the two that get used — switching
   view, and publishing — were the hardest to find. One row now: what you touch
   while working stays out, everything that opens a panel is behind one gear. */
.preview-head { flex-wrap: nowrap; padding: 0.55rem 0.9rem; }
.preview-tabs, .preview-actions { flex-wrap: nowrap; gap: 0.35rem; }
.preview-tabs { min-width: 0; }

/* Preview and Code are one thing seen two ways, so they share one control
   rather than being two buttons that happen to sit together. */
.seg { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--border); }
.seg-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0.34rem 0.6rem; border: none; border-radius: 8px;
  background: transparent; color: var(--text-dim);
  font: inherit; font-size: 0.83rem; font-weight: 500; cursor: pointer;
  transition: background .14s, color .14s;
}
.seg-btn svg { width: 15px; height: 15px; fill: currentColor; flex: 0 0 auto; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--bg-1); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.25); }

/* A divider rather than more spacing: the groups do different jobs and the
   eye reads a line faster than a gap. */
.viewport-switch { margin-left: 0.35rem; padding-left: 0.5rem; border-left: 1px solid var(--border); }
.icon-btn.pick.active { background: var(--grad); color: var(--on-brand); }

.tool-menu-wrap, .project-menu-wrap { position: relative; }
.tool-menu { min-width: 210px; }
.tool-menu button { display: flex; align-items: center; gap: 10px; }
.tm-ico { width: 16px; height: 16px; flex: 0 0 auto; color: var(--text-dim); display: grid; place-items: center; }
.tm-ico svg { width: 16px; height: 16px; fill: currentColor; }
.tool-menu button:hover .tm-ico { color: var(--text); }
.tm-sep { height: 1px; margin: 0.3rem 0.2rem; background: var(--border); }
/* Unread count, pushed to the end of its row. The only place anyone finds
   out a message arrived, so it has to carry the accent. */
.tm-badge {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--grad); color: var(--on-brand);
  font-size: 0.7rem; font-weight: 700; line-height: 20px; text-align: center;
}

/* ── Form messages ── */
.inbox-list { display: flex; flex-direction: column; gap: 0.7rem; }
.inbox-row {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 0.8rem 0.9rem; background: var(--bg);
}
/* Unread is a left edge rather than a background: the rows are read one after
   another and a coloured block behind text is harder to read, which is the
   opposite of what marking it was for. */
.inbox-row.unread { border-left: 3px solid var(--brand); }
.inbox-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.5rem;
}
.inbox-when { font-size: 0.76rem; color: var(--text-mute); }
.inbox-field { display: flex; gap: 0.8rem; padding: 0.25rem 0; font-size: 0.88rem; }
.inbox-key {
  flex: 0 0 110px; color: var(--text-mute); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.04em; padding-top: 0.15rem;
}
.inbox-val { flex: 1; min-width: 0; color: var(--text-dim); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .inbox-field { flex-direction: column; gap: 0.1rem; }
  .inbox-key { flex: none; }
}

/* The project name is the menu: what you do to a project belongs on the thing
   itself, not on a row of buttons that never says which one they act on. */
button.project-title {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 0.3rem 0.5rem; margin-left: -0.5rem;
  background: transparent; border: none; border-radius: 9px;
  color: var(--text); font-size: 0.95rem; cursor: pointer;
  transition: background .14s;
}
button.project-title:hover:not(:disabled) { background: var(--bg-3); }
button.project-title:disabled { cursor: default; opacity: .7; }
button.project-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-chev { width: 15px; height: 15px; fill: var(--text-dim); flex: 0 0 auto; }
button.project-title:disabled .pt-chev { display: none; }
.project-menu-wrap .dropdown { left: 0; right: auto; }

@media (max-width: 860px) {
  /* Labels go before controls do: the icons are the same size on a phone and
     the row still has to hold everything. */
  .seg-btn span:not(.sr-only) { display: none; }
  .seg-btn { padding: 0.34rem 0.5rem; }
  .preview-head { overflow-x: auto; }
}

/* ── Publishing: the decision and its result in one place ──
   The button used to publish on press and report it in a toast that took the
   address with it when it faded — the one thing publishing is for. */
.publish-wrap { position: relative; }
.publish-panel { min-width: 300px; padding: 1rem; gap: 0.85rem; }
.pp-head { display: flex; flex-direction: column; gap: 3px; }
.pp-head strong { font-size: 0.95rem; }
.pp-head span { font-size: 0.78rem; color: var(--text-dim); }
.pp-live { display: flex; align-items: center; gap: 8px; padding: 0.55rem 0.7rem; border-radius: 9px; background: var(--bg-3); border: 1px solid var(--border); }
.pp-live a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; color: var(--brand); text-decoration: none; }
.pp-live a:hover { text-decoration: underline; }
.pp-live .btn { flex: 0 0 auto; }
.pp-vis { display: flex; flex-direction: column; gap: 6px; }
.pp-vis-label { font-size: 0.78rem; color: var(--text-dim); }
.pp-vis select { width: 100%; padding: 0.5rem 0.6rem; font: inherit; font-size: 0.85rem; background: var(--bg-3); border: 1px solid var(--border); border-radius: 9px; color: var(--text); }
.pp-vis small { font-size: 0.74rem; line-height: 1.45; color: var(--text-mute); }
.publish-panel .error-msg:empty { display: none; }
@media (max-width: 640px) { .publish-panel { min-width: min(300px, calc(100vw - 2rem)); } }

/* ── The landing's ask field ───────────────────────────────
   The call to action is a place to type, not a button. "Start building" asks
   someone to commit to an account before they have seen anything; a box asks
   for the idea, which is what they already have.

   So it is treated as the centre of the page: raised off the background,
   ringed in warm light that breathes, and it types to itself until someone
   takes over. */
.l-ask {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: min(660px, 100%); margin: 0 auto;
  padding: 9px 9px 9px 16px;
  background: #ffffff;
  border: 1px solid var(--l-line); border-radius: 18px;
  box-shadow: var(--l-shadow-lg);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
/* The ring is a sibling layer rather than a box-shadow so it can pulse
   without the field itself moving — a growing shadow on a focused input reads
   as the layout twitching. */
.l-ask::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, rgba(27,77,216,0.55), rgba(157,186,255,0.18) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s;
}
.l-ask::after {
  content: ""; position: absolute; inset: -18px; z-index: -1; border-radius: 30px;
  background: radial-gradient(60% 100% at 50% 50%, rgba(27,77,216,0.22), transparent 70%);
  opacity: .5; animation: l-breathe 5.5s ease-in-out infinite;
}
@keyframes l-breathe { 0%, 100% { opacity: .35; } 50% { opacity: .7; } }
.l-ask:hover { border-color: rgba(27,77,216,0.35); }
.l-ask:focus-within { border-color: transparent; transform: translateY(-1px); }
.l-ask:focus-within::before { opacity: 1; }

.l-ask-icon { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; color: var(--l-mint); }
.l-ask-icon svg { width: 18px; height: 18px; fill: currentColor; }
/* One line under the headline, at reading size rather than at lead size.
   A paragraph here pushes the field down the screen and is read by nobody,
   because the person it is aimed at has already decided to type. */
/* ── Out of the way, to the left ──
   The landing and the workspace are one journey, not two places: somebody
   typed a sentence and is now watching it be built. A cut makes them read as
   separate pages and loses the thread.
   Decoration only — app.js opens the workspace on a timer as well as on the
   transition, so a slide that never runs is never a door that never opens. */
#landing-screen.is-leaving {
  transform: translateX(-4%);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #landing-screen.is-leaving { transition: none; }
}

.l-lead-tight { max-width: 34rem; margin-inline: auto; font-size: 1rem; font-weight: 500; color: var(--l-dim); }

/* ── The first screen ──
   A sentence, and a box to type one into. Everything that used to be under it
   is a page of its own, read by somebody who went looking for it rather than
   scrolled past it. */
/* The section and the block inside it were both padded, so the two stacked
   into an empty half-screen between the field and the marks below it. The
   inner block owns the spacing; the section owns none. */
.l-hero { padding: 0; }
.l-hero-inner { padding-block: clamp(4rem, 13vh, 8.5rem) clamp(1.5rem, 4vh, 2.5rem); text-align: center; }
.l-h1 {
  max-width: 18ch; margin-inline: auto;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 800; line-height: 1.04; letter-spacing: -0.042em;
  color: var(--l-text);
}
/* The gradient span was doing the work when the page was dark. On white it
   reads as a highlighter pen through the middle of a sentence. */
.l-h1 .l-grad { background: none; -webkit-text-fill-color: currentColor; color: inherit; }

/* One pill, one field, one small round button — the whole call to action. */
.l-ask {
  width: min(100%, 42rem); margin: clamp(2.4rem, 6vh, 3.6rem) auto 0;
  /* Half of one row's height rather than 999px, so the ends are perfect
     circles while there is one line in it and the shape stays a field when
     the description runs to three — at 999px a grown box becomes two large
     semicircles with the text pushed into the middle. */
  border-radius: 30px; padding: 0.55rem 0.65rem 0.55rem 1.35rem;
  background: var(--l-s1); border: 1px solid var(--l-line);
  box-shadow: var(--l-shadow);
}
.l-ask:focus-within { border-color: var(--l-mint); box-shadow: var(--l-shadow-lg); transform: none; }
.l-ask-icon { color: var(--l-muted); }
.l-ask-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
.l-ask input { font-size: 1.02rem; padding: 0.6rem 0; }
.l-ask-go {
  flex: 0 0 auto; width: 38px; height: 38px; border: none; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, var(--l-mint) 14%, transparent);
  color: var(--l-mint);
  transition: background-color 0.16s ease, transform 0.16s ease;
}
.l-ask-go svg { width: 17px; height: 17px; fill: currentColor; }
.l-ask-go:hover { background: var(--l-mint); color: var(--l-on-mint); transform: scale(1.05); }


/* ── What it runs on ──
   At the bottom of the first screen, quiet and grey. Named as what it is
   rather than as a relationship: none of them endorse or sponsor this. */
/* Close to the field, not a section of its own. Spaced for a full page it
   pushed the footer past the fold, so the first scroll landed on empty
   white with nothing at either end of it. */
.l-integrations { padding: clamp(2rem, 5vh, 3.2rem) 0 clamp(1.6rem, 4vh, 2.6rem); text-align: center; }
.l-int-label {
  margin: 0 0 1.6rem; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--l-muted);
}
.l-int-row {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(2rem, 6vw, 4rem); flex-wrap: wrap; margin: 0; padding: 0; list-style: none;
}
.l-int-row li {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 1.1rem; font-weight: 600; color: var(--l-muted);
}
/* Greyed on purpose: these are somebody else's marks sitting on our page, and
   at full strength they compete with the one thing it is asking for. */
/* As supplied. Greyscaling somebody's mark is a modification, and that is
   the first thing every brand guideline forbids. */
.l-int-row img { height: 24px; width: auto; display: block; }
.l-int-row li.has-mark span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}

/* ── Who is signed in, in the corner ──
   One slot, two states, and neither shown until the session is known: a
   "Get Started" that flashes at somebody who signed in months ago is the
   small rudeness that makes a product feel like it is not paying attention. */
#l-nav-actions[data-state="unknown"] .l-nav-out { visibility: hidden; }
#l-nav-actions[data-state="in"] .l-nav-out { display: none; }
.l-nav-me {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  border: 1px solid var(--l-line); border-radius: 999px;
  text-decoration: none; color: var(--l-text);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.l-nav-me:hover { border-color: var(--l-mint); background: var(--l-s2); }
.l-nav-avatar {
  width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--l-mint); color: var(--l-on-mint);
  font-size: 0.78rem; font-weight: 700; line-height: 1;
}
.l-nav-who { display: flex; flex-direction: column; line-height: 1.15; }
.l-nav-who strong { font-size: 0.82rem; font-weight: 600; }
.l-nav-who em { font-style: normal; font-size: 0.7rem; color: var(--l-muted); }
@media (max-width: 640px) { .l-nav-who { display: none; } .l-nav-me { padding: 0.35rem; } }

.l-ask input {
  flex: 1; min-width: 0; padding: 0.75rem 0;
  background: transparent; border: none; outline: none;
  color: var(--l-text); font: inherit; font-size: 1.02rem;
  /* The one part of a dark field the browser still paints in its own colour.
     A white block cursor on an amber-lit input is the single thing on that
     hero that does not belong to the design. */
  caret-color: var(--brand);
}
/* The field says what it wants and then waits. It used to type rotating
   examples over its own placeholder, which meant the one line a first-time
   visitor needs to read — what to put in the box — was the one line the box
   never showed. */
.l-ask input::placeholder { color: var(--l-muted); }
/* Nothing overrides how the field is drawn. Every appearance and type
   override tried here moved the caret out of the pill on iOS and none of
   them stopped the autofill row they were for. */

/* No ring of its own. Every input in the workspace gets a focus ring from
   the rule near the top of this file, and inside the hero pill that ring is
   a second rounded box drawn within the first — which is what the caret
   appeared to be floating outside of. The pill already shows focus: it is
   the control, and the input is the whole of its inside. */
.l-ask input:focus { box-shadow: none; border-color: transparent; }

.l-ask .l-pill-lg {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.8rem 1.35rem; font-size: 0.98rem;
}
.l-ask .l-pill-lg svg { width: 17px; height: 17px; fill: currentColor; transition: transform .18s; }
.l-ask .l-pill-lg:hover svg { transform: translateX(3px); }

.l-ask-chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 1.15rem; }
.l-chips-label { font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--l-muted); margin-right: 2px; }
.l-chip {
  padding: 0.42rem 0.9rem; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.02); border: 1px solid var(--l-line);
  color: var(--l-dim); font: inherit; font-size: 0.86rem;
  transition: color .16s, border-color .16s, background .16s, transform .16s;
}
.l-chip:hover {
  color: var(--l-text); border-color: rgba(27,77,216,0.45);
  background: rgba(27,77,216,0.07); transform: translateY(-1px);
}

.l-hero-meta {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  margin: 2.2rem 0 4.5rem; font-size: 0.83rem; color: var(--l-muted);
}
.l-hero-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

@media (max-width: 620px) {
  .l-hero { padding-top: 6rem; }
  /* One row, on a phone as much as anywhere. It used to wrap — the input
     took the full width and pushed the round button onto a line of its own,
     bottom-left, which reads as a stray button rather than as the thing that
     sends the sentence above it. */
  .l-ask { flex-wrap: nowrap; gap: 8px; padding: 0.5rem 0.55rem 0.5rem 0.9rem; border-radius: 27px; }
  .l-ask input {
    flex: 1 1 auto; min-width: 0; padding: 0.55rem 0;
    /* 16px exactly. Below that, iOS zooms the page when the field takes
       focus and does not zoom back out — the single most common way a
       mobile form feels broken. */
    font-size: 16px;
  }
  .l-ask-icon { width: 18px; height: 18px; }
  .l-ask-icon svg { width: 17px; height: 17px; }
  .l-ask-go { width: 40px; height: 40px; }
  .l-ask .l-pill-lg { width: auto; justify-content: center; }
  .l-hero-meta { flex-wrap: wrap; }
  /* The row under the field: three links that fit, rather than three that
     nearly fit. */
  .l-quick { gap: 0.3rem 1rem; font-size: 0.86rem; }
}
@media (max-width: 380px) {
  /* Room for the placeholder before anything else: the magnifier is
     decoration, the words in the box are the instruction. */
  .l-ask-icon { display: none; }
  .l-ask { padding-left: 1.05rem; }
}
/* Nothing drifts, breathes or types for anyone who asked for stillness. */
@media (prefers-reduced-motion: reduce) {
  .l-rise { animation: none; }
  /* Including the modal, which arrived on a fade: an animation that does not
     run leaves whatever it started at on screen, and it started at
     transparent. */
  .modal-overlay, .modal-card { animation: none; }
  .l-ask::after { animation: none; opacity: .4; }
}

/* The mark, wherever the product names itself. */
.l-logo { height: 28px; }
.l-brand-lg { font-size: 1.35rem; gap: 0.6rem; }
.l-brand-lg .l-logo, .l-brand-lg .l-hex { height: 38px; width: 38px; }

.side-brand {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.15rem 0.5rem 0.9rem; text-decoration: none; color: var(--text);
}
.side-mark { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.side-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
/* Back and forward sit apart from undo and redo: one moves through the site,
   the other through its history. */
.nav-pair { margin-left: 0.35rem; padding-left: 0.5rem; border-left: 1px solid var(--border); }
.editor-dirty.is-error { color: #ff9aae; background: rgba(255,95,126,.12); }
/* Editing on the page is a mode, so the button that turns it on says so. */
.icon-btn#text-btn.active { background: var(--grad); color: var(--on-brand); }

/* ── The rail's two views: pages, and what is on all of them ── */
.rail-tabs { display: flex; gap: 2px; padding: 0 0.5rem 0.5rem; }
.rail-tab {
  flex: 1; padding: 0.36rem 0.5rem; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid transparent;
  color: var(--text-dim); font: inherit; font-size: 0.78rem; font-weight: 500;
  transition: color .14s, background .14s;
}
.rail-tab:hover { color: var(--text); }
.rail-tab.active { color: var(--text); background: var(--bg-3); border-color: var(--border); }

.det-group { margin-bottom: 0.9rem; }
.det-group-head {
  padding: 0 0.55rem 0.35rem; font-size: 0.66rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--text-mute);
}
.det-row { display: flex; flex-direction: column; gap: 3px; padding: 0.3rem 0.55rem 0.5rem; }
.det-label { display: flex; align-items: baseline; gap: 6px; font-size: 0.76rem; color: var(--text-dim); }
.det-where { font-size: 0.66rem; color: var(--text-mute); }
.det-row input {
  width: 100%; padding: 0.42rem 0.55rem; font: inherit; font-size: 0.82rem;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  transition: border-color .14s;
}
.det-row input:focus { outline: none; border-color: var(--brand); }
.det-row input:disabled { opacity: .5; }
.det-note { margin: 0.4rem 0.55rem 0; font-size: 0.68rem; line-height: 1.5; color: var(--text-mute); }
.rail-loading, .rail-empty { padding: 1rem 0.6rem; font-size: 0.78rem; line-height: 1.6; color: var(--text-mute); }

/* ── The phone ─────────────────────────────────────────────
   The workspace was built for two panes side by side and a rail down the
   left. On a phone the rail was laid out as a horizontal strip that ran off
   the right edge — half the navigation unreachable, the rest eating a fifth
   of the screen — and the cookie line, fixed to the bottom, sat exactly on
   top of the box people type in. */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5, 4, 3, 0.55); backdrop-filter: blur(2px);
  animation: fadeIn 0.18s ease;
}

@media (max-width: 940px) {
  .sidebar {
    position: fixed; z-index: 70; top: 0; bottom: 0; left: 0;
    width: min(280px, 84vw);
    flex-direction: column; overflow-y: auto;
    padding: max(0.9rem, env(safe-area-inset-top)) 0.7rem 1rem max(0.7rem, env(safe-area-inset-left));
    border-right: 1px solid var(--border); border-bottom: none;
    transform: translateX(-100%); transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1);
  }
  body.drawer-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  /* Back to how it reads on a wide screen: a column, full labels, room. */
  .side-user-meta { display: flex; }
  .side-item { white-space: normal; }
  .project-list li { white-space: nowrap; }

  /* The strip is gone, so the app is the switch bar and one pane. */
  .app { grid-template-rows: auto 1fr; }

  .mobile-switch { align-items: center; gap: 0.4rem; }
  .msw-menu {
    flex: 0 0 auto; width: 38px; height: 36px; display: grid; place-items: center;
    border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text-dim);
  }
  .msw-menu svg { width: 19px; height: 19px; fill: currentColor; }
  .msw-menu:hover { color: var(--text); }

  /* Whatever the notice is taking at the bottom, the composer stays clear of
     it — including the home indicator underneath. */
  /* One place holds it, or the gap is counted twice and the composer floats
     in the middle of nowhere. */
  .chat-pane { padding-bottom: var(--notice-h, 0px); }

  /* Only the view controls scroll. Publish is the button the whole screen is
     for, and it was the one that scrolled off. */
  .preview-head { overflow: visible; flex-wrap: nowrap; gap: 0.4rem; }
  /* An older rule pinned this to flex:0 0 auto, so it never gave up a pixel
     and the row grew past the screen — taking Publish, the button the whole
     screen is for, off the edge with it. */
  .preview-tabs { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .preview-tabs::-webkit-scrollbar { display: none; }
  .preview-actions { flex: 0 0 auto; overflow: visible; }
  #publish-btn { position: static; }
  .nav-pair, .undo-pair { flex: 0 0 auto; }
}

@media (max-width: 620px) {
  /* One line, small, out of the way of everything. */
  .cookie-notice { padding: 10px 12px; gap: 10px; }
  .cookie-notice p { font-size: 12px; }
  /* A project's name is more use here than the model it was built with. */
  .chat-head .msel { display: none; }
  /* A keyboard shortcut is not advice on a phone. */
  .composer-hint { display: none; }
  /* The switch bar already gives the preview the whole screen, and a phone is
     already the narrow width. Both controls are answers to questions nobody
     is asking here, and they were pushing Publish off the edge. */
  #chat-toggle, #viewport-switch { display: none; }
  /* Long enough to wrap in a one-line field, and then clipped. */
  #chat-input::placeholder { font-size: 15px; }
  /* The box was shorter than the line inside it, so the first line of the
     placeholder — and of what you typed — was sliced along the top. 16px
     also stops iOS zooming the page on focus and never zooming back. */
  #chat-input {
    /* Below 16px iOS zooms the page on focus and never zooms back. */
    font-size: 16px; min-height: 54px;
    padding: 0.8rem 0.9rem 0.45rem;
  }
}

/* ── The blog ──────────────────────────────────────────────
   Long-form reading, so the column is narrow and the type is bigger than the
   product's own. Everything else comes from the landing page: a blog that
   looks like a different company is a blog nobody connects to the thing it
   is about. */
.blog-body { overflow: auto; }
.blog-index { padding: 7rem 0 5rem; }
.blog-index h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; margin: 0 0 0.8rem; }
.blog-lede { max-width: 58ch; margin: 0 0 3rem; color: var(--l-dim); font-size: 1.05rem; line-height: 1.7; }

.post-list { display: grid; gap: 14px; max-width: 760px; }
.post-card {
  display: block; padding: 1.5rem 1.6rem; border-radius: 16px; text-decoration: none;
  background: var(--l-s1); border: 1px solid var(--l-line);
  transition: border-color .16s, transform .16s;
}
.post-card:hover { border-color: rgba(27,77,216,.45); transform: translateY(-2px); }
.post-card h2 { margin: 0.5rem 0 0.5rem; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--l-text); }
.post-card p { margin: 0 0 1rem; color: var(--l-dim); font-size: 0.95rem; line-height: 1.65; }
.post-meta { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--l-muted); }
.post-more { font-size: 0.88rem; color: var(--l-mint); }

.post { padding: 6.5rem 0 4rem; }
.post-wrap { max-width: 720px; }
.post-back { display: inline-block; margin-bottom: 2rem; font-size: 0.88rem; color: var(--l-dim); text-decoration: none; }
.post-back:hover { color: var(--l-text); }
.post h1 { font-size: clamp(2rem, 5.4vw, 3.1rem); line-height: 1.1; letter-spacing: -0.032em; margin: 0 0 0.7rem; text-wrap: balance; }
.post > .l-wrap > .post-meta { display: block; margin-bottom: 2.6rem; }

/* Held near 68 characters: past that the eye loses the start of the next
   line, which is most of what makes long text tiring. */
.post-body { font-size: 1.06rem; line-height: 1.75; color: var(--l-dim); }
.post-body > * { max-width: 68ch; }
.post-body .lead { font-size: 1.2rem; line-height: 1.65; color: var(--l-text); margin-bottom: 1.8rem; }
.post-body h2 { margin: 2.8rem 0 0.9rem; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--l-text); }
.post-body h3 { margin: 2rem 0 0.6rem; font-size: 1.1rem; color: var(--l-text); }
.post-body p { margin: 0 0 1.15rem; }
.post-body ul { margin: 0 0 1.4rem; padding-left: 1.2rem; }
.post-body li { margin-bottom: 0.7rem; }
.post-body strong { color: var(--l-text); }
.post-body em { color: var(--l-text); font-style: italic; }
.post-body code {
  padding: 2px 6px; border-radius: 5px; font-size: 0.9em;
  background: var(--l-s2); color: var(--l-mint-hi); font-family: var(--l-mono);
}
.post-body a { color: var(--l-mint); }

.post-cta {
  max-width: 68ch; margin: 3.5rem 0 0; padding: 2rem;
  border-radius: 18px; border: 1px solid var(--l-line);
  background: linear-gradient(140deg, rgba(27,77,216,.09), transparent 65%);
}
.post-cta h2 { margin: 0 0 0.5rem; font-size: 1.25rem; color: var(--l-text); }
.post-cta p { margin: 0 0 1.3rem; color: var(--l-dim); font-size: 0.95rem; }

@media (max-width: 620px) {
  .blog-index, .post { padding-top: 5.5rem; }
  .post-body { font-size: 1rem; }
}
/* A pull quote in a post: the one place the column is allowed to be louder. */
.post-quote {
  margin: 2.2rem 0; padding: 1.4rem 1.6rem;
  border-left: 3px solid var(--l-mint); border-radius: 0 12px 12px 0;
  background: linear-gradient(120deg, rgba(27,77,216,.07), transparent 70%);
}
.post-quote blockquote { margin: 0 0 0.8rem; font-size: 1.15rem; line-height: 1.55; color: var(--l-text); }
.post-quote figcaption { font-size: 0.86rem; color: var(--l-muted); }
.post-quote figcaption strong { color: var(--l-dim); }

/* ── The team, on the about post ──
   Photographs are optional by design. A card with no picture shows the
   person's initials at the same size, so a set that is half filled reads as
   a choice rather than as broken images. */
.team-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem; margin: 2rem 0 2.6rem; max-width: none;
}
.team-card {
  margin: 0; padding: 1.5rem;
  border: 1px solid var(--l-line); border-radius: 14px; background: var(--l-s1);
}
.team-face {
  display: grid; place-items: center; position: relative;
  width: 76px; height: 76px; margin-bottom: 1rem;
  border-radius: 50%; overflow: hidden;
  background: var(--grad-soft); border: 1px solid var(--l-line);
}
/* The monogram is the background of the circle, so an image simply covers it
   and nothing has to be toggled. */
.team-face::before {
  content: attr(data-initials);
  font-family: var(--l-display); font-size: 1.5rem; font-weight: 700;
  letter-spacing: 0.01em; color: var(--l-mint);
}
.team-face img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.team-card figcaption { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.7rem; }
.team-card figcaption strong { font-size: 1.02rem; color: var(--l-text); }
.team-role { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--l-muted); }
.team-card p { margin: 0; font-size: 0.92rem; line-height: 1.65; color: var(--l-dim); }
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr; } }
.l-head-link { display: inline-block; margin-left: 0.4rem; color: var(--l-mint); text-decoration: none; white-space: nowrap; }
.l-head-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════
   OPERATIONS PANEL
   Part of the app now rather than a page of its own behind a typed key.
   ════════════════════════════════════════════════ */
.ops-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.ops-tab {
  padding: 0.5rem 0.9rem; border: 1px solid var(--border); border-radius: 999px;
  background: none; color: var(--text-mute); font-size: 0.85rem;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.ops-tab:hover { color: var(--text-dim); }
.ops-tab.active { background: var(--grad-soft); border-color: var(--brand); color: var(--text); }

.ops-search {
  width: 100%; margin-bottom: 1rem; padding: 0.6rem 0.8rem;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font-size: 0.9rem;
}
/* A table of accounts is wide by nature. It scrolls inside its own box so the
   page never does. */
.ops-table-wrap { overflow-x: auto; }
.ops-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 640px; }
.ops-table th {
  text-align: left; padding: 0.5rem 0.6rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute);
  border-bottom: 1px solid var(--border);
}
.ops-table td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.ops-table .num { text-align: right; white-space: nowrap; }
.ops-table tr.is-suspended { opacity: 0.55; }
.ops-email { display: block; color: var(--text); }
.ops-sub { display: block; font-size: 0.76rem; color: var(--text-mute); margin-top: 0.15rem; }
.ops-actions { display: flex; gap: 0.35rem; justify-content: flex-end; flex-wrap: wrap; }

.ops-toggle { display: flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; color: var(--text-dim); margin-bottom: 1rem; }
.ops-msg { border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.7rem; background: var(--bg); }
.ops-msg.closed { opacity: 0.55; }
.ops-msg-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.ops-msg-head span { font-size: 0.76rem; color: var(--text-mute); }
.ops-msg p { margin: 0 0 0.5rem; font-size: 0.88rem; color: var(--text-dim); white-space: pre-wrap; overflow-wrap: anywhere; }
.ops-msg .ops-actions { justify-content: flex-start; }

/* ── Plan picker ──
   One row per plan, each saying what it gives. The limits are the reason
   anyone is in this dialogue, so they read as part of the name rather than as
   a footnote under it. */
.plan-picks { display: grid; gap: 8px; margin: 0 0 1.2rem; }
.plan-pick {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.9rem; width: 100%; text-align: left;
  padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-3); color: var(--text-dim);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.plan-pick:hover { border-color: var(--text-dim); color: var(--text); }
.plan-pick[aria-pressed="true"] {
  border-color: var(--brand); background: var(--grad-soft); color: var(--text);
}
.plan-pick-name { font-size: 0.92rem; font-weight: 600; flex: 0 0 auto; }
/* Wraps rather than pushing the row wider: the dialogue is a fixed width and
   a horizontal scrollbar inside a modal is always a mistake. */
.plan-pick-limits { font-size: 0.78rem; color: var(--text-mute); text-align: right; min-width: 0; }
@media (max-width: 520px) {
  .plan-pick { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .plan-pick-limits { text-align: left; }
}

/* ── Uploaded images ──
   A grid of what is stored, because "delete some images" needs somewhere to
   do it. Square cells so a page of mixed shapes still reads as a set. */
.quota-bar { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; margin: 0.4rem 0 0.6rem; }
.quota-bar span { display: block; height: 100%; background: var(--grad); transition: width 0.3s; }
.quota-bar span.full { background: var(--danger); }
/* Asking for a picture. The shapes are a radio group that shows what each one
   is for, because "16:9" is not what anybody is choosing between — a banner
   and a product card is. */
.img-shapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem; margin: 0.8rem 0; }
.img-shape { display: flex; flex-direction: column; gap: 0.15rem; text-align: left; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: inherit; cursor: pointer; font: inherit; }
.img-shape:hover { border-color: var(--border-strong, var(--border)); }
.img-shape strong { font-size: 0.85rem; font-weight: 600; }
.img-shape span { font-size: 0.75rem; opacity: 0.7; line-height: 1.3; }
.img-shape.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.img-make-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.img-make-row .page-note { margin: 0; }
#img-prompt { width: 100%; resize: vertical; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.img-cell { margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); }
.img-cell img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg-3); }
.img-cell figcaption {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.35rem 0.5rem; font-size: 0.74rem; color: var(--text-mute);
}

/* Room left, in the account menu. A bar rather than a number alone: "38 MB"
   means nothing without knowing what the ceiling is. */
.side-space { padding: 0.6rem 0.7rem 0.7rem; border-bottom: 1px solid var(--border-soft); }
.side-space-label { display: block; font-size: 0.72rem; color: var(--text-mute); margin-bottom: 0.35rem; }
.side-space .quota-bar { margin: 0; }

/* The offer to list a site publicly, shown once after publishing. Set apart
   from the panel's own controls: it is a question, not a setting. */
.pp-ask {
  margin-top: 0.9rem; padding: 0.8rem 0.9rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--grad-soft);
}
.pp-ask p { margin: 0 0 0.7rem; font-size: 0.82rem; line-height: 1.5; color: var(--text-dim); }
.pp-ask-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }

/* ── House rules ──
   Two short lists rather than one long one: what it does, what it never
   does. A tick or a cross carries that at a glance, so the eye can skip the
   group it is not looking for. */
.rule-count {
  display: inline-block; min-width: 20px; margin-left: 0.4rem; padding: 0 6px;
  border-radius: 999px; background: var(--bg-3); color: var(--text-mute);
  font-size: 0.72rem; font-weight: 600; line-height: 20px; text-align: center;
}
.rule {
  border: 1px solid var(--border); border-left-width: 3px; border-radius: 10px;
  padding: 0.75rem 0.9rem; margin-bottom: 0.6rem; background: var(--bg);
}
.rule.off { opacity: 0.5; }
.rule-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.rule-head strong { font-size: 0.92rem; }
.rule-mark {
  display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto;
  border-radius: 50%; font-size: 0.7rem; font-weight: 700;
}
.rule-mark.yes { background: rgba(27,77,216,.16); color: var(--brand); }
.rule-mark.no { background: rgba(255,95,126,.14); color: var(--danger); }
.rule-when {
  margin-left: auto; font-size: 0.72rem; color: var(--text-mute);
  letter-spacing: 0.03em; text-align: right; min-width: 0;
}
.rule p { margin: 0 0 0.5rem; font-size: 0.86rem; line-height: 1.55; color: var(--text-dim); }
.rule-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.8rem; flex-wrap: wrap; font-size: 0.72rem; color: var(--text-mute);
}

/* Which kind is being written. Two buttons rather than a select: the choice
   changes what the rule means, not a detail of it. */
.rule-kind { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.rule-kind-btn {
  flex: 1 1 200px; padding: 0.6rem 0.9rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-3); color: var(--text-mute);
  font-size: 0.85rem; transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.rule-kind-btn:hover { color: var(--text-dim); }
.rule-kind-btn.active { border-color: var(--brand); background: var(--grad-soft); color: var(--text); }

/* What the rules cost, split the way they are billed. A number alone answers
   nothing; a number beside what it buys answers "is this expensive". */
.tok-rows { display: grid; gap: 0.7rem; margin: 0.6rem 0 0.4rem; }
.tok-row { display: grid; grid-template-columns: 130px 1fr 190px; gap: 0.8rem; align-items: center; }
.tok-label { font-size: 0.78rem; color: var(--text-mute); }
.tok-row .quota-bar { margin: 0; }
.tok-row .quota-bar span.soft { background: var(--bg-3); }
.tok-value { font-size: 0.78rem; color: var(--text-dim); text-align: right; }
.tok-value strong { color: var(--text); }
.tok-value em { display: block; font-style: normal; font-size: 0.7rem; color: var(--text-mute); }
@media (max-width: 700px) {
  .tok-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .tok-value { text-align: left; }
}

/* What a site cost to build, under its live address. A receipt, not a
   headline: quiet, and only once there is something to report. */
.pp-cost {
  margin: 0.5rem 0 0; font-size: 0.74rem; line-height: 1.5; color: var(--text-mute);
}

/* The same, per message in the chat. */
.msg-cost {
  align-self: flex-end; margin: -0.2rem 0.2rem 0.4rem;
  font-size: 0.7rem; color: var(--text-mute); letter-spacing: 0.02em;
}

/* An email in the people table is the way into that person, so it looks like
   a way in rather than like a cell. */
.ops-open {
  display: block; padding: 0; background: none; border: none;
  color: var(--text); font-size: inherit; text-align: left;
  border-bottom: 1px dashed var(--border); cursor: pointer;
}
.ops-open:hover { color: var(--brand); border-bottom-color: var(--brand); }
.btn.danger { color: var(--danger); }
.btn.danger:hover:not(:disabled) { background: rgba(255, 95, 126, 0.1); }

/* ── The record, the alerts and the trend ── */
.audit-kind {
  display: inline-block; margin-right: 0.5rem; padding: 0.05rem 0.45rem;
  border-radius: 999px; background: var(--bg-3); color: var(--text-mute);
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.audit-kind.k-suspend, .audit-kind.k-unpublish { background: rgba(255,95,126,.14); color: var(--danger); }
.audit-kind.k-points, .audit-kind.k-plan { background: rgba(27,77,216,.16); color: var(--brand); }

/* Thirty days as bars. Small on purpose: it answers "is it going up", which
   is the only version of the number worth acting on. */
.spark-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.spark-head { font-size: 0.76rem; color: var(--text-mute); margin-bottom: 0.4rem; }
.spark-head strong { font-size: 1.25rem; color: var(--text); font-family: var(--font-display); }
.spark-bars { display: flex; align-items: flex-end; gap: 2px; height: 46px; }
.spark-bar { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--grad); opacity: 0.85; }
.spark-bar:hover { opacity: 1; }

/* A published site, looked at without leaving the panel or loading it as
   yourself in a real tab. */
.ops-frame {
  width: 100%; height: min(52vh, 420px); border: 1px solid var(--border);
  border-radius: 10px; background: #fff; margin-bottom: 1rem;
}

/* Something worth knowing that is not an error: the build worked, and one
   thing about it needs saying. */
.msg.bot.warn {
  border: 1px solid rgba(27,77,216, 0.35);
  background: var(--grad-soft);
  color: var(--text-dim);
}

/* The trail of what happened, left in place when a build ends. A line that
   changes says what is happening now; a trail says what happened — which is
   what somebody reads a week later to understand what they were charged for. */
.bp-trail { list-style: none; margin: 0 0 0.5rem; padding: 0; display: grid; gap: 0.25rem; }
.bp-trail li {
  display: flex; align-items: baseline; gap: 0.45rem;
  font-size: 0.8rem; color: var(--text-dim); font-style: normal;
}
.bp-trail li::before {
  content: "✓"; flex: 0 0 auto; color: var(--brand); font-size: 0.72rem;
}
/* The filename, kept for whoever it means something to and out of the way of
   everyone else. */
.bp-trail li i {
  font-style: normal; font-size: 0.7rem; color: var(--text-mute);
  font-family: var(--mono, ui-monospace, monospace);
}
/* The record of the build, as one card with a heading on it. The steps are
   inside; the heading says what happened, which is all most people want. */
.msg.bot.trail-done { background: none; }
.msg.bot.trail-done .bp-trail { margin: 0; padding: 0 0.85rem 0.2rem; }
.bp-trail-foot {
  padding: 0 0.85rem 0.7rem;
  font-size: 0.72rem; color: var(--text-mute); font-variant-numeric: tabular-nums;
}

/* What is up, where somebody is already looking when something is wrong. */
/* ── The status banner ──
   One sentence that answers the question somebody arrived with, before any
   table asks them to do the summarising themselves. Never green while
   something is red: a summary that rounds a fault away is read as an
   all-clear by exactly the person who came to check. */
.ops-banner {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 1.1rem; margin: 0.2rem 0 0.4rem;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-3);
}
.ops-banner strong { display: block; font-size: 1rem; font-weight: 600; }
.ops-banner span { font-size: 0.8rem; color: var(--text-mute); }
.ops-banner-mark {
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid currentColor;
}
.ops-banner-mark::after { content: "✓"; font-size: 0.8rem; line-height: 1; }
.ops-banner--good .ops-banner-mark { color: var(--brand); }
.ops-banner--warn .ops-banner-mark { color: #d9a63c; }
.ops-banner--warn .ops-banner-mark::after { content: "!"; font-weight: 700; }
.ops-banner--bad .ops-banner-mark { color: var(--danger); }
.ops-banner--bad .ops-banner-mark::after { content: "×"; font-size: 1rem; }
.ops-banner--warn { border-color: rgba(217,166,60,0.35); }
.ops-banner--bad { border-color: var(--danger); }

.ops-sub { margin: 1.2rem 0 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); }

/* What the provider actually said. Folded, because it is a wall of JSON and
   it is only ever read when somebody is already looking for a reason. */
.ops-fails { display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.ops-fail { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.ops-fail summary {
  display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.55rem 0.75rem; cursor: pointer; font-size: 0.8rem;
  list-style: none;
}
.ops-fail summary::-webkit-details-marker { display: none; }
.ops-fail-when { color: var(--text-mute); font-size: 0.72rem; min-width: 4.5rem; }
.ops-fail-what { color: var(--text-dim); flex: 1 1 12rem; }
.ops-fail-model { color: var(--text-mute); font-size: 0.72rem; font-family: ui-monospace, Menlo, monospace; }
.ops-fail pre {
  margin: 0 0.75rem 0.75rem; padding: 0.6rem; border-radius: 8px;
  background: var(--bg-3); overflow-x: auto;
  font-size: 0.7rem; line-height: 1.5; color: var(--text-mute);
}
.ops-tail code { white-space: pre-wrap; word-break: break-word; }

.st-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; margin: 0.8rem 0 0.4rem; }
.st { display: flex; align-items: flex-start; gap: 0.5rem; }
.st-dot { width: 8px; height: 8px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; }
.st-dot.up { background: var(--brand); }
.st-dot.down { background: var(--danger); }
.st-dot.idle { background: var(--text-mute); opacity: 0.5; }
.st-label { font-size: 0.82rem; color: var(--text-dim); min-width: 0; }
.st-label em { display: block; font-style: normal; font-size: 0.72rem; color: var(--text-mute); overflow-wrap: anywhere; }

.ops-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ops-filters select {
  padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text-dim); font-size: 0.82rem;
}

/* The tab is older than the server. Offered rather than imposed: nothing is
   broken, and a modal for something the page cannot fix is a demand. */
.stale-notice {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 0.8rem;
  max-width: calc(100vw - 24px);
  padding: 0.6rem 0.7rem 0.6rem 1rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-2); box-shadow: var(--shadow);
  font-size: 0.85rem; color: var(--text-dim);
}
.stale-notice span { min-width: 0; }

/* ════════════════════════════════════════════════
   THE DESIGN ENGINE — /engine
   A page that has to demonstrate the thing it describes: if the page
   explaining how we design is not designed, nobody believes a word of it.
   ════════════════════════════════════════════════ */
.eng-body { overflow: auto; background: var(--bg); color: var(--text); }

.eng-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.eng-back { font-size: 0.84rem; color: var(--text-mute); text-decoration: none; }
.eng-back:hover { color: var(--text); }
.eng-cta {
  padding: 0.5rem 1rem; border-radius: 999px; background: var(--grad);
  color: var(--on-brand); font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
.eng-cta-lg { padding: 0.85rem 1.8rem; font-size: 0.95rem; }

.eng { max-width: 860px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 6rem; }

/* ── Opening ── */
.eng-hero { padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.eng-eyebrow {
  display: inline-block; margin-bottom: 1rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand);
}
.eng h1 {
  margin: 0 0 1.2rem; font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.6rem); line-height: 1.02;
  letter-spacing: -0.04em; font-weight: 700;
}
.eng-lede { max-width: 40rem; font-size: clamp(1rem, 2.2vw, 1.15rem); line-height: 1.7; color: var(--text-dim); }

.eng-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.4rem; margin-top: 2.8rem; padding-top: 2rem; border-top: 1px solid var(--border-soft);
}
.eng-facts b {
  display: block; font-family: var(--font-display); font-size: 1.9rem;
  letter-spacing: -0.03em; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.eng-facts span { display: block; margin-top: 0.35rem; font-size: 0.78rem; color: var(--text-mute); line-height: 1.45; }

.eng-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--border-soft); }
.eng-section h2 {
  margin: 0 0 0.7rem; font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.15;
}
.eng-section h3 { margin: 2rem 0 0.6rem; font-size: 1rem; letter-spacing: -0.01em; }
.eng-note { max-width: 38rem; color: var(--text-dim); line-height: 1.7; font-size: 0.95rem; }

/* ── The tree ──
   The centrepiece. A spine runs the height of it with a light travelling
   down; each node lights as the light reaches it, then the chips fill in one
   after another. One 16-second loop, so it can be watched twice without
   becoming wallpaper. */
.tree { position: relative; margin-top: 2.5rem; padding-left: 2.4rem; }

.tree-spine {
  position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.tree-spine i {
  position: absolute; inset: 0 0 auto 0; height: 22%;
  background: linear-gradient(180deg, transparent, var(--brand), transparent);
  filter: blur(0.5px);
}

.node { position: relative; padding: 0 0 2.2rem; }
.node:last-child { padding-bottom: 0; }
.node-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.node-head h3 { margin: 0; font-size: 1.06rem; letter-spacing: -0.015em; }
.node-head em {
  font-style: normal; font-size: 0.72rem; color: var(--text-mute);
  letter-spacing: 0.03em; white-space: nowrap;
}
.node-dot {
  position: absolute; left: -2.4rem; top: 0.35rem;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.node p { margin: 0 0 0.9rem; max-width: 38rem; color: var(--text-dim); line-height: 1.7; font-size: 0.92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips span {
  padding: 0.32rem 0.7rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-2); color: var(--text-mute); font-size: 0.75rem; white-space: nowrap;
  transition: border-color 0.35s ease, color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .tree-spine i { animation: spine 16s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
  @keyframes spine {
    0%   { transform: translateY(-120%); opacity: 0; }
    4%   { opacity: 1; }
    /* Pauses at each node rather than sliding evenly — the light is meant to
       read as arriving somewhere, not as a loading bar. */
    18%  { transform: translateY(20%); }
    26%  { transform: translateY(60%); }
    40%  { transform: translateY(150%); }
    48%  { transform: translateY(200%); }
    62%  { transform: translateY(290%); }
    70%  { transform: translateY(330%); }
    84%  { transform: translateY(420%); }
    92%  { opacity: 1; transform: translateY(460%); }
    100% { opacity: 0; transform: translateY(460%); }
  }

  .node-dot { animation: dot 16s ease-in-out infinite; }
  @keyframes dot {
    0%, 6%   { border-color: var(--border); box-shadow: none; }
    9%, 20%  { border-color: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 16%, transparent); }
    28%, 100% { border-color: var(--border); box-shadow: none; }
  }
  .n2 .node-dot { animation-delay: 3.5s; }
  .n3 .node-dot { animation-delay: 7s; }
  .n4 .node-dot { animation-delay: 10.5s; }

  .chips span { animation: chip 16s ease-in-out infinite; }
  @keyframes chip {
    0%, 8%    { border-color: var(--border); color: var(--text-mute); background: var(--bg-2); transform: none; }
    12%, 19%  { border-color: var(--brand); color: var(--text); background: var(--grad-soft); transform: translateY(-2px); }
    26%, 100% { border-color: var(--border); color: var(--text-mute); background: var(--bg-2); transform: none; }
  }
  .n2 .chips span { animation-delay: 3.5s; }
  .n3 .chips span { animation-delay: 7s; }
  .n4 .chips span { animation-delay: 10.5s; }
  /* Each chip a beat after the one before it, so a row fills rather than
     flashes. Written out because :nth-child cannot do arithmetic. */
  .chips span:nth-child(1) { animation-delay: 0s; }
  .chips span:nth-child(2) { animation-delay: 0.07s; }
  .chips span:nth-child(3) { animation-delay: 0.14s; }
  .chips span:nth-child(4) { animation-delay: 0.21s; }
  .chips span:nth-child(5) { animation-delay: 0.28s; }
  .chips span:nth-child(6) { animation-delay: 0.35s; }
  .chips span:nth-child(7) { animation-delay: 0.42s; }
  .chips span:nth-child(8) { animation-delay: 0.49s; }
  .chips span:nth-child(9) { animation-delay: 0.56s; }
  .chips span:nth-child(10) { animation-delay: 0.63s; }
  .chips span:nth-child(11) { animation-delay: 0.7s; }
  .n2 .chips span:nth-child(1) { animation-delay: 3.5s; }
  .n2 .chips span:nth-child(2) { animation-delay: 3.57s; }
  .n2 .chips span:nth-child(3) { animation-delay: 3.64s; }
  .n2 .chips span:nth-child(4) { animation-delay: 3.71s; }
  .n2 .chips span:nth-child(5) { animation-delay: 3.78s; }
  .n2 .chips span:nth-child(6) { animation-delay: 3.85s; }
  .n2 .chips span:nth-child(7) { animation-delay: 3.92s; }
  .n2 .chips span:nth-child(8) { animation-delay: 3.99s; }
  .n2 .chips span:nth-child(9) { animation-delay: 4.06s; }
  .n2 .chips span:nth-child(10) { animation-delay: 4.13s; }
  .n2 .chips span:nth-child(11) { animation-delay: 4.2s; }
  .n3 .chips span:nth-child(1) { animation-delay: 7s; }
  .n3 .chips span:nth-child(2) { animation-delay: 7.07s; }
  .n3 .chips span:nth-child(3) { animation-delay: 7.14s; }
  .n3 .chips span:nth-child(4) { animation-delay: 7.21s; }
  .n3 .chips span:nth-child(5) { animation-delay: 7.28s; }
  .n3 .chips span:nth-child(6) { animation-delay: 7.35s; }
  .n3 .chips span:nth-child(7) { animation-delay: 7.42s; }
  .n3 .chips span:nth-child(8) { animation-delay: 7.49s; }
  .n3 .chips span:nth-child(9) { animation-delay: 7.56s; }
  .n4 .chips span:nth-child(1) { animation-delay: 10.5s; }
  .n4 .chips span:nth-child(2) { animation-delay: 10.57s; }
  .n4 .chips span:nth-child(3) { animation-delay: 10.64s; }
  .n4 .chips span:nth-child(4) { animation-delay: 10.71s; }
  .n4 .chips span:nth-child(5) { animation-delay: 10.78s; }
  .n4 .chips span:nth-child(6) { animation-delay: 10.85s; }
}

/* Standing still it must still look finished. */
@media (prefers-reduced-motion: reduce) {
  .tree-spine i { top: 0; height: 100%; opacity: 0.5; }
  .node-dot { border-color: var(--brand); }
}

/* ── Steps ── */
.steps { counter-reset: s; list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.4rem; }
.steps li {
  counter-increment: s; position: relative; padding-left: 3rem;
  color: var(--text-dim); line-height: 1.7; font-size: 0.94rem; max-width: 40rem;
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 0.1rem;
  font-family: var(--font-display); font-size: 0.86rem; font-weight: 700;
  color: var(--brand); letter-spacing: 0.02em;
}
.steps b { display: block; color: var(--text); font-weight: 600; margin-bottom: 0.15rem; }

/* ── Good and bad ── */
.cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin-top: 1.8rem; }
.cmp-col { padding: 1.3rem; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); }
.cmp-col h4 {
  margin: 0 0 0.7rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.cmp-col.bad { border-left: 3px solid var(--danger); }
.cmp-col.bad h4 { color: var(--danger); }
.cmp-col.good { border-left: 3px solid var(--brand); }
.cmp-col.good h4 { color: var(--brand); }
.cmp-col p { margin: 0 0 0.7rem; font-size: 0.95rem; line-height: 1.6; color: var(--text); }
.cmp-col small { font-size: 0.8rem; line-height: 1.55; color: var(--text-mute); }

.eng-list { margin: 0.8rem 0 0; padding-left: 1.1rem; max-width: 40rem; }
.eng-list li { margin-bottom: 0.6rem; color: var(--text-dim); line-height: 1.7; font-size: 0.92rem; }
.eng-list b { color: var(--text); font-weight: 600; }

.kbd {
  display: inline-block; padding: 0.1rem 0.5rem; margin: 0 0.1rem;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg-2);
  font-size: 0.85em; color: var(--text);
}

/* ── The refusals ── */
.nevers { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.6rem 0; }
.nevers span {
  position: relative; padding: 0.4rem 0.8rem 0.4rem 1.6rem;
  border: 1px solid rgba(255, 95, 126, 0.28); border-radius: 999px;
  background: rgba(255, 95, 126, 0.06); color: var(--text-dim); font-size: 0.8rem;
}
.nevers span::before {
  content: "✕"; position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  font-size: 0.66rem; color: var(--danger);
}

.eng-end { padding: clamp(3rem, 8vw, 5rem) 0 0; border-top: 1px solid var(--border-soft); text-align: center; }
.eng-end h2 { margin-bottom: 0.5rem; }
.eng-end p { margin: 0 0 1.8rem; color: var(--text-dim); }

@media (max-width: 560px) {
  .tree { padding-left: 1.9rem; }
  .node-dot { left: -1.9rem; width: 13px; height: 13px; }
  .tree-spine { left: 5px; }
  .node-head em { white-space: normal; }
}

/* ── The decision procedure, on /engine ──
   Shown as branches rather than as prose, because the shape is the point: one
   question, several answers, each changing what leads. */
.decide { display: grid; gap: 1.6rem; margin: 2.2rem 0 2.4rem; }
.decide-row { display: grid; gap: 0.8rem; }
.decide-q {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand);
}
.decide-arms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0.7rem; }
.decide-arms > div {
  position: relative; padding: 0.9rem 1rem 0.95rem;
  border: 1px solid var(--border); border-top: 2px solid var(--border);
  border-radius: 10px; background: var(--bg-2);
  transition: border-top-color 0.2s ease, transform 0.2s ease;
}
.decide-arms > div:hover { border-top-color: var(--brand); transform: translateY(-2px); }
.decide-arms > div.wide { grid-column: span 2; }
.decide-arms b { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; }
.decide-arms span { display: block; font-size: 0.8rem; line-height: 1.55; color: var(--text-mute); }

.decide-tie {
  padding: 1.3rem 1.4rem; border-radius: 14px;
  border: 1px solid rgba(27,77,216, 0.3); background: var(--grad-soft);
}
.decide-tie h4 {
  margin: 0 0 0.6rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand);
}
.decide-tie p { margin: 0 0 0.6rem; font-size: 0.92rem; line-height: 1.7; color: var(--text-dim); max-width: 42rem; }
.decide-tie p:last-child { margin-bottom: 0; }
.decide-tie b { color: var(--text); }

@media (max-width: 560px) { .decide-arms > div.wide { grid-column: auto; } }

/* The assembled line under what the model said in its own words: the same
   facts, quieter, because the sentence above it is the one worth reading. */
/* A footnote to the message above it, not a message of its own.
   padding-left: 0 put it flush against the edge of the panel while every
   bubble around it sat inset, so it read as text that had escaped the layout
   rather than as a quiet aside. It keeps the bubbles' inset and drops only
   the background. */
.msg.bot.quiet {
  background: none; border: none; padding-top: 0.15rem; padding-bottom: 0;
  font-size: 0.78rem; color: var(--text-mute);
}

/* ── THE DESIGN ENGINE: the build, played back ──
   The one section on the page that is not an argument. Three panes: what the
   model says, the page it is making, and what the engine is doing underneath.
   Everything is driven by engine-demo.js; the markup underneath is the
   finished state, so the section is never broken when the script is not
   there. */
.eng-wide {
  width: min(1180px, calc(100vw - 2rem));
  margin-left: calc(50% - min(590px, calc(50vw - 1rem)));
}

.theatre {
  margin-top: 2.2rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.55);
}

.th-bar {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 60%, var(--bg-2));
}
.th-lights { display: flex; gap: 0.32rem; }
.th-lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.th-title { font-size: 0.74rem; color: var(--text-mute); letter-spacing: 0.01em; }
.th-meta { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; font-size: 0.72rem; color: var(--text-mute); }
.th-status { position: relative; padding-left: 0.95rem; color: var(--brand); }
.th-status::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.th-tokencount b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.th-replay {
  padding: 0.28rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-mute); font-size: 0.72rem; cursor: pointer;
}
.th-replay:hover { color: var(--text); border-color: var(--brand); }

.th-grid { display: grid; grid-template-columns: 1fr 1.15fr 1fr; min-height: 460px; }
.th-pane { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); }
.th-pane:last-child { border-right: none; }
.th-pane-head {
  padding: 0.5rem 0.85rem; border-bottom: 1px solid var(--border-soft);
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-mute);
}
.th-pane-body { flex: 1; min-height: 0; overflow: hidden; padding: 0.9rem; }

/* Left: the conversation */
.th-you { padding-bottom: 0.9rem; border-bottom: 1px solid var(--border-soft); }
.th-you-label {
  display: block; margin-bottom: 0.35rem;
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-mute);
}
.th-you p { margin: 0; font-size: 0.83rem; line-height: 1.6; color: var(--text); }
.th-caret {
  display: inline-block; width: 2px; height: 0.95em; margin-left: 1px;
  vertical-align: -0.13em; background: var(--brand);
}
.th-chat-log { margin-top: 0.9rem; display: grid; gap: 0.6rem; max-height: 290px; overflow: hidden; }
.th-bubble {
  margin: 0; padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-soft); border-radius: 10px 10px 10px 3px;
  background: var(--bg); color: var(--text-dim);
  font-size: 0.79rem; line-height: 1.58;
}
.th-bubble.is-last { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); color: var(--text); }

/* Right: the engine log and the code */
.th-right .th-pane-body { padding: 0.6rem 0.5rem; }
.th-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.12rem; max-height: 236px; overflow: hidden; }
.th-log-line {
  display: grid; grid-template-columns: 14px 1fr; gap: 0.5rem;
  padding: 0.28rem 0.4rem; border-radius: 7px;
  font-size: 0.745rem; line-height: 1.35; color: var(--text-dim);
}
.th-log-mark {
  width: 7px; height: 7px; margin-top: 0.34rem; margin-left: 3px;
  border-radius: 50%; background: var(--border);
}
.th-log-detail { grid-column: 2; font-size: 0.68rem; color: var(--text-mute); }
.is-ok .th-log-mark { background: var(--brand); }
.is-think .th-log-mark { background: #8b7bff; }
.is-warn .th-log-mark { background: #e0a33a; }
.is-write .th-log-mark { background: var(--text-mute); }
.is-check .th-log-mark { background: #3fb27f; }
.th-log-line.is-done .th-log-mark { background: #3fb27f; box-shadow: 0 0 0 4px rgba(63, 178, 127, 0.16); }
.th-log-line.is-done .th-log-text { color: var(--text); font-weight: 600; }
/* The whole panel settles once the build finishes. */
.theatre.is-done .th-status { color: #3fb27f; }
.theatre.is-done .th-status::before { background: #3fb27f; animation: none; }
.theatre.is-done .th-caret { opacity: 0; animation: none; }

.th-pane-head-2 { display: flex; gap: 0.45rem; border-top: 1px solid var(--border); }
.th-file {
  padding: 0.12rem 0.5rem; border-radius: 6px; border: 1px solid transparent;
  letter-spacing: 0.04em; text-transform: none; font-size: 0.66rem;
}
.th-file.on { border-color: var(--border); background: var(--bg); color: var(--text); }
.th-code-wrap { flex: 0 0 auto; max-height: 190px; padding: 0.7rem 0.85rem; }
.th-code {
  margin: 0; font-size: 0.7rem; line-height: 1.62;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-dim); white-space: pre; overflow: hidden;
}
.th-code-line { white-space: pre; }
.c-p { color: #7aa7ff; }
.c-a { color: var(--brand); }
.c-s { color: #3fb27f; }
.c-v { color: #e0a33a; }
.c-c { color: var(--text-mute); font-style: italic; }

/* Middle: the page, assembling.
   Deliberately a real little restaurant site rather than grey boxes — the
   claim of the whole page is that the output is designed, and grey boxes
   would quietly say the opposite. */
.th-mid .th-pane-body { padding: 0; background: #f7f1e8; }
.th-site {
  --ink: #2b1d16; --accent: #b4451f; --paper: #f7f1e8;
  height: 100%; padding: 0.9rem; display: grid; gap: 0.65rem;
  align-content: start; overflow: hidden;
}
.th-block {
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.th-block.in { opacity: 1; transform: none; }

.b-nav { display: flex; align-items: center; justify-content: space-between; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(43, 29, 22, 0.14); }
.s-mark { font-family: Georgia, "Times New Roman", serif; font-size: 0.95rem; color: var(--ink); letter-spacing: 0.01em; }
.s-links { display: flex; gap: 0.4rem; }
.s-links i { width: 26px; height: 5px; border-radius: 3px; background: rgba(43, 29, 22, 0.22); }

.b-hero { display: grid; gap: 0.4rem; justify-items: start; padding: 0.7rem 0 0.9rem; }
.s-eyebrow { font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.s-h1 { font-family: Georgia, "Times New Roman", serif; font-size: 2.1rem; line-height: 1; color: var(--ink); letter-spacing: -0.02em; }
.s-lede { width: 76%; height: 6px; border-radius: 3px; background: rgba(43, 29, 22, 0.16); }
.s-btn {
  margin-top: 0.3rem; padding: 0.34rem 0.8rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 0.66rem; letter-spacing: 0.02em;
}
.s-btn-sm { padding: 0.26rem 0.66rem; font-size: 0.6rem; }

.s-label { display: block; margin-bottom: 0.4rem; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(43, 29, 22, 0.55); }
.b-menu .s-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.32rem; }
.b-menu .s-row i { height: 6px; border-radius: 3px; background: rgba(43, 29, 22, 0.2); flex: 1; }
.b-menu .s-row b { width: 22px; height: 6px; border-radius: 3px; background: rgba(180, 69, 31, 0.4); }
.b-hours .s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3rem; }
.b-hours .s-grid i { height: 14px; border-radius: 4px; background: rgba(43, 29, 22, 0.09); }
.b-book { padding: 0.7rem; border-radius: 10px; background: rgba(180, 69, 31, 0.07); display: grid; gap: 0.35rem; justify-items: start; }
.b-book .s-field { width: 100%; height: 16px; border-radius: 5px; background: #fff; border: 1px solid rgba(43, 29, 22, 0.12); }
.b-foot { display: flex; gap: 0.5rem; padding-top: 0.5rem; border-top: 1px solid rgba(43, 29, 22, 0.14); }
.b-foot i { height: 5px; border-radius: 3px; background: rgba(43, 29, 22, 0.16); }
.b-foot i:first-child { width: 40%; }
.b-foot i:last-child { width: 24%; }

.th-after { margin-top: 1.4rem; }

@media (prefers-reduced-motion: no-preference) {
  .th-caret { animation: th-blink 1.05s steps(1) infinite; }
  @keyframes th-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
  .th-status::before { animation: th-pulse 1.6s ease-in-out infinite; }
  @keyframes th-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); }
    60% { box-shadow: 0 0 0 6px transparent; }
  }
  .th-log-line { animation: th-slide 0.35s ease both; }
  @keyframes th-slide { from { opacity: 0; transform: translateX(-6px); } }
  .th-bubble { animation: th-rise 0.4s ease both; }
  @keyframes th-rise { from { opacity: 0; transform: translateY(6px); } }
  .th-code-line { animation: th-rise 0.25s ease both; }
  /* The block that just landed gets a moment of the accent, so the eye is
     told where to look rather than left to find it. */
  .th-block.in { animation: th-land 1.1s ease; }
  @keyframes th-land {
    0% { box-shadow: 0 0 0 0 rgba(180, 69, 31, 0); }
    25% { box-shadow: -8px 0 0 -6px rgba(180, 69, 31, 0.85); }
    100% { box-shadow: 0 0 0 0 rgba(180, 69, 31, 0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .th-block { opacity: 1; transform: none; }
  .th-caret { display: none; }
}

@media (max-width: 900px) {
  .eng-wide { width: auto; margin-left: 0; }
  .th-grid { grid-template-columns: 1fr; }
  .th-pane { border-right: none; border-bottom: 1px solid var(--border); }
  .th-pane:last-child { border-bottom: none; }
  /* On a phone the page being built is the part worth seeing first. */
  .th-mid { order: -1; min-height: 320px; }
  .th-chat-log, .th-log { max-height: none; }
  .th-code-wrap { max-height: 150px; }
}

/* ── THE POLICY PAGES ──
   Long documents that have to be readable, because a term nobody read is a
   term nobody agreed to. Slightly wider measure than /help, numbered
   headings, and the two devices that make a long agreement navigable: a
   summary in a box at the top of each, and tables where the content is
   genuinely tabular. */
.doc-legal { max-width: 760px; }
.legal-kicker {
  margin: 0 0 0.5rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand);
}
.legal-meta { margin: -0.6rem 0 2rem; font-size: 0.82rem; color: var(--text-mute); }
.legal-meta a { color: var(--text-dim); }

.doc-legal h2 {
  margin: 44px 0 12px; padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 1.12rem; letter-spacing: -0.01em;
}
.doc-legal h3 { margin: 24px 0 8px; font-size: 0.95rem; color: var(--text); }
.doc-legal b { color: var(--text); font-weight: 600; }

.legal-callout {
  margin: 2rem 0; padding: 1.2rem 1.35rem;
  border: 1px solid rgba(27,77,216, 0.28); border-radius: 14px;
  background: var(--grad-soft);
  font-size: 15px; line-height: 1.7; color: var(--text-dim);
}
.legal-callout strong { color: var(--text); }
.legal-callout p { margin: 0; }
.legal-callout-quiet {
  border-color: var(--border); background: var(--bg-2);
}

.legal-list { margin: 0.8rem 0; padding-left: 1.15rem; }
.legal-list li { margin-bottom: 0.55rem; }
.legal-steps { margin: 0.8rem 0; padding-left: 1.3rem; }
.legal-steps li { margin-bottom: 0.55rem; }

/* Capitalised disclaimers are a legal convention and unreadable as a wall of
   capitals. The convention is served by making the paragraph visibly set
   apart instead. */
.legal-caps {
  padding: 0.9rem 1.1rem; border-left: 3px solid var(--border);
  background: var(--bg-2); border-radius: 0 10px 10px 0;
  font-size: 14px;
}

.legal-table-wrap { margin: 1.2rem 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal-table th, .legal-table td {
  padding: 0.7rem 0.9rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border-soft); line-height: 1.55;
}
.legal-table th { color: var(--text); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.legal-table td { color: var(--text-dim); }
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td:first-child { color: var(--text); }

/* A fact nobody has supplied yet. Loud on purpose: a quiet placeholder reads
   as a design choice and ships. */
.legal-gap {
  padding: 0.05rem 0.4rem; border-radius: 5px;
  border: 1px dashed var(--danger); background: rgba(255, 95, 126, 0.08);
  color: var(--danger); font-size: 0.9em; white-space: nowrap;
}

.legal-foot {
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  margin-top: 3.5rem; padding-top: 1.4rem; border-top: 1px solid var(--border-soft);
}
.legal-foot a { font-size: 0.85rem; color: var(--text-mute); text-decoration: none; }
.legal-foot a:hover { color: var(--brand); }

/* ── THE QUESTIONS, on the landing page ──
   <details> rather than a script: it opens with no JavaScript running, is
   keyboard operable and announced correctly for free, and the answer sits in
   the document whether or not it is open — which is the half that matters,
   because a crawler and a language model both read the closed state. */
/* The light tokens, because this only ever appears on a light page.
   It was written with the workspace's — --text is near-white there, so on
   the pricing page every question was white on white and the answers were a
   shade off it. The questions were readable only by being selected. */
.l-faq { max-width: 760px; margin: 2.5rem auto 0; }
.l-faq-item {
  border-bottom: 1px solid var(--l-line);
}
.l-faq-item summary {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.15rem 0; cursor: pointer; list-style: none;
  font-size: 1.02rem; font-weight: 600; color: var(--l-text);
  transition: color 0.15s;
}
.l-faq-item summary::-webkit-details-marker { display: none; }
.l-faq-item summary::after {
  content: ""; flex: none; width: 11px; height: 11px; margin-top: 0.42rem; margin-left: auto;
  border-right: 2px solid var(--l-muted); border-bottom: 2px solid var(--l-muted);
  transform: rotate(45deg); transition: transform 0.22s ease, border-color 0.15s;
}
.l-faq-item[open] summary::after { transform: rotate(-135deg); border-color: var(--brand); }
.l-faq-item summary:hover { color: var(--brand); }
.l-faq-item p {
  margin: 0; padding: 0 2.2rem 1.35rem 0;
  color: var(--l-dim); line-height: 1.75; font-size: 0.95rem;
}
@media (prefers-reduced-motion: no-preference) {
  .l-faq-item[open] p { animation: faq-open 0.28s ease both; }
  @keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } }
}

/* ── A PAGE PER TRADE ──
   The body of each is the real rule set the engine sends for that industry,
   so these pages are long and are meant to be read rather than skimmed past
   on the way to a button. Measure and rhythm do the work. */
.ind { padding: clamp(3rem, 8vw, 5.5rem) 0 5rem; }
.ind-head { max-width: 44rem; }
.ind-kicker {
  margin: 0 0 0.9rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand);
}
.ind h1 {
  margin: 0 0 1.1rem; font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.06;
  letter-spacing: -0.035em;
}
.ind-lede { margin: 0 0 2rem; font-size: clamp(1rem, 2.2vw, 1.15rem); line-height: 1.72; color: var(--text-dim); }

/* The example prompt. Set as something to be read and copied, because that is
   what it is for — a vague example teaches somebody to write a vague request. */
.ind-try {
  max-width: 44rem; margin: 3.5rem 0;
  padding: 1.5rem 1.6rem; border-radius: 16px;
  border: 1px solid var(--border); background: var(--bg-2);
}
.ind-label {
  margin: 0 0 0.8rem; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute);
}
.ind-example {
  margin: 0 0 1.1rem; padding-left: 1rem;
  border-left: 2px solid var(--brand);
  font-size: 1.02rem; line-height: 1.7; color: var(--text);
}
.ind-note { margin: 0; font-size: 0.86rem; line-height: 1.65; color: var(--text-mute); }

.ind-rules { margin-top: 4rem; }
.ind-head-2 { margin-top: 3rem; }
.ind-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem; margin-top: 2rem;
}
.ind-rule {
  padding: 1.2rem 1.25rem; border-radius: 14px;
  border: 1px solid var(--border-soft); background: var(--bg-2);
}
.ind-rule h3 { margin: 0 0 0.45rem; font-size: 0.94rem; letter-spacing: -0.01em; }
.ind-rule p { margin: 0; font-size: 0.87rem; line-height: 1.65; color: var(--text-mute); }
/* The prohibitions are the more interesting half — what stops the page
   looking like every other site in the trade — so they read differently. */
.ind-grid-never .ind-rule { border-color: rgba(255, 95, 126, 0.22); background: rgba(255, 95, 126, 0.04); }
.ind-grid-never .ind-rule h3 { color: var(--danger); }

.ind-end {
  margin-top: 4.5rem; padding: 3rem 1.5rem; border-radius: 20px;
  background: var(--grad-soft); border: 1px solid var(--border); text-align: center;
}
.ind-end h2 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -0.03em; }
.ind-end p { margin: 0 0 1.6rem; color: var(--text-dim); }

.ind-others {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border-soft);
}
.ind-others span { margin-right: 0.4rem; font-size: 0.8rem; color: var(--text-mute); }
.ind-others a {
  padding: 0.32rem 0.75rem; border-radius: 999px;
  border: 1px solid var(--border-soft); background: var(--bg-2);
  color: var(--text-dim); font-size: 0.8rem; text-decoration: none;
}
.ind-others a:hover { border-color: var(--brand); color: var(--text); }

/* ── WHAT IT DECIDED, AND WHAT IT COULD NOT ──
   Two blocks in the chat that are not messages. The plan is folded away
   because on a page somebody likes it is noise and on a page somebody does
   not it is the first useful thing there is. The question is open, because a
   question nobody sees is an assumption nobody was told about. */
.msg.bot.plan, .msg.bot.trail-done {
  max-width: 92%; padding: 0; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border-soft);
}
.msg.bot.plan summary, .msg.bot.trail-done summary {
  padding: 0.55rem 0.85rem; cursor: pointer; list-style: none;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-mute);
}
.msg.bot.plan summary::-webkit-details-marker,
.msg.bot.trail-done summary::-webkit-details-marker { display: none; }
.msg.bot.plan summary::after, .msg.bot.trail-done summary::after {
  content: ""; float: right; width: 7px; height: 7px; margin-top: 0.3rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.msg.bot.plan[open] summary::after,
.msg.bot.trail-done[open] summary::after { transform: rotate(-135deg); }
.msg.bot.plan summary:hover, .msg.bot.trail-done summary:hover { color: var(--text); }
.plan-line {
  display: flex; gap: 0.55rem; align-items: baseline;
  padding: 0.3rem 0.85rem; font-size: 0.78rem; line-height: 1.5;
  color: var(--text-dim);
}
.plan-line:last-child { padding-bottom: 0.75rem; }
.plan-line b {
  flex: 0 0 auto; min-width: 4.6rem;
  color: var(--brand); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* The question. Built already, so this is an offer to correct it rather than
   a form standing between somebody and their website. */
.msg.bot.ask {
  max-width: 92%;
  border-color: color-mix(in srgb, var(--brand) 42%, var(--border));
  background: var(--grad-soft);
}
.ask-q { margin: 0 0 0.7rem; font-size: 0.9rem; line-height: 1.5; color: var(--text); }
.ask-options { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ask-option {
  padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--text-dim); font: inherit; font-size: 0.8rem;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.ask-option:hover:not(:disabled) { border-color: var(--brand); color: var(--text); transform: translateY(-1px); }
.ask-option:disabled { opacity: 0.45; cursor: default; }
/* The one that was picked stays legible: a row of faded buttons with no
   record of the choice reads as the answer having been lost. */
.ask-option.chosen {
  opacity: 1; border-color: var(--brand);
  background: var(--grad); color: var(--on-brand);
}
.ask-note { display: block; margin-top: 0.6rem; font-size: 0.72rem; color: var(--text-mute); }

/* ── TALKING RATHER THAN BUILDING ──
   A reply in Discuss mode is longer than a build's two sentences and is meant
   to be read rather than glanced at, so it gets the width and the measure of
   something written to a person. */
.msg.bot.talk {
  max-width: 94%;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 0.88rem;
  border-color: color-mix(in srgb, #3fb27f 34%, var(--border));
  background: color-mix(in srgb, #3fb27f 6%, var(--bg-3));
}

/* The button that ends the conversation and starts the site. */
.msg.bot.build-it {
  max-width: 94%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  background: var(--grad-soft);
}
.msg.bot.build-it p { margin: 0; font-size: 0.82rem; color: var(--text-dim); }
.msg.bot.build-it .btn { flex: none; }

/* ── QUESTIONS WITH ANSWERS TO PRESS ──
   Pressing an answer instead of composing a sentence is most of why somebody
   chose to talk rather than type. Grouped into one card because two questions
   answered separately are two round trips for one decision. */
.msg.bot.asks {
  max-width: 94%;
  display: grid; gap: 1rem;
  border-color: color-mix(in srgb, #3fb27f 34%, var(--border));
  background: color-mix(in srgb, #3fb27f 5%, var(--bg-3));
}
.asks-group { display: grid; gap: 0.5rem; }
.asks-q { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--text); font-weight: 600; }
.asks-options { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.asks-option {
  padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--text-dim); font: inherit; font-size: 0.8rem; text-align: left;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}
.asks-option:hover:not(:disabled) { border-color: #3fb27f; color: var(--text); transform: translateY(-1px); }
.asks-option.chosen {
  border-color: #3fb27f; color: var(--text);
  background: color-mix(in srgb, #3fb27f 22%, transparent);
  font-weight: 600;
}
/* The escape hatch, quieter than the answers it sits beside: every list is
   somebody's guess at what you meant, and a list with no way out is a worse
   question than one asked in prose. */
.asks-other { border-style: dashed; color: var(--text-mute); }
.asks-other:hover:not(:disabled) { border-style: dashed; }
.asks-option:disabled { opacity: 0.5; cursor: default; transform: none; }

.asks-go { justify-self: start; }
.asks-go:disabled { opacity: 0.45; cursor: default; }

/* ── THE BRIEF, SETTLED ──
   Shown rather than summarised: it is what will be built word for word, and
   the last moment to disagree with it is before pressing the button beside
   it. */
.msg.bot.build-it {
  max-width: 94%;
  display: block;
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  background: var(--grad-soft);
}
.build-it-head {
  margin: 0 0 0.7rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand);
}
.build-it-brief {
  margin: 0 0 1rem; padding: 0.7rem 0;
  border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
}
.build-it-brief .plan-line { padding: 0.28rem 0; font-size: 0.8rem; }
.build-it-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.build-it-row .btn:disabled { opacity: 0.5; cursor: default; }

/* ── ANSWERING WHERE THE QUESTION IS ──
   Both of these used to send somebody to the composer, which means holding
   the question — or six lines of settled decisions — in their head while they
   look somewhere else for the field. */
.asks-write {
  width: 100%; margin-top: 0.5rem;
  padding: 0.5rem 0.75rem; border-radius: 10px;
  border: 1px solid color-mix(in srgb, #3fb27f 45%, var(--border));
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 0.82rem;
}
.asks-write:focus { outline: none; border-color: #3fb27f; box-shadow: 0 0 0 3px rgba(63, 178, 127, 0.18); }
.asks-write::placeholder { color: var(--text-mute); }
.asks-write:disabled { opacity: 0.5; }

.build-it-change {
  display: flex; gap: 0.5rem; align-items: center;
  margin-top: 0.8rem; padding-top: 0.8rem;
  border-top: 1px solid var(--border-soft);
}
.build-it-change input {
  flex: 1; min-width: 0;
  padding: 0.5rem 0.75rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--text); font: inherit; font-size: 0.84rem;
}
.build-it-change input:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-glow); }
.build-it-change .btn { flex: none; }


/* ══════════════ THE STATUS PAGE ══════════════
   Read by somebody who is often already annoyed. The answer first, at a size
   that can be taken in without reading; the detail underneath for whoever has
   a reason to want it. */
.status-body { background: var(--l-surface); }
.sx-wrap { width: min(100% - 2.5rem, 76rem); margin: 2.5rem auto 6rem; }

/* One card, one sentence, one mark.
   The tone lives in a bar down the left edge and in the mark, and nowhere
   else: a card washed entirely in green reads as decoration and stops being
   read at all, which is the opposite of what it is for. */
.sx-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 2.6rem 3rem; border-radius: 12px;
  background: var(--l-s1); border: 1px solid var(--l-line-soft);
  border-left: 4px solid var(--sx-tone, var(--l-muted));
  box-shadow: var(--l-shadow);
}
.sx-hero h1 {
  margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--l-text);
}
.sx-hero p { margin: 0.7rem 0 0; font-size: 1rem; color: var(--l-muted); }
/* Drawn, not typed: a tick character is whatever font happens to be installed,
   and it lands at a different weight on every machine — on the one element
   carrying the whole answer that is the difference between a status page and
   a page about status. */
.sx-hero-mark {
  width: 64px; height: 64px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--sx-tone) 12%, transparent);
  color: var(--sx-tone);
}
.sx-hero-mark svg { width: 30px; height: 30px; display: block; }
.sx-hero--good { --sx-tone: #10b981; }
.sx-hero--warn { --sx-tone: #d97706; }
.sx-hero--bad { --sx-tone: #dc2626; }
.sx-hero--unknown { --sx-tone: #6b7280; }

.sx-h2 {
  margin: 3.4rem 0 1.2rem; font-size: 1.4rem;
  font-weight: 750; letter-spacing: -0.02em; color: var(--l-text);
}

/* One line under a heading, where the heading alone would leave somebody
   guessing what the list below it is for. */
.sx-lede {
  margin: -0.6rem 0 1.2rem; font-size: 0.95rem; line-height: 1.6; color: var(--l-muted);
  max-width: 62ch;
}

.sx-services {
  background: var(--l-s1); border: 1px solid var(--l-line-soft);
  border-radius: 12px; overflow: hidden; box-shadow: var(--l-shadow);
}
.sx-service {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.35rem 1.9rem; border-bottom: 1px solid var(--l-line-soft);
}
.sx-service:last-child { border-bottom: none; }
.sx-service strong { display: block; font-size: 1rem; font-weight: 650; color: var(--l-text); letter-spacing: -0.01em; }
.sx-service span { font-size: 0.9rem; color: var(--l-muted); }
.sx-state {
  font-style: normal; font-size: 0.95rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.sx-state i { display: block; width: 17px; height: 17px; }
.sx-state svg { width: 100%; height: 100%; display: block; }
.sx-state--good { color: #10b981; }
.sx-state--warn { color: #d97706; }
.sx-state--bad { color: #dc2626; }
.sx-state--unknown { color: var(--l-muted); }

/* ── An incident, as a conversation down a line ──
   The updates alternate either side of a line through the middle. It reads as
   a conversation rather than a log, and it makes the gap between two updates
   visible as distance — an hour of silence looks like an hour of silence.
   Newest first: somebody arriving mid-incident is asking what has changed
   since they last looked. */
.sx-incidents { display: grid; gap: 1.2rem; }
.sx-incident {
  padding: 2rem 2.2rem 2.2rem; border-radius: 12px;
  background: var(--l-s1); border: 1px solid var(--l-line-soft);
  box-shadow: var(--l-shadow);
}
.sx-incident h3 { margin: 0; font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; color: var(--l-text); }
.sx-incident-when {
  margin: 0.5rem 0 2rem; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.09em; color: var(--l-dim);
}

.sx-trail { list-style: none; margin: 0; padding: 0; position: relative; }
.sx-trail::before {
  content: ""; position: absolute; left: 50%; top: 0.6rem; bottom: 0.6rem;
  width: 1px; background: var(--l-line); transform: translateX(-0.5px);
}
.sx-trail-item { position: relative; width: 50%; padding-bottom: 1.6rem; }
.sx-trail-item:last-child { padding-bottom: 0; }
/* Newest first, and the newest sits on the right — reading order down a
   centre line is right, then left, then right. */
.sx-trail-item:nth-child(odd) { margin-left: 50%; padding-left: 2.6rem; }
.sx-trail-item:nth-child(even) { padding-right: 2.6rem; }
.sx-trail-dot {
  position: absolute; top: 0.75rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--l-muted); box-shadow: 0 0 0 4px var(--l-s1);
}
.sx-trail-item:nth-child(odd) .sx-trail-dot { left: -4.5px; }
.sx-trail-item:nth-child(even) .sx-trail-dot { right: -4.5px; }
.sx-trail-item--resolved .sx-trail-dot { background: #10b981; }
.sx-trail-item--investigating .sx-trail-dot,
.sx-trail-item--maintenance .sx-trail-dot,
.sx-trail-item--degraded .sx-trail-dot { background: #d97706; }
.sx-trail-item--down .sx-trail-dot { background: #dc2626; }
.sx-trail-body {
  background: var(--l-s2); border: 1px solid var(--l-line-soft);
  border-radius: 8px; padding: 0.85rem 1rem;
}
.sx-trail-body header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.sx-trail-body strong { font-size: 0.78rem; font-weight: 700; color: var(--l-text); }
.sx-trail-body time { font-size: 0.72rem; font-weight: 600; color: var(--l-muted); font-variant-numeric: tabular-nums; }
.sx-trail-body p { margin: 0.5rem 0 0; font-size: 0.9rem; line-height: 1.6; color: var(--l-dim); }

.sx-none { font-size: 0.95rem; line-height: 1.7; color: var(--l-muted); max-width: 44rem; }

/* On a phone the centre line has nowhere to alternate to, so it becomes one
   rail down the left. Two columns of 40% each is not a timeline, it is two
   columns. */
@media (max-width: 720px) {
  .sx-hero { padding: 1.7rem 1.5rem; gap: 1rem; }
  .sx-hero-mark { width: 46px; height: 46px; }
  .sx-hero-mark svg { width: 22px; height: 22px; }
  .sx-service { padding: 1.1rem 1.2rem; }
  .sx-incident { padding: 1.4rem 1.2rem 1.6rem; }
  .sx-trail::before { left: 4px; }
  .sx-trail-item, .sx-trail-item:nth-child(odd), .sx-trail-item:nth-child(even) {
    width: 100%; margin-left: 0; padding-left: 1.6rem; padding-right: 0;
  }
  .sx-trail-item:nth-child(odd) .sx-trail-dot,
  .sx-trail-item:nth-child(even) .sx-trail-dot { left: 0; right: auto; }
}

/* ════════════════════════════════════════════════
   SIGN IN
   The auth modal opens from the landing, so it is light: a white card on a
   soft scrim, the mark above it rather than inside it. Scoped to
   .auth-overlay — every other modal in this file belongs to the workspace
   and stays dark.
   ════════════════════════════════════════════════ */
.auth-overlay {
  background: rgba(232, 234, 238, 0.86);
  backdrop-filter: blur(6px);
  color: var(--l-text);
}
.auth-stack {
  margin: auto; width: min(432px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
}
.auth-brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--l-display); font-size: 1.45rem; font-weight: 800;
  letter-spacing: -0.02em; color: var(--l-mint);
}
.auth-brand .l-hex { width: 22px; height: 22px; fill: currentColor; }
.auth-brand .l-logo { height: 24px; width: auto; display: none; }

.auth-card {
  width: 100%; background: #fff; border: 1px solid var(--l-line);
  border-radius: 18px; padding: 2.6rem 2.2rem 2.2rem;
  box-shadow: var(--l-shadow-lg); color: var(--l-text);
}
.auth-card .modal-close { color: var(--l-muted); }
.auth-card .modal-close:hover { color: var(--l-text); }
.auth-card .auth-head { margin-bottom: 1.9rem; }
.auth-card .auth-head h2 {
  font-family: var(--l-display); font-size: 2.1rem; font-weight: 800;
  letter-spacing: -0.03em; margin: 0 0 0.5rem; color: var(--l-text);
}
.auth-card .auth-sub { color: var(--l-dim); font-size: 0.95rem; }

/* One row per provider, sized like the fields under it so the card reads as
   a single column of equal offers rather than a button and then a form. */
.auth-oauth {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 0.85rem 1rem; margin-bottom: 0.9rem;
  border: 1px solid var(--l-line); border-radius: 11px;
  background: #fff; color: var(--l-text); font-weight: 600; font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.auth-oauth:hover { border-color: var(--l-muted); background: var(--l-surface); }
.auth-oauth .gh-mark { fill: currentColor; }

.auth-card .auth-divider { color: var(--l-muted); margin: 1.4rem 0; letter-spacing: 0.06em; }
.auth-card .auth-divider::before, .auth-card .auth-divider::after { background: var(--l-line); }

.auth-card .auth-form { gap: 1.15rem; }
.auth-card .field > span { color: var(--l-text); font-size: 0.85rem; font-weight: 600; }
.auth-card .field > span em { color: var(--l-muted); }
.auth-card .field input {
  padding: 0.85rem 1rem; border-radius: 11px;
  border: 1px solid var(--l-line); background: #fff; color: var(--l-text);
  font-size: 0.98rem; caret-color: var(--l-mint);
}
.auth-card .field input::placeholder { color: var(--l-muted); }
.auth-card .field input:focus {
  outline: none; border-color: var(--l-mint);
  box-shadow: 0 0 0 3px rgba(27,77,216,0.14);
}

.auth-remember {
  display: flex; align-items: center; gap: 0.55rem; margin: -0.2rem 0 0.2rem;
  font-size: 0.88rem; color: var(--l-dim); cursor: pointer;
}
.auth-remember input { width: 16px; height: 16px; accent-color: var(--l-mint); margin: 0; }

.auth-card .btn-primary {
  background: var(--l-mint); color: var(--l-on-mint); border-radius: 11px;
  box-shadow: none; font-weight: 600;
}
.auth-card .btn-primary:hover:not(:disabled) { box-shadow: 0 10px 24px -12px rgba(27,77,216,0.8); }

.auth-switch {
  margin: 1.5rem 0 0; text-align: center;
  font-size: 0.92rem; color: var(--l-dim);
}
/* The switch is a link in a sentence, not the pill-shaped tab it inherits. */
.auth-switch .tab {
  flex: none; display: inline; padding: 0; background: none; box-shadow: none;
  border-radius: 0; font: inherit; font-weight: 700; color: var(--l-mint);
}
.auth-switch .tab:hover { text-decoration: underline; }
.auth-card .error-msg { text-align: center; }

@media (max-width: 480px) {
  .auth-card { padding: 2rem 1.4rem 1.6rem; }
  .auth-card .auth-head h2 { font-size: 1.8rem; }
}
.auth-card .error-msg:empty { display: none; }

/* ════════════════════════════════════════════════
   SPLIT — the workbench on the landing page
   The hero slides left and the preview docks on the right. The panes inside
   are the workspace's own, moved here at runtime, so this block does two
   things: it lays the split out, and it repaints those panes light. They are
   built entirely on the app's tokens, so redefining the tokens on this
   container is the whole repaint — no rule inside either pane is touched.
   ════════════════════════════════════════════════ */
.landing.is-split { min-height: 0; }
/* The split is exactly one screen and owns its own scrolling, so the page
   behind it must not scroll as well. */
body:has(.landing.is-split) { overflow: hidden; }
/* The parts of the page that are not the build. The nav stays: being able to
   see where you are is the difference between a mode and a different site. */
.landing.is-split > main,
.landing.is-split > .l-foot { display: none; }

/* The rail: what you have already built, beside what you are building.
   Fixed width, because a list of names does not want to be wider on a bigger
   screen — the two panes that do get the rest. */
.l-rail {
  display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--l-line); background: var(--l-bg);
}
.l-rail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0.9rem 0.6rem;
  font-family: var(--l-mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--l-muted);
}
.l-rail-head button {
  border: 1px solid var(--l-line); background: var(--l-bg); color: var(--l-dim);
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 1rem; line-height: 1;
}
.l-rail-head button:hover { color: var(--brand); border-color: var(--brand); }
.l-rail-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0.55rem 0.9rem; }
.l-rail-item {
  display: grid; gap: 0.15rem; width: 100%; text-align: left;
  padding: 0.5rem 0.6rem; border: none; border-radius: 9px;
  background: none; cursor: pointer; font: inherit; color: var(--l-dim);
}
.l-rail-item:hover { background: var(--l-surface); color: var(--l-text); }
/* The one being worked on. Marked, not merely a different grey — a list where
   nothing is marked is a list you have to read to find your place in. */
.l-rail-item.on { background: var(--l-surface); color: var(--l-text); }
.l-rail-item.on .l-rail-name { font-weight: 600; }
.l-rail-name { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-rail-when { font-size: 0.72rem; color: var(--l-muted); }
.l-rail-empty { margin: 0; padding: 0.4rem 0.6rem; font-size: 0.82rem; color: var(--l-muted); line-height: 1.5; }

.l-split {
  display: grid; grid-template-columns: 232px minmax(0, 1fr) minmax(0, 1.15fr);
  /* The nav is 76px and stays on screen; the split takes what is left. */
  height: calc(100dvh - 76px);
  border-top: 1px solid var(--l-line-soft);
}
.l-split-chat, .l-split-preview { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.l-split-preview { border-left: 1px solid var(--l-line); background: var(--l-surface); }
.l-split-chat > .chat-pane, .l-dock-body > .preview-pane { flex: 1; min-height: 0; }

.l-dock-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--l-line);
  background: var(--l-bg);
}
.l-dock-title {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--l-display); font-size: 1.05rem; font-weight: 700; color: var(--l-text);
}
.l-dock-title svg { width: 20px; height: 20px; fill: var(--l-mint); }
.l-dock-close {
  border: none; background: none; color: var(--l-muted); padding: 0.3rem; border-radius: 8px;
  display: grid; place-items: center; transition: color 0.15s, background 0.15s;
}
.l-dock-close svg { width: 18px; height: 18px; fill: currentColor; }
.l-dock-close:hover { color: var(--l-text); background: var(--l-surface); }
.l-dock-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* The repaint. Same panes, same rules, light values. */
.landing.is-split {
  --bg: #ffffff;
  --bg-1: #ffffff;
  --bg-2: #f7f8fa;
  --bg-3: #eef0f4;
  --border: rgba(16, 20, 28, 0.12);
  --border-soft: rgba(16, 20, 28, 0.07);
  --text: #0b0d12;
  --text-dim: #3d4551;
  --text-mute: #6b7280;
  --shadow: 0 1px 2px rgba(16,20,28,0.04), 0 8px 24px -12px rgba(16,20,28,0.10);
  --shadow-lg: 0 2px 4px rgba(16,20,28,0.04), 0 24px 60px -24px rgba(16,20,28,0.16);
  --grad-soft: linear-gradient(120deg, rgba(27,77,216,0.10), rgba(157,186,255,0.08));
}
/* Two things in those panes are painted in raw white rather than a token,
   because on black they were a highlight; on white they are invisible. */
.landing.is-split .btn-ghost { background: #fff; }
.landing.is-split .btn-ghost:hover:not(:disabled) { background: var(--bg-2); }

/* Desktop shows both panes, so there is nothing to switch between. */
.l-split-tabs { display: none; }

/* Under this width the rail is taking room from the two panes that are doing
   the work. The project list is still a press away in the account menu. */
@media (max-width: 1180px) {
  .l-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  /* Between 900 and 1180 there are two panes and no tabs, so the rail has
     nowhere to be: the project list is a press away in the account menu. */
  .l-rail { display: none; }
}

@media (max-width: 900px) {
  /* One at a time on a phone. Two columns of a split screen is two things
     that are both too narrow to use. The row of tabs above them is how you
     reach the one that is not showing. */
  .l-split { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .l-split-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem;
    padding: 0.5rem 0.75rem; background: var(--l-bg);
    border-bottom: 1px solid var(--l-line);
  }
  .l-split-tabs button {
    border: 1px solid var(--l-line); background: var(--l-bg); color: var(--l-muted);
    font: inherit; font-size: 0.92rem; font-weight: 600;
    padding: 0.55rem 0.5rem; border-radius: 10px;
    /* Below 16px on the thing you tap next to an input, iOS treats the tap
       as a reason to zoom; these sit beside the composer. */
    min-height: 44px;
  }
  .l-split-tabs button[aria-selected="true"] {
    background: var(--brand); border-color: var(--brand); color: var(--on-brand);
  }
  /* The pane that is not chosen is not there. Chat is the default: the
     conversation is what a follow-up is typed into. */
  .landing.is-split:not([data-pane="chat"]) .l-split-chat,
  .landing.is-split:not([data-pane="preview"]) .l-split-preview,
  .landing.is-split:not([data-pane="projects"]) .l-rail { display: none; }
  /* The rail is hidden on narrow screens because it takes room from the two
     panes doing the work — but as a pane of its own it is the only way to
     pick a project in here, so it comes back when it is the one chosen. */
  .landing.is-split[data-pane="projects"] .l-rail {
    display: flex; border-right: none; min-height: 0;
  }
}

/* ════════════════════════════════════════════════
   MARKETING PAGES
   One shell for /features, /team, /pricing and /blog: a soft grey page with
   white cards on it. White cards on a white page is the version that has no
   design in it — the grey is what makes a card a card.
   ════════════════════════════════════════════════ */
body.marketing-body { background: var(--l-surface); }
.m-page { padding: clamp(3.5rem, 8vh, 6rem) 0 clamp(4rem, 10vh, 7rem); }

/* Every one of these pages opens the same way: one line saying what the page
   is, one paragraph saying it again in sentences, both centred. */
.m-hero { text-align: center; max-width: 720px; margin: 0 auto clamp(3rem, 7vh, 5rem); }
.m-hero h1 {
  font-family: var(--l-display); font-size: clamp(2.4rem, 5.4vw, 3.6rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.05;
  margin: 0 0 1.1rem; color: var(--l-text);
}
.m-hero p { color: var(--l-dim); font-size: 1.05rem; line-height: 1.65; margin: 0 auto; max-width: 620px; }

.m-section { margin-top: clamp(3rem, 7vh, 4.5rem); }
.m-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.m-section-head h2 {
  font-family: var(--l-display); font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 800; letter-spacing: -0.03em; margin: 0; color: var(--l-text);
}

.m-card {
  background: #fff; border: 1px solid var(--l-line-soft); border-radius: 16px;
  box-shadow: var(--l-shadow); padding: 1.8rem;
}
.m-card--lead { border-color: var(--l-mint); }

/* ── Features ── */
.m-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
.m-feat { display: flex; flex-direction: column; gap: 0.9rem; }
.m-feat-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(27,77,216,0.10); color: var(--l-mint);
}
.m-feat--lead .m-feat-ico { background: var(--l-mint); color: var(--l-on-mint); }
.m-feat-ico svg { width: 22px; height: 22px; fill: currentColor; }
.m-feat h3 { font-family: var(--l-display); font-size: 1.25rem; font-weight: 700; margin: 0.4rem 0 0; letter-spacing: -0.02em; }
.m-feat p { color: var(--l-dim); font-size: 0.95rem; line-height: 1.65; margin: 0; }
/* The picture under each one is drawn, not loaded: a screenshot of a product
   that changes weekly is out of date the day it is taken. */
.m-feat-art {
  margin-top: auto; border-radius: 12px; background: var(--l-surface);
  border: 1px solid var(--l-line-soft); padding: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* Drawn at a fixed viewBox and scaled, so one illustration is the same
   drawing on a phone and on a monitor rather than a different crop of it. */
.m-art { display: block; width: 100%; height: auto; }
/* A real screenshot replaces the drawing when one is added — see
   public/img/features/README.md. Until then nothing is missing: the drawing
   is the illustration, not a placeholder waiting for a file. */
.m-feat-art img { display: block; width: 100%; height: auto; }

.m-cta { text-align: center; margin-top: clamp(3.5rem, 8vh, 5.5rem); }
.m-cta h2 { font-family: var(--l-display); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 1.6rem; }

/* ── Team ── */
.m-founders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
.m-person { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.m-person .m-photo {
  width: 128px; height: 128px; border-radius: 50%; overflow: hidden; position: relative;
  background: var(--l-surface); display: grid; place-items: center;
  font-family: var(--l-display); font-size: 2.4rem; font-weight: 700; color: var(--l-mint);
  margin-bottom: 0.9rem;
}
.m-person .m-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
.m-person .m-photo img.loaded { opacity: 1; }
.m-person h3 { font-family: var(--l-display); font-size: 1.2rem; font-weight: 700; margin: 0; }
.m-role { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--l-mint); margin: 0; }
.m-person p.m-bio { color: var(--l-dim); font-size: 0.95rem; line-height: 1.65; margin: 0.6rem 0 0; }

.m-crew { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; }
.m-crew .m-card { padding: 1.5rem 1.2rem; }
.m-crew .m-photo { width: 96px; height: 96px; font-size: 1.9rem; }
.m-crew h3 { font-size: 1.02rem; }
.m-crew .m-role { font-size: 0.72rem; color: var(--l-muted); letter-spacing: 0.04em; text-transform: none; font-weight: 500; }

/* The filter is real: each person carries the discipline they work in, and
   the pills read that. A control that sorts nothing is a decoration. */
.m-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.m-filter {
  padding: 0.5rem 1.05rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--l-s2, #eef0f4); color: var(--l-dim); font: inherit; font-size: 0.88rem;
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.m-filter:hover { color: var(--l-text); }
.m-filter.active { background: var(--l-mint); color: var(--l-on-mint); font-weight: 600; }

/* ── Pricing ── */
.m-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; align-items: start; }
.m-plan { display: flex; flex-direction: column; padding: 2rem 1.9rem; }
.m-plan--hot { border: 2px solid var(--l-mint); position: relative; box-shadow: var(--l-shadow-lg); }
.m-plan-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--l-mint); color: var(--l-on-mint); border-radius: 999px;
  padding: 0.3rem 0.9rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.m-plan h3 { font-family: var(--l-display); font-size: 1.4rem; font-weight: 700; margin: 0 0 0.5rem; }
.m-plan--hot h3 { color: var(--l-mint); }
.m-plan-note { color: var(--l-dim); font-size: 0.92rem; line-height: 1.6; margin: 0 0 1.5rem; min-height: 3.2rem; }
.m-price { display: flex; align-items: baseline; gap: 0.35rem; margin-bottom: 0.3rem; }
.m-price b { font-family: var(--l-display); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.04em; }
.m-price span { color: var(--l-muted); font-size: 0.95rem; }
.m-price-sub { color: var(--l-muted); font-size: 0.82rem; margin: 0 0 1.6rem; min-height: 1.2rem; }
.m-plan-btn {
  display: block; width: 100%; text-align: center; padding: 0.85rem 1rem; border-radius: 11px;
  border: 1px solid var(--l-line); background: #fff; color: var(--l-text);
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.m-plan-btn:hover:not([disabled]) { border-color: var(--l-muted); background: var(--l-surface); }
.m-plan-btn--hot { background: var(--l-mint); border-color: var(--l-mint); color: var(--l-on-mint); }
.m-plan-btn--hot:hover:not([disabled]) { background: #153fb4; border-color: #153fb4; }
.m-plan-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.m-plan ul { list-style: none; padding: 0; margin: 1.8rem 0 0; display: flex; flex-direction: column; gap: 0.9rem; }
.m-plan li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.93rem; color: var(--l-text); }
.m-plan li svg { width: 17px; height: 17px; fill: none; stroke: var(--l-mint); stroke-width: 2.4; flex: none; margin-top: 0.15rem; }

/* ── Blog ── */
.m-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.m-post { display: flex; flex-direction: column; gap: 0.7rem; color: inherit; transition: transform 0.16s, box-shadow 0.16s; }
.m-post:hover { transform: translateY(-2px); box-shadow: var(--l-shadow-lg); }
.m-post-meta { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--l-muted); }
.m-post h2 { font-family: var(--l-display); font-size: 1.15rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; line-height: 1.3; }
.m-post p { color: var(--l-dim); font-size: 0.92rem; line-height: 1.6; margin: 0; }
.m-post-more { margin-top: auto; padding-top: 0.6rem; color: var(--l-mint); font-size: 0.88rem; font-weight: 600; }

@media (max-width: 900px) {
  .m-bento, .m-founders, .m-plans, .m-posts { grid-template-columns: 1fr; }
  .m-crew { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .m-crew { grid-template-columns: 1fr; }
}

/* The drawings inside the feature cards. All CSS: nothing to load, and
   nothing that goes stale the next time the product changes. */
.m-versions { display: flex; align-items: center; gap: 0.5rem; font-family: var(--l-mono); font-size: 0.72rem; color: var(--l-muted); }
.m-v { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.m-v i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.m-v.is-now { color: var(--l-mint); }
.m-v.is-now i { background: currentColor; border-color: currentColor; }
.m-vline { flex: 1; height: 1px; background: var(--l-line); }
.m-diffs { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.m-diff { font-family: var(--l-mono); font-size: 0.72rem; padding: 0.25rem 0.55rem; border-radius: 7px; border: 1px solid var(--l-line); color: var(--l-muted); }
.m-diff-add { color: var(--l-mint); border-color: rgba(27,77,216,0.28); background: rgba(27,77,216,0.07); }
.m-diff-del { text-decoration: line-through; }
.m-bar {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.8rem;
  border: 1px solid var(--l-line); border-radius: 999px; background: #fff;
  font-family: var(--l-mono); font-size: 0.76rem; color: var(--l-dim);
}
.m-lock { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--l-mint); }
.m-globe {
  margin: 0.6rem auto 0; width: 92px; height: 92px; border-radius: 50%;
  border: 1px solid var(--l-line);
  background:
    radial-gradient(circle at 34% 30%, rgba(27,77,216,0.16), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 21px, var(--l-line-soft) 21px 22px),
    repeating-linear-gradient(0deg, transparent 0 21px, var(--l-line-soft) 21px 22px);
}
.m-swatches { display: flex; gap: 0.5rem; }
.m-swatches i { width: 30px; height: 30px; border-radius: 8px; background: var(--c); border: 1px solid var(--l-line-soft); }
.m-specimen { display: flex; align-items: baseline; gap: 0.7rem; }
.m-specimen b { font-family: var(--l-display); font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.m-specimen span { font-family: var(--l-mono); font-size: 0.72rem; color: var(--l-muted); }
.m-msg { max-width: 100%; padding: 0.6rem 0.85rem; border-radius: 12px; font-size: 0.85rem; line-height: 1.45; }
.m-msg-you { align-self: flex-start; background: #fff; border: 1px solid var(--l-line); color: var(--l-text); }
.m-msg-ai { background: rgba(27,77,216,0.08); border: 1px solid rgba(27,77,216,0.20); color: var(--l-dim); font-family: var(--l-mono); font-size: 0.76rem; display: flex; gap: 0.55rem; align-items: center; }
.m-dots { display: inline-flex; gap: 3px; }
.m-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--l-mint); opacity: 0.5; }
/* The card beside the founder: text, no portrait, so it does not read as a
   person whose photograph failed to load. */
.m-person--note { text-align: left; align-items: flex-start; justify-content: center; }
.m-person--note h3 { font-size: 1.15rem; }
.m-note-link { margin-top: 1rem; color: var(--l-mint); font-size: 0.92rem; font-weight: 600; }
.m-note-link:hover { text-decoration: underline; }
.m-topup { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: 2rem; }
.m-topup h2 { font-family: var(--l-display); font-size: 1.3rem; font-weight: 700; margin: 0 0 0.5rem; }
.m-topup p { color: var(--l-dim); font-size: 0.93rem; line-height: 1.6; margin: 0; max-width: 46ch; }
.m-packs { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.m-pack {
  min-width: 74px; padding: 0.8rem 0.9rem; border-radius: 12px; text-align: center;
  border: 1px solid var(--l-line); background: var(--l-surface);
}
.m-pack strong { display: block; font-family: var(--l-display); font-size: 1.25rem; font-weight: 800; }
.m-pack span { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--l-muted); }
/* A second block on the same page does not need the first one's opening
   distance again. */
.m-page--tight { padding-top: 0; }

/* ── The account menu, and the pages it opens ──
   Both live on the landing page. Clicking yourself used to open a separate
   application; now it opens a menu, and what the menu opens arrives here. */
.l-nav-me-wrap { position: relative; }
.l-nav-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 190px; padding: 0.4rem; border-radius: 12px;
  background: #fff; border: 1px solid var(--l-line); box-shadow: var(--l-shadow-lg);
  display: flex; flex-direction: column;
}
.l-nav-menu button {
  text-align: left; padding: 0.6rem 0.7rem; border: none; background: none;
  border-radius: 8px; font: inherit; font-size: 0.92rem; color: var(--l-text); cursor: pointer;
}
.l-nav-menu button:hover { background: var(--l-surface); }
.l-nav-menu hr { border: none; border-top: 1px solid var(--l-line-soft); margin: 0.35rem 0.2rem; }

.landing.is-page > main,
.landing.is-page > .l-foot { display: none; }
body:has(.landing.is-page) { overflow: hidden; }
.l-page {
  display: flex; flex-direction: column;
  height: calc(100dvh - 76px); border-top: 1px solid var(--l-line-soft);
  background: var(--l-surface);
}
.l-page-head {
  display: flex; align-items: center;
  padding: 0.7rem 1.4rem; border-bottom: 1px solid var(--l-line); background: var(--l-bg);
}
.l-page-back {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: none; background: none; cursor: pointer; padding: 0.35rem 0.5rem 0.35rem 0.3rem;
  border-radius: 9px; font: inherit; font-size: 0.92rem; font-weight: 500; color: var(--l-dim);
  transition: color 0.15s, background 0.15s;
}
.l-page-back svg { width: 18px; height: 18px; fill: currentColor; }
.l-page-back:hover { color: var(--l-text); background: var(--l-surface); }
.l-page-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.l-page-body > .page-pane { flex: 1; min-height: 0; }
/* Same repaint as the split: these panes are written entirely in the app's
   tokens, so redefining the tokens here is the whole of it. */
.landing.is-page {
  --bg: #ffffff; --bg-1: #ffffff; --bg-2: #f7f8fa; --bg-3: #eef0f4;
  --border: rgba(16, 20, 28, 0.12); --border-soft: rgba(16, 20, 28, 0.07);
  --text: #0b0d12; --text-dim: #3d4551; --text-mute: #6b7280;
  --grad-soft: linear-gradient(120deg, rgba(27,77,216,0.10), rgba(157,186,255,0.08));
}
.landing.is-page .btn-ghost { background: #fff; }

/* How hard to think about it, directly under the field. Pills rather than a
   select, because the price has to be on the thing you press: a choice that
   hides what it costs is not a choice. */
.l-modes {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 0.3rem; margin: 0.9rem auto 0; padding: 0.2rem;
  width: max-content; max-width: 100%;
  background: var(--l-surface); border: 1px solid var(--l-line-soft);
  border-radius: 999px;
}
.l-mode {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: none; background: none; cursor: pointer; font: inherit;
  font-size: 0.85rem; font-weight: 500; color: var(--l-muted);
  padding: 0.42rem 0.95rem; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.l-mode em { font-style: normal; font-size: 0.75rem; opacity: 0.75; font-variant-numeric: tabular-nums; }
.l-mode:hover { color: var(--l-text); }
/* Filled, not a slightly different grey: which one is armed decides what the
   next press costs. */
.l-mode.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.l-mode.on em { opacity: 0.85; }
.l-mode-note {
  margin: 0.55rem 0 0; text-align: center;
  font-size: 0.82rem; line-height: 1.5; color: var(--l-muted);
}
@media (max-width: 620px) {
  /* Three prices across a phone: the row keeps its shape and scrolls rather
     than breaking into a stack of pills. */
  .l-modes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .l-modes::-webkit-scrollbar { display: none; }
  .l-mode { flex: 0 0 auto; white-space: nowrap; }
}

/* ── What is being made ──
   Above the field rather than beside the button: it changes what the field
   is asking for, so it has to be read before somebody types, not after.
   Larger than the mode pills below it and quieter than the field itself —
   it is a choice most people will not change, and the one they will is
   worth finding. */
.l-make {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 0.25rem; margin: 0 auto clamp(1.1rem, 3vh, 1.8rem); padding: 0.25rem;
  width: max-content; max-width: 100%;
  background: var(--l-surface); border: 1px solid var(--l-line-soft);
  border-radius: 999px;
}
.l-make-opt {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: none; background: none; cursor: pointer; font: inherit;
  font-size: 0.9rem; font-weight: 500; color: var(--l-muted);
  padding: 0.5rem 1.05rem; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.l-make-opt svg { width: 16px; height: 16px; fill: currentColor; opacity: 0.85; }
.l-make-opt:hover { color: var(--l-text); }
/* Filled, like the mode pills: which one is armed decides what the button
   below does, and a slightly darker grey does not say that. */
.l-make-opt.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.l-make-opt.on svg { opacity: 1; }
.l-make-note {
  margin: 0.7rem auto 0; max-width: 34rem; text-align: center;
  font-size: 0.85rem; line-height: 1.55; color: var(--l-muted);
}
@media (max-width: 620px) {
  /* Three across a phone: the row keeps its shape and scrolls rather than
     stacking into three full-width bars. */
  .l-make { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .l-make::-webkit-scrollbar { display: none; }
  .l-make-opt { flex: 0 0 auto; white-space: nowrap; }
}

/* What a press costs, under the words rather than beside them. Inline, the
   pill was as wide as a sentence; stacked, it is a label with its price
   under it — narrower, and the two read as one thing rather than two. */
.l-counts .l-mode {
  flex-direction: column; gap: 0.05rem; padding: 0.4rem 1.1rem 0.42rem;
  line-height: 1.25;
}
.l-counts .l-mode em { display: block; font-size: 0.72rem; opacity: 0.7; }
.l-counts .l-mode.on em { opacity: 0.85; }

/* ── The choices, as tiles ──
   Four rows of word-and-note pills was most of a screen, and every one of
   them said its explanation at the same volume as its name. A tile is an
   icon and a word; the explanation appears once, underneath, for whichever
   is chosen. */
.l-picks { width: min(100%, 44rem); margin: 1rem auto 0; }
.l-tiles {
  display: flex; gap: 0.45rem; margin-top: 0.55rem;
  /* Sideways rather than wrapped. Five kinds of logo stacked into a column
     is a form; swiped through, it is a choice. */
  overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none; padding: 0.15rem 0.15rem 0.35rem;
  /* The strip fades at both ends, so a row that continues past the edge
     looks like it continues rather than like it stops. */
  mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}
.l-tiles::-webkit-scrollbar { display: none; }
.l-tile {
  flex: 0 0 auto; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  width: 5.9rem; padding: 0.65rem 0.35rem 0.55rem;
  border: 1px solid var(--l-line-soft); border-radius: 14px;
  background: var(--l-surface); cursor: pointer;
  font: inherit; font-size: 0.75rem; font-weight: 500; color: var(--l-muted);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.l-tile svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.l-tile:hover { color: var(--l-text); border-color: var(--l-line); transform: translateY(-1px); }
/* Filled, not a slightly different grey: which one is armed decides what the
   next press produces. */
.l-tile.on {
  background: var(--brand); border-color: var(--brand); color: var(--on-brand);
  font-weight: 600;
}
.l-tile-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.l-tile-note {
  margin: 0.15rem 0 0; text-align: center; min-height: 1.2em;
  font-size: 0.82rem; line-height: 1.5; color: var(--l-muted);
}
@media (min-width: 760px) {
  /* Room for all five, so the strip stops being a strip and is simply a row. */
  .l-tiles { justify-content: center; }
}

@media (max-width: 620px) {
  /* ── The choices, on a phone ──
     The strips bleed to both edges of the screen rather than stopping inside
     the page's margin. A row that ends short of the edge looks like it ends;
     one that runs off it looks like it continues, which is the whole point
     of a strip you swipe. */
  .l-picks { width: auto; margin-inline: -1.2rem; }
  .l-tiles {
    justify-content: flex-start;
    padding-inline: 1.2rem;
    /* No fade here: the page's own edge does that job, and a mask over the
       first tile makes the selected one look half-drawn. */
    mask-image: none;
  }
  /* Five across a 390px screen, whole. Sized so the widest strip fits
     rather than so a tile looks comfortable on its own: a row you have to
     swipe to discover has a fifth option most people never see. */
  .l-tiles { gap: 0.35rem; padding-inline: 0.9rem; }
  .l-tile {
    width: 4.05rem; padding: 0.5rem 0.2rem 0.45rem; gap: 0.22rem;
    font-size: 0.68rem; border-radius: 12px;
  }
  .l-tile svg { width: 18px; height: 18px; }
  .l-tile-note { padding-inline: 1.2rem; font-size: 0.78rem; }
  .l-picks { margin-inline: -0.9rem; }
  /* One row that scrolls rather than two that wrap: "Four to choose from"
     wrapping under "Just one" reads as two settings, not one choice. */
  .l-counts { margin-inline: 1.2rem; }
  .l-brandbox { font-size: 0.8rem; padding: 0.35rem 0.75rem 0.35rem 0.5rem; }
  /* The three things to make now fit a 390px screen with one word each, so
     the row is centred and whole rather than scrolled — the choice that
     decides everything below it should never be half off the edge. */
  .l-make { flex-wrap: nowrap; justify-content: center; }
  .l-make-opt { padding: 0.5rem 0.85rem; }
}

/* The account's own colours, offered as a switch rather than assumed. The
   swatches are the point: "use my brand colours" means nothing until you can
   see which colours are being talked about. */
.l-brandbox {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0.7rem auto 0; padding: 0.4rem 0.9rem 0.4rem 0.6rem;
  border-radius: 999px; border: 1px solid var(--l-line-soft); background: var(--l-surface);
  font-size: 0.85rem; color: var(--l-muted); cursor: pointer;
  /* One line. Left to wrap it became three words stacked in a pill, which
     reads as a broken control rather than a switch. */
  white-space: nowrap; width: max-content; max-width: 100%;
}
.l-brandbox:hover { color: var(--l-text); }
.l-brandbox input { accent-color: var(--brand); margin: 0; }
.l-brandbox-dots { display: inline-flex; gap: 3px; }
.l-brandbox-dots i {
  width: 11px; height: 11px; border-radius: 50%; display: block;
  border: 1px solid rgba(15, 20, 32, 0.12);
}

/* The made-four grid. Square cells whatever the shape, so four pictures of
   different proportions still read as one row of choices. */
.l-made-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem;
}
@media (min-width: 700px) { .l-made-grid { grid-template-columns: repeat(4, 1fr); } }
.l-made-grid button {
  padding: 0; border: 2px solid transparent; border-radius: 12px;
  background: var(--l-surface); cursor: pointer; overflow: hidden; line-height: 0;
}
.l-made-grid button:hover { border-color: var(--l-line); }
.l-made-grid button.on { border-color: var(--brand); }
.l-made-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.l-made-grid .l-made-hole {
  display: grid; place-items: center; aspect-ratio: 1;
  font-size: 0.75rem; color: var(--l-muted); line-height: 1.4; padding: 0.5rem;
}

/* A list of things to choose between, in a dialogue. Rows rather than a
   select: one tap on a phone instead of two and a scroll. */
.pick-list { display: flex; flex-direction: column; gap: 0.25rem; max-height: 20rem; overflow-y: auto; }
.pick-row {
  text-align: left; padding: 0.7rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-1);
  font: inherit; font-size: 0.92rem; color: var(--text); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick-row:hover, .pick-row:focus-visible { border-color: var(--brand); background: var(--bg-2); }

/* ── What was made, under the field that asked for it ──
   A card rather than a bare image: the picture needs somewhere to sit while
   it is still being made, and afterwards it needs the two or three things
   somebody wants to do with it. */
.l-made {
  width: min(100%, 42rem); margin: clamp(1.4rem, 4vh, 2.2rem) auto 0;
  padding: 0.9rem; border-radius: 20px;
  background: var(--l-s1); border: 1px solid var(--l-line);
  box-shadow: var(--l-shadow);
  text-align: center;
}
.l-made-wait {
  padding: 2.6rem 1rem; color: var(--l-muted); font-size: 0.92rem;
}
/* The dots say it is still working. A still line of text during a ten-second
   wait reads as a page that has stopped. */
.l-made-wait::after {
  content: ""; display: inline-block; width: 1.2em; text-align: left;
  animation: l-made-dots 1.4s steps(4, end) infinite;
}
@keyframes l-made-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.l-made img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  background: var(--l-surface);
}
/* A logo is square and small; letting it fill the card blows a 1024px mark
   up to forty centimetres of screen. */
.l-made.is-logo img { width: min(100%, 20rem); margin: 0 auto; }
.l-made-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.5rem; padding: 0.9rem 0.2rem 0.3rem;
}
.l-made-act {
  border: 1px solid var(--l-line); background: var(--l-surface); cursor: pointer;
  font: inherit; font-size: 0.86rem; font-weight: 500; color: var(--l-text);
  padding: 0.5rem 1rem; border-radius: 999px;
  transition: border-color 0.15s, background 0.15s;
}
.l-made-act:hover { border-color: var(--brand); background: var(--l-s1); }
.l-made-act.is-key { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.l-made-act:disabled { opacity: 0.55; cursor: default; }
/* The words, as words. They go on the advertisement and also in the caption,
   the message and the listing, so they are here as text to be taken. */
.l-ad-words {
  margin: 0.7rem 0.3rem 0.2rem; padding: 0.8rem 0.9rem;
  border-radius: 12px; background: var(--l-surface); border: 1px solid var(--l-line-soft);
  text-align: left;
}
.l-ad-head { margin: 0; font-family: var(--l-display); font-weight: 700; font-size: 1.02rem; color: var(--l-text); }
.l-ad-line { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--l-muted); }
.l-ad-cta {
  margin: 0.6rem 0 0.7rem; display: inline-block; padding: 0.3rem 0.8rem;
  border-radius: 999px; background: var(--brand); color: var(--on-brand);
  font-size: 0.8rem; font-weight: 600;
}

/* What was asked for, folded under what came back. Left-aligned inside a
   centred card: it is text to read, and centred prose is text nobody reads. */
.l-made-asked { margin: 0.4rem 0.3rem 0.2rem; text-align: left; }
.l-made-asked summary {
  cursor: pointer; list-style: none; text-align: center;
  font-size: 0.82rem; color: var(--l-muted); padding: 0.35rem;
}
.l-made-asked summary::-webkit-details-marker { display: none; }
.l-made-asked summary::after { content: " ▾"; }
.l-made-asked[open] summary::after { content: " ▴"; }
.l-made-asked summary:hover { color: var(--l-text); }
.l-asked-said {
  margin: 0.3rem 0; padding: 0.6rem 0.8rem; border-radius: 10px;
  background: var(--l-surface); border: 1px solid var(--l-line-soft);
  font-size: 0.88rem; color: var(--l-text);
}
.l-asked-lead { margin: 0.7rem 0 0.3rem; font-size: 0.78rem; color: var(--l-muted); }
.l-asked-full {
  margin: 0 0 0.6rem; padding: 0.6rem 0.8rem; border-radius: 10px;
  background: var(--l-surface); border: 1px solid var(--l-line-soft);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.76rem; line-height: 1.6; color: var(--l-muted);
  white-space: pre-wrap; word-break: break-word; max-height: 14rem; overflow-y: auto;
}

.l-made-said { margin: 0.2rem 0 0.6rem; font-size: 0.85rem; color: var(--l-muted); }
.l-made-said.is-bad { color: #b42318; }

/* The row under the field: where the work you already have lives. Quiet, and
   under the thing the page is actually asking for. */
.l-quick {
  display: flex; align-items: center; justify-content: center;
  gap: 0.4rem 1.4rem; flex-wrap: wrap; margin-top: 1.1rem;
}
.l-quick button, .l-quick a {
  background: none; border: none; padding: 0.2rem 0; cursor: pointer;
  font: inherit; font-size: 0.9rem; color: var(--l-muted);
  text-decoration: underline; text-underline-offset: 0.22em;
  text-decoration-color: transparent; transition: color 0.15s, text-decoration-color 0.15s;
}
.l-quick button:hover, .l-quick a:hover { color: var(--l-text); text-decoration-color: currentColor; }
/* A build carries on when you leave the screen it is on. Without this the
   only honest reading of another page is that it stopped. */
body.is-building [data-go="chat"]::after {
  content: ""; display: inline-block; margin-inline-start: 0.4rem;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  animation: hx-building 1.4s ease-in-out infinite;
}
@keyframes hx-building { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) {
  body.is-building [data-go="chat"]::after { animation: none; }
}

.ex-actions { display: flex; gap: 0.5rem; flex: none; }

/* ── Blog covers, the featured post, and the topic chip ── */
.m-hero-left { text-align: left; margin-left: 0; max-width: 720px; }
.m-hero-left p { margin-left: 0; }

.m-cover { display: block; border-radius: 12px; overflow: hidden; background: var(--l-surface); }
.m-cover-art, .m-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* The newest post, at the width of the page: a list where every row is the
   same size says nothing about which one to read first. */
.m-feature {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; padding: 0; overflow: hidden;
  color: inherit; transition: transform 0.16s, box-shadow 0.16s;
}
.m-feature:hover { transform: translateY(-2px); box-shadow: var(--l-shadow-lg); }
.m-feature .m-cover { border-radius: 0; height: 100%; min-height: 300px; }
.m-feature-body { padding: 2.2rem 2.2rem 2rem; display: flex; flex-direction: column; gap: 0.8rem; }
.m-feature-body h2 {
  font-family: var(--l-display); font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.15; margin: 0;
}
.m-feature-body p { color: var(--l-dim); font-size: 0.98rem; line-height: 1.65; margin: 0; }
.m-feature-body .m-post-meta { margin-top: auto; padding-top: 0.8rem; }

/* What the post is about, taken from its first tag — the thing it is about
   rather than everything it mentions. */
.m-topic {
  align-self: flex-start; padding: 0.28rem 0.7rem; border-radius: 999px;
  background: rgba(27,77,216,0.10); color: var(--l-mint);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}

.m-post .m-cover { margin: -1.8rem -1.8rem 0.2rem; border-radius: 16px 16px 0 0; aspect-ratio: 16 / 9; }
.m-post h2 { font-family: var(--l-display); font-size: 1.15rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; line-height: 1.3; }

@media (max-width: 860px) {
  .m-feature { grid-template-columns: 1fr; }
  .m-feature .m-cover { min-height: 200px; aspect-ratio: 16 / 9; }
  .m-feature-body { padding: 1.6rem; }
}
/* A mention, on its own line and quieter than the row above it: what the
   product runs on is a claim about us, and this is a claim about somebody
   else's page. */
.l-press { margin: 1.4rem 0 0; font-size: 0.85rem; color: var(--l-muted); }
.l-press a { color: var(--l-dim); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--l-line); }
.l-press a:hover { color: var(--l-text); text-decoration-color: currentColor; }
.l-press:empty { display: none; }
/* An avatar fills its circle; the initial is the fallback underneath it.
   Positioned rather than sized in percentages: both of these centre their
   contents with place-items, so the image is not stretched and a height of
   100% resolves against a row whose height the image itself defines — the
   picture then renders at its intrinsic size and spills out of the circle,
   which is exactly what it did. */
.l-nav-avatar, .side-avatar { position: relative; overflow: hidden; }
.l-nav-avatar img, .side-avatar img {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: cover;
}

/* What the next press will do, under the field. "Smarter" on its own is a
   word; this is the sentence. */
.mode-now {
  margin: 0.5rem 0 0; padding: 0 0.2rem;
  font-size: 0.78rem; line-height: 1.5; color: var(--text-mute);
}
.mode-now b { color: var(--text-dim); font-weight: 600; }
.mode-now[data-mode="discuss"] b { color: #3fb27f; }
.mode-now[data-mode="deep"] b { color: var(--brand-2); }
.mode-now:empty { display: none; }

@media (max-width: 620px) {
  /* Four modes with their prices do not fit across a phone. Hiding the
     prices would make it a choice that hides what it costs, so the row
     scrolls instead — and the sentence under the bar always names the one
     that is armed, so nothing important lives off-screen. */
  .mode {
    display: flex; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mode::-webkit-scrollbar { display: none; }
  .eff { flex: 0 0 auto; white-space: nowrap; }
}
