/* WingMan. No external fonts, no CDN, no analytics: the CSP in html.ts
   forbids them, and this file is the whole of the styling.

   No images either, anywhere except the relayed emulator screen. Trust
   iconography is reassurance nobody earned, and this product's argument is
   that it tells you the truth, not that it looks safe. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-alt: #f4f1ea;
  --surface-sunken: #ede8df;
  --border: #ddd6c9;
  --border-strong: #a3998a;
  --text: #191817;
  --text-muted: #55504a;
  --accent: #13453d;
  --accent-text: #ffffff;
  --accent-soft: #e4efe9;
  --accent-on-soft: #0f3a33;
  --danger: #8a1414;
  --danger-text: #ffffff;
  --ok: #1b5e3f;
  --warn: #7a4a06;
  --focus: #0b4fc4;
  --disclosure-bg: #f0ece3;
  --disclosure-text: #171615;

  /* Type scale, roughly 1.25 from a 1.0625rem base, with the display sizes
     pulled in so a heading does not tower over the paragraph it introduces. */
  --size-xs: 0.8125rem;
  --size-sm: 0.9375rem;
  --size-base: 1.0625rem;
  --size-lg: 1.25rem;
  --size-xl: 1.5rem;
  --size-2xl: 1.875rem;
  --size-3xl: 2.375rem;

  --leading-tight: 1.18;
  --leading-snug: 1.35;
  --leading-body: 1.65;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semi: 600;
  --weight-bold: 700;

  /* One spacing scale, used everywhere. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  /* Long prose sets at a readable measure; the working surfaces are wider
     because they hold tables and side-by-side controls. */
  --measure: 68ch;
  --page: 64rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --ring: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent);
  --lift: 0 1px 2px rgba(16, 18, 20, 0.04), 0 2px 8px rgba(16, 18, 20, 0.05);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
  --bg: #121417;
  --surface: #191c21;
  --surface-alt: #21262c;
  --surface-sunken: #0d0f12;
  --border: #333942;
  --border-strong: #5b6572;
  --text: #f2f1ee;
  --text-muted: #b2aea7;
  --accent: #7fd1bd;
  --accent-text: #06201a;
  --accent-soft: #1a2c29;
  --accent-on-soft: #9fe0cf;
  --danger: #ff9f96;
  --danger-text: #2b0a08;
  --ok: #8fd8ab;
  --warn: #e8bf72;
  --focus: #9cc0ff;
  --disclosure-bg: #22262b;
  --disclosure-text: #f2f1ee;
    --lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size-base);
  line-height: var(--leading-body);
  text-rendering: optimizeLegibility;
}

/* Keyboard first: a ring visible on every surface, including inside the
   accent-coloured buttons. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  z-index: 10;
  font-weight: var(--weight-semi);
}
.skip:focus { left: var(--space-2); top: var(--space-2); }

/* Available to a screen reader, not to the eye. Never used on .disclosure
   or .plainly. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* -- type ---------------------------------------------------------------- */

h1, h2, h3 {
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}
h1 { font-size: var(--size-2xl); font-weight: var(--weight-bold); }
h2 { font-size: var(--size-xl); font-weight: var(--weight-semi); }
h3 { font-size: var(--size-lg); font-weight: var(--weight-semi); }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.3em; }
li + li { margin-top: var(--space-2); }
strong { font-weight: var(--weight-semi); }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

.lede { font-size: var(--size-lg); line-height: var(--leading-snug); }
.small { font-size: var(--size-sm); }
.muted { color: var(--text-muted); }

/* The copy this product cannot afford to demote. Body size, full contrast,
   never an aside. See the module comment and test/web-prominence.test.ts. */
.plainly {
  font-size: var(--size-base);
  line-height: var(--leading-body);
  color: var(--text);
  font-weight: var(--weight-normal);
}
.plainly strong { font-weight: var(--weight-semi); }

/* -- layout -------------------------------------------------------------- */

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--space-5); }
.prose { max-width: var(--measure); }
.stack > * + * { margin-top: var(--space-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.spacer { margin-left: auto; }

main.wrap { padding-top: var(--space-6); padding-bottom: var(--space-8); }
/* Marketing pages breathe; the app's working surfaces are tighter.
   Marketing is also narrower: its content is a single column of prose at the
   measure, so a wide container would leave a dead band down one side and read
   as a page that failed to centre. The app's surfaces keep the full width
   because they hold tables and side-by-side controls. */
main.marketing { max-width: 46rem; }
main.marketing > * + * { margin-top: var(--space-7); }
main.app > * + * { margin-top: var(--space-5); }

section > h2:first-child { margin-top: 0; }

/* -- chrome -------------------------------------------------------------- */

header.top {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
}
header.top .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-3);
}
.brand {
  font-weight: var(--weight-bold);
  font-size: var(--size-lg);
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
nav.main ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
}
nav.main li { margin: 0; }
nav.main a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: var(--size-sm);
  font-weight: var(--weight-medium);
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
}
nav.main a:hover { color: var(--text); }
nav.main a[aria-current="page"] {
  color: var(--text);
  font-weight: var(--weight-semi);
  border-bottom-color: var(--accent);
}

