/* =========================================================================
   Samjho — core stylesheet
   Design: civic-utility feel. One ink colour, one accent, restrained rounding,
   hairline rules instead of shadows, numbers set in a monospace face.
   ========================================================================= */

:root {
  /* Colour */
  --ink: #142B43;          /* primary text / headings / header bg */
  --ink-soft: #3E5266;     /* secondary text on light background */
  --paper: #FFFFFF;        /* page background */
  --paper-tint: #F5F6F4;   /* alternating section background */
  --line: #DEE2E4;         /* hairline borders */
  --line-strong: #C4CBCF;
  --accent: #C97A1E;       /* single accent — warm amber, used sparingly */
  --accent-ink: #7A4A10;   /* accent text on light background (AA contrast) */
  --accent-tint: #FBEEDD;  /* light accent wash for badges/highlights */
  --good: #1E6B4E;         /* used only for calculator "positive" results */
  --focus: #1B6FA8;

  /* Type */
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Layout */
  --container: 1120px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--focus); text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.6rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 1.15rem + 1vw, 1.7rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}
.section--tint { background: var(--paper-tint); }
.section--tight { padding: 32px 0; }

.section-head {
  margin-bottom: 24px;
}
.section-head p { color: var(--ink-soft); }

/* -------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* -------------------------------------------------------------- Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--ink); }
.logo span { color: var(--accent); }

.main-nav {
  display: none;
}
.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 26px;
}
.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: inline-flex;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 3px 0;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 0 18px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mobile-nav a {
  display: block;
  padding: 10px 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 860px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* -------------------------------------------------------------- Search */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 4px 6px 4px 16px;
}
.search-box:focus-within { border-color: var(--focus); }
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 12px 0;
  background: transparent;
  color: var(--ink);
}
.search-box button {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.search-box button:hover { background: var(--accent-ink); }

.search-wrap { position: relative; max-width: 620px; }
.search-results {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  max-height: 360px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.search-results.is-open { display: block; }
.search-results a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--paper-tint); }
.search-results .result-kind {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-ink);
  background: var(--accent-tint);
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}
.search-results .result-empty {
  padding: 16px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.search-results .result-title { font-weight: 600; }
.search-results .result-cat { color: var(--ink-soft); font-size: 0.85rem; }

/* -------------------------------------------------------------- Hero */
.hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--line);
}
.hero h1 { max-width: 16ch; }
.hero .lede {
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 52ch;
  margin-bottom: 28px;
}
.hero .search-wrap { margin-bottom: 6px; }
.hero .search-hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------- Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 940px) {
  .card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  display: block;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
}
.card:hover { border-color: var(--line-strong); border-left-color: var(--accent-ink); }
.card h3 { margin-bottom: 6px; font-size: 1.05rem; }
.card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.card .card-eyebrow {
  display: block;
  font-size: 0.8rem;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 6px;
}

.category-card {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.category-card:hover { border-color: var(--line-strong); background: var(--paper-tint); }
.category-card h3 { margin-bottom: 6px; }
.category-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.category-card .count { color: var(--ink-soft); font-size: 0.82rem; font-family: var(--font-mono); }

/* -------------------------------------------------------------- Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.steps h3 { margin-bottom: 2px; font-size: 1rem; }
.steps p { color: var(--ink-soft); margin: 0; font-size: 0.92rem; }

/* -------------------------------------------------------------- Article */
.article-head {
  border-bottom: 1px solid var(--line);
  padding: 40px 0 28px;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--ink-soft); }
.short-answer {
  background: var(--paper-tint);
  border-left: 3px solid var(--accent);
  padding: 16px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.05rem;
  margin-top: 18px;
}
.short-answer p { margin: 0; max-width: none; }

.article-body { padding: 36px 0; }
.article-body section { margin-bottom: 40px; }
.article-body section:last-child { margin-bottom: 0; }

.point-list, .mistake-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.point-list li, .mistake-list li {
  padding-left: 26px;
  position: relative;
  max-width: 68ch;
}
.point-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
}
.mistake-list li::before {
  content: "×";
  position: absolute;
  left: 0; top: -0.05em;
  color: var(--ink-soft);
  font-weight: 700;
}

.example-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--paper);
}
.example-box .card-eyebrow { color: var(--ink-soft); font-family: var(--font-mono); font-size: 0.78rem; text-transform: none; }

.table-wrap { overflow-x: auto; }
.score-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.score-table th, .score-table td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
.score-table thead th { background: var(--paper-tint); color: var(--ink); font-size: 0.85rem; }
.score-table tbody th { width: 30%; font-weight: 600; }
.score-table tbody td { color: var(--ink-soft); }

details.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
details.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  font-weight: 400;
  color: var(--ink-soft);
  flex: none;
}
details.faq-item[open] summary::after { content: "–"; }
details.faq-item p { margin-top: 10px; color: var(--ink-soft); }

