/* KnownSquare website
   Design language: the app's own tokens (app/lib/ui/theme.dart), extended for
   the web. Dark is the default because the mark is a lit window and the site
   is the room around it. Fonts are self-hosted from the same OFL files the app
   bundles: a site whose headline is "we never asked" must not hand every
   visitor's IP to a font CDN on first paint. */

/* ── Fonts ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Tokens ────────────────────────────────────────────────────────── */
:root {
  --coral: #E85A4F;
  --amber: #F5A623;
  --mint: #00E676;
  --accent-grad: linear-gradient(135deg, var(--coral), var(--amber));

  /* dark, the default */
  --bg: #16191D;
  --bg-deep: #101316;
  --fg: #E8E8E8;
  --card: #1F2429;
  --card-2: #272C31;
  --border: #2D3238;
  --muted: #9CA1A8;
  --bar: rgba(26, 29, 33, .72);
  --primary: var(--amber);
  --on-primary: #16191D;
  --coral-text: var(--coral);    /* dark theme: the brand coral is already 5:1 */
  --glow: rgba(245, 166, 35, .16);
  --grain: .035;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --ring: rgba(245, 166, 35, .35);
  --panel: var(--card-2);        /* raised surfaces: read against the ground */

  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 64px);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 26px;
}

:root[data-theme='light'] {
  --bg: #FAF9F7;
  --bg-deep: #F2EFEA;
  --fg: #1A1D21;
  --card: #FFFFFF;
  --card-2: #FBF8F4;
  --border: #E0DBD5;
  --muted: #63676B;              /* was #7A7D81: 3.9:1 on the light ground, under AA */
  --bar: rgba(250, 249, 247, .78);
  --primary: var(--coral);
  --coral-text: #C63B2B;         /* the brand coral is 3.5:1 on white, so text uses this */
  --on-primary: #FFFFFF;
  --glow: rgba(232, 90, 79, .12);
  --grain: .02;
  --shadow: 0 20px 48px rgba(26, 29, 33, .10);
  --ring: rgba(232, 90, 79, .3);
  --panel: var(--card);
}

/* ── Base ──────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* grain: the ground is a surface, not a fill */
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); font-weight: 700; letter-spacing: -.042em; }
h2 { font-size: clamp(2rem, 4.3vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 2.1vw, 1.65rem); letter-spacing: -.02em; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.muted { color: var(--muted); }
.lede { font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: var(--muted); line-height: 1.62; }
.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.kicker {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.kicker::before {
  content: ''; width: 13px; height: 13px; flex: none;
  background: var(--accent-grad);
  border-radius: 3px;
  box-shadow: inset -4px -4px 0 0 var(--bg);
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .82em 1.5em;
  border-radius: 999px;
  font-size: .96rem; font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn-primary {
  background: var(--accent-grad);
  color: #16191D;
  box-shadow: 0 10px 30px rgba(232, 90, 79, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(232, 90, 79, .36); }
.btn-ghost { border-color: var(--border); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); transform: translateY(-2px); }

/* ── Nav ───────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bar);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.is-stuck { border-bottom-color: var(--border); }
.nav-in { display: flex; align-items: center; gap: 1.6rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .62rem; text-decoration: none; font-weight: 600; letter-spacing: -.02em; margin-right: auto; }
.brand svg { width: 27px; height: 27px; display: block; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { text-decoration: none; font-size: .93rem; color: var(--muted); font-weight: 500; transition: color .18s ease; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--fg); }
.theme-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 11px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}
.theme-btn:hover { color: var(--fg); border-color: var(--muted); }
@media (max-width: 780px) {
  .nav-links a:not(.nav-keep) { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(3.4rem, 8vw, 6.4rem) 0 clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero::after {
  /* the light left on */
  content: '';
  position: absolute; z-index: -1;
  width: 900px; height: 900px;
  right: -220px; top: -380px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2.4rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 span { display: block; }
.hero .lede { max-width: 34ch; margin-top: 1.4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; align-items: center; }
.soon {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 500; color: var(--muted);
}
.soon .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 0 rgba(0, 230, 118, .55);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, .5); }
  70% { box-shadow: 0 0 0 11px rgba(0, 230, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .lede { max-width: none; }
}

/* ── The door panel (hero art) ─────────────────────────────────────── */
.door {
  position: relative;
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-deep) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 480px;
  display: flex; flex-direction: column;
}
.door-head { padding: 1.15rem 1.3rem .9rem; }
.door-head .t { font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.rows { padding: 0 .85rem .3rem; display: grid; gap: .42rem; }
.row {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .7rem; border-radius: 13px;
  background: var(--card-2); border: 1px solid var(--border);
}
.av {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--accent-grad);
  display: grid; place-items: center;
  color: #16191D; font-weight: 600; font-size: .86rem;
}
.row .nm { display: block; font-size: .9rem; font-weight: 500; }
.row .ms { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.row .tick { margin-left: auto; color: var(--mint); font-size: .8rem; }

.doorline {
  position: relative;
  margin: 1.15rem 0 0;
  display: flex; align-items: center; gap: .8rem;
  padding: 0 1.3rem;
}
.doorline::before, .doorline::after {
  content: ''; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--border));
}
.doorline::after { background: linear-gradient(90deg, var(--border), transparent); }
.doorline span {
  font-size: .7rem; letter-spacing: .17em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; white-space: nowrap;
}
.doorflash {
  position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  background: var(--accent-grad);
  opacity: 0; filter: blur(1px);
  animation: flash 9s linear infinite;
}
@keyframes flash {
  0%, 14%, 100% { opacity: 0; }
  16% { opacity: .85; }
  22% { opacity: 0; }
  46% { opacity: 0; }
  48% { opacity: .85; }
  54% { opacity: 0; }
  76% { opacity: 0; }
  78% { opacity: .85; }
  84% { opacity: 0; }
}

