/* Silent Flow — shared kit for the site.
   The app is black glass: a pure black window, white type, a 84%-black HUD card with a 14% white
   hairline and 16px corners, a red dot that pulses while it listens, rounded keycap hints.
   Those values are lifted from Sources/LipReader/HUD.swift and LipReaderApp.swift. */

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

:root {
  --black: #000;
  --key: rgba(255, 255, 255, 0.14);
  --white: #fff;
  --white-2: rgba(255, 255, 255, 0.7);
  --white-3: rgba(255, 255, 255, 0.6);   /* Hint labels in the HUD */
  --red: #ff453a;                          /* systemRed, dark appearance: the listening dot */
  --orange: #ff9f0a;                       /* the "nothing heard" notice */
  --green: #30d158;                        /* the camera-in-use light */

  /* Default page: the app's own black. Pages override these four. */
  --bg: #000;
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.68);
  --text-3: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.12);
  --line-2: rgba(255, 255, 255, 0.2);
  --btn-bg: #fff;
  --btn-fg: #000;

  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", "Helvetica Neue", sans-serif;
  --display: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  caret-color: var(--red);
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input { font: inherit; color: inherit; }
::selection { background: rgba(255, 69, 58, 0.35); color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 28px; height: 28px; margin: -2px 0 -2px -2px; }

/* ---------- type ---------- */
.lede { margin: 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; color: var(--text-2); max-width: 30em; text-wrap: pretty; }
p { text-wrap: pretty; }

/* ---------- buttons ---------- */
.btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: 999px;
  font: 500 14px/1 var(--display); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer;
  transition: background-color .18s var(--ease), transform .18s var(--ease), border-color .18s;
}
.btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.btn--primary:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--btn-fg)); }
.btn--sm { --h: 32px; padding: 0 13px; font-size: 13px; }

/* ---------- keycaps (HUD.swift Hint: 11pt semibold rounded, 14% white, 4pt corners) ---------- */
.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em;
  padding: 0.12em 0.42em; border-radius: 0.3em;
  font: 600 0.82em/1.25 ui-rounded, "SF Pro Rounded", var(--ui);
  background: var(--key); color: inherit; vertical-align: 0.06em;
}

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 40px; font-size: 13px; color: var(--text-3); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; align-items: baseline; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--text); }
