:root {
  color-scheme: light;
  --paper: oklch(96.5% 0.012 91);
  --paper-2: oklch(93.8% 0.017 91);
  --ink: oklch(21% 0.018 176);
  --ink-soft: oklch(39% 0.02 176);
  --muted: oklch(55% 0.018 176);
  --rule: oklch(84% 0.018 91);
  --panel: oklch(98.4% 0.006 91);
  --panel-quiet: oklch(95% 0.011 91);
  --panel-wash: oklch(88.5% 0.037 176);
  --accent: oklch(43% 0.09 176);
  --accent-hover: oklch(36% 0.095 176);
  --warm: oklch(58% 0.115 48);
  --night: oklch(16% 0.022 176);
  --white-tint: oklch(99% 0.004 91);
  --danger: oklch(52% 0.16 28);
  --success: oklch(48% 0.09 176);
  --font-sans: "Hanken Grotesk", "Trebuchet MS", system-ui, sans-serif;
  --font-display: "Literata", Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: min(100% - 32px, 1190px);
}

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  width: 100%;
  background: oklch(96.5% 0.012 91 / 0.9);
  border-bottom: 1px solid oklch(86% 0.014 91 / 0.68);
  backdrop-filter: blur(18px) saturate(150%);
}

.topbar {
  width: var(--container);
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand-mark,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-weight: 620;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark img,
.footer-brand img {
  width: 32px;
  height: 32px;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 34px);
}

.nav-links a,
.navbar-link,
.text-link,
.site-footer a {
  color: var(--ink);
  font-size: 0.98rem;
  text-decoration: none;
}

.nav-links a:hover,
.navbar-link:hover,
.text-link:hover,
.site-footer a:hover {
  color: var(--accent);
}

.navbar-link.active,
.navbar-subscribe-btn.is-active {
  color: var(--accent);
}

.navbar-subscribe-btn.is-active {
  background: var(--accent-hover);
  color: var(--white-tint);
}

.nav-actions {
  justify-content: end;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 21px;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    transform 180ms var(--ease);
}

.button-primary,
.submit-btn {
  background: var(--accent);
  color: var(--white-tint);
  box-shadow: 0 1px 0 oklch(100% 0 0 / 0.32) inset;
}

.button-primary:hover,
.submit-btn:hover {
  background: var(--accent-hover);
  color: var(--white-tint);
}

.button-secondary {
  background: oklch(96% 0.009 91);
  border-color: var(--rule);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: oklch(72% 0.028 176);
  color: var(--accent-hover);
}

.button:focus-visible,
.submit-btn:focus-visible,
.form-input:focus-visible,
.state-select:focus-visible,
.frequency-option input:focus-visible + .frequency-label,
.nav-links a:focus-visible,
.navbar-link:focus-visible,
.text-link:focus-visible {
  outline: 3px solid oklch(63% 0.09 176 / 0.36);
  outline-offset: 3px;
}

.nav-icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.nav-icon-button svg {
  width: 24px;
  height: 24px;
}

.nav-icon-button:hover {
  color: var(--accent);
}

.navbar-mobile-menu,
.search-modal {
  display: none;
}

main {
  padding-top: 72px;
}

.intro-label {
  margin: 0;
  color: var(--accent-hover);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.alerts-hero {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 0.82fr);
  align-items: center;
  gap: clamp(34px, 6vw, 86px);
  padding: clamp(42px, 5vw, 70px) 0 clamp(30px, 4vw, 54px);
}

.alerts-copy h1 {
  max-width: 670px;
  margin: 22px 0 22px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 6vw, 6.45rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.alerts-lede {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.45vw, 1.2rem);
  line-height: 1.5;
}

.alerts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.alerts-photo {
  position: relative;
  min-height: clamp(440px, 48vw, 610px);
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-quiet);
}

.alerts-photo img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: 42% 50%;
}

.alerts-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    oklch(15% 0.02 176 / 0) 42%,
    oklch(15% 0.02 176 / 0.58) 100%
  );
}

.alerts-photo figcaption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  color: var(--white-tint);
}

.alerts-photo figcaption span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.alerts-photo figcaption strong {
  max-width: 230px;
  font-size: 1.08rem;
  line-height: 1.25;
  text-align: right;
}

.alerts-workspace {
  width: var(--container);
  margin: 0 auto;
  padding: 0 0 clamp(80px, 10vw, 132px);
}

.form-shell {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.46fr) minmax(0, 1fr);
  max-width: 920px;
  min-height: 0;
  margin-left: auto;
  overflow: hidden;
}

.form-header {
  padding: clamp(26px, 4vw, 42px);
  border-right: 1px solid var(--rule);
  background: var(--panel-quiet);
}