.outside {
  position: relative;
  flex: 1;
  min-height: 210px;
  overflow: hidden;
  margin-top: .4rem;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 82%, transparent 100%);
}
.chip {
  position: absolute; left: 1.15rem; right: 1.15rem;
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .7rem;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px dashed var(--border);
  font-size: .78rem; color: var(--muted);
  opacity: 0;
  animation: rise 9s cubic-bezier(.4, .1, .3, 1) infinite;
}
.chip b { color: var(--fg); font-weight: 500; }
.chip .x { margin-left: auto; color: var(--coral-text); font-weight: 600; font-size: .82rem; }
.chip:nth-child(1) { animation-delay: 0s; }
.chip:nth-child(2) { animation-delay: 3s; }
.chip:nth-child(3) { animation-delay: 6s; }
@keyframes rise {
  0%   { transform: translateY(200px); opacity: 0; }
  10%  { transform: translateY(140px); opacity: 1; }
  30%  { transform: translateY(30px);  opacity: 1; }
  38%  { transform: translateY(6px);   opacity: 0; filter: blur(6px); }
  100% { transform: translateY(6px);   opacity: 0; filter: blur(6px); }
}
.door-foot {
  padding: .95rem 1.3rem 1.2rem;
  border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .chip { animation: none; opacity: 1; position: relative; left: auto; right: auto; margin: .42rem 1.15rem; transform: none; }
  .doorflash, .soon .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Sections ──────────────────────────────────────────────────────── */
section { position: relative; }
.sec { padding: clamp(3.6rem, 8vw, 6.6rem) 0; }
.sec-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.6rem);
  align-items: center;
}
.sec-split.rev > *:first-child { order: 2; }
@media (max-width: 880px) {
  .sec-split { grid-template-columns: 1fr; }
  .sec-split.rev > *:first-child { order: 0; }
}
.sec h2 + .lede { margin-top: 1.1rem; }
.rule { height: 1px; background: var(--border); border: 0; margin: 0; }
.band { background: var(--bg-deep); border-block: 1px solid var(--border); }

/* ── The form that asks for nothing ────────────────────────────────── */
.askform {
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}
.askform .h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 1.3rem; }
.askform .field .box { color: var(--muted); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .35rem; }
.field .box {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: .78rem .9rem;
  color: var(--muted);
  font-size: .93rem;
  background: color-mix(in srgb, var(--bg-deep) 60%, transparent);
  overflow: hidden;
}
.field .box .ph { opacity: .55; }
.field .box {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
}
.field .box .ph { flex: 1; min-width: 0; }
.askwrap { position: relative; }

/* Option A: the form is there, switched off, with one stamp across it. The
   fields dim first and the stamp lands after, so the beat is: it asks, and
   then it does not. */
