/* Citizen design system. One file, no build step, no third-party requests. */
:root {
  --ink: #1c1917; --ink-2: #44403c; --ink-3: #6b645e; --paper: #fafaf9; --card: #ffffff; --line: #e7e5e4; --line-2: #d6d3d1;
  --accent: #c8391f; --accent-ink: #ffffff; --accent-soft: #fbeae6; --ok: #166534; --ok-soft: #e8f5ec; --warn: #92400e; --warn-soft: #fdf3e2; --bad: #b91c1c; --bad-soft: #fdecec;
  --radius: 10px; --radius-lg: 16px; --shadow: 0 1px 2px rgba(28,25,23,.05), 0 8px 24px -12px rgba(28,25,23,.12);
  --sans: ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f5f5f4; --ink-2: #d6d3d1; --ink-3: #a8a29e; --paper: #0f0e0d; --card: #1a1817; --line: #292524; --line-2: #3d3835;
    --accent: #f0694e; --accent-ink: #1a0b07; --accent-soft: #33170f; --ok: #6ee7a0; --ok-soft: #10261a; --warn: #fbbf24; --warn-soft: #2b2110; --bad: #fca5a5; --bad-soft: #2d1414;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6); }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0 0 var(--s4); text-wrap: pretty; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: var(--s4); top: var(--s4); background: var(--card); padding: var(--s2) var(--s4); z-index: 10; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--s5); }
.narrow { max-width: 720px; }
.muted { color: var(--ink-3); } .small { font-size: .875rem; } .mono { font-family: var(--mono); font-size: .85em; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.display { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; }
.stack > * + * { margin-top: var(--s4); } .stack-lg > * + * { margin-top: var(--s6); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.grid { display: grid; gap: var(--s4); } .g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } .g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s5); border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--ink-3); color: var(--ink); } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); } .btn.primary:hover { background: var(--ink-2); color: var(--paper); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn.accent:hover { filter: brightness(1.06); color: var(--accent-ink); }
.btn.sm { min-height: 36px; padding: 0 var(--s4); font-size: .875rem; } .btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Site header and footer */
.site-head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.05rem var(--sans); letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.nav { display: flex; gap: var(--s5); align-items: center; } .nav a { text-decoration: none; font-size: .95rem; color: var(--ink-2); } .nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }
.site-foot { border-top: 1px solid var(--line); margin-top: var(--s9); padding: var(--s7) 0; color: var(--ink-3); font-size: .9rem; }
.site-foot a { color: var(--ink-2); text-decoration: none; } .site-foot a:hover { color: var(--accent); }
.site-foot .cols { display: grid; gap: var(--s6); grid-template-columns: 2fr repeat(3, 1fr); } @media (max-width: 720px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } }
.site-foot ul { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: var(--s2); }

/* Marketing */
.hero { padding: var(--s9) 0 var(--s8); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); max-width: 14ch; }
.hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 56ch; margin: var(--s5) 0 var(--s6); }
.section { padding: var(--s8) 0; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 20ch; }
.section .intro { color: var(--ink-2); max-width: 60ch; margin-top: var(--s4); font-size: 1.05rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s5); }
.card h3 { font-size: 1.05rem; margin-bottom: var(--s2); } .card p:last-child { margin-bottom: 0; }
.card.lift { box-shadow: var(--shadow); }
.num { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--accent); }
.ticks { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.ticks li { padding-left: 26px; position: relative; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.price { font-family: var(--serif); font-size: 2.4rem; line-height: 1; } .price small { font: 400 .95rem var(--sans); color: var(--ink-3); }
.signal { display: flex; gap: 3px; align-items: flex-end; height: 18px; } .signal i { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 1.2s ease-in-out infinite; }
.signal i:nth-child(1) { height: 40%; } .signal i:nth-child(2) { height: 100%; animation-delay: .2s; } .signal i:nth-child(3) { height: 65%; animation-delay: .4s; } .signal i:nth-child(4) { height: 85%; animation-delay: .1s; }
@keyframes eq { 50% { transform: scaleY(.45); } } .signal i { transform-origin: bottom; }
@media (prefers-reduced-motion: reduce) { .signal i, .live-dot { animation: none !important; } * { scroll-behavior: auto !important; } }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field { margin-bottom: var(--s4); } .hint { font-size: .85rem; color: var(--ink-3); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=number], input[type=time], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; }
textarea { min-height: 96px; resize: vertical; } input[type=file] { font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; } .check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.notice { padding: var(--s3) var(--s4); border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); font-size: .95rem; }
.notice.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); } .notice.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); } .notice.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.hp { position: absolute; left: -9999px; }

