/* shiip design system, v3: quiet SaaS with a warmer grotesk.
   One hand-written stylesheet, no build step. docs/design.md explains the
   tokens, the status vocabulary and the voice.

   Sections
   1. Fonts
   2. Tokens (light, then dark)
   3. Base and type
   4. Brand mark, pennant, top bar, footer
   5. Buttons, inputs, links, focus
   6. Status pills
   7. Panels, flashes, tables, code, copy lines
   8. Sites list
   9. Site page and versions
   10. Domains, forms, connect
   11. Small standalone pages: 404, sign-in, upload, consent
   12. Landing page
   13. Motion and reduced motion
*/

/* 1. Fonts ------------------------------------------------------------ */
@font-face {
  font-family: "shiip Sans";
  src: url("fonts/schibsted-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens ----------------------------------------------------------- */
:root {
  --page: #FAFAF9;
  --surface: #F5F5F4;
  --panel: #FFFFFF;
  --border: #E7E5E4;
  --border-strong: #D6D3D1;
  --ink: #1C1917;
  --ink-2: #57534E;
  --muted: #78716C;
  --blue: #2563A8;
  --blue-soft: #EEF3FA;
  --signal: #F2B705;          /* the pennant: Live and the brand mark only */
  --danger: #B42318;
  --danger-soft: #FDF2F1;
  --danger-line: #F4C7C1;
  --ok: #1D6B45;
  --ok-soft: #EFF7F2;
  --ok-line: #C9E4D3;
  --hover: #F5F5F4;
  --on-ink: #FFFFFF;
  --ink-hover: #3A3532;

  /* Illustration tints: backdrops for landing vignettes only, never bands. */
  --tint-blue: #EBF1F9;
  --tint-blue-2: #D7E4F4;
  --tint-yellow: #FBF4DF;
  --tint-yellow-2: #F5E6B8;
  --tint-sage: #EAF0E8;
  --tint-sage-2: #D3E0CF;
  --tint-clay: #F4ECE6;
  --tint-clay-2: #E8D6C9;
  /* The one strong section: the set-up call to action. */
  --deep: #1C1917;
  --on-deep: #FAFAF9;
  --on-deep-2: #C9C3BD;
  --deep-line: #3A3532;

  --font: "shiip Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px; --s9: 64px; --s10: 96px;
  --r-panel: 8px;
  --r-control: 6px;
  --w-app: 1120px;
  --w-land: 1160px;
  --gutter: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #1A1918;
    --surface: #232120;
    --panel: #232120;
    --border: #35322F;
    --border-strong: #4A4643;
    --ink: #F5F5F4;
    --ink-2: #D6D3D1;
    --muted: #A8A29E;
    --blue: #8AB4F0;
    --blue-soft: #1F2733;
    --signal: #F5C330;
    --danger: #F59A8F;
    --danger-soft: #2E1F1D;
    --danger-line: #5C2D27;
    --ok: #86D5A8;
    --ok-soft: #1B2A22;
    --ok-line: #2E4A3A;
    --hover: #2B2826;
    --on-ink: #1A1918;
    --ink-hover: #E7E5E4;
    --tint-blue: #1D2530;
    --tint-blue-2: #27354A;
    --tint-yellow: #2A2519;
    --tint-yellow-2: #4A3F1E;
    --tint-sage: #1E2620;
    --tint-sage-2: #2E3C31;
    --tint-clay: #2A221E;
    --tint-clay-2: #45362D;
    --deep: #2B2826;
    --on-deep: #FAFAF9;
    --on-deep-2: #C9C3BD;
    --deep-line: #46413D;
    color-scheme: dark;
  }
}
@media (max-width: 640px) { :root { --gutter: 16px; } }

/* 3. Base and type ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" off;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1 { font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
h2 { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
h3 { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
p, li, dd { max-width: 70ch; }
strong, b { font-weight: 600; }
a { color: var(--blue); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blue) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
code, pre, kbd, .mono { font-family: var(--mono); font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.mt-2 { margin-top: var(--s2); }
.mt-5 { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); }

/* 4. Brand mark, pennant, top bar, footer ------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; margin: 0; }
.brand .mark { display: block; flex: none; }
.brand-word { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1; }
.mark-mast { fill: var(--ink); }
.mark-pennant { fill: var(--signal); }
.pennant { display: block; flex: none; }
.pennant-pole { fill: var(--ink); }
.pennant-flag { fill: var(--signal); }

.topbar { background: var(--panel); border-bottom: 1px solid var(--border); }
.topbar-inner {
  max-width: var(--w-app); margin: 0 auto; padding: 0 var(--gutter); min-height: 56px;
  display: flex; align-items: center; gap: var(--s6); flex-wrap: wrap;
}
.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: var(--r-control);
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.875rem;
}
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; min-width: 0; }
.who { color: var(--muted); font-size: 0.8125rem; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org { display: flex; align-items: center; gap: var(--s3); margin: 0; }
.org select { min-height: 32px; height: 32px; font-size: 0.8125rem; padding: 0 30px 0 10px; }
.link-quiet { color: var(--ink-2); font-size: 0.8125rem; }
.sign-out { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.link-button:hover { text-decoration-color: currentColor; }
@media (max-width: 760px) {
  .topbar-inner { gap: 0 var(--s4); padding-top: var(--s2); }
  .topbar .brand { order: 1; }
  .topbar-right { order: 2; gap: var(--s2); }
  .nav { order: 3; flex-basis: 100%; min-height: 44px; margin-left: -10px; }
  .who { max-width: 8rem; }
  .org .link-quiet { display: none; }
}

main { flex: 1; width: 100%; max-width: var(--w-app); margin: 0 auto; padding: var(--s8) var(--gutter) var(--s9); }
@media (max-width: 640px) { main { padding-top: var(--s7); padding-bottom: var(--s8); } }

.foot { border-top: 1px solid var(--border); }
.foot-inner {
  max-width: var(--w-app); margin: 0 auto; padding: var(--s5) var(--gutter);
  display: flex; gap: var(--s2) var(--s5); flex-wrap: wrap; align-items: center; font-size: 0.8125rem; color: var(--muted);
}
.foot-inner a { color: var(--ink-2); }
.foot-inner .push { margin-left: auto; }

/* 5. Buttons, inputs, links, focus ------------------------------------- */
.btn {
  font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-control);
}
.btn:hover { background: var(--hover); color: var(--ink); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 0.8125rem; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 0.75rem; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 0.9375rem; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn.primary .pennant-pole { fill: var(--on-ink); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger-line); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn[disabled], .btn[disabled]:hover { cursor: not-allowed; color: var(--muted); background: var(--surface); border-color: var(--border); }
.btn.htmx-request { opacity: .6; cursor: progress; }

input[type=text], input[type=email], select {
  font: inherit; font-size: 0.875rem; color: var(--ink); background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: var(--r-control); padding: 0 12px; height: 38px;
}
input[type=text]:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
input::placeholder { color: var(--muted); opacity: 1; }
label { font-weight: 500; font-size: 0.875rem; }
.field-hint { color: var(--muted); font-size: 0.8125rem; }

/* 6. Status pills ------------------------------------------------------- */
/* A small shape and a word. Yellow only in the Live pennant. */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--panel);
  font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; line-height: 1;
}
.pill::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.pill.live { color: var(--ink); }
.pill.live::before { display: none; }
.pill.live .pennant { height: 12px; width: 11px; }
.pill.preview { color: var(--blue); }
.pill.preview::before { border: 1.5px solid currentColor; }
.pill.was::before { background: var(--muted); }
.pill.off { color: var(--muted); }
.pill.off::before { border: 1.5px dashed currentColor; }
.pill.ok { color: var(--ok); }
.pill.ok::before { background: currentColor; }
.pill.bad { color: var(--danger); }
.pill.bad::before { background: currentColor; }