.askwrap .askform .field, .askwrap .askform .h, .askwrap .askform .askcap {
  transition: opacity .5s ease .35s;
}
.askwrap.in .askform .field { opacity: .34; }
.notasked-stamp {
  position: absolute; top: 47%; left: 50%;
  transform: translate(-50%, -50%) rotate(-9deg) scale(1.35);
  max-width: 84%;
  border: 3px solid var(--coral-text); color: var(--coral-text);
  border-radius: 12px; padding: .5rem clamp(1rem, 3vw, 1.6rem);
  font-size: clamp(1.25rem, 3.4vw, 1.75rem); font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  opacity: 0; pointer-events: none;
}
.askwrap.in .notasked-stamp {
  animation: thump .5s cubic-bezier(.2, 1.5, .4, 1) .75s forwards;
}
@keyframes thump {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-9deg) scale(1.35); }
  to   { opacity: 1; transform: translate(-50%, -50%) rotate(-9deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .askwrap.in .notasked-stamp { animation: none; opacity: 1; transform: translate(-50%, -50%) rotate(-9deg); }
  .askwrap .askform .field { transition: none; }
}
.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;
}
.askcap {
  font-size: .84rem; color: var(--muted); margin: -.7rem 0 1.3rem; max-width: 34ch;
}
@media (prefers-reduced-motion: reduce) { .nomark { transition: none; } }
/* The fields sit there asking, and only then get struck out: the beat is the
   whole point, and in the hero it plays on load rather than on scroll. */
.stamp {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1rem;
  font-size: .82rem; font-weight: 600;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .5rem 1rem;
  background: var(--card-2);
}
.stamp .k { color: var(--mint); }

/* ── Comparison ────────────────────────────────────────────────────── */
.compare { width: 100%; border-collapse: collapse; margin-top: 2rem; font-size: .96rem; }
.compare th, .compare td { text-align: left; padding: .95rem 1rem; border-bottom: 1px solid var(--border); }
.compare th { font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.compare td:first-child { font-weight: 500; }
.compare tr:last-child td { border-bottom: 0; }
.compare .us { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.compare .us td:first-child { color: var(--fg); font-weight: 600; }
.no { color: var(--muted); }
.yes { color: var(--coral-text); font-weight: 500; }
.none { color: var(--mint); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* A four column table in a 350px window means a sideways scroll nobody asked
   for, so phones get the same comparison stacked, one card per app. */
.compare-cards { display: none; }
.capp {
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--panel); padding: 1.1rem 1.2rem; margin-top: .9rem;
}
.capp.us { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.capp h3 { font-size: 1.1rem; margin-bottom: .7rem; }
.capp dl { margin: 0; display: grid; gap: .55rem; }
.capp dt { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }
.capp dd { margin: 0 0 .35rem; font-size: .95rem; font-weight: 500; }
.capp dd + dt { border-top: 1px solid var(--border); padding-top: .6rem; }
@media (max-width: 720px) {
  .compare-cards { display: block; }
  .table-scroll { display: none; }
}

/* ── Cards ─────────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; margin-top: 2.4rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem 1.4rem;
  transition: transform .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.card h3 { margin-bottom: .6rem; }
.card p { margin: 0; font-size: .93rem; color: var(--muted); }
.card .ico {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent-grad);
  box-shadow: inset -11px -11px 0 0 var(--card);
  margin-bottom: 1.1rem;
}

/* ── Not built list ────────────────────────────────────────────────── */
.notbuilt { display: grid; gap: .1rem; margin-top: 2.2rem; }
.nb {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1.05rem .2rem;
  border-bottom: 1px solid var(--border);
}
.nb .n {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; letter-spacing: -.02em;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--coral) 70%, transparent);
  text-decoration-thickness: 2px;
  flex: none;
  min-width: 12ch;
}
.nb .w { font-size: .92rem; color: var(--muted); }
@media (max-width: 640px) {
  .nb { flex-direction: column; gap: .2rem; }
  .nb .n { min-width: 0; }
}

/* ── Phone frames ──────────────────────────────────────────────────── */
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1.4rem; margin-top: 2.6rem; }
.phone {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--card);
  padding: .6rem .6rem 1rem;
  box-shadow: var(--shadow);
}
.phone .screen {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem .85rem;
  min-height: 260px;
  display: flex; flex-direction: column; gap: .6rem;
}
.phone .cap { font-size: .82rem; color: var(--muted); padding: .8rem .4rem 0; }
.bubble {
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 14px; padding: .7rem .8rem; font-size: .8rem; line-height: 1.45;
}
.bubble.grad { background: var(--accent-grad); color: #16191D; border-color: transparent; font-weight: 500; }
.bubble .s { display: block; font-size: .7rem; color: var(--muted); margin-bottom: .25rem; }
.bubble.grad .s { color: rgba(22, 25, 29, .7); }
.mini-btns { display: flex; gap: .45rem; margin-top: auto; }
.mini-btn { flex: 1; text-align: center; font-size: .75rem; font-weight: 600; padding: .55rem; border-radius: 10px; border: 1px solid var(--border); color: var(--muted); }
.mini-btn.on { background: var(--accent-grad); color: #16191D; border-color: transparent; }
svg.qr {
  display: block; width: 100%; height: auto;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}

/* ── Closing CTA ───────────────────────────────────────────────────── */
.closing {
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative; overflow: hidden;
}
.closing::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 60% at 50% 100%, var(--glow), transparent 70%);
}
.closing h2 { max-width: 18ch; margin-inline: auto; }
.closing .lede { max-width: 46ch; margin: 1.2rem auto 2rem; }