.related-grid {
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }

/* -------------------------------------------------------------- Calculators */
.calc-shell {
  display: grid;
  gap: 24px;
}
@media (min-width: 780px) {
  .calc-shell { grid-template-columns: 1fr 1fr; align-items: start; }
}
.calc-form, .calc-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.8rem; margin-top: 4px; }
.field input, .field select {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--focus); }
.field-error {
  color: #A13A2B;
  font-size: 0.82rem;
  margin-top: 6px;
  display: none;
}
.field.has-error input { border-color: #A13A2B; }
.field.has-error .field-error { display: block; }

.toggle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.toggle-row button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.toggle-row button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.form-actions { display: flex; gap: 10px; }

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.result-row:last-child { border-bottom: none; }
.result-row .label { color: var(--ink-soft); font-size: 0.92rem; }
.result-row .value { font-family: var(--font-mono); font-weight: 600; font-size: 1.05rem; text-align: right; }
.result-row.result-hero .value { font-size: 1.5rem; color: var(--accent-ink); }
.result-placeholder { color: var(--ink-soft); font-size: 0.92rem; }
.result-breakdown { margin-top: 14px; font-size: 0.85rem; color: var(--ink-soft); font-family: var(--font-mono); }

.calc-explainer {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 40px;
}

/* -------------------------------------------------------------- Ad placeholders */
.ad-slot {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-tint);
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 14px;
  margin: 28px 0;
}
.ad-slot--header { min-height: 60px; display: flex; align-items: center; justify-content: center; }
.ad-slot--incontent { min-height: 90px; display: flex; align-items: center; justify-content: center; }
.ad-slot--sidebar { min-height: 250px; display: none; align-items: center; justify-content: center; }
.ad-slot--footer { min-height: 70px; display: flex; align-items: center; justify-content: center; }
@media (min-width: 940px) {
  .ad-slot--sidebar { display: flex; }
}

/* -------------------------------------------------------------- Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-tint);
  padding: 40px 0 28px;
  margin-top: 24px;
}
.site-footer .foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.site-footer .foot-brand strong { font-size: 1.15rem; }
.site-footer .foot-brand p { color: var(--ink-soft); font-size: 0.9rem; max-width: 40ch; }
.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
.site-footer nav a:hover { color: var(--ink); }
.foot-note {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------- Misc pages */
.page-head { padding: 44px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.prose section { margin-bottom: 32px; }
.prose h2 { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; max-width: 68ch; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tag-row a {
  font-size: 0.85rem;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
}
.tag-row a.is-active, .tag-row a:hover { color: var(--ink); border-color: var(--ink); }

.empty-note {
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

/* -------------------------------------------------------------- Homepage */
.home-page {
  --home-ink: #0f3d3a;
  --home-ink-soft: #1a5c57;
  --home-muted: #4b5e5b;
  --home-paper: #f7faf9;
  --home-line: #dce6e4;
  --home-coral: #e86a4a;
  --home-coral-dark: #c04a2e;
  --home-mint: #e3f0ec;
  --home-yellow: #f1c75b;
  --home-blue: #3b7dd8;
  --home-blue-soft: #e8f0fe;
  --home-teal-deep: #0b2e2b;
  color: var(--home-ink);
  background: var(--home-paper);
}

.home-page a { color: inherit; }
.home-page .home-kicker {
  margin: 0 0 14px;
  color: var(--home-coral-dark);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.home-page h1,
.home-page h2,
.home-page h3 { color: var(--home-ink); }
.home-page em { color: var(--home-coral); font-style: normal; }
.home-page .home-card-link,
.home-page .home-section-link {
  color: var(--home-coral-dark);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}
.home-page .home-card-link span,
.home-page .home-section-link span { margin-left: 5px; }

.home-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(11, 46, 43, 0.92) 0%, rgba(15, 61, 58, 0.85) 55%, rgba(59, 125, 216, 0.35) 100%),
    linear-gradient(135deg, var(--home-mint) 0%, #dceef6 100%);
  border-bottom: 1px solid var(--home-line);
}
.home-hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  pointer-events: none;
}
.home-hero::after {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 106, 74, 0.22) 0%, transparent 70%);
  content: "";
  pointer-events: none;
}
.home-hero__inner {
  position: relative;
  padding-top: 76px;
  padding-bottom: 84px;
  max-width: 800px;
}
.home-hero h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 1.6rem + 2.2vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
}
.home-hero__lede {
  max-width: 620px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.15rem;
  line-height: 1.55;
}
.home-search { max-width: 680px; }
.home-search .search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 680px;
  padding: 7px 7px 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 0 rgba(11, 46, 43, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.home-search .search-box:focus-within {
  border-color: var(--home-coral);
  box-shadow: 0 14px 0 rgba(11, 46, 43, 0.18);
  transform: translateY(-1px);
}
.home-search .search-icon {
  display: inline-flex;
  color: var(--home-ink-soft);
  flex: none;
}
.home-search .search-icon svg {
  width: 20px;
  height: 20px;
}
.home-search .search-box input {
  flex: 1;
  padding: 13px 0;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  background: transparent;
  color: var(--home-ink);
}
.home-search .search-box button {
  padding: 11px 22px;
  border-radius: 8px;
  background: var(--home-coral);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 160ms ease, transform 120ms ease;
}
.home-search .search-box button:hover { background: var(--home-coral-dark); transform: translateY(-1px); }
.home-search .search-results { border-color: var(--home-ink); }
.home-page .search-hint {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
}
.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.home-chip {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.home-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.14);
}