/* 7. Panels, flashes, tables, code, copy lines -------------------------- */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-panel); padding: var(--s5); }
.panel.flush { padding: 0; overflow: hidden; }
.panel-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: var(--s3); }
.panel p + p { margin-top: var(--s3); }
.plan-options { list-style: none; margin: var(--s3) 0; padding: 0; display: grid; gap: var(--s3); }
.plan-options li { display: grid; gap: 4px; justify-items: start; font-size: 0.875rem; }
.plan-interval { border: 0; margin: var(--s3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s4); font-size: 0.875rem; }
.plan-interval legend { font-weight: 600; margin-bottom: 4px; padding: 0; float: left; width: 100%; }
.plan-interval label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* The buttons show the price of the interval chosen above (no script). */
.plan-choose .price-year { display: none; }
.plan-choose:has(input[name="interval"][value="year"]:checked) .price-year { display: inline; }
.plan-choose:has(input[name="interval"][value="year"]:checked) .price-month { display: none; }
/* Without :has(), show both prices rather than a monthly one under Yearly. */
@supports not selector(:has(*)) {
  .plan-choose .price-year { display: inline; }
  .plan-choose .price-year::before { content: " / "; }
}
.lede { color: var(--ink-2); font-size: 1rem; margin-top: var(--s2); }

