/* The people surface's pages: signing in, allowing an app, pairing an agent
 * and deciding a held write. They wear the Lightsmith design system's tokens,
 * as Setup's page does (ui/index.html), so a person signing in sees the same
 * Aether they set up. The faces are named but not served: their licence is
 * Setup's exception alone (docs/licences.md), so the system's sans-serif
 * stands in, as it does in Setup wherever they are missing. No rule here
 * needs a script, an inline style or anything from another origin. */
:root {
  color-scheme: light;
  --bg: #f9f8f6; --surface: #fdfdfc; --surface-warm: rgba(0, 0, 0, .05);
  --fg: #1a1f23; --muted: #58616a;
  --border: #e0dcd7; --border-hover: color-mix(in oklab, var(--fg) 22%, transparent);
  --field-bg: var(--surface);
  --accent: #2085d5; --accent-dark: #167db8; --accent-on: #fff;
  /* Azure text and links are --accent-ink; the solid button is --accent-cta. */
  --accent-ink: #0577b2; --accent-cta: #0577b2; --accent-cta-hover: #0c73ae;
  --link-hover: var(--accent-cta-hover);
  --success: #10b981; --success-text: #087f5b;
  --warn: #ffc247; --warn-text: var(--fg);
  --danger: #dc2626; --danger-text: #b91c1c;
  --success-tint: color-mix(in oklab, var(--success) 8%, var(--surface));
  --warn-tint: color-mix(in oklab, var(--warn) 22%, var(--surface));
  --danger-tint: color-mix(in oklab, var(--danger) 9%, var(--surface));
  --focus: #3b82f6; --focus-ring: 0 0 0 2px var(--focus);
  --mark-solid: #1d1d1d; --mark-from: #666; --mark-to: #333;
  --font-display: "Cabinet Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Switzer", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm: 3px; --radius-md: 6px; --radius-lg: 9px; --radius-2xl: 16px; --radius-pill: 9999px;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1215; --surface: #151a1e; --surface-warm: rgba(255, 255, 255, .05);
    --fg: #edece8; --muted: #959ea7;
    --border: #282e33; --field-bg: rgba(255, 255, 255, .03);
    --accent: #4aa8dc; --accent-dark: #2085d5;
    --accent-ink: var(--accent); --link-hover: #8fd4f8;
    --success-text: #34d399; --warn-text: var(--warn);
    --danger: #f87171; --danger-text: #f87171;
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .3); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .35);
    --mark-solid: #8c8c91; --mark-from: #e9e9e9; --mark-to: #b0b0b0;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 400 .9375rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  padding: 0 16px 48px;
}
h1 {
  margin: 0 0 12px; font: 800 1.5rem/1.15 var(--font-display);
  letter-spacing: -.02em; text-wrap: balance;
}
p { margin: 0 0 12px; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
code { font-family: var(--font-mono); font-size: .88em; overflow-wrap: anywhere; }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* The bar above every page: Aether's mark, and who is signed in. */
.top {
  max-width: 34rem; margin: 0 auto; padding: 20px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; font: 800 1.0625rem/1 var(--font-display); letter-spacing: -.02em; }
.brand svg { width: 16px; height: 21px; }
.mark-solid { fill: var(--mark-solid); }
.mark-from { stop-color: var(--mark-from); }
.mark-to { stop-color: var(--mark-to); }
.who { margin: 0; font-size: .8125rem; color: var(--muted); text-align: right; }
.who strong { color: var(--fg); font-weight: 600; }

/* The page itself: one panel. */
main {
  max-width: 34rem; margin: 0 auto; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
main > :last-child { margin-bottom: 0; }
.lead { color: var(--muted); }
.lead strong { color: var(--fg); }

/* What a page says about what it shows, in rows: a term, and its value. */
dl.facts {
  display: grid; grid-template-columns: minmax(8rem, 2fr) 5fr; margin: 16px 0;
  border-top: 1px solid var(--border); font-size: .875rem;
}
dl.facts dt, dl.facts dd { padding: 9px 0; border-bottom: 1px solid var(--border); }
dl.facts dt { color: var(--muted); padding-right: 12px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dt { border-bottom: 0; padding-bottom: 0; }
  dl.facts dd { padding-top: 2px; }
}

/* Where something stands: a dot and a few words, then why. */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 7px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  font-size: .75rem; font-weight: 600; line-height: 1.6; white-space: nowrap; vertical-align: 1px;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.ok::before { background: var(--success); }
.pill.warn::before { background: var(--warn); }
.pill.bad::before { background: var(--danger); }
.standing { display: block; margin-top: 4px; color: var(--muted); }

/* Notes: a warning to read before acting, and a notice of what just happened. */
.warning, .notice, .reminder {
  margin: 16px 0; padding: 12px 14px; border: 1px solid; border-radius: var(--radius-lg);
  font-size: .875rem; line-height: 1.5;
}
.warning { background: var(--danger-tint); border-color: color-mix(in oklab, var(--danger) 40%, transparent); }
.warning strong { font-weight: 600; }
.notice { background: var(--warn-tint); border-color: color-mix(in oklab, var(--warn) 60%, transparent); }
.reminder { background: var(--surface-warm); border-color: var(--border); color: var(--muted); }

/* Buttons: the azure primary for the one answer that goes ahead, and outline
 * for the rest. A link may look like one where it is the page's next step. */
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border: 1px solid transparent; border-radius: var(--radius-lg);
  font: 600 .875rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--accent-cta); color: var(--accent-on); box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--accent-cta-hover); color: var(--accent-on); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--border); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-warm); border-color: var(--border-hover); }
.btn.wide { width: 100%; justify-content: flex-start; padding: 13px 16px; }

/* The ways to sign in. */
ul.ways { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }

/* Typing a pairing code. */
.field { display: grid; gap: 6px; margin: 16px 0 0; }
.field label { font-weight: 600; font-size: .8125rem; }
input.code {
  width: 100%; padding: 10px 12px; background: var(--field-bg); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  font: 600 1.5rem/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}
input.code:hover { border-color: var(--border-hover); }
input.code:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }

/* What a held write would write. */
details { margin: 16px 0 0; }
summary { cursor: pointer; font-weight: 600; font-size: .875rem; }
pre {
  margin: 8px 0 0; padding: 12px 14px; background: var(--surface-warm);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  font: 400 .8125rem/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 28rem; overflow: auto;
}

@media (max-width: 480px) {
  body { padding: 0 12px 32px; }
  main { padding: 18px; }
  .who { text-align: left; }
  .actions .btn { flex: 1 1 auto; }
}
