/* ==========================================================================
   LongTermCareInsurance411 — design system
   Direction: clean & trustworthy for a 50–70 audience.
   Calm blue/green palette, 18px base, WCAG-AA contrast, generous whitespace,
   mobile-first with a single breakpoint at 48rem.
   All design decisions live here as custom properties — pages use the tokens,
   not raw values.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* Palette */
  --c-ink:        #1a2b3c;  /* body text — ~13:1 on white */
  --c-ink-soft:   #4a5b6c;  /* muted text — ~7:1 on white */
  --c-trust:      #1f5f8b;  /* primary blue — white text ~6.8:1 */
  --c-trust-deep: #153f5e;  /* hovers / headings accent — higher contrast */
  --c-accent:     #2e8b6f;  /* green — large/bold or non-text accents only */
  --c-accent-deep:#206450;  /* green as body-text/link (~5.4:1 on white) */
  --c-bg:         #ffffff;
  --c-bg-soft:    #f4f7fa;  /* alternating sections, cards */
  --c-line:       #dce4ec;  /* hairline borders */
  --c-focus:      #b8531f;  /* warm focus ring, high visibility */

  /* Typography — system stack, 18px base */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-base: 1.125rem;   /* 18px */
  --fs-sm:   1rem;       /* 16px */
  --fs-lg:   1.375rem;   /* 22px */
  --fs-h3:   1.5rem;     /* 24px */
  --fs-h2:   1.9375rem;  /* 31px */
  --fs-h1:   2.5rem;     /* 40px */
  --lh: 1.6;
  --lh-tight: 1.2;

  /* Spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;

  /* Shape & layout */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(26,43,60,.06), 0 4px 16px rgba(26,43,60,.08);
  --shadow-lg: 0 8px 30px rgba(26,43,60,.12);
  --wrap: 72rem;   /* max content width */
  --wrap-narrow: 44rem; /* readable prose measure */
}

/* ---- Reset (light) ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
ul, ol { padding: 0; }

/* ---- Base --------------------------------------------------------------- */
body {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: var(--lh-tight);
  color: var(--c-trust-deep);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-lg); }

p, ul, ol { margin-bottom: var(--s-4); }
p { max-width: 68ch; }
li { margin-bottom: var(--s-2); }

a {
  color: var(--c-trust);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--c-trust-deep); }

strong { font-weight: 700; }
small { font-size: var(--fs-sm); color: var(--c-ink-soft); }
hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--s-6) 0; }

/* ---- Accessibility ------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -3rem;
  z-index: 100;
  background: var(--c-trust-deep);
  color: #fff;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: var(--s-3); color: #fff; }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.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;
}

/* ---- Layout ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-4);
}
.container--narrow { max-width: var(--wrap-narrow); }

.section {
  padding-block: var(--s-7);
}
.section--soft { background: var(--c-bg-soft); }
.section--tight { padding-block: var(--s-6); }

.page-hero {
  background: linear-gradient(180deg, var(--c-bg-soft), var(--c-bg));
  border-bottom: 1px solid var(--c-line);
  padding-block: var(--s-8) var(--s-7);
}
.page-hero h1 { max-width: 20ch; }
.page-hero .lede {
  font-size: var(--fs-lg);
  color: var(--c-ink-soft);
  max-width: 46ch;
  margin-top: var(--s-4);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-5);
  margin-bottom: 0;
}

/* Simple responsive grid */
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.stack > * + * { margin-top: var(--s-4); }

/* ---- Components: buttons ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.1;
  padding: var(--s-3) var(--s-5);
  min-height: 3rem;                 /* comfortable tap target */
  border: 2px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }

/* Primary CTA — trust blue, white text ~6.8:1 (AA all sizes) */
.btn--primary { background: var(--c-trust); color: #fff; }
.btn--primary:hover { background: var(--c-trust-deep); color: #fff; }

/* Accent CTA — green; button text is large/bold so 3:1 threshold applies */
.btn--accent { background: var(--c-accent); color: #fff; }
.btn--accent:hover { background: var(--c-accent-deep); color: #fff; }

/* Secondary — outline */
.btn--ghost {
  background: transparent;
  color: var(--c-trust);
  border-color: var(--c-trust);
}
.btn--ghost:hover { background: var(--c-bg-soft); color: var(--c-trust-deep); }

.btn--lg { font-size: var(--fs-lg); padding: var(--s-4) var(--s-6); min-height: 3.5rem; }
.btn--block { display: flex; width: 100%; }

/* ---- Components: cards -------------------------------------------------- */
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s-5);
  box-shadow: var(--shadow);
}
.card--link { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s ease, transform .1s ease; }
.card--link:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card h3 { margin-bottom: var(--s-2); }
.card p { color: var(--c-ink-soft); margin-bottom: 0; }

/* Accent top-rule for pillar/trust cards (green as non-text accent) */
.card--accent { border-top: 4px solid var(--c-accent); }

/* Eyebrow / kicker label */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-accent-deep);
  margin-bottom: var(--s-2);
}