/* ── Footer ────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--border); background: var(--bg-deep); padding: 3.2rem 0 2.4rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.foot h4 { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.foot a { text-decoration: none; font-size: .9rem; color: var(--muted); }
.foot a:hover { color: var(--fg); }
.foot-note { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ── Scam library ──────────────────────────────────────────────────── */
.page-head { padding: clamp(3rem, 7vw, 5rem) 0 clamp(1.6rem, 3vw, 2.4rem); }
.page-head h1 { max-width: 16ch; }
.page-head .lede { max-width: 58ch; margin-top: 1.3rem; }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.file {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.4rem 1.35rem;
  transition: transform .22s ease, border-color .22s ease;
  position: relative;
}
a.file:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.file .tag {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  color: var(--muted);
}
.file h3 { margin: .7rem 0 .5rem; font-size: 1.18rem; }
.file p { font-size: .89rem; color: var(--muted); margin: 0; }
.file .meta { margin-top: auto; padding-top: 1.2rem; font-size: .78rem; color: var(--muted); display: flex; gap: .8rem; align-items: center; }
.file.soon { opacity: .62; }
.file.soon .meta .s { color: var(--amber); font-weight: 600; }
.file .arrow { color: var(--primary); font-weight: 600; }

.alerts { display: grid; gap: .1rem; margin-top: 1.6rem; }
.alert {
  display: grid; grid-template-columns: 122px 1fr; gap: 1.2rem;
  padding: 1.15rem .2rem; border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.alert time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .18rem; }
.alert .ttl { font-weight: 500; font-size: 1rem; letter-spacing: -.01em; }
.alert .sub { font-size: .86rem; color: var(--muted); margin-top: .2rem; }
@media (max-width: 620px) { .alert { grid-template-columns: 1fr; gap: .3rem; } }