.flash {
  display: block; padding: 10px 14px; margin: 0 0 var(--s5); font-size: 0.875rem; font-weight: 500;
  border-radius: var(--r-panel); border: 1px solid var(--border); background: var(--surface); color: var(--ink); overflow-wrap: anywhere;
}
.flash.ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.flash.bad { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.flash.note { background: var(--panel); border-color: var(--border-strong); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px var(--s5); text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { font-size: 0.8125rem; color: var(--muted); font-weight: 500; white-space: nowrap; background: var(--surface); padding-top: 9px; padding-bottom: 9px; }
.table tbody tr:last-child td { border-bottom: 0; }

pre {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-control);
  padding: 10px 14px; overflow-x: auto; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
:not(pre) > code { font-size: 0.8125rem; }

/* A copy line: the value and an attached Copy button. */
.copyline { display: flex; align-items: stretch; min-width: 0; }
.copyline .value {
  flex: 1 1 auto; min-width: 0; padding: 0 12px; min-height: 38px; display: block; line-height: 36px;
  background: var(--surface); border: 1px solid var(--border-strong); border-right: 0;
  border-radius: var(--r-control) 0 0 var(--r-control); color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copyline .btn { border-radius: 0 var(--r-control) var(--r-control) 0; flex: none; min-width: 64px; height: auto; min-height: 38px; }
.copyline.wrap .value { white-space: normal; overflow-wrap: anywhere; padding-top: 9px; padding-bottom: 9px; line-height: 1.4; }
.copyline.big .value { font-size: 0.875rem; min-height: 44px; line-height: 42px; padding: 0 14px; }
.copyline.big .btn { min-width: 76px; }

.crumbs { font-size: 0.8125rem; color: var(--muted); margin-bottom: var(--s3); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.page-head .push { margin-left: auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s3); flex-wrap: wrap; }
.section-head p { color: var(--muted); font-size: 0.8125rem; }

/* 8. Sites list --------------------------------------------------------- */
.tile {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: var(--r-control);
  background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); font-weight: 600; font-size: 0.8125rem; line-height: 1;
}
.tile.lg { width: 40px; height: 40px; font-size: 1.0625rem; border-radius: var(--r-panel); }
.sites tbody tr { position: relative; }
.sites tbody tr:hover td { background: var(--hover); }
.sites tbody tr:focus-within td { background: var(--hover); }
.sites tbody td { height: 64px; }
.site-cell { display: flex; align-items: center; gap: var(--s3); }
.site-name { font-weight: 500; color: var(--ink); text-decoration: none; }
.site-name::after { content: ""; position: absolute; inset: 0; }
.site-name:focus-visible { outline: none; }
.sites tbody tr:has(.site-name:focus-visible) { outline: 2px solid var(--blue); outline-offset: -2px; }
.site-addr { display: block; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.waiting { position: relative; z-index: 1; font-weight: 500; font-size: 0.875rem; }
.sites .c-wait .muted, .sites .c-when { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.sites .c-plan { font-size: 0.875rem; white-space: nowrap; }
@media (max-width: 760px) {
  .sites, .sites tbody, .sites tr, .sites td { display: block; }
  .sites thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sites tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 6px var(--s3); padding: var(--s4); border-bottom: 1px solid var(--border); }
  .sites tbody tr:last-child { border-bottom: 0; }
  .sites tbody td { padding: 0; border: 0; height: auto; }
  .sites td.c-state { grid-column: 2; grid-row: 1; }
  .sites td.c-plan, .sites td.c-wait, .sites td.c-when { grid-column: 1 / -1; padding-left: 40px; }
}

.new-site { position: relative; }
.new-site > summary { list-style: none; }
.new-site > summary::-webkit-details-marker { display: none; }
.new-site[open] > summary { background: var(--surface); }
.new-site .create {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; width: min(360px, calc(100vw - 32px));
  display: grid; gap: var(--s2); padding: var(--s4); background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-panel);
}
.new-site .create .btn { justify-self: start; }

.empty { padding: var(--s7); }
.empty h2 { font-size: 1.125rem; }
.empty > p { color: var(--ink-2); margin-top: var(--s2); }
.empty .connect-steps { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--border); }

/* 9. Site page and versions --------------------------------------------- */
.site-head { display: flex; align-items: center; gap: var(--s3) var(--s4); flex-wrap: wrap; margin-bottom: var(--s7); }
.site-head h1 { min-width: 0; overflow-wrap: anywhere; }
.site-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
@media (max-width: 900px) { .site-grid { grid-template-columns: minmax(0, 1fr); } }
.site-main, .site-side { min-width: 0; }
.site-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.site-side p { font-size: 0.875rem; }
.site-side form { margin-top: var(--s3); }
.facts { margin-top: var(--s5); }
.facts dt { font-size: 0.8125rem; color: var(--muted); margin-bottom: 6px; }

.live-block { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.live-main { min-width: 0; flex: 1 1 18rem; }
.live-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1rem; }
.live-line > span { overflow-wrap: anywhere; }
.live-meta { color: var(--muted); font-size: 0.8125rem; margin-top: 6px; }
.live-actions { display: flex; gap: var(--s2); }
.live-block.empty-slot { background: transparent; border-style: dashed; border-color: var(--border-strong); }
.live-block.empty-slot .live-line { color: var(--ink-2); }

.vgroup { margin-top: var(--s7); }
.vgroup-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: var(--s3); }
.vgroup-title .count { color: var(--muted); font-weight: 500; }
.vgroup-empty { font-size: 0.875rem; }
details.vgroup > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; border-radius: var(--r-control); }
details.vgroup > summary::-webkit-details-marker { display: none; }
details.vgroup > summary::before {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s;
}
details.vgroup[open] > summary::before { transform: rotate(45deg); }

