:root {
  color-scheme: light dark;
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --paper: #ffffff;
  --canvas: #f8f9fa;
  /* Google Blue: 600 (#1a73e8) sits at ~4.4:1 against white, borderline for
     AA normal text, so it is reserved for focus rings and UI borders (3:1).
     Text and button fills use Blue 700/900, both comfortably over 4.5:1. */
  --action: #1967d2;
  --action-dark: #174ea6;
  --action-soft: #e8f0fe;
  --focus: #1a73e8;
  --warning: #b06000;
  --error: #c5221f;
  --input-border: #80868b;
  --shadow: 0 24px 70px rgba(60, 64, 67, 0.15);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(26, 115, 232, 0.1), transparent 27rem),
    linear-gradient(145deg, #f8f9fa 0%, var(--canvas) 60%, #f1f3f4 100%);
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 64px;
}

.eyebrow,
.step-number {
  color: var(--action);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 54px;
  align-items: center;
}

h1 {
  max-width: 760px;
  margin: 14px 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.lede {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 8px 12px;
  border: 1px solid rgba(25, 103, 210, 0.24);
  border-radius: 999px;
  color: var(--action-dark);
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  font-weight: 650;
}

.card {
  padding: 30px;
  border: 1px solid rgba(218, 220, 224, 0.9);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  letter-spacing: -0.025em;
}

.card-intro {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

label {
  display: block;
  margin: 17px 0 7px;
  font-size: 0.83rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  color: var(--ink);
  background: #fbfcfc;
  font: inherit;
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.16);
}

.field-hint,
.field-error {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.field-hint {
  color: var(--muted);
}

.field-error {
  min-height: 1.05rem;
  color: var(--error);
  font-weight: 650;
}

input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.1);
}

details {
  margin-top: 19px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

summary {
  color: var(--action-dark);
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

#form-status {
  min-height: 20px;
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

#form-status[data-kind="ready"] {
  color: var(--action);
}

#form-status[data-kind="waiting"] {
  color: var(--action-dark);
  font-weight: 650;
}

#form-status[data-kind="error"] {
  color: var(--error);
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

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

.button-primary {
  color: white;
  background: var(--action);
}

.button-primary:hover {
  background: var(--action-dark);
}

.button-secondary {
  color: var(--action-dark);
  background: var(--action-soft);
}

.button[aria-disabled="true"],
.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.create-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.privacy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.privacy a,
.create-note a {
  color: var(--action-dark);
}

.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 64px;
}

.step {
  padding: 22px 20px;
  border-top: 1px solid var(--line);
}

.step h3 {
  margin: 8px 0 6px;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.step a {
  color: var(--action-dark);
}

.notice {
  margin-top: 28px;
  padding: 17px 20px;
  border-left: 3px solid var(--action);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.notice-warning {
  border-left-color: var(--warning);
}

/* Critical recovery guidance must read as body text, not fine print
   (#445): failure diagnosis and privacy instructions stay at >= 16px. */
#report-not-shared {
  font-size: 1rem;
  line-height: 1.6;
}

.notice strong {
  color: var(--ink);
}

.post-create {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1.2fr);
  gap: 32px;
  align-items: start;
  margin-top: 46px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 14px 44px rgba(60, 64, 67, 0.1);
}

.post-create h2 {
  margin: 8px 0 10px;
  font-size: 1.45rem;
}

.post-create p,
.post-create ol {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.post-create p {
  margin: 0;
}

.post-create ol {
  margin: 0;
  padding-left: 1.35rem;
}

.post-create li + li {
  margin-top: 6px;
}

.checklist-copy {
  grid-column: 2;
  justify-self: start;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.78rem;
}

footer a {
  color: var(--action-dark);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaed;
    --muted: #9aa0a6;
    --line: #3c4043;
    --paper: #202124;
    --canvas: #17181b;
    --action: #8ab4f8;
    --action-dark: #aecbfa;
    --action-soft: #2d3140;
    --focus: #8ab4f8;
    --warning: #fdd663;
    --error: #f28b82;
    --input-border: #9aa0a6;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  }

  body {
    background:
      radial-gradient(circle at 12% 4%, rgba(138, 180, 248, 0.1), transparent 27rem),
      linear-gradient(145deg, #17181b 0%, var(--canvas) 60%, #141518 100%);
  }

  .facts li,
  .notice {
    background: rgba(32, 33, 36, 0.78);
  }

  .facts li {
    border-color: rgba(138, 180, 248, 0.3);
  }

  input {
    border-color: var(--input-border);
    background: #1a1c1f;
  }

  input:focus {
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.2);
  }

  input[aria-invalid="true"] {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(242, 139, 130, 0.14);
  }

  #form-status[data-kind="error"],
  .field-error {
    color: var(--error);
  }

  .button-primary {
    color: #202124;
    background: var(--action);
  }

  .button-primary:hover {
    background: var(--action-dark);
  }
}

@media (max-width: 820px) {
  main {
    width: min(100% - 28px, 620px);
    padding-top: 32px;
  }

  .hero,
  .how,
  .post-create {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 34px;
  }

  .how {
    gap: 0;
    margin-top: 40px;
  }

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

  .checklist-copy {
    grid-column: 1;
  }

  footer {
    flex-direction: column;
  }
}
