:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #131417;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f2f1ed;
  --muted: #9c9a92;
  --accent: #d97757;
  --accent-hover: #e59579;
  --accent-tint: rgba(217, 119, 87, 0.16);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

/* WIG Targets & Input: "MUST: `touch-action: manipulation` to prevent double-tap
   zoom". Every control on the page, not just the button. */
button,
input,
a {
  touch-action: manipulation;
}

.landing {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-content: center;
  gap: 16px;
  width: min(760px, calc(100vw - 32px));
  margin: 0 auto;
  /* WIG Layout: "MUST: Respect safe areas". On a notched phone in landscape the
     intake would otherwise sit under the cutout. */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.eyebrow,
.lede {
  margin: 0;
}

.eyebrow {
  color: var(--accent-hover);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 8vw, 4.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.lede {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.5;
}

.intake {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

input {
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 7px;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 12px;
  font-size: 16px;
}

input::placeholder {
  color: var(--muted);
}

button {
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #0b0b0d;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--accent-hover);
}

button:disabled {
  cursor: default;
  opacity: 0.72;
}

input:focus-visible,
button:focus-visible,
.detail:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

.github-sso {
  justify-self: start;
  display: inline-flex;
  /* WIG: "MUST: Hit target ≥24px (mobile ≥44px)". Was 38px, measured on a
     386px touch viewport in promotion/evidence/wig/receipt-before-fixes.json. */
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 0 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.github-sso:hover {
  border-color: var(--accent);
}

/* Was `outline: 0` with only a 1px border-colour change as the replacement —
   the weakest focus indicator of the three controls. WIG Keyboard: "MUST:
   Visible focus rings"; "NEVER: `outline: none` without visible focus
   replacement". Now the same 2px ring the input and button already had. */
.github-sso:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

.github-sso[data-authenticated="true"] {
  color: var(--accent-hover);
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* WIG Content & Accessibility: "MUST: Redundant status cues (not color-only)".
   Success and refusal used to be two warm oranges — #e59579 and #ffb199 — and
   nothing else. Colour, glyph, and the leading word of the sentence now all
   carry the state, so it survives greyscale, colour blindness, and a screen
   reader reading the live region aloud. */
.status[data-kind]::before {
  margin-right: 6px;
  font-family: var(--mono);
}

.status[data-kind="queued"],
.status[data-kind="github"] {
  color: var(--accent-hover);
}

.status[data-kind="queued"]::before,
.status[data-kind="github"]::before {
  content: "\2713"; /* check */
}

.status[data-kind="blocked"] {
  color: #ffb199;
}

.status[data-kind="blocked"]::before {
  content: "\26A0"; /* warning */
}

.status[data-kind="pending"]::before {
  content: "\2026"; /* ellipsis */
}

.detail {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 12px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .landing {
    width: min(100% - 24px, 760px);
    align-content: center;
  }

  .intake {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .github-sso {
    width: 100%;
  }
}