.vlist { list-style: none; margin: 0; padding: 0; }
.vrow { max-width: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 14px var(--s5); border-bottom: 1px solid var(--border); }
.vrow:last-child { border-bottom: 0; }
.vrow-main { min-width: 0; flex: 1; }
.vrow-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vnum { font-weight: 600; }
.vid { color: var(--muted); font-size: 0.75rem; }
.vrow-meta { color: var(--ink-2); font-size: 0.8125rem; margin-top: 3px; }
.vrow-link { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-width: 0; }
.vrow-link a { font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vrow-actions { flex: none; display: flex; gap: var(--s2); align-items: center; }
.vrow.was .vnum, .vrow.expired .vnum, .vrow.superseded .vnum { color: var(--ink-2); }
@media (max-width: 560px) {
  .vrow { flex-direction: column; align-items: stretch; gap: var(--s3); padding: 14px var(--s4); }
  .vrow-actions { flex-direction: column; align-items: stretch; }
  .vrow-actions .btn { width: 100%; }
}
.empty-versions h3 { font-size: 1rem; }
.empty-versions p { color: var(--ink-2); margin-top: 6px; }

/* 10. Domains, forms, connect ------------------------------------------ */
.domain { padding: var(--s4) 0; border-top: 1px solid var(--border); }
.domain:first-of-type { border-top: 0; padding-top: 0; }
.domain-head { display: flex; justify-content: space-between; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.domain-host { font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; overflow-wrap: anywhere; }
.domain-step { margin-top: var(--s2); font-size: 0.875rem; color: var(--ink-2); }
.records { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: var(--s2); }
.record { border: 1px solid var(--border); border-radius: var(--r-control); padding: 8px 10px; background: var(--surface); }
.record dl { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 2px var(--s3); align-items: center; }
.record dt { font-size: 0.75rem; color: var(--muted); }
.record dd { font-family: var(--mono); font-size: 0.75rem; overflow-wrap: anywhere; display: flex; justify-content: space-between; gap: var(--s2); align-items: center; }
.domain-remove { margin-top: var(--s3); }
.domain-add { display: grid; gap: 6px; margin-top: var(--s4); }
.domain-add .row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.domain-add input { flex: 1; min-width: 0; }

.subs td { font-size: 0.875rem; vertical-align: top; padding-top: 14px; padding-bottom: 14px; }
.subs .when { white-space: nowrap; color: var(--ink-2); width: 11rem; }
.subs .form-name { white-space: nowrap; font-weight: 500; }
.fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px var(--s4); }
.fields dt { color: var(--muted); }
.fields dd { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .subs, .subs tbody, .subs tr, .subs td { display: block; }
  .subs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .subs tr { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
  .subs td { border: 0; padding: 2px 0; }
  .subs .when { width: auto; }
}
.pager { display: flex; gap: var(--s3); align-items: center; margin-top: var(--s4); flex-wrap: wrap; font-size: 0.875rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); }
@media (max-width: 760px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.steps-plain { padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps-plain li { counter-increment: s; position: relative; padding-left: 32px; }
.steps-plain li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); font-weight: 500; font-size: 0.75rem;
}
.connect-steps h3 { margin-bottom: var(--s2); }
.connect-steps .copyline { margin-bottom: var(--s6); max-width: 36rem; }
.stack > * + * { margin-top: var(--s3); }
.narrow { max-width: 560px; }
.narrow-panel { max-width: 720px; }

/* 11. Small standalone pages -------------------------------------------- */
.standalone { max-width: 460px; margin: var(--s9) auto 0; text-align: center; }
.standalone h1 { margin-bottom: var(--s2); }
.standalone p { margin: 0 auto var(--s5); color: var(--ink-2); }

.upload { max-width: 560px; margin: var(--s7) auto 0; text-align: center; }
.upload .lede { margin: var(--s2) auto 0; }
.dropzone {
  display: grid; justify-items: center; gap: var(--s2); margin: var(--s6) 0 var(--s4); padding: var(--s9) var(--s5);
  border: 1.5px dashed var(--border-strong); border-radius: 10px; background: var(--panel);
}
.dropzone:focus-within, .dropzone.over { border-color: var(--blue); background: var(--blue-soft); }
.dropzone .drop-title { font-size: 1.125rem; font-weight: 600; }
.dropzone input[type=file] { font: inherit; font-size: 0.875rem; max-width: 100%; margin-top: var(--s2); }
.dropzone input[type=file]::file-selector-button {
  font: inherit; font-weight: 500; margin-right: var(--s3); height: 34px; padding: 0 12px; cursor: pointer;
  background: var(--panel); color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--r-control);
}
[data-progress] { width: 100%; height: 6px; accent-color: var(--blue); }
.upload [data-status] { margin-top: var(--s4); text-align: left; }
.upload [data-status]:empty { display: none; }
.upload-done { margin-top: var(--s4); display: grid; justify-items: center; }

.consent { max-width: 440px; width: 100%; margin: 0 auto; padding: var(--s9) var(--gutter); flex: 1; }
.consent-brand { margin-bottom: var(--s5); }
.consent-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: var(--s7); }
.consent-card h1 { font-size: 1.375rem; overflow-wrap: anywhere; }
.consent-host { font-family: var(--mono); font-size: 0.9em; }
.consent-client { color: var(--muted); font-size: 0.8125rem; margin-top: var(--s2); }
.consent-lede { color: var(--ink-2); margin-top: var(--s3); }
.can-do { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: 10px; }
.can-do li { display: flex; gap: 10px; align-items: flex-start; }
.can-do .check { flex: none; margin-top: 3px; color: var(--ok); }
.consent-scope { margin-top: var(--s5); padding: 12px 14px; background: var(--surface); border-radius: var(--r-panel); font-size: 0.875rem; }
.consent-label { font-weight: 600; margin-bottom: 2px; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s6); }
.consent-actions .btn { height: 40px; }
.consent-who { margin-top: var(--s4); color: var(--muted); font-size: 0.8125rem; }
@media (max-width: 480px) { .consent { padding-top: var(--s7); } .consent-card { padding: var(--s5); } }

/* 12. Landing page ------------------------------------------------------ */
.land .wrap { width: 100%; max-width: var(--w-land); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.land main { flex: none; max-width: none; padding: 0; }
.land-top { display: flex; align-items: center; gap: var(--s4); min-height: 72px; }
.land-top .push { margin-left: auto; display: flex; gap: var(--s5); align-items: center; font-size: 0.875rem; }
.land-top .push > a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.land-top .push > a:not(.btn):hover { color: var(--ink); }
@media (max-width: 560px) { .land-top .push .btn { display: none; } }

.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; padding-top: var(--s7); padding-bottom: var(--s9); }
/* Hero stage: a soft two-tint backdrop behind the mock, and a phone that
   overlaps the browser with the next preview. */
.hero-stage { position: relative; padding: 36px 56px 56px 36px; }
.hero-stage::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; background: var(--tint-blue);
}
.hero-stage::after {
  content: ""; position: absolute; right: -18px; bottom: -18px; width: 46%; height: 58%; border-radius: 20px; background: var(--tint-yellow); z-index: -1;
}
.hero-stage .mock { position: relative; }
.hero-phone { position: absolute; right: 14px; bottom: 18px; z-index: 2; }
@media (max-width: 640px) {
  .hero-stage { padding: 16px; }
  .hero-stage::after { display: none; }
  .hero-phone { display: none; }
}
.hero h1 { font-size: clamp(2.25rem, 1.2rem + 3vw, 3.5rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.hero .lede { font-size: 1.125rem; line-height: 1.55; margin-top: var(--s5); max-width: 32rem; }
.hero-actions { display: flex; align-items: center; gap: var(--s5); margin-top: var(--s7); flex-wrap: wrap; }
.hero-actions a:not(.btn) { color: var(--ink); font-weight: 500; font-size: 0.9375rem; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s7); padding-top: var(--s5); padding-bottom: var(--s9); } }

