/* ReadyFileCo brand (shared/brand.py): teal, cream, mint, peach, lavender. Same tokens as the calculators. */
:root {
  --teal: #1F4E5A;
  --teal-dark: #163942;
  --cream: #F7F3EC;
  --mint: #DDF1E4;
  --peach: #FBD9C4;
  --lavender: #E3D9F5;
  --ink: #1d2b2f;
  --muted: #55666b;
  --line: #d9d2c5;
  --white: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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); }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
img { max-width: 100%; height: auto; display: block; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--teal);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 20;
}
.skip:focus { top: 12px; }

/* Header */
header.site { padding: 18px 0 8px; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: -0.01em;
}
header nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 0.95rem; }
header nav a { font-weight: 600; text-decoration: none; padding: 6px 0; }
header nav a:hover { text-decoration: underline; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: 28px;
}
.hero h1 {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.lede { margin: 0 0 22px; color: var(--muted); font-size: 1.1rem; }
.hero-shot { margin: 0; }
.hero-shot a { display: block; text-decoration: none; color: var(--ink); }
.hero-shot img {
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(22, 57, 66, 0.16);
}
.hero-shot figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 14px;
  font-size: 0.95rem;
}
.hero-name { font-weight: 700; color: var(--teal-dark); }
.hero-price { font-weight: 700; color: var(--ink); }
.hero-shot .card-go { margin-left: auto; }
.hero-shot a:hover .card-go { text-decoration: underline; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 10px;
  border: 2px solid var(--teal);
}
.button:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.button-quiet { background: transparent; color: var(--teal); }
.button-quiet:hover { background: var(--white); color: var(--teal-dark); }

/* How it works */
.how ul {
  list-style: none;
  margin: 8px auto 0;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.how li { font-size: 0.95rem; color: var(--muted); }
.how strong { display: block; color: var(--teal-dark); font-size: 1rem; margin: 0 0 4px; }

/* Sections */
.calcs h2, .templates > h2, .follow h2 {
  color: var(--teal);
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  letter-spacing: -0.02em;
  margin: 48px 0 4px;
}
.section-intro { margin: 0 0 18px; color: var(--muted); }

/* Calculators */
.calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.calc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.calc:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(22, 57, 66, 0.12); }
.calc-mint { background: var(--mint); }
.calc-peach { background: var(--peach); }
.calc-lavender { background: var(--lavender); }
.calc strong { color: var(--teal-dark); font-size: 1.15rem; line-height: 1.25; }
.calc-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
}
.calc-go { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--teal); }
.calc-go::after { content: " \2192"; }
@media (prefers-reduced-motion: reduce) { .calc, .card a { transition: none; } .calc:hover, .card a:hover { transform: none; } }

/* Templates */
/* Jump links to each template group */
.jump ul { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.jump a:hover { background: var(--mint); border-color: var(--mint); }
.category { scroll-margin-top: 16px; }

.category { margin: 28px 0 0; }
.category h3 { margin: 0 0 2px; color: var(--teal); font-size: 1.3rem; }
.category-intro { margin: 0 0 14px; color: var(--muted); }
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card a:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(22, 57, 66, 0.12); }
.card img { aspect-ratio: 4 / 3; width: 100%; border-bottom: 1px solid var(--line); }
.card-name { display: block; padding: 14px 16px 4px; font-weight: 700; color: var(--teal-dark); line-height: 1.3; }
.card-blurb { display: block; padding: 0 16px 12px; font-size: 0.92rem; color: var(--muted); }
.card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 0 16px 16px;
}
.card-price { font-weight: 700; color: var(--ink); }
.card-go { font-weight: 700; color: var(--teal); font-size: 0.92rem; white-space: nowrap; }
.card a:hover .card-go { text-decoration: underline; }

/* Rows of 3 or 4 on wide screens, picked per group by tools/build-page.js */
@media (min-width: 861px) {
  .category > .cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .category > .cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Featured card (the bundle): full row, picture beside the text */
.card-featured { grid-column: 1 / -1; }
.card-featured a { flex-direction: row; align-items: stretch; }
.card-featured img { width: 46%; flex: 0 0 46%; border-bottom: 0; border-right: 1px solid var(--line); object-fit: cover; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 8px 6px; }
.card-featured .card-name { font-size: 1.3rem; padding-top: 4px; }
.card-featured .card-blurb { font-size: 1rem; }
.card-featured .card-body { justify-content: center; padding-bottom: 16px; }
.card-featured .card-foot { margin-top: 10px; padding-top: 6px; justify-content: flex-start; gap: 24px; }
.card-featured .card-price { font-size: 1.15rem; }
.card-kicker {
  padding: 0 16px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
}
.card-deal { display: block; padding: 0 16px 14px; font-size: 0.95rem; color: var(--ink); }
.pill {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--peach);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.85rem;
}

.states-title { margin: 20px 0 10px; font-size: 1rem; color: var(--teal-dark); }
.states-price { margin-left: 6px; font-weight: 600; color: var(--muted); font-size: 0.92rem; }
.states { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.states a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.states a { background: var(--cream); }
.states a:hover { background: var(--mint); border-color: var(--mint); }

/* Follow */
.follow { margin-top: 48px; background: var(--lavender); border-radius: var(--radius); padding: 28px 24px; }
.follow h2 { margin-top: 0; }
.follow > p { color: var(--ink); margin: 0 0 16px; }

/* Footer */
footer.site {
  margin: 44px 0 0;
  padding: 22px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}
footer.site p { margin: 0 0 8px; }
.footer-links { margin-bottom: 12px; }
.footer-links a { display: inline-block; padding: 8px 2px; font-weight: 600; }

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

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  .how ul { grid-template-columns: 1fr 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .how ul { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .follow { padding: 22px 16px; }
  .actions .button { flex: 1 1 auto; text-align: center; }
}

/* ESA row: the any-state tracker card beside the state-by-state list. */
.split { display: grid; grid-template-columns: minmax(240px, 1fr) 3fr; gap: 16px; align-items: start; }
.split .cards { grid-template-columns: 1fr; }
.states-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.states-panel .states-title { margin-top: 0; }
.states-note { margin: 16px 0 0; font-size: 0.92rem; color: var(--muted); }
.states-note a { font-weight: 600; }
@media (max-width: 640px) {
  .split { grid-template-columns: 1fr; }
}

/* Narrow screens: the featured card stacks. Phones get a two-column grid (bigger pictures than a
   thumbnail list without doubling the page length); the jump links above help move around. */
@media (max-width: 700px) {
  .card-featured a { flex-direction: column; }
  .card-featured img { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .card-body { padding: 14px 0 0; }
  .card-featured .card-name { font-size: 1.15rem; }
}
@media (max-width: 560px) {
  .cards, .category > .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .split .cards { grid-template-columns: 1fr; }
  .card-name { padding: 10px 10px 2px; font-size: 0.92rem; }
  .card-blurb { padding: 0 10px 8px; font-size: 0.82rem; line-height: 1.45; }
  .card-foot { flex-direction: column; align-items: flex-start; gap: 0; padding: 0 10px 12px; }
  .card-go { font-size: 0.85rem; }
  .card-featured .card-name { font-size: 1.1rem; padding: 4px 14px 2px; }
  .card-featured .card-blurb { font-size: 0.9rem; padding: 0 14px 8px; }
  .card-featured .card-kicker, .card-featured .card-deal { padding-left: 14px; padding-right: 14px; }
  .card-featured .card-foot { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 0 14px 14px; }
  .hero-shot .card-go { margin-left: 0; }
}
