/* The app's look: Factory neutrals, indigo controls and the Vice City sunset (App/Chrome.swift). */
@font-face {
  font-family: Geist;
  src: url("/fonts/Geist.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --background: #ffffff;
  --row: #f4f5f7;
  --ink: #1b1c1f;
  --muted: #636771;
  --line: #dcdde2;
  --accent: #5e6ad2;
  --on-accent: #ffffff;
  --accent-text: #4f5bd5;
  --alert: #b82f65;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #08090a;
    --row: #131416;
    --ink: #f7f8f8;
    --muted: #9297a0;
    --line: #2a2c31;
    --accent-text: #8b95f0;
    --alert: #ff71ae;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.55 Geist, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

header, main, footer {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 0.875rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #5e6ad2, #ff71ae, #ffb080) 1;
}

nav { display: flex; gap: 1rem; }

a { color: var(--accent-text); }
.brand { color: var(--ink); font-weight: 650; text-decoration: none; }
nav a { color: var(--muted); text-decoration: none; padding-block: 0.5rem; }
nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

main { padding-block: 1.5rem 2.5rem; }
h1 { font-size: 1.875rem; line-height: 1.2; margin: 0 0 0.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
h3 { font-size: 1rem; margin: 1.25rem 0 0.25rem; }
p, li { margin: 0 0 0.75rem; }
ul { padding-left: 1.25rem; }
.lead { color: var(--muted); font-size: 1.0625rem; }

form { display: grid; gap: 0.375rem; margin-top: 1rem; }
label { font-weight: 600; font-size: 0.9375rem; margin-top: 0.5rem; }
input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--row);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
}
select { min-height: 2.875rem; }
textarea { resize: vertical; min-height: 9rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

button {
  justify-self: start;
  margin-top: 0.75rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: progress; }

[role="status"] { margin: 0.5rem 0 0; min-height: 1.55em; font-weight: 600; }
[data-outcome="rate-limited"], [data-outcome="unavailable"], [data-outcome="incomplete"] { color: var(--alert); }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

footer { padding-block: 1.25rem 2rem; color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--line); }
footer p { margin: 0; }