footer.bottom {
  border-top: 1px solid var(--border);
  margin-top: var(--space-8);
  padding-block: var(--space-5);
  color: var(--text-muted);
  font-size: var(--size-sm);
  background: var(--surface);
}
footer.bottom ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: 0 0 var(--space-3);
  padding: 0;
}
footer.bottom li { margin: 0; }

/* -- surfaces ------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--lift);
}
.panel {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.flash {
  border: 1px solid var(--border);
  border-left: 3px solid var(--ok);
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: var(--size-base);
}
.flash.problem { border-left-color: var(--danger); }

.error { color: var(--danger); font-weight: var(--weight-semi); }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1em 0.7em;
  font-size: var(--size-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
  background: var(--accent-soft);
  color: var(--accent-on-soft);
}
.badge.quiet { background: var(--surface-alt); color: var(--text-muted); }

/* -- the disclosure line -------------------------------------------------
   Styled to be read. Nothing in this rule may hide, shrink, fade, clip or
   truncate it, and the contrast of these two colours is held to AAA. */

.disclosure {
  background: var(--disclosure-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-4);
  font-size: var(--size-base);
  line-height: var(--leading-body);
  color: var(--disclosure-text);
}
.disclosure-label {
  font-weight: var(--weight-semi);
  font-size: var(--size-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.disclosure-example {
  white-space: pre-wrap;
  margin: 0 0 var(--space-4);
  font-family: var(--mono);
  font-size: var(--size-base);
  line-height: var(--leading-body);
}
.disclosure-example:last-child { margin-bottom: 0; }

/* -- controls ------------------------------------------------------------ */

label {
  display: block;
  font-weight: var(--weight-semi);
  font-size: var(--size-sm);
  margin-bottom: var(--space-1);
}
.hint {
  display: block;
  font-weight: var(--weight-normal);
  color: var(--text-muted);
  font-size: var(--size-sm);
  margin-bottom: var(--space-2);
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], textarea, select {
  width: 100%;
  font: inherit;
  font-size: var(--size-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-3);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  border-color: var(--focus);
  box-shadow: var(--ring);
}
textarea { min-height: 7rem; resize: vertical; line-height: var(--leading-body); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

.check { display: flex; gap: var(--space-3); align-items: flex-start; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.3rem; flex: none; accent-color: var(--accent); }
.check label { font-weight: var(--weight-normal); font-size: var(--size-base); margin: 0; }

button, a.btnlink {
  font: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-semi);
  line-height: 1.2;
  cursor: pointer;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  display: inline-block;
}
button:hover, a.btnlink:hover { filter: brightness(1.08); }
button.secondary, a.btnlink.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
button.danger { background: var(--danger); border-color: var(--danger); color: var(--danger-text); }
button.link {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  padding: var(--space-1);
  font-weight: var(--weight-medium);
}
button[disabled] { cursor: not-allowed; border-style: dashed; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: 0;
}
legend { font-weight: var(--weight-semi); font-size: var(--size-sm); padding-inline: var(--space-2); }

/* -- wizard -------------------------------------------------------------- */

.steps {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.steps li { margin: 0; font-size: var(--size-sm); color: var(--text-muted); }
.steps li[aria-current="step"] { color: var(--text); font-weight: var(--weight-semi); }
.steps .done::before { content: "\2713\00a0"; color: var(--ok); font-weight: var(--weight-bold); }

progress {
  width: 100%;
  height: 0.5rem;
  border: none;
  border-radius: 999px;
  background: var(--surface-sunken);
  overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--surface-sunken); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }

.samples { list-style: none; margin: 0; padding: 0; }
.samples li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--surface);
  margin: 0;
}
.samples li + li { margin-top: var(--space-3); }
.samples p { margin: 0; flex: 1; white-space: pre-wrap; }

/* -- tables -------------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; font-size: var(--size-sm); }
caption {
  text-align: left;
  font-weight: var(--weight-semi);
  font-size: var(--size-base);
  padding-bottom: var(--space-2);
}
th, td { text-align: left; padding: var(--space-3); border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font-size: var(--size-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* -- review queue: a working surface, tighter than the marketing pages --- */

.draft { scroll-margin-top: 5rem; padding: var(--space-4); }
.draft + .draft { margin-top: var(--space-3); }
.draft header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: baseline;
  margin-bottom: var(--space-3);
}
.draft .who { font-weight: var(--weight-semi); }
.draft textarea { min-height: 5.5rem; }
.draft .actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-top: var(--space-3); }
.draft[data-focus="true"] { border-color: var(--accent); box-shadow: var(--ring); }

kbd {
  font-family: var(--mono);
  font-size: var(--size-xs);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 0.1em 0.45em;
  background: var(--surface-alt);
}

/* -- landing ------------------------------------------------------------- */

.hero { padding-block: var(--space-6) var(--space-4); }
.hero h1 { font-size: var(--size-3xl); max-width: 18ch; }
.hero .lede { max-width: var(--measure); }

.pricing { border-color: var(--accent); }
.price { font-size: var(--size-2xl); font-weight: var(--weight-bold); letter-spacing: -0.02em; margin: 0; }

.relay-screen {
  display: block;
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 9 / 19.5;
  object-fit: contain;
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: crosshair;
}

@media (max-width: 40rem) {
  :root { --size-3xl: 2rem; --size-2xl: 1.625rem; }
  .wrap { padding-inline: var(--space-4); }
  .card { padding: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