.form-header h2 {
  margin: 22px 0 16px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4.2vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.form-header p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.source-rules {
  margin: 30px 0 0;
  display: grid;
  gap: 14px;
}

.source-rules div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.source-rules dt {
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source-rules dd {
  margin: 0;
  color: var(--ink-soft);
}

.form-container {
  padding: clamp(24px, 4vw, 44px);
}

.form-container.hidden {
  display: none;
}

.rate-limit-warning {
  display: none;
  margin-bottom: 18px;
  border: 1px solid oklch(72% 0.08 40);
  border-radius: 8px;
  padding: 12px 14px;
  background: oklch(94% 0.04 55);
  color: oklch(35% 0.09 42);
  font-weight: 620;
}

.rate-limit-warning.show {
  display: block;
}

.form-fields {
  display: grid;
  gap: 28px;
}

.form-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-label {
  display: block;
  margin: 0 0 9px;
  color: var(--ink);
  font-weight: 700;
}

.form-input,
.state-select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0 16px;
  background: oklch(98% 0.005 91);
  color: var(--ink);
  outline: none;
  transition:
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease),
    background 180ms var(--ease);
}

.state-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-hover) 50%),
    linear-gradient(135deg, var(--accent-hover) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 24px,
    calc(100% - 14px) 24px;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.form-input:hover,
.state-select:hover {
  border-color: oklch(76% 0.026 176);
}

.form-input:focus,
.state-select:focus {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 4px oklch(63% 0.09 176 / 0.16);
}

.form-input.invalid,
.state-select.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px oklch(60% 0.15 28 / 0.14);
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.field-hint.error {
  color: var(--danger);
  font-weight: 620;
}

.frequency-group {
  display: grid;
  gap: 9px;
}

.frequency-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.frequency-option {
  min-width: 0;
  display: block;
  position: relative;
  cursor: pointer;
}

.frequency-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.frequency-label {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px;
  background: oklch(98% 0.005 91);
  transition:
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    box-shadow 180ms var(--ease);
  pointer-events: none;
}

.frequency-option:hover .frequency-label {
  border-color: oklch(76% 0.026 176);
}

.frequency-option input:checked + .frequency-label {
  border-color: oklch(72% 0.055 176);
  background: oklch(91.5% 0.034 176);
  box-shadow: 0 0 0 1px oklch(72% 0.055 176) inset;
}

.frequency-title {
  color: var(--ink);
  font-weight: 700;
}

.frequency-desc {
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.45;
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}

.submit-btn {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 30px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 180ms var(--ease),
    transform 180ms var(--ease),
    opacity 180ms var(--ease);
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.rate-limit-status {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-footer {
  margin-top: 32px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.94rem;
}

.form-footer a {
  color: var(--accent-hover);
  font-weight: 700;
  text-decoration: none;
}

.success-state {
  display: none;
  padding: clamp(28px, 4vw, 44px);
}

.success-state.show {
  display: grid;
  align-content: center;
  gap: 26px;
}

.success-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid oklch(72% 0.055 176);
  border-radius: 999px;
  background: var(--panel-wash);
  color: var(--accent-hover);
}

.success-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.success-text h2 {
  margin: 14px 0 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.success-text p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.state-name {
  color: var(--accent-hover);
  font-weight: 700;
}

.success-next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer {
  padding: 34px max(16px, calc((100vw - 1190px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--night);
  color: oklch(83% 0.01 176);
}

.site-footer p {
  margin: 18px 0 0;
  color: oklch(72% 0.012 176);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 22px;
}

.site-footer a {
  color: inherit;
  font-weight: 620;
}

.footer-brand {
  color: var(--white-tint);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .nav-links,
  .nav-actions .text-link,
  .navbar-search {
    display: none;
  }

  .navbar-menu-btn {
    display: inline-grid;
  }

  .navbar-mobile-menu {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    z-index: 19;
    display: none;
    grid-template-columns: 1fr;
    gap: 2px;
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 8px;
    background: var(--panel);
  }

  .navbar-mobile-menu.open {
    display: grid;
  }

  .navbar-mobile-menu a {
    padding: 12px;
    border-radius: 7px;
    text-decoration: none;
  }

  .navbar-mobile-menu a:hover {
    background: var(--panel-quiet);
  }

  .alerts-hero,
  .form-shell {
    grid-template-columns: 1fr;
  }

  .alerts-hero {
    min-height: 0;
    padding-top: 50px;
  }

  .alerts-copy h1 {
    max-width: 720px;
    font-size: clamp(3.7rem, 13vw, 6.7rem);
  }

  .form-header {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .form-shell {
    max-width: none;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(100% - 28px, 1190px);
  }

  .topbar {
    min-height: 64px;
  }

  main {
    padding-top: 64px;
  }

  .navbar-mobile-menu {
    top: 64px;
  }

  .brand-mark span {
    font-size: 0.74rem;
  }

  .button {
    min-height: 40px;
    padding: 0 16px;
  }

  .alerts-hero {
    gap: 36px;
    padding-bottom: 42px;
  }

  .alerts-copy h1 {
    margin-top: 18px;
    font-size: clamp(3.05rem, 15vw, 4.55rem);
  }

  .alerts-actions,
  .submit-row,
  .form-footer,
  .success-next {
    align-items: stretch;
    flex-direction: column;
  }

  .form-header,
  .form-container,
  .success-state {
    padding: 20px;
  }

  .alerts-photo {
    min-height: 290px;
  }

  .alerts-photo figcaption {
    align-items: start;
    flex-direction: column;
  }

  .alerts-photo figcaption strong {
    max-width: 260px;
    text-align: left;
  }

  .frequency-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-shell {
    min-height: 0;
  }

  .form-header h2,
  .success-text h2 {
    font-size: clamp(2.35rem, 14vw, 3.35rem);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
