/* Solvify App — website
   Two voices: Public Sans is the voice of the form (it is the typeface of US government
   forms); Newsreader italic is Solvify's voice, the plain-language gloss underneath. */

@font-face { font-family: "Public Sans"; src: url("fonts/public-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --ink: #092869;        /* brand navy: all text and structure */
  --ink-soft: #46567A;   /* secondary text */
  --paper: #FFFFFF;
  --field: #F2F5FA;      /* the fill of a form field */
  --rule: #D6DDEA;       /* field borders and separators */
  --signal: #22C55E;     /* brand green: only for "explained / resolved" marks */
  --signal-ink: #11713A; /* green that passes contrast as text */
  --form: "Public Sans", system-ui, sans-serif;
  --voice: "Newsreader", Georgia, serif;
  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--form); font-size: 1.0625rem; line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

/* Language switch: content is written twice; the page shows one */
html[data-lang="en"] [data-l="es"], html[data-lang="es"] [data-l="en"] { display: none !important; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem .75rem; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 2rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 650; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { width: 1.6rem; }
.nav { display: flex; gap: 1.75rem; margin-left: auto; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.lang-switch {
  font: inherit; font-size: .9rem; color: var(--ink); background: none; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 999px; padding: .35rem .9rem;
}
.lang-switch:hover { border-color: var(--ink); }

/* Hero */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
h1 {
  font-family: var(--voice); font-weight: 420; font-size: clamp(2.6rem, 5.2vw, 4.1rem);
  line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 1.5rem; font-variation-settings: "opsz" 72;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 34rem; margin: 0 0 2.25rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.button {
  display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none;
  font-weight: 600; padding: .85rem 1.4rem; border-radius: .6rem;
}
.button:hover { background: #0C3488; }
.aside-note { font-size: .92rem; color: var(--ink-soft); }

/* The glossed form: the one memorable element */
.glossed {
  margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 30px 60px -40px rgba(9, 40, 105, .45);
}
.glossed figcaption { font-size: .8rem; color: var(--ink-soft); margin-top: 1.25rem; }
.gf { padding: 1rem 0 1.15rem; border-bottom: 1px solid var(--rule); }
.gf:first-of-type { padding-top: 0; }
.gf:last-of-type { border-bottom: 0; padding-bottom: 0; }
.gf-label { display: block; font-size: .95rem; font-weight: 600; margin-bottom: .45rem; }
.gf-control {
  height: 2.6rem; border: 1px solid var(--rule); border-radius: .45rem; background: var(--field);
  display: flex; align-items: center; justify-content: space-between; padding: 0 .8rem; color: var(--ink-soft); font-size: .9rem;
}
.gf-radios { display: flex; gap: 1.5rem; font-size: .95rem; }
.gf-radios span { display: inline-flex; align-items: center; gap: .45rem; }
.gf-radios span::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; border: 1.5px solid var(--ink-soft); }
.gloss {
  display: flex; gap: .6rem; align-items: baseline; margin-top: .7rem;
  font-family: var(--voice); font-style: italic; font-size: 1.2rem; line-height: 1.35;
}
.gloss::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--signal); transform: translateY(-.1rem); }

@media (prefers-reduced-motion: no-preference) {
  .js .gloss { clip-path: inset(0 100% 0 0); opacity: 0; }
  .js .glossed.play .gloss { animation: explain .9s cubic-bezier(.2, .7, .2, 1) forwards; }
  .js .glossed.play .gf:nth-of-type(2) .gloss { animation-delay: .55s; }
  .js .glossed.play .gf:nth-of-type(3) .gloss { animation-delay: 1.1s; }
}
@keyframes explain { to { clip-path: inset(0 0 0 0); opacity: 1; } }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--rule); }
h2 {
  font-family: var(--voice); font-weight: 450; font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 2.5rem; max-width: 30rem;
}
h3 { font-size: 1.1rem; font-weight: 650; margin: 0 0 .5rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.steps li::before { content: counter(step); display: block; font-family: var(--voice); font-size: 2.25rem; line-height: 1; margin-bottom: 1rem; }
.steps p { margin: 0; color: var(--ink-soft); }

.never { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); }
.never h2 { margin-bottom: 1.25rem; }
.never-intro p { color: var(--ink-soft); margin: 0 0 1rem; max-width: 26rem; }
.never ul { list-style: none; margin: 0; padding: 0; }
.never li { display: grid; grid-template-columns: 1.75rem 1fr; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.never li:first-child { padding-top: 0; }
.never li::before { content: ""; width: .85rem; height: 2px; background: var(--ink); margin-top: .8rem; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: 1rem; overflow: hidden; }
.plan { padding: clamp(1.5rem, 4vw, 2.5rem); }
.plan + .plan { border-left: 1px solid var(--rule); background: var(--field); }
.plan .amount { font-family: var(--voice); font-size: 2.1rem; line-height: 1.1; margin: .25rem 0 .75rem; }
.plan p { color: var(--ink-soft); margin: 0 0 1rem; }

.disclaimer { font-size: .92rem; color: var(--ink-soft); max-width: var(--measure); margin: 2.5rem 0 0; }

/* Long-form pages (privacy, terms) */
.doc { padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
.doc .updated { color: var(--ink-soft); margin: 0 0 2.5rem; }
.doc h2 { font-size: 1.65rem; margin: 3rem 0 1rem; max-width: none; }
.doc h3 { margin-top: 1.75rem; }
.doc p, .doc li { max-width: var(--measure); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .4rem; }
.doc .summary { background: var(--field); border-radius: 1rem; padding: 1.5rem 1.75rem; margin: 0 0 2rem; }
.doc .summary p { margin: 0 0 .5rem; }
.doc .summary ul { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .7rem .75rem .7rem 0; border-bottom: 1px solid var(--rule); }
.doc th { font-weight: 650; }

/* Footer */
.site-footer { background: var(--ink); color: #DCE4F5; padding: 3rem 0; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; }
.site-footer .brand { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-footer a { color: #fff; }
.site-footer small { margin-left: auto; color: #A9B6D3; font-size: .9rem; }

@media (max-width: 860px) {
  .hero .wrap, .never { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .site-header .wrap { gap: 1rem; flex-wrap: wrap; padding-top: .75rem; padding-bottom: .75rem; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 1.25rem; }
  .lang-switch { margin-left: auto; }
  .site-footer small { margin-left: 0; width: 100%; }
}
.spaced { margin-top: 2rem; }
@media (max-width: 640px) {
  .doc thead { display: none; }
  .doc tr { display: block; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
  .doc td { display: block; border: 0; padding: .15rem 0; }
  .doc td:first-child { font-weight: 650; }
}