/* ---- Breakpoint: >= 48rem (768px) -------------------------------------- */
@media (min-width: 48rem) {
  :root { --fs-h1: 3rem; }        /* 48px on larger screens */
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .section { padding-block: var(--s-8); }
  .btn--block--auto { display: inline-flex; width: auto; }
}

/* ---- Site header -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  padding-block: var(--s-3);
}
.brand {
  flex: 0 0 auto;
  margin-inline-end: auto;   /* keeps CTA to the right on the brand/CTA row */
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--c-trust-deep);
  text-decoration: none;
  white-space: nowrap;
}
.brand__accent { color: var(--c-accent-deep); }

/* Nav is its own full-width row beneath the brand/CTA row (a deliberate
   two-row header — roomy enough for 7 items at readable 18px). */
.site-nav {
  order: 3;
  flex: 0 1 100%;
  margin-top: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--c-line);
}
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin: 0;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-block;
  padding: var(--s-2) var(--s-1);
  font-weight: 600;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--c-trust); border-bottom-color: var(--c-trust); }
.site-nav a[aria-current="page"] { color: var(--c-trust-deep); border-bottom-color: var(--c-accent); }

.site-header__cta { order: 2; white-space: nowrap; }

/* ---- Site footer -------------------------------------------------------- */
.site-footer {
  margin-top: var(--s-8);
  background: var(--c-trust-deep);
  color: #eaf1f6;
  padding-block: var(--s-6);
}
.site-footer .container { display: grid; gap: var(--s-4); }
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin: 0;
}
.footer-nav li { margin: 0; }
.footer-nav a {
  color: #eaf1f6;
  text-decoration: none;
  font-weight: 600;
}
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.site-footer .disclosure {
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: #c4d4e0;      /* ~7:1 on trust-deep */
  max-width: 80ch;
  margin: 0;
}
.site-footer .disclosure strong { color: #fff; }
.site-footer .copyright {
  font-size: var(--fs-sm);
  color: #a9bece;
  margin: 0;
}

/* No special desktop header rules needed: the two-row layout (brand + CTA,
   then the full nav row) reads cleanly and fits the 72rem container at
   every width without cramping the nav below 18px. */

/* ---- Hero tick list ----------------------------------------------------- */
.ticks { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--c-ink); }
.ticks li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--c-accent-deep); font-weight: 800;
}