/* Listener page */
.place-hero { padding: var(--s8) 0 var(--s6); } .place-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.channel { display: flex; flex-direction: column; gap: var(--s3); } .channel .np { min-height: 1.5em; font-size: .95rem; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; background: var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.accent { background: var(--accent-soft); color: var(--accent); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; } @keyframes pulse { 50% { opacity: .25; } }
.play { width: 100%; }

/* Console */
.console { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: var(--s5) var(--s4); position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: var(--s5); background: var(--paper); }
.side nav { display: grid; gap: 2px; } .side nav a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .95rem; }
.side nav a:hover { background: var(--line); color: var(--ink); } .side nav a[aria-current=page] { background: var(--ink); color: var(--paper); }
.side .group { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 0 12px; margin-bottom: 6px; }
.main { padding: var(--s6) var(--s6) var(--s8); min-width: 0; } .main > header { margin-bottom: var(--s6); } .main h1 { font-size: 1.9rem; }
@media (max-width: 860px) { .console { grid-template-columns: 1fr; } .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); } .side nav { grid-auto-flow: column; overflow-x: auto; } .main { padding: var(--s5) var(--s4) var(--s8); } }
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: .95rem; }
.tabs a[aria-current=page] { color: var(--ink); border-color: var(--accent); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; } th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; } .table-wrap { overflow-x: auto; }
.stat { font-family: var(--serif); font-size: 2rem; line-height: 1.1; } .kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: .95rem; } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; word-break: break-word; }
pre.script { white-space: pre-wrap; font: .95rem/1.6 var(--serif); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); max-height: 520px; overflow: auto; margin: 0; }
code.copy { display: block; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font: .85rem var(--mono); overflow-x: auto; white-space: nowrap; }

/* Operator chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.chat .log { flex: 1; overflow: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.msg { max-width: 76ch; white-space: pre-wrap; } .msg.user { align-self: flex-end; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 14px 14px 4px 14px; }
.msg.bot { align-self: flex-start; } .msg .tool { font: .8rem var(--mono); color: var(--ink-3); display: block; margin: 4px 0; }
.chat form { display: flex; gap: var(--s2); padding: var(--s3); border-top: 1px solid var(--line); } .chat textarea { min-height: 44px; height: 44px; resize: none; }
.approve { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: var(--s4); align-self: flex-start; max-width: 76ch; }
.prose h2 { font-size: 1.35rem; margin: var(--s6) 0 var(--s3); } .prose h3 { font-size: 1.05rem; margin: var(--s5) 0 var(--s2); } .prose ul { padding-left: 20px; } .prose li { margin-bottom: 6px; } .prose table { margin: var(--s4) 0; }

/* Public site: British indie. Big type, dry copy, one loud highlight. */
.hero.indie { padding: var(--s8) 0 0; overflow: hidden; }
.shout { font-family: "Helvetica Neue", "Arial Black", Arial, var(--sans); font-weight: 800; letter-spacing: -.045em; line-height: .92; font-size: clamp(3.2rem, 11vw, 8.4rem); text-transform: none; max-width: 11ch; }
.shout.sm { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; max-width: 18ch; letter-spacing: -.035em; }
.shout mark, .shout.sm mark { background: linear-gradient(transparent 58%, var(--hi) 58%, var(--hi) 92%, transparent 92%); color: inherit; padding: 0 .06em; }
:root { --hi: #e9ff4d; } @media (prefers-color-scheme: dark) { :root { --hi: #5d6a00; } }
.hero.indie .lede { font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: var(--ink-2); max-width: 54ch; margin: var(--s5) 0; }
.sticker { display: inline-block; padding: 6px 12px; background: var(--accent); color: var(--accent-ink); font: 800 .75rem var(--sans); letter-spacing: .14em; text-transform: uppercase; transform: rotate(-3deg); border-radius: 4px; }
.ticker { margin-top: var(--s8); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); overflow: hidden; white-space: nowrap; background: var(--ink); color: var(--paper); }
.ticker > div { display: inline-block; padding: 12px 0; animation: tick 40s linear infinite; }
.ticker span { font: 700 .85rem var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-right: 0; }
.ticker span::after { content: "✶"; margin: 0 22px; color: var(--accent); }
@keyframes tick { to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) { .ticker > div { animation: none; } }
.hero.indie.teaser { padding-bottom: var(--s8); min-height: calc(100vh - 64px - 260px); }
.brand { text-transform: none; letter-spacing: -.02em; }