.home-section { padding: 72px 0; }
.home-section--services { background: linear-gradient(180deg, #fff 0%, var(--home-paper) 100%); }
.home-section--featured { background: #fff; padding: 40px 0; }
.home-section--guides { background: var(--home-paper); }
.home-section--calc { background: linear-gradient(135deg, var(--home-teal-deep) 0%, var(--home-ink) 60%, #16403c 100%); }
.home-section--topics { background: #fff; }
.home-section--why { background: var(--home-blue-soft); }
.home-section--latest { background: #fff; }
.home-section-heading { margin-bottom: 30px; }
.home-section-heading h2 {
  margin-bottom: 0;
  font-size: 2.1rem;
  letter-spacing: -0.025em;
}
.home-section-heading p:not(.home-kicker) { color: var(--home-muted); }
.home-section-heading--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.home-section-link { white-space: nowrap; }
.home-section--calc .home-kicker,
.home-section--calc .home-section-heading h2,
.home-section--calc .home-section-heading p:not(.home-kicker) { color: #f5f7f2; }
.home-section--calc .home-kicker { color: var(--home-yellow); }
.home-section--calc .home-section-link { color: var(--home-yellow); }

.home-services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.home-service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px;
  border: 1px solid var(--home-line);
  border-radius: 14px;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 61, 58, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.home-service-card:hover {
  border-color: var(--home-ink);
  box-shadow: 0 10px 0 rgba(15, 61, 58, 0.06);
  transform: translateY(-3px);
}
.home-service-card__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--home-mint);
  color: var(--home-ink-soft);
  margin-bottom: 18px;
}
.home-service-card__icon svg {
  width: 22px;
  height: 22px;
}
.home-service-card__number {
  color: var(--home-coral);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.home-service-card h3 { margin: 10px 0 8px; font-size: 1.25rem; }
.home-service-card p { flex: 1; margin-bottom: 20px; color: var(--home-muted); font-size: 0.92rem; }

.home-featured-card {
  display: block;
  border: 1px solid var(--home-line);
  border-radius: 16px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--home-mint) 0%, #fff 100%);
  box-shadow: 0 2px 0 rgba(15, 61, 58, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.home-featured-card:hover {
  border-color: var(--home-ink);
  box-shadow: 0 12px 0 rgba(15, 61, 58, 0.07);
  transform: translateY(-2px);
}
.home-featured-card__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 28px;
}
.home-featured-card__label {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--home-coral);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
}
.home-featured-card .card-eyebrow {
  color: var(--home-coral-dark);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.home-featured-card h3 { margin: 8px 0 10px; font-size: 1.6rem; }
.home-featured-card p { color: var(--home-muted); font-size: 1rem; }
.home-featured-card .home-card-link { margin-top: 18px; }

.home-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.home-guide-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--home-line);
  border-radius: 14px;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 61, 58, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.home-guide-card:hover {
  border-color: var(--home-ink);
  box-shadow: 0 10px 0 rgba(15, 61, 58, 0.06);
  transform: translateY(-3px);
}
.home-guide-card__icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--home-mint);
  color: var(--home-ink-soft);
  margin-bottom: 14px;
}
.home-guide-card__icon svg { width: 20px; height: 20px; }
.home-guide-card__index {
  color: var(--home-coral);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.home-guide-card .card-eyebrow {
  color: var(--home-coral-dark);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 6px;
}
.home-guide-card h3 { margin: 10px 0 8px; font-size: 1.15rem; }
.home-guide-card p { flex: 1; color: var(--home-muted); font-size: 0.92rem; margin-bottom: 18px; }
.home-guide-card .home-card-link { margin-top: auto; }

.home-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.home-calc-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
.home-calc-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.18);
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.12);
}
.home-calc-card__icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--home-yellow);
  margin-bottom: 14px;
}
.home-calc-card__icon svg { width: 20px; height: 20px; }
.home-calc-card__index {
  color: var(--home-yellow);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.home-calc-card .card-eyebrow { color: #9fcabb; }
.home-calc-card h3 { margin: 8px 0; color: #f5f7f2; font-size: 1.2rem; }
.home-calc-card p { flex: 1; margin-bottom: 20px; color: #c1d0ca; font-size: 0.92rem; }
.home-calc-card .home-card-link { color: var(--home-yellow); }

.home-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.home-topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--home-line);
  border-radius: 14px;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 61, 58, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.home-topic-card:hover {
  border-color: var(--home-ink);
  box-shadow: 0 10px 0 rgba(15, 61, 58, 0.06);
  transform: translateY(-3px);
}
.home-topic-card__icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--home-mint);
  color: var(--home-ink-soft);
  margin-bottom: 14px;
}
.home-topic-card__icon svg { width: 20px; height: 20px; }
.home-topic-card__mark {
  display: block;
  margin-bottom: 6px;
  color: var(--home-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
}
.home-topic-card h3 { margin-bottom: 8px; font-size: 1.25rem; }
.home-topic-card p { flex: 1; margin-bottom: 20px; color: var(--home-muted); font-size: 0.92rem; }
.home-topic-card--money { border-top: 4px solid var(--home-coral); }
.home-topic-card--documents { border-top: 4px solid var(--home-blue); }
.home-topic-card--education { border-top: 4px solid #7c3aed; }
.home-topic-card--jobs { border-top: 4px solid #0d9488; }
.home-topic-card--technology { border-top: 4px solid #2563eb; }
.home-topic-card--everyday-life { border-top: 4px solid var(--home-yellow); }

.home-latest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.home-latest-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--home-line);
  border-radius: 14px;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 61, 58, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.home-latest-card:hover {
  border-color: var(--home-ink);
  box-shadow: 0 10px 0 rgba(15, 61, 58, 0.06);
  transform: translateY(-3px);
}
.home-latest-card .card-eyebrow {
  color: var(--home-coral-dark);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 4px;
}
.home-latest-card h3 { margin: 10px 0 8px; font-size: 1.1rem; }
.home-latest-card p { flex: 1; color: var(--home-muted); font-size: 0.92rem; margin-bottom: 18px; }
.home-latest-card .home-card-link { margin-top: auto; }

.home-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.home-why-card {
  padding: 24px;
  border: 1px solid var(--home-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 61, 58, 0.04);
}
.home-why-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}
.home-why-card p {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.home-cta {
  background: linear-gradient(135deg, var(--home-coral) 0%, var(--home-coral-dark) 100%);
  color: #fff;
}
.home-cta__inner {
  max-width: 760px;
  padding: 72px 0;
  text-align: center;
}
.home-cta h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 2.4rem;
  letter-spacing: -0.025em;
}
.home-cta p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
}
.home-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.home-cta .btn-primary {
  background: #fff;
  color: var(--home-coral-dark);
}
.home-cta .btn-primary:hover { background: var(--home-paper); color: var(--home-coral-dark); }
.home-cta .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.home-cta .btn-secondary:hover { border-color: #fff; color: #fff; }

.home-value {
  padding: 88px 0;
  background: var(--home-teal-deep);
  color: #fff;
}
.home-value__inner { max-width: 760px; }
.home-value .home-kicker { color: var(--home-yellow); }
.home-value h2 { margin-bottom: 22px; color: #fff; font-size: 3.1rem; letter-spacing: -0.03em; }
.home-value h2 em { color: var(--home-yellow); }
.home-value p:last-child { max-width: 560px; color: rgba(255, 255, 255, 0.85); font-size: 1.05rem; }

@media (min-width: 860px) {
  .home-featured-card__inner {
    grid-template-columns: 200px 1fr;
    align-items: center;
  }
}
@media (max-width: 1024px) {
  .home-services { grid-template-columns: repeat(2, 1fr); }
  .home-guide-grid { grid-template-columns: repeat(2, 1fr); }
  .home-why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 940px) {
  .home-latest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .home-hero__inner { padding-top: 52px; padding-bottom: 60px; }
  .home-hero h1 { font-size: 2.6rem; }
  .home-hero__lede { font-size: 1.05rem; }
  .home-section { padding: 56px 0; }
  .home-section-heading h2 { font-size: 1.85rem; }
  .home-section-heading--row { align-items: flex-start; flex-direction: column; }
  .home-services,
  .home-guide-grid,
  .home-topic-grid,
  .home-calc-grid,
  .home-latest-grid,
  .home-why-grid { grid-template-columns: 1fr; }
  .home-value { padding: 64px 0; }
  .home-value h2 { font-size: 2.35rem; }
  .home-cta__inner { padding: 56px 0; }
  .home-cta h2 { font-size: 1.9rem; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