/* ---- Lead form ---------------------------------------------------------- */
.lead-form {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-5);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: clamp(1rem, 4vw, 2rem);
  box-shadow: var(--shadow);
}
.lead-form__title { margin: 0; }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; }
.field input {
  width: 100%;
  padding: var(--s-3);
  font-size: var(--fs-base);
  color: var(--c-ink);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
}
.field input:hover { border-color: #b9c6d4; }
.field input:focus-visible { border-color: var(--c-trust); outline-offset: 1px; }
.field--narrow input { max-width: 8rem; }
.field--error input { border-color: #b3261e; }
.field__error { color: #b3261e; font-size: var(--fs-sm); font-weight: 600; }
.field__label { font-weight: 600; }
.field__help { color: var(--c-ink-soft); font-size: var(--fs-sm); }
.field select {
  width: 100%;
  padding: var(--s-3);
  font-size: var(--fs-base);
  color: var(--c-ink);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
}
.field select:hover { border-color: #b9c6d4; }
.field select:focus-visible { border-color: var(--c-trust); outline-offset: 1px; }
.field--error select { border-color: #b3261e; }
.radio-row { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); }
.radio { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 400; cursor: pointer; }
.radio input { width: 1.25rem; height: 1.25rem; accent-color: var(--c-trust); }
.field__error:empty { display: none; }

.form-row { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }

/* Honeypot: off-screen, not display:none (bots skip display:none). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--c-ink-soft);
}
.consent input {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15em;
  accent-color: var(--c-trust);
}
.lead-form__foot { font-size: var(--fs-sm); color: var(--c-ink-soft); margin: 0; }
.form-note {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-sm);
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-sm);
  color: var(--c-ink);
  margin: 0;
}
.form-note strong { color: var(--c-trust-deep); }
.form-notice {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-trust-deep);
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-focus);
  border-radius: var(--radius-sm);
  padding: var(--s-3) var(--s-4);
  margin: 0;
}
.form-notice[hidden] { display: none; }

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Server-rendered 422 fallback list */
.form-errors { color: #b3261e; font-weight: 600; }

.thanks__more { margin-top: var(--s-6); color: var(--c-ink-soft); }

/* ---- Legal / policy pages ----------------------------------------------- */
.legal__updated { color: var(--c-ink-soft); }
.legal h2 { margin-top: var(--s-6); }
.legal h3 { margin-top: var(--s-5); }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: var(--s-2); }
.legal__quote {
  margin: var(--s-4) 0;
  padding: var(--s-4);
  border-left: 4px solid var(--c-trust);
  background: var(--c-bg-soft);
  border-radius: var(--radius-sm);
  color: var(--c-ink);
  font-style: normal;
}
.legal em { color: var(--c-ink-soft); }

/* Important callout / disclaimer box */
.callout {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-focus);
  border-radius: var(--radius-sm);
  padding: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--c-ink);
}
.callout strong { color: var(--c-trust-deep); }

/* Related-links block at the end of content pages */
.related { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 2px solid var(--c-line); }
.related h2 { margin-top: 0; font-size: var(--fs-h3); }
.related ul { padding-left: 1.25rem; }

/* Answers (Q&A) list */
.answers-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.answers-list__item {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-sm);
  padding: var(--s-4) var(--s-5);
  margin: 0;
}
.answers-list__q { margin: 0; font-size: var(--fs-lg); }
.answers-list__q a { color: var(--c-trust-deep); text-decoration: none; }
.answers-list__q a:hover { color: var(--c-trust); text-decoration: underline; }
.answers-list__a { margin: var(--s-2) 0 0; color: var(--c-ink-soft); }

/* Glossary */
.glossary { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.glossary__term { margin: 0; }
.glossary dt { font-weight: 700; color: var(--c-trust-deep); font-size: var(--fs-lg); }
.glossary dd { margin: var(--s-1) 0 0; color: var(--c-ink); }
.glossary__group { scroll-margin-top: 6rem; }
.glossary-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.glossary-nav a {
  display: inline-flex; min-width: 2rem; justify-content: center;
  padding: var(--s-1) var(--s-2); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 700; color: var(--c-trust);
}
.glossary-nav a:hover { background: var(--c-bg-soft); }

/* News list */
.news-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.news-item {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-trust);
  border-radius: var(--radius-sm);
  padding: var(--s-4);
  margin: 0;
}
.news-item__title { margin: 0; font-size: var(--fs-lg); }
.news-item__title a { color: var(--c-trust-deep); text-decoration: none; }
.news-item__title a:hover { color: var(--c-trust); text-decoration: underline; }
.news-item__meta { margin: var(--s-2) 0 0; font-size: var(--fs-sm); color: var(--c-ink-soft); display: flex; gap: var(--s-3); flex-wrap: wrap; }
.news-item__source { font-weight: 600; }

/* Data table (costs, comparisons) */
.table-wrap { overflow-x: auto; margin: var(--s-5) 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); min-width: 34rem; }
.data-table th, .data-table td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-line); }
.data-table thead th { background: var(--c-bg-soft); color: var(--c-trust-deep); font-weight: 700; }
.data-table td small { color: var(--c-ink-soft); }
.steps.steps--stacked { grid-template-columns: 1fr; gap: var(--s-4); max-width: 44rem; }

@media (min-width: 48rem) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
}

/* ---- How-it-works steps (a real 3-step sequence) ------------------------ */
.steps {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}
.steps > li { margin: 0; }
.step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--c-trust);
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-h3);
  margin-bottom: var(--s-3);
}
.steps h3 { margin-bottom: var(--s-1); }
.steps p { color: var(--c-ink-soft); margin: 0; }

@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Pillar cards eyebrow spacing --------------------------------------- */
.pillars__grid { margin-top: var(--s-5); }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band__heading { text-align: center; max-width: 26ch; margin-inline: auto; }
.cta-band__grid { margin-top: var(--s-5); align-items: stretch; }
.cta-band .card { display: flex; flex-direction: column; }
.cta-band .card p { flex: 1 1 auto; margin-bottom: var(--s-4); }

/* ---- Insurers listing --------------------------------------------------- */
.insurers__note { color: var(--c-ink-soft); max-width: 62ch; }
.insurers__grid {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
.insurers__item {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-sm);
  padding: var(--s-3) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.insurers__item { margin: 0; }
.insurers__name { font-weight: 700; color: var(--c-trust-deep); text-decoration: none; }
.insurers__name:hover { color: var(--c-trust); text-decoration: underline; }
.insurers__type { font-size: var(--fs-sm); color: var(--c-ink-soft); }

@media (min-width: 48rem) {
  .insurers__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
