/* InsurWatch public pages: the plain-spoken editorial direction (web.spec.md, Visual Design). */

:root {
  --paper: #f7f7f4;
  --ink: #0d0d0d;
  --muted: #4a4a45;
  --card: #ffffff;
  --inv-bg: #0d0d0d;
  --inv-ink: #f7f7f4;
  --inv-muted: #bdbdb6;
  --inv-line: #3a3a36;
  --lime: #d4ff3a;
  --on-lime: #0d0d0d;
  --shadow: #0d0d0d;
  --hover-bg: #0d0d0d;
  --hover-ink: #f7f7f4;
  --hover-num: #d4ff3a;
  /* Side padding; it widens past 1536px screens so content stays within 1440px while bands stay full width. */
  --gutter: max(clamp(16px, 4vw, 48px), calc((100vw - 1440px) / 2));
  --display: 900 1em/0.92 Archivo, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0e0e0d;
    --ink: #f2f2ec;
    --muted: #b4b4ac;
    --card: #171716;
    --inv-bg: #1d1d1b;
    --inv-ink: #f2f2ec;
    --inv-muted: #b4b4ac;
    --shadow: #d4ff3a;
    --hover-bg: #d4ff3a;
    --hover-ink: #0d0d0d;
    --hover-num: #0d0d0d;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --paper: #0e0e0d;
  --ink: #f2f2ec;
  --muted: #b4b4ac;
  --card: #171716;
  --inv-bg: #1d1d1b;
  --inv-ink: #f2f2ec;
  --inv-muted: #b4b4ac;
  --shadow: #d4ff3a;
  --hover-bg: #d4ff3a;
  --hover-ink: #0d0d0d;
  --hover-num: #0d0d0d;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, system-ui, sans-serif;
  overflow-x: hidden;
  transition:
    background 300ms ease,
    color 300ms ease;
}