/* The product mock: the one rich visual, with the one soft shadow. */
.mock {
  display: grid; grid-template-columns: 172px minmax(0, 1fr); border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel); overflow: hidden;
  box-shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 12px 32px -8px rgba(28, 25, 23, .14);
}
.mock-chat { background: var(--surface); border-right: 1px solid var(--border); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); font-size: 0.8125rem; }
.mock-chat-head { font-weight: 600; color: var(--ink-2); font-size: 0.75rem; }
.msg .who-said { display: block; font-size: 0.6875rem; color: var(--muted); margin-bottom: 3px; }
.msg p { line-height: 1.45; }
.msg.you p { background: var(--panel); border: 1px solid var(--border); border-radius: 10px 10px 10px 3px; padding: 7px 10px; }
.msg.claude .mono { color: var(--blue); font-size: 0.75rem; overflow-wrap: anywhere; }
.mock-browser { display: flex; flex-direction: column; min-width: 0; }
.mock-bar { display: flex; align-items: center; gap: var(--s2); padding: 8px 12px; border-bottom: 1px solid var(--border); }
.mock-bar .dots { display: flex; gap: 5px; }
.mock-bar .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); display: block; }
.mock-addr { flex: 1; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); background: var(--surface); padding: 4px 10px; border-radius: var(--r-control); }
.shiip-bar { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 0.75rem; }
.hb-brand { font-weight: 600; color: var(--ink); padding-right: 10px; border-right: 1px solid var(--border); }
.hb-states { position: relative; flex: 1 0 84px; min-width: 84px; height: 18px; }
.hb-state { position: absolute; inset: 0 auto 0 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.hb-preview { color: var(--blue); }
.hb-preview .dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.hb-live { color: var(--ink); }
.hb-link { color: var(--blue); }
.hb-btn { background: var(--ink); color: var(--on-ink); border-radius: 5px; padding: 4px 9px; font-weight: 500; }
.mini { padding: 20px 22px 24px; background: #FBF7F1; color: #3B2A1E; flex: 1; }
.mini-nav { display: flex; gap: 12px; font-size: 11px; align-items: baseline; color: #6E5644; }
.mini-nav b { font-size: 13px; color: #3B2A1E; margin-right: auto; font-weight: 600; }
.mini-h { font-size: 22px; line-height: 1.15; margin-top: 22px; max-width: 15em; font-weight: 600; letter-spacing: -0.01em; }
.mini-p { font-size: 12px; line-height: 1.5; margin-top: 8px; color: #6E5644; max-width: 30em; }
.mini-btn { display: inline-block; margin-top: 14px; font-size: 11px; font-weight: 500; padding: 6px 12px; background: #7A3E22; color: #FBF7F1; border-radius: 5px; }
.mini-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.mini-tiles i { display: block; height: 52px; border-radius: 6px; background: #EADBC6; }
.mini-tiles i:nth-child(2) { background: #DDC2A5; }
.mini-tiles i:nth-child(3) { background: #CFA683; }
@media (max-width: 640px) {
  .mock { grid-template-columns: minmax(0, 1fr); }
  .mock-chat { border-right: 0; border-bottom: 1px solid var(--border); }
  .hb-link { display: none; }
}

.land h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.land-section { padding-top: var(--s9); padding-bottom: var(--s9); }
.section-intro { max-width: 36rem; margin-bottom: var(--s7); }
.intro { color: var(--ink-2); font-size: 1rem; margin-top: var(--s2); }

/* Phone frame, shared by the hero and step 3. */
.phone {
  width: 158px; padding: 7px; border-radius: 24px; background: var(--deep); border: 1px solid var(--deep-line);
  box-shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 14px 30px -10px rgba(28, 25, 23, .3);
}
.phone-screen { border-radius: 18px; overflow: hidden; background: #FBF7F1; }
.phone-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 9px 7px; background: #FFFFFF; border-bottom: 1px solid #E7E5E4; font-size: 10px; color: #1C1917; }
.pb-state { display: inline-flex; align-items: center; gap: 4px; color: #2563A8; font-weight: 500; white-space: nowrap; }
.pb-state .dot { width: 6px; height: 6px; border-radius: 50%; border: 1.25px solid currentColor; }
.pb-btn { background: #1C1917; color: #FFFFFF; border-radius: 4px; padding: 2px 6px; font-weight: 500; }
.mini-phone { padding: 12px 11px 14px; }
.mini-phone .mini-h { font-size: 14px; margin-top: 2px; }
.mini-phone .mini-p { font-size: 9.5px; margin-top: 5px; }
.mini-phone .mini-btn { font-size: 9px; padding: 4px 8px; margin-top: 8px; }
.mini-phone .mini-tiles { grid-template-columns: repeat(2, 1fr); gap: 5px; margin-top: 10px; }
.mini-phone .mini-tiles i { height: 34px; }
.phone-sm { width: 128px; padding: 5px; border-radius: 20px; box-shadow: none; }
.phone-sm .phone-screen { border-radius: 15px; }

/* How it works: on a subtle surface, four steps with small vignettes. */
.how-band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: var(--s9) 0; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.step { max-width: none; }
.step h3 { display: flex; align-items: center; gap: 8px; margin-top: var(--s4); font-size: 1rem; }
.step-num {
  display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--border-strong); font-size: 0.75rem; font-weight: 600; color: var(--ink);
}
.step:last-child .step-num { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.step p { color: var(--ink-2); margin-top: 4px; font-size: 0.9375rem; padding-left: 30px; }
.not-it { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--border); color: var(--ink-2); font-size: 0.9375rem; max-width: none; }
.not-it strong { color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s5); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Vignettes: tiny product scenes on a tinted backdrop. */
.vignette {
  position: relative; height: 168px; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  padding: var(--s4); font-size: 0.75rem; color: var(--ink);
}
.tint-blue { background: var(--tint-blue); }
.tint-yellow { background: var(--tint-yellow); }
.tint-sage { background: var(--tint-sage); }
.tint-clay { background: var(--tint-clay); }
.v-card, .v-chat, .v-reply, .v-versions {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px; width: min(100%, 230px);
}
.v-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 10px 10px 10px 3px; padding: 6px 9px; display: inline-block; }
.v-bubble.mine { border-radius: 10px 10px 3px 10px; }
.v-artifact { display: flex; align-items: center; gap: 9px; margin-top: 9px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.v-artifact b { display: block; font-weight: 600; font-size: 0.8125rem; }
.v-artifact small { display: block; color: var(--muted); font-size: 0.6875rem; }
.v-artifact-icon { width: 28px; height: 32px; border-radius: 5px; background: var(--tint-blue-2); position: relative; flex: none; }
.v-artifact-icon::after { content: ""; position: absolute; left: 6px; right: 6px; top: 9px; height: 2px; background: var(--blue); box-shadow: 0 5px 0 var(--blue), 0 10px 0 color-mix(in srgb, var(--blue) 50%, transparent); border-radius: 2px; }
.v-reply { display: grid; gap: 6px; justify-items: start; }
.v-reply .mine { justify-self: end; }
.v-claude { color: var(--ink-2); }
.v-url { font-family: var(--mono); font-size: 0.625rem; color: var(--blue); background: var(--tint-blue); border-radius: 6px; padding: 4px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vignette .phone-sm { transform: translateY(26px); }
.v-versions { list-style: none; margin: 0; padding: 4px 12px; }
.v-versions li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); max-width: none; }
.v-versions li:last-child { border-bottom: 0; }
.v-versions .faint { opacity: .55; }
.vignette .pill { height: 20px; font-size: 0.6875rem; padding: 0 7px 0 6px; }
.vignette .pill::before { width: 6px; height: 6px; }
.v-dns { display: grid; gap: 6px; }
.v-dns-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.v-dns-row span { color: var(--muted); font-size: 0.6875rem; }
.v-dns-row code { font-size: 0.6875rem; overflow-wrap: anywhere; text-align: right; }
.v-pills { display: flex; gap: 6px; margin-top: 4px; }
.v-note-title { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 0.8125rem; }
.v-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.v-note dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin-top: 8px; }
.v-note dt { color: var(--muted); }
.v-note dd { max-width: none; }
.v-checks { list-style: none; margin: 0; display: grid; gap: 7px; }
.v-checks li { display: flex; align-items: center; gap: 8px; max-width: none; }
.v-checks code { font-size: 0.6875rem; }
.ok-mark { width: 14px; height: 14px; border-radius: 50%; background: var(--tint-sage-2); position: relative; flex: none; }
.ok-mark::after { content: ""; position: absolute; left: 4px; top: 3px; width: 3px; height: 6px; border: solid var(--ok); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.v-checks .warn { color: var(--ink-2); }
.warn-mark { width: 14px; height: 14px; border-radius: 50%; background: var(--tint-clay-2); position: relative; flex: none; }
.warn-mark::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-weight: 600; color: #8A4B2A; }
.v-avatars { display: flex; }
.v-avatars span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 0.6875rem; font-weight: 600; border: 2px solid var(--panel); margin-right: -8px; color: var(--ink); }
.v-avatars .a1 { background: var(--tint-blue-2); }
.v-avatars .a2 { background: var(--tint-sage-2); }
.v-avatars .a3 { background: var(--tint-yellow-2); }
.v-team-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@media (prefers-color-scheme: dark) { .warn-mark::after { color: #E8B48E; } }

/* What makes it a real website: four cards, each with a vignette. */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 10px 10px var(--s5); }
.feature .vignette { height: 176px; }
.feature h3 { margin: var(--s4) 10px 0; font-size: 1rem; }
.feature p { margin: 4px 10px 0; color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 760px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* Set up in a minute: the one strong section, on the deep ink colour. */
.setup-band { background: var(--deep); color: var(--on-deep); padding: var(--s9) 0; }
.setup-band h2, .setup-band h3 { color: var(--on-deep); }
.setup-band .intro { color: var(--on-deep-2); }
.setup-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; margin-bottom: var(--s6); }
.setup .copyline { max-width: 40rem; }
.setup-band .copyline .value { background: rgba(255, 255, 255, .06); border-color: var(--deep-line); color: var(--on-deep); }
.setup-band .copyline .btn { background: transparent; border-color: var(--deep-line); color: var(--on-deep); }
.setup-band .copyline .btn:hover { background: rgba(255, 255, 255, .08); }
.setup .two-col { margin-top: var(--s7); gap: var(--s7); }
.setup h3 { margin-bottom: var(--s3); }
.setup-band .steps-plain li { color: var(--on-deep-2); }
.setup-band .steps-plain li::before { background: transparent; border-color: var(--deep-line); color: var(--on-deep); }
.setup-band pre { background: rgba(255, 255, 255, .06); border-color: var(--deep-line); color: var(--on-deep); }
.btn.invert { background: var(--on-deep); border-color: var(--on-deep); color: #1C1917; }
.btn.invert:hover { background: #E7E5E4; border-color: #E7E5E4; color: #1C1917; }
.setup-band :focus-visible { outline-color: var(--on-deep); }

.land-foot { border-top: 1px solid var(--border); }
.land-foot .wrap { display: flex; gap: var(--s3) var(--s6); align-items: center; flex-wrap: wrap; padding-top: var(--s6); padding-bottom: var(--s6); font-size: 0.8125rem; color: var(--muted); }
.land-foot a:not(.brand) { color: var(--ink-2); }
.land-foot .push { margin-left: auto; }

@media (max-width: 640px) {
  .copyline.big .value { white-space: normal; overflow-wrap: anywhere; padding-top: 10px; padding-bottom: 10px; line-height: 1.4; }
}

/* Review comments (WP22): the comments page and the counts on versions. */
.vcomments { font-size: 0.8125rem; font-weight: 500; }
.filter-row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
.seg a {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-control);
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.seg a:hover { color: var(--ink); }
.seg a[aria-current="page"] { background: var(--panel); color: var(--ink); border: 1px solid var(--border); }
.seg .count { color: var(--muted); font-weight: 500; }
.filter-note { color: var(--ink-2); font-size: 0.875rem; }
.comments-table td { vertical-align: top; }
.comments-table .c-page code { white-space: nowrap; }
.comments-table .c-el { color: var(--ink-2); width: 22%; min-width: 180px; overflow-wrap: anywhere; }
.comments-table .c-body { width: 32%; min-width: 220px; }
.comments-table .c-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.comments-table .c-meta { display: block; color: var(--muted); font-size: 0.8125rem; margin-top: 2px; }
.comments-table .c-note { margin-top: var(--s2); padding: 8px 10px; background: var(--ok-soft); border: 1px solid var(--ok-line); border-radius: var(--r-control); font-size: 0.8125rem; overflow-wrap: anywhere; }
.comments-table .c-author, .comments-table .c-ver { white-space: nowrap; }
.comments-table .c-open { text-align: right; white-space: nowrap; }
@media (max-width: 900px) {
  .comments-table, .comments-table tbody, .comments-table tr, .comments-table td { display: block; }
  .comments-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .comments-table tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 6px var(--s3); padding: var(--s4); border-bottom: 1px solid var(--border); }
  .comments-table tbody tr:last-child { border-bottom: 0; }
  .comments-table tbody td { padding: 0; border: 0; max-width: none; }
  .comments-table td.c-page { grid-column: 1; grid-row: 1; }
  .comments-table td.c-state { grid-column: 2; grid-row: 1; }
  .comments-table td.c-el, .comments-table td.c-body, .comments-table td.c-author, .comments-table td.c-ver, .comments-table td.c-open { grid-column: 1 / -1; }
  .comments-table td.c-open { text-align: left; margin-top: var(--s2); }
}

/* 13. Motion ------------------------------------------------------------ */
/* One load moment on the landing page: in the mock's preview bar, Publish
   is pressed and the preview becomes Live under the pennant. */
@keyframes out { to { opacity: 0; visibility: hidden; } }
@keyframes in { from { opacity: 0; transform: translateY(3px); } }
@keyframes snap { from { transform: scaleX(0); } }
.hb-preview { animation: out .2s ease 1.5s both; }
.hb-live { animation: in .25s ease 1.6s both; }
.hb-live .pennant-flag { transform-origin: 1.5px 4.5px; animation: snap .22s cubic-bezier(.3, 0, .2, 1) 1.75s both; }
.hb-btn { animation: out .2s ease 1.45s both; }

/* Publish in the dashboard: app.js breaks out the pennant on the live block. */
@keyframes pennant-break { from { transform: scaleX(0); } }
.live-block .pennant-flag.breaking { transform-origin: 1.5px 4.5px; animation: pennant-break .2s cubic-bezier(.3, 0, .2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
}

/* The user's page keeps its own colours in both themes. */
.phone .mini-h, .phone .mini { color: #3B2A1E; }

/* 14. Analytics (ADR 0014) -------------------------------------------- */
/* The analytics page: period control and filter chips, headline numbers,
   the visitors chart (bars) with pageviews (a line), the live panel and
   top-value lists. Blue is the data colour; nothing here uses yellow. */
.an-controls { justify-content: space-between; }
.an-periods { flex-wrap: wrap; }
.an-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.an-chip {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 30px; padding: 0 6px 0 12px;
  background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); border-radius: 999px;
  font-size: 0.8125rem; color: var(--ink); max-width: 100%;
}
.an-chip span { overflow-wrap: anywhere; }
.an-chip strong { font-weight: 600; }
.an-chip a { font-size: 0.75rem; font-weight: 500; padding: 2px 6px; border-radius: 999px; }
.an-note { margin: calc(-1 * var(--s2)) 0 var(--s4); }

.an-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
@media (max-width: 1000px) { .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-kpi { padding: var(--s4); min-width: 0; }
.an-kpi-label { font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.an-kpi-value { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; }
.an-delta { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.an-delta.none { color: var(--muted); font-weight: 400; }

.an-chart { margin-bottom: var(--s4); }
.an-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.an-legend { display: flex; gap: var(--s4); font-size: 0.8125rem; color: var(--ink-2); }
.an-key { display: inline-flex; align-items: center; gap: 6px; }
.an-key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.an-key.visitors::before { background: color-mix(in srgb, var(--blue) 70%, transparent); }
.an-key.pageviews::before { height: 2px; width: 14px; border-radius: 1px; background: var(--ink-2); }
.an-chart figure { margin: 0; }
.an-svg { display: block; width: 100%; height: auto; overflow: visible; }
.an-svg .an-grid-line { stroke: var(--border); stroke-width: 1; }
.an-svg .an-axis { fill: var(--muted); font-family: var(--font); font-size: 11px; font-variant-numeric: tabular-nums; }
.an-svg .an-bar { fill: color-mix(in srgb, var(--blue) 70%, transparent); }
.an-svg .an-bar:hover { fill: var(--blue); }
.an-svg .an-line { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.an-svg .an-dot { fill: var(--panel); stroke: var(--ink-2); stroke-width: 1.5; }
.an-chart-empty { padding: var(--s6) 0; }

.an-live-panel { margin-bottom: var(--s4); }
.an-live { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s3); }
.an-now { display: flex; align-items: center; gap: var(--s2); color: var(--ink-2); }
.an-now strong { color: var(--ink); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.an-pulse { width: 8px; height: 8px; border-radius: 50%; border: 1.5px dashed var(--muted); }
.an-pulse.on { border: 0; background: var(--ok); }
.an-spark { width: 240px; max-width: 100%; height: 40px; }
.an-spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.an-feed-wrap { margin: 0 calc(-1 * var(--s5)) calc(-1 * var(--s5)); border-top: 1px solid var(--border); overflow-x: auto; }
.an-feed { font-size: 0.875rem; }
.an-feed td { padding-top: 8px; padding-bottom: 8px; }
.an-feed .an-when { white-space: nowrap; color: var(--muted); }
.an-feed .an-path code { white-space: nowrap; }
/* On phones the feed keeps when, page and source; country and device go. */
@media (max-width: 560px) {
  .an-feed th:nth-child(n+4), .an-feed td:nth-child(n+4) { display: none; }
  .an-feed .an-path { max-width: 32vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.an-feed .an-path .pill { margin-left: var(--s2); vertical-align: middle; }

.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 760px) { .an-grid { grid-template-columns: 1fr; } }
.an-top { min-width: 0; }
.an-top-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.an-top-metric { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.an-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.an-row { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 32px; padding: 0 var(--s2); border-radius: var(--r-control); max-width: none; }
.an-fill { position: absolute; inset: 0 auto 0 0; background: var(--blue-soft); border-radius: var(--r-control); z-index: 0; }
.an-row.active .an-fill { background: color-mix(in srgb, var(--blue) 22%, transparent); }
.an-value, .an-count { position: relative; z-index: 1; }
.an-value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; color: var(--ink); text-decoration: none; }
a.an-value:hover { text-decoration: underline; color: var(--blue); }
.an-value.unknown { color: var(--muted); }
.an-count { flex: none; font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* Compare view (WP34): renders of two versions, a swipe slider and side by side. */
.cmp-pick { gap: var(--s3); }
.cmp-field { display: inline-flex; align-items: center; gap: var(--s2); font-size: 0.875rem; color: var(--ink-2); }
.cmp-field select { height: 32px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--r-control); background: var(--panel); color: var(--ink); font: inherit; }
.cmp-arrow { color: var(--muted); }
.cmp-pick .push { margin-left: auto; }
.cmp-off { margin-bottom: var(--s4); }
.cmp-summary { font-weight: 500; }
.cmp-page { margin-top: var(--s3); }
.cmp-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.cmp-path { font-size: 0.8125rem; }
.cmp-kind { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.cmp-kind.added { color: var(--ok); }
.cmp-kind.removed { color: var(--danger); }
.cmp-kind.changed { color: var(--blue); }
.cmp-images { margin-top: var(--s3); }
.cmp-note { color: var(--ink-2); font-size: 0.875rem; }
.cmp-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s2); font-size: 0.8125rem; color: var(--ink-2); }
.cmp-modes { display: inline-flex; gap: var(--s1); }
.cmp-modes .btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.cmp-stage { display: grid; border: 1px solid var(--border); border-radius: var(--r-control); overflow: hidden; background: var(--surface); }
.cmp-stage figure { margin: 0; min-width: 0; }
/* Renders show at the width they were taken (390 stays phone-sized), scaled down only to fit. */
.cmp-frame { width: fit-content; max-width: 100%; }
.cmp-stage img { display: block; max-width: 100%; height: auto; }
.cmp-stage figcaption { display: none; }
/* Swipe: both images in one cell, aligned at the top; before is clipped at the divider. */
.cmp.both[data-mode="swipe"] .cmp-stage > figure { grid-area: 1 / 1; align-self: start; }
.cmp.both[data-mode="swipe"] .cmp-before { z-index: 1; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp.both[data-mode="swipe"] .cmp-stage { position: relative; }
.cmp.both[data-mode="swipe"] .cmp-stage::after {
  content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--blue);
}
.cmp-range { display: block; width: 100%; margin-top: var(--s2); accent-color: var(--blue); }
/* Side by side: two columns with their labels. */
.cmp[data-mode="side"] .cmp-stage { grid-template-columns: repeat(2, minmax(0, max-content)); gap: 1px; background: var(--border); }
.cmp[data-mode="side"] .cmp-stage figure { background: var(--panel); }
.cmp[data-mode="side"] figcaption { display: block; padding: 6px 10px; font-size: 0.8125rem; color: var(--ink-2); border-bottom: 1px solid var(--border); }
.cmp[data-mode="side"] .cmp-range { display: none; }
.cmp:not(.both) figcaption { display: block; padding: 6px 10px; font-size: 0.8125rem; color: var(--ink-2); border-bottom: 1px solid var(--border); background: var(--panel); }
.cmp-cut { font-size: 0.8125rem; margin-top: var(--s2); }
@media (max-width: 640px) {
  .cmp-pick .push { margin-left: 0; }
}