/* Marks */
.brand .mark { --mark-accent: var(--accent); flex: none; }
.brand .dot { display: none; }

/* Teaser hero: rings, newsprint grain, photo stack, postcode ticker */
.hero.indie.teaser { position: relative; isolation: isolate; padding-top: var(--s7); padding-bottom: 0; min-height: 0; }
.hero.indie.teaser::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .5;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.6px); background-size: 14px 14px;
  mask-image: linear-gradient(115deg, transparent 35%, #000 100%); -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 100%); }
.rings { position: absolute; z-index: -1; right: -180px; top: -120px; width: min(900px, 90vw); color: var(--ink); opacity: .14; pointer-events: none; }
.rings svg { width: 100%; height: auto; display: block; }
.rings circle { stroke-width: 26; transform-origin: 300px 300px; animation: ring 6s ease-in-out infinite; }
.rings circle:nth-child(2) { animation-delay: .5s; } .rings circle:nth-child(3) { animation-delay: 1s; } .rings circle:nth-child(4) { animation-delay: 1.5s; }
.rings .core { fill: var(--accent); stroke: none; opacity: 1; animation: none; }
@keyframes ring { 0%, 100% { opacity: .35; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.02); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s7); align-items: center; padding-bottom: var(--s8); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .stack-shots { display: none; } }
.shout mark { display: inline-block; transition: opacity .25s ease, transform .25s ease; }
.shout mark.swap { opacity: 0; transform: translateY(.18em) skewX(-6deg); }
.stack-shots { position: relative; height: 560px; transform: translate(var(--px, 0), var(--py, 0)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.shot { position: absolute; margin: 0; width: 62%; background: #fff; padding: 10px 10px 34px; border-radius: 4px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.15); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; filter: contrast(1.05) saturate(.9); border-radius: 2px; }
.shot.s1 { left: 22%; top: 2%; transform: rotate(4deg); z-index: 3; } .shot.s2 { left: 0; top: 24%; transform: rotate(-7deg); z-index: 2; width: 52%; } .shot.s3 { right: 0; top: 34%; transform: rotate(9deg); z-index: 1; width: 48%; }
.shot.s1::after { content: ""; position: absolute; left: 50%; top: -14px; width: 90px; height: 28px; background: color-mix(in srgb, var(--hi) 80%, transparent); transform: translateX(-50%) rotate(-3deg); }
.hero.indie.teaser .ticker { margin-top: 0; }
.ticker span { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .rings circle { animation: none; } .stack-shots { transform: none; } }
.brand.waves { gap: 3px; } .brand.waves i { font-style: normal; color: var(--accent); } .brand .wave { flex: none; }