a {
  color: inherit;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.display {
  margin: 0;
  font-weight: 900;
  font-stretch: 62%;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.d-xl {
  font-size: clamp(64px, 12vw, 184px);
  line-height: 0.9;
}
.d-l {
  font-size: clamp(44px, 6vw, 96px);
}
.d-m {
  font-size: clamp(36px, 4vw, 64px);
}
.title {
  font-weight: 800;
  font-stretch: 85%;
}
.lede {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}
.muted {
  color: var(--muted);
}
p {
  line-height: 1.55;
}

/* Layout */
.wrap {
  padding-inline: var(--gutter);
}
.section {
  padding: clamp(56px, 8vw, 120px) var(--gutter) 0;
}
.section.last {
  padding-bottom: clamp(56px, 8vw, 120px);
}
.hero {
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(40px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.inverse {
  background: var(--inv-bg);
  color: var(--inv-ink);
}
.inverse .muted {
  color: var(--inv-muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.grid > .span {
  grid-column: 1 / -1;
}
.row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
}
.grow {
  flex: 1 1 420px;
  min-width: 0;
}

/* Header and footer */
.site-header {
  padding: 20px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  text-decoration: none;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.logo::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 3px;
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}
.site-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-nav .app-link {
  font-weight: 700;
}
/* Phones: logo and actions on one row, the links on a row of their own. */
@media (max-width: 719px) {
  .site-header {
    gap: 12px 8px;
  }
  .site-actions {
    gap: 8px;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 14px;
  }
}
@media (max-width: 359px) {
  .logo {
    font-size: 18px;
  }
}
.site-nav a {
  text-decoration: none;
}
.site-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  font-weight: 700;
}
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle .sun {
  display: none;
}
:root[data-theme='dark'] .theme-toggle .sun {
  display: block;
}
:root[data-theme='dark'] .theme-toggle .moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .sun {
    display: block;
  }
  :root:not([data-theme='light']) .theme-toggle .moon {
    display: none;
  }
}
.site-footer {
  background: var(--inv-bg);
  color: var(--inv-ink);
  padding: 48px var(--gutter) 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: clamp(56px, 8vw, 120px);
}
.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.wordmark {
  font-size: clamp(48px, 18.5vw, 280px);
  line-height: 0.8;
  font-weight: 900;
  font-stretch: 62%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.wordmark span {
  color: var(--lime);
}

/* Controls */
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 200ms ease;
}
.pill:hover {
  transform: translateY(-4px);
}
.pill.lime {
  background: var(--lime);
  color: var(--on-lime);
}
.pill.ink {
  background: var(--ink);
  color: var(--paper);
}
.pill.small {
  min-height: 48px;
  padding: 0 18px;
  font-size: 15px;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip[aria-pressed='true'],
.chip[aria-selected='true'] {
  background: var(--lime);
  color: var(--on-lime);
}

/* Blocks */
.card {
  border: 2px solid var(--ink);
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 200ms ease;
}
.card:hover {
  transform: translateY(-4px);
}
.card.lime {
  background: var(--lime);
  color: var(--on-lime);
  border-color: var(--ink);
}
.card.inverse {
  background: var(--inv-bg);
  color: var(--inv-ink);
}
.card .title {
  font-size: 26px;
  line-height: 1.15;
}
.panel {
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--card);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 8px 8px 0 var(--shadow);
}
.rows {
  border-top: 2px solid var(--ink);
  margin: 0;
  padding: 0;
  list-style: none;
}
.inverse .rows {
  border-color: var(--inv-line);
}
.rows > li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  align-items: baseline;
  padding: 24px 12px;
  border-bottom: 2px solid var(--ink);
  transition:
    background 200ms ease,
    color 200ms ease;
}
.inverse .rows > li {
  border-bottom: 1px solid var(--inv-line);
  padding-inline: 0;
}
.rows:not(.static) > li:hover {
  background: var(--hover-bg);
  color: var(--hover-ink);
}
.rows:not(.static) > li:hover .num {
  color: var(--hover-num);
}
.rows .num {
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 900;
  font-stretch: 62%;
  min-width: 1.6em;
}
.inverse .rows .num {
  color: var(--lime);
}
.rows .head {
  flex: 1 1 280px;
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: 800;
  font-stretch: 85%;
}
.rows .body {
  flex: 1 1 320px;
  font-size: 18px;
  line-height: 1.5;
}

/* Accordions: <details> keeps full content readable without JavaScript. */
.accordion {
  border-top: 2px solid var(--ink);
}
.accordion details {
  border-bottom: 2px solid var(--ink);
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 800;
  font-stretch: 85%;
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion summary::after {
  content: '+';
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 400;
}
.accordion details[open] summary::after {
  content: '−';
  background: var(--lime);
  color: var(--on-lime);
}
.accordion details p {
  margin: 0;
  padding: 0 4px 24px;
  max-width: 62ch;
  font-size: 19px;
}

/* Home */
.cycle {
  font-size: clamp(72px, 15vw, 232px);
  height: 1em;
  overflow: hidden;
  line-height: 1;
}
.cycle span {
  display: flex;
  flex-direction: column;
  animation: iwcycle 7.5s cubic-bezier(0.7, 0, 0.2, 1) infinite;
}
.cycle span span {
  display: block;
  height: 1em;
  animation: none;
}
@keyframes iwcycle {
  0%,
  24% {
    transform: translateY(0);
  }
  30%,
  54% {
    transform: translateY(-1em);
  }
  60%,
  84% {
    transform: translateY(-2em);
  }
  90%,
  100% {
    transform: translateY(-3em);
  }
}
.ticker {
  background: var(--inv-bg);
  color: var(--inv-ink);
  overflow: hidden;
  border-block: 2px solid var(--ink);
}
.ticker div {
  display: flex;
  width: max-content;
  padding: 16px 0;
  font-size: 22px;
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  white-space: nowrap;
  animation: iwmarquee 32s linear infinite;
}
.ticker span {
  padding: 0 28px;
}
.ticker i {
  color: var(--lime);
  font-style: normal;
}
@keyframes iwmarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
/* Home: quick start */
.start {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  align-items: end;
}
.start label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.start input,
.start select {
  min-height: 64px;
  padding: 0 18px;
  border-radius: 18px;
  border: 2px solid var(--inv-ink);
  background: transparent;
  color: var(--inv-ink);
  font: inherit;
  font-size: 24px;
  font-weight: 700;
}
.start select option {
  color: #0d0d0d;
}
.start button {
  grid-column: 1 / -1;
  justify-content: center;
  font-size: 18px;
}
.bubble {
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--card);
  color: var(--ink);
  padding: 24px;
}
.bubble.ask {
  background: var(--lime);
  color: var(--on-lime);
  border-radius: 22px 22px 6px 22px;
  font-weight: 600;
  align-self: flex-end;
}
.prompt-list button {
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 14px 12px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  font-stretch: 85%;
  cursor: pointer;
}

/* Coverage */
.zip {
  width: 100%;
  max-width: 420px;
  min-height: 88px;
  padding: 0 24px;
  border-radius: 22px;
  border: 2px solid var(--inv-ink);
  background: transparent;
  color: var(--inv-ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 44px;
  letter-spacing: 0.08em;
}
.states {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 8px;
}
.states li {
  height: 64px;
  border-radius: 14px;
  border: 2px dashed var(--muted);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
}
.states li.live {
  background: var(--lime);
  color: var(--on-lime);
  border: 2px solid var(--ink);
}
.table {
  overflow-x: auto;
}
.table table {
  min-width: 640px;
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
}
.table th {
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 12px;
  border-bottom: 1px solid var(--ink);
}
.table td {
  padding: 20px 12px;
  border-bottom: 2px solid var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.search {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
