/* ReadyFileCo brand (shared/brand.py): teal, cream, mint, peach, lavender. */
:root {
  --teal: #1F4E5A;
  --teal-dark: #163942;
  --cream: #F7F3EC;
  --mint: #DDF1E4;
  --peach: #FBD9C4;
  --lavender: #E3D9F5;
  --ink: #1d2b2f;
  --muted: #55666b;
  --line: #d9d2c5;      /* dividers and card edges */
  --control: #8C8577;   /* form control borders: 3.7:1 on white, 3.3:1 on cream (WCAG 1.4.11) */
  --white: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--teal); }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  padding: 18px 0 8px;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  font-weight: 800;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand span { font-weight: 500; color: var(--muted); }

.hero { padding: 20px 0 8px; }
.hero h1 {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero p { margin: 0 0 8px; color: var(--muted); }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}

form .field { margin: 0 0 18px; border: 0; padding: 0; }
form .field:last-child { margin-bottom: 0; }
form label.top, form legend {
  display: block;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--teal-dark);
  padding: 0;
}
select, input[type=number] {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--control);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
/* Teal focus ring: 7.7:1 or more against every background on the page. */
select:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible, .choice input:focus-visible + span {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
/* A field the parent still has to fill in. */
select.needs-input {
  border: 2px solid var(--teal);
  box-shadow: 0 0 0 4px var(--mint);
  padding: 11px;
}
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { flex: 1 1 140px; position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: block;
  text-align: center;
  padding: 12px;
  border: 1px solid var(--control);
  border-radius: 10px;
  cursor: pointer;
  background: var(--white);
}
.choice input:checked + span {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  font-weight: 700;
}
.help { font-size: 0.9rem; color: var(--muted); margin: 6px 0 0; }

.result:focus { outline: none; }
.result { scroll-margin-top: 12px; }
.result-card {
  background: var(--mint);
  border-radius: var(--radius);
  padding: 20px;
}
.result-card h3 { margin: 22px 0 6px; color: var(--teal); font-size: 1.05rem; }
.eyebrow {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--teal);
}
.amount {
  margin: 4px 0 0;
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  line-height: 1.1;
  color: var(--teal-dark);
  letter-spacing: -0.02em;
}
.amount-none { font-size: 2rem; }
.amount-sub { margin: 2px 0 10px; color: var(--muted); }
.detail { margin: 8px 0; }

.deposits {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.95rem;
}
.deposits th, .deposits td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.deposits th { background: var(--cream); font-size: 0.85rem; color: var(--muted); }
.deposits tr:last-child td { border-bottom: 0; }
.deposits .label { white-space: nowrap; }
.deposits .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.badge {
  display: inline-block;
  margin: 10px 0 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--white);
}
.badge-official { background: var(--white); color: #2E7D32; }
.badge-third_party, .badge-unverified, .badge-not_published { background: var(--peach); color: #9A2E0E; }

.assumptions { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); }
.assumptions a { font-weight: 600; margin-left: 4px; white-space: nowrap; }

.good-to-know {
  margin: 16px 0 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 20px;
}
.good-to-know summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--teal);
  padding: 14px 0;
  min-height: 44px;
}
.good-to-know[open] { padding-bottom: 16px; }
.good-to-know .notes { margin-top: 0; }

.notes { margin: 18px 0 0; padding-left: 20px; font-size: 0.95rem; }
.notes li { margin: 0 0 6px; }

.source { font-size: 0.88rem; color: var(--muted); margin: 16px 0 0; }

.tracker {
  margin: 16px 0 0;
  background: var(--lavender);
  border-radius: var(--radius);
  padding: 20px;
}
.tracker h3 { margin: 0 0 6px; color: var(--teal); }
.tracker p { margin: 0 0 14px; }
.button {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
}
.button:hover { background: var(--teal-dark); }

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

.hero .checked { font-size: 0.9rem; font-weight: 600; color: var(--teal); }

.more { margin: 14px 0 0; font-size: 0.95rem; }
.more a { font-weight: 600; }

/* Home page: one link per state page. */
.state-links h2, .more-from h2 { color: var(--teal); font-size: 1.25rem; margin: 30px 0 10px; }
.state-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.state-links a {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  font-weight: 600;
  color: var(--teal-dark);
}
.state-links a:hover { border-color: var(--teal); }
.state-links a span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--muted); }

.more-from ul { padding-left: 20px; margin: 0; }
.more-from li { margin: 0 0 6px; }
.more-from a { font-weight: 600; }

.footer-links a { font-weight: 600; }

.explainer h2 { color: var(--teal); font-size: 1.25rem; margin: 26px 0 8px; }
.explainer ul { padding-left: 20px; }

footer.site {
  margin: 36px 0 0;
  padding: 20px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
footer.site p { margin: 0 0 8px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .panel, .result-card, .tracker { padding: 16px; }
  .good-to-know { padding: 0 16px; }
  .deposits th, .deposits td { padding: 8px; }

  /* Deposit schedule on phones: label and amount on one line, the date underneath at full width. */
  .schedule thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .schedule tr {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }
  .schedule tr:last-child { border-bottom: 0; }
  .schedule td { padding: 0; border: 0; }
  .schedule td.label { font-weight: 600; white-space: normal; }
  .schedule td.when { grid-column: 1 / -1; grid-row: 2; color: var(--muted); }
}

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