/* ── Article ───────────────────────────────────────────────────────── */
.article { max-width: 720px; margin-inline: auto; }
.crumb { font-size: .82rem; color: var(--muted); margin-bottom: 1.8rem; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--fg); }
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
  font-size: .85rem; color: var(--muted);
  margin: 1.8rem 0 0; padding-bottom: 1.8rem; border-bottom: 1px solid var(--border);
}
.byline .av { width: 30px; height: 30px; font-size: .78rem; }
.article h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.8rem 0 1rem; }
.article h3 { margin: 2rem 0 .7rem; }
.article p, .article li { font-size: 1.04rem; line-height: 1.75; }
.article ul, .article ol { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.article li { margin-bottom: .5rem; }
.article strong { font-weight: 600; }
.pull {
  border-left: 3px solid transparent;
  border-image: var(--accent-grad) 1;
  padding: .3rem 0 .3rem 1.4rem;
  margin: 2rem 0;
  font-size: 1.16rem; font-weight: 500; line-height: 1.5; letter-spacing: -.015em;
}
.steps { counter-reset: s; list-style: none; padding: 0; margin: 1.4rem 0; }
.steps li {
  counter-increment: s;
  position: relative; padding-left: 3rem; margin-bottom: 1.3rem;
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--card-2); border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: .84rem; font-weight: 600; color: var(--primary);
}
.callout {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--coral);
  border-radius: var(--r-sm);
  padding: 1.3rem 1.4rem; margin: 2rem 0;
}
.callout .h { font-weight: 600; margin-bottom: .5rem; font-size: .95rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.honest {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.6rem 1.5rem; margin: 2.6rem 0;
}
.honest .h { display: flex; align-items: center; gap: .6rem; font-weight: 600; margin-bottom: .8rem; }
.honest .h .m { width: 16px; height: 16px; border-radius: 4px; background: var(--accent-grad); box-shadow: inset -5px -5px 0 0 var(--card); flex: none; }
.honest .limit { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.sources { margin: 2.6rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.sources h4 { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; font-weight: 600; }
.sources ol { padding-left: 1.2rem; }
.sources li { font-size: .88rem; color: var(--muted); margin-bottom: .5rem; }
.reviewed { font-size: .82rem; color: var(--muted); margin-top: 2rem; }

/* ── Reveal ────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover, .file:hover, .btn:hover { transform: none; }
}

/* ── Feature panels ────────────────────────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
}
.panel .h {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 1.1rem;
}
.panel .line {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem 0; border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.panel .line:last-of-type { border-bottom: 0; }
.panel .line .r { margin-left: auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.panel .line .who { color: var(--muted); font-size: .82rem; }
.panel .tally {
  font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: .2rem;
}
.panel .note { font-size: .84rem; color: var(--muted); margin: 1rem 0 0; }
.panel .sys {
  font-size: .82rem; color: var(--muted); text-align: center;
  padding: .55rem .8rem; margin: .5rem 0 0;
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent);
  border-radius: 10px;
}
.pollrow { margin-bottom: .7rem; }
.pollrow .lab { display: flex; justify-content: space-between; font-size: .86rem; margin-bottom: .3rem; }
.pollrow .track { height: 8px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.pollrow .bar { height: 100%; background: var(--accent-grad); border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips span {
  font-size: .8rem; padding: .38rem .75rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}
.chips span.on { border-color: transparent; background: var(--accent-grad); color: #16191D; font-weight: 600; }

/* ── Speech bubbles ────────────────────────────────────────────────────
   A messaging product should show messages. Bubbles carry the moments
   where somebody actually says something; panels keep the tallies. */
.chat { display: grid; gap: .55rem; }
/* a chat needs its own ground, or the bubbles are the same surface as the
   panel they sit on and read as empty outlines */
.panel.chatpanel { background: var(--bg-deep); }
.chat .b {
  position: relative;
  max-width: 84%;
  padding: .72rem .95rem;
  border-radius: 16px 16px 16px 5px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: .9rem; line-height: 1.5;
}
.chat .b::after {
  /* the tail: a skewed square sharing the bubble's own fill, so the outline
     carries on round it. No z-index games, or it paints behind the fill. */
  content: '';
  position: absolute; bottom: -1px; left: -6px;
  width: 14px; height: 13px;
  background: inherit;
  border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  transform: skewX(-18deg);
}
.chat .b .s {
  display: block; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  color: var(--primary); margin-bottom: .2rem;
}
.chat .b .t { display: block; font-size: .68rem; color: var(--muted); margin-top: .3rem; }
.chat .b.me {
  justify-self: end;
  background: var(--accent-grad);
  border-color: transparent;
  color: #16191D;
  border-radius: 16px 16px 5px 16px;
}
.chat .b.me::after { left: auto; right: -6px; border: 0; transform: skewX(18deg); border-radius: 0 0 4px 0; }
.chat .b.me .s, .chat .b.me .t { color: rgba(22, 25, 29, .72); }
.chat .sys {
  justify-self: center; text-align: center;
  font-size: .78rem; color: var(--muted);
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent);
  border-radius: 999px; padding: .4rem .9rem;
}
.chat .ask {
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: 14px; padding: .9rem 1rem; font-size: .88rem;
}
.chat .ask .q { font-weight: 600; margin-bottom: .2rem; }
.chat .ask .n { color: var(--muted); font-size: .82rem; }
.chat .ask .btns { display: flex; gap: .45rem; margin-top: .8rem; }
.chat .ask .btns span {
  flex: 1; text-align: center; font-size: .78rem; font-weight: 600;
  padding: .5rem; border-radius: 10px; border: 1px solid var(--border); color: var(--muted);
}
.chat .ask .btns span.on { background: var(--accent-grad); color: #16191D; border-color: transparent; }

/* ── Form controls (the website has a form; the app has none) ───────── */
.askform input.box, .askform select.box, .askform textarea.box {
  display: block; width: 100%;
  font: inherit; font-size: .95rem; color: var(--fg);
  border: 1px solid var(--border); border-radius: 12px;
  background: color-mix(in srgb, var(--bg-deep) 60%, transparent);
  padding: .78rem .9rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.askform textarea.box { resize: vertical; min-height: 150px; line-height: 1.55; }
.askform select.box { appearance: none; cursor: pointer; }
.askform .box:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}
.askform .box::placeholder { color: var(--muted); }
/* the honeypot: present for bots, gone for everyone else */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Three states, two of which can look identical: say which one you landed on. */
.theme-tip {
  font-size: .78rem; color: var(--muted); white-space: nowrap;
  opacity: 0; transform: translateX(6px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.theme-tip.show { opacity: 1; transform: none; }
@media (max-width: 560px) { .theme-tip { display: none; } }

/* ── Figures and attack diagrams ───────────────────────────────────── */
.fig { margin: 2.4rem 0; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption {
  font-size: .82rem; color: var(--muted); margin-top: .8rem; line-height: 1.5;
}
.fig.bleed { margin-inline: calc(-1 * clamp(0px, 4vw, 90px)); }

/* nodes drawn from tokens, so a diagram themes with the page */
.d-card { fill: var(--panel); stroke: var(--border); }
.d-stop { fill: var(--card-2); stroke: var(--coral); stroke-width: 2; }
.d-line { stroke: var(--border); stroke-width: 2; fill: none; }
.d-txt { fill: var(--fg); font-size: 17px; font-weight: 600; }
.d-sub { fill: var(--muted); font-size: 14px; }
.d-tag { fill: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.d-stopword { fill: var(--coral-text); font-size: 13px; font-weight: 600; }
.d-arrowhead { fill: var(--border); }
.d-blocked { stroke: var(--coral); stroke-width: 2; }

/* the payload travelling down the chain, and the wall it meets */
.d-dot { fill: url(#dgrad); }
@keyframes travel { from { transform: translateX(0); } to { transform: translateX(var(--travel, 700px)); } }
.d-dot.run { animation: travel 5s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes stoppulse { 0%,100% { opacity: .25; } 50% { opacity: .9; } }
.d-stopglow { animation: stoppulse 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .d-dot.run, .d-stopglow { animation: none; }
}

/* the do-this-now block, so the actions are scannable rather than read */
.steps-do { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: .7rem; }
.steps-do li {
  display: grid; grid-template-columns: 34px 1fr; gap: .9rem; align-items: start;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.1rem;
}
.steps-do li b { display: block; margin-bottom: .15rem; }
.steps-do .n {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent-grad); color: #16191D;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
}
.steps-do li p { margin: 0; font-size: .92rem; color: var(--muted); }

/* A 1000 unit diagram scaled into a phone puts labels at five pixels, so
   phones get a stacked drawing of the same thing instead. */
.d-tall { display: none; }
@keyframes travelY { from { transform: translateY(0); } to { transform: translateY(var(--travelY, 300px)); } }
.d-dot.runy { animation: travelY 5s cubic-bezier(.5,0,.5,1) infinite; }
@media (prefers-reduced-motion: reduce) { .d-dot.runy { animation: none; } }
@media (max-width: 720px) {
  .d-wide { display: none; }
  .d-tall { display: block; }
  .fig.bleed { margin-inline: 0; }
}

/* On a narrow phone the two kept nav items wrapped onto two lines. */
.nav-links a { white-space: nowrap; }
@media (max-width: 480px) {
  .nav-in { gap: .9rem; }
  .nav-links { gap: .9rem; }
  .nav-links a { font-size: .86rem; }
  .brand { font-size: .95rem; }
}
