/* ============================================================================
   Daily Finance Online — main.css
   Global design system: tokens, layout, typography, components.
   Mobile-first, high contrast, calm and trustworthy.
   ========================================================================== */

:root {
  /* Brand palette — calm, professional, financial */
  --brand-900: #0b2540;   /* deep navy — primary text / headers */
  --brand-800: #123a63;
  --brand-700: #1d4f86;
  --brand-600: #2563a8;
  --brand-500: #3577c4;
  --brand-100: #e8f0fb;
  --brand-50:  #f4f8fd;

  --ink-900: #16202b;
  --ink-700: #3a4654;
  --ink-500: #5c6b7a;
  --ink-300: #98a6b4;

  --surface-0: #ffffff;
  --surface-1: #f6f8fa;
  --surface-2: #eef2f6;
  --surface-3: #e3e9ef;

  --line-200: #e3e9ef;
  --line-300: #d3dbe4;

  --accent: #0f9d6b;      /* calm green for positive / success */
  --accent-soft: #e3f5ee;
  --warn: #b45309;        /* amber for cautions */
  --warn-soft: #fdf0e3;
  --danger: #b42318;      /* red for errors */
  --danger-soft: #fbeae8;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-md: 0 4px 12px rgba(16,24,40,.08), 0 2px 4px rgba(16,24,40,.05);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.12);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas, monospace;

  --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step-0:  clamp(1rem, .95rem + .28vw, 1.125rem);
  --step-1:  clamp(1.25rem, 1.18rem + .36vw, 1.5rem);
  --step-2:  clamp(1.5625rem, 1.43rem + .64vw, 2rem);
  --step-3:  clamp(1.953rem, 1.72rem + 1.16vw, 2.625rem);

  --container: 1140px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* Reset / base ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  color: var(--brand-900);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-1); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

ul, ol { padding-left: 1.3rem; margin-bottom: 1rem; }
li { margin-bottom: .35rem; }
li:last-child { margin-bottom: 0; }

img, svg { max-width: 100%; height: auto; display: block; }

code {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--surface-2);
  padding: .12em .4em;
  border-radius: 6px;
  color: var(--brand-900);
}

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

.container--narrow { max-width: 760px; }
.container--wide   { max-width: 1320px; }

.section { padding-block: clamp(2rem, 5vw, 4rem); }
.section--tight { padding-block: clamp(1.25rem, 3vw, 2rem); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-900);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Header / navigation ----------------------------------------------------- */
.site-header {
  background: var(--surface-0);
  border-bottom: 1px solid var(--line-200);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(6px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  color: var(--brand-900);
  font-size: 1.05rem;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
}
.brand__name span { color: var(--brand-600); }

.site-nav { margin-left: auto; }
.site-nav__list {
  display: flex;
  gap: .25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav__list a {
  display: inline-block;
  padding: .5rem .8rem;
  color: var(--ink-700);
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-pill);
}
.site-nav__list a:hover { background: var(--surface-1); text-decoration: none; color: var(--brand-900); }
.site-nav__list a[aria-current="page"] { background: var(--brand-100); color: var(--brand-900); }

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line-300);
  background: var(--surface-0);
  border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--brand-900);
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav.is-open { display: block; }
  .site-nav__list {
    flex-direction: column;
    gap: .1rem;
    padding: .5rem 0 .9rem;
  }
  .site-nav__list a { padding: .7rem .8rem; width: 100%; border-radius: var(--radius-sm); }
}

/* Footer ----------------------------------------------------------------- */
.site-footer {
  background: var(--brand-900);
  color: #c3d2e2;
  margin-top: 4rem;
}
.site-footer a { color: #d7e4f2; }
.site-footer a:hover { color: #fff; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  padding-block: 2.5rem;
}
.site-footer h3 {
  color: #fff;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .8rem;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: .5rem; font-size: .92rem; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  padding-block: 1.2rem;
  font-size: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.2rem;
  justify-content: space-between;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: .75rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: transform .06s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--brand-700);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--brand-600); }
.btn--secondary {
  background: var(--surface-0);
  color: var(--brand-800);
  border-color: var(--line-300);
}
.btn--secondary:hover { background: var(--surface-1); }
.btn--ghost {
  background: transparent;
  color: var(--brand-700);
  border-color: var(--brand-100);
}
.btn--sm { padding: .5rem 1rem; font-size: .9rem; }
.btn--block { width: 100%; justify-content: center; }
.btn .arrow { transition: transform .12s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Cards ------------------------------------------------------------------ */
.card {
  background: var(--surface-0);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: clamp(1.1rem, 3vw, 1.75rem); }

/* Category grid (homepage "Browse by category") ------------------------- */
.category-grid {
  display: grid;
  gap: clamp(.75rem, 2vw, 1rem);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
  padding: clamp(.9rem, 2.4vw, 1.25rem);
  background: var(--surface-0);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease, box-shadow .1s ease, border-color .1s ease;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300, var(--brand-100));
  text-decoration: none;
}
.category-card__ico {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--brand-100);
  color: var(--brand-600);
  display: grid; place-items: center;
}
.category-card__ico svg { width: 24px; height: 24px; }
.category-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-900);
  line-height: 1.25;
}
.category-card p {
  font-size: .85rem;
  color: var(--ink-500);
  margin: 0;
}

/* Tool grid (homepage "Popular calculators" + hubs + index) -------------- */
.tool-grid {
  display: grid;
  gap: clamp(.75rem, 2vw, 1rem);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: clamp(1rem, 2.6vw, 1.3rem);
  background: var(--surface-0);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease, box-shadow .1s ease, border-color .1s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300, var(--brand-100));
  text-decoration: none;
}
.tool-card__ico {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-100);
  color: var(--brand-600);
  display: grid; place-items: center;
}
.tool-card__ico svg { width: 24px; height: 24px; }
.tool-card__name {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--brand-900);
  line-height: 1.25;
}
.tool-card__desc {
  font-size: .85rem;
  color: var(--ink-500);
  line-height: 1.45;
}
.tool-card__cta {
  margin-top: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand-600);
}
.tool-card:hover .tool-card__cta { text-decoration: underline; }

/* Calculator card --------------------------------------------------------- */
.calc-card {
  background: var(--surface-0);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.calc-card__body { padding: clamp(1.1rem, 3vw, 1.75rem); }

.input-group { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field { display: grid; gap: .45rem; }
.field__label { font-weight: 600; color: var(--brand-900); font-size: .95rem; }
.field__hint { font-size: .82rem; color: var(--ink-500); }

.input-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-300);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  transition: border-color .12s ease, box-shadow .12s ease;
  width: 100%;
}
.input-wrap:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.input-wrap .prefix, .input-wrap .suffix {
  padding: .65rem .8rem;
  color: var(--ink-500);
  font-weight: 600;
  user-select: none;
}
.input-wrap .prefix svg, .input-wrap .suffix svg {
  width: 18px; height: 18px; display: block;
}
.input-wrap input {
  border: 0;
  padding: .65rem .8rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink-900);
  width: 100%;
  min-width: 0;
  background: transparent;
  border-radius: var(--radius-sm);
}
.input-wrap input:focus { outline: none; }
select.input-wrap { padding: 0; }
select.input-wrap select {
  border: 0; background: transparent; padding: .65rem .8rem;
  font-size: 1rem; font-family: inherit; color: var(--ink-900); width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c6b7a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2rem;
}

.field__error { color: var(--danger); font-size: .85rem; min-height: 1.1rem; }

/* Results ---------------------------------------------------------------- */
.results { margin-top: 1.5rem; }
.results[hidden] { display: none; }

.result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .25rem 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  margin-bottom: .8rem;
}
.result-card__label { font-weight: 600; color: var(--ink-700); font-size: .95rem; }
.result-card__value { font-size: 1.4rem; font-weight: 800; color: var(--brand-900); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.result-card--primary { background: var(--brand-100); border-color: var(--brand-100); }
.result-card--primary .result-card__value { color: var(--brand-700); font-size: 1.9rem; }

.results-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.results-grid .result-card { margin-bottom: 0; grid-template-columns: 1fr; }

.comparison { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .comparison { grid-template-columns: 1fr 1fr; }
}
.comparison__col h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); margin-bottom: .8rem; }

.delta-banner {
  background: var(--accent-soft);
  border: 1px solid #bfe8d5;
  color: #0c6b48;
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  font-weight: 600;
  margin-top: 1rem;
}
.delta-banner strong { font-weight: 800; }

/* Notes / callouts ------------------------------------------------------- */
.note {
  border-radius: var(--radius-md);
  padding: .9rem 1.1rem;
  font-size: .92rem;
  border: 1px solid;
  margin-block: 1rem;
}
.note--info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-800); }
.note--warn { background: var(--warn-soft); border-color: #f3d7b3; color: #7c3e07; }
.note--danger { background: var(--danger-soft); border-color: #f3c4bf; color: #8f1d13; }
.note strong { font-weight: 700; }
.note p { margin: 0; }
.note p + p { margin-top: .5rem; }

.formula-box {
  background: var(--surface-2);
  border-left: 4px solid var(--brand-500);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--ink-900);
  margin-block: 1rem;
  overflow-x: auto;
}
.example-box {
  border: 1px dashed var(--line-300);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-block: 1.25rem;
  background: var(--surface-1);
}
.example-box h4 { margin-bottom: .6rem; }

/* Breadcrumb ------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: .88rem;
  color: var(--ink-500);
  margin-bottom: 1.25rem;
  list-style: none;
  padding: 0;
}
.breadcrumb a { color: var(--ink-500); font-weight: 500; }
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb li { display: inline-flex; align-items: center; gap: .4rem; }
.breadcrumb li + li::before { content: "/"; color: var(--ink-300); margin-right: .4rem; }
.breadcrumb [aria-current="page"] { color: var(--brand-900); font-weight: 600; }

/* Page hero / header ----------------------------------------------------- */
.page-head { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.page-head .eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-600);
  background: var(--brand-100);
  padding: .3rem .7rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}
.page-head p.lead { font-size: var(--step-1); color: var(--ink-700); max-width: 62ch; }

/* Prose ------------------------------------------------------------------ */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2rem; margin-bottom: .8rem; }
.prose h3 { margin-top: 1.6rem; margin-bottom: .6rem; }
.prose > * + * { margin-top: 1rem; }

/* Tables ----------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-200); border-radius: var(--radius-md); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 480px; }
table.data th, table.data td { text-align: right; padding: .65rem .8rem; font-variant-numeric: tabular-nums; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { background: var(--surface-1); color: var(--brand-900); font-weight: 700; border-bottom: 2px solid var(--line-200); }
table.data tbody tr { border-bottom: 1px solid var(--line-200); }
table.data tbody tr:last-child { border-bottom: 0; }
table.data tbody tr:nth-child(even) { background: var(--surface-1); }

/* FAQ -------------------------------------------------------------------- */
.faq { display: grid; gap: .6rem; margin-block: 1.2rem; }
.faq details {
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  padding: 0;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-weight: 600;
  color: var(--brand-900);
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--brand-500);
  transition: transform .15s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq__a { padding: 0 1.1rem 1rem; color: var(--ink-700); }

/* Category / popular grids ---------------------------------------------- */
.cat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.25rem;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  transition: box-shadow .12s ease, transform .08s ease, border-color .12s ease;
}
.cat-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand-100); transform: translateY(-2px); text-decoration: none; }
.cat-card__icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  background: var(--brand-100);
  display: grid; place-items: center;
  font-size: 1.5rem;
}
.cat-card h3 { font-size: 1.1rem; }
.cat-card p { color: var(--ink-500); font-size: .92rem; margin: 0; }
.cat-card__tools { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .9rem; color: var(--ink-700); }
.cat-card__tools li { margin-bottom: .3rem; }

.popular-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pop-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  transition: box-shadow .12s ease, border-color .12s ease;
}
.pop-card:hover { box-shadow: var(--shadow-sm); border-color: var(--brand-100); }
.pop-card h3 { font-size: 1.02rem; }
.pop-card p { color: var(--ink-500); font-size: .9rem; margin: 0; }
.pop-card a { font-weight: 600; font-size: .92rem; display: inline-flex; gap: .35rem; margin-top: auto; }

/* Search box ------------------------------------------------------------- */
.search {
  display: flex;
  gap: .5rem;
  background: var(--surface-0);
  border: 1px solid var(--line-300);
  border-radius: var(--radius-pill);
  padding: .35rem .35rem .35rem 1.1rem;
  box-shadow: var(--shadow-sm);
  align-items: center;
}
.search input { border: 0; flex: 1; min-width: 0; font-size: 1rem; font-family: inherit; padding: .55rem 0; }
.search input:focus { outline: none; }
.search-results {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  background: var(--surface-0);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 20;
  max-height: 70vh;
  overflow-y: auto;
}
.search-results[hidden] { display: none; }
.search-results li { list-style: none; }
.search-results a {
  display: block;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line-200);
}
.search-results li:last-child a { border-bottom: 0; }
.search-results a:hover { background: var(--surface-1); }
.search-results .sr-name { font-weight: 600; color: var(--brand-900); }
.search-results .sr-cat { font-size: .8rem; color: var(--ink-500); }
.search-results .sr-empty { padding: 1rem; color: var(--ink-500); }
.hero__search { position: relative; }

/* Homepage hero ---------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--brand-100), transparent 60%),
    linear-gradient(180deg, var(--brand-50), var(--surface-0));
  border-bottom: 1px solid var(--line-200);
}
.hero__inner { text-align: center; padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero h1 { margin-bottom: 1rem; }
.hero p.lead { max-width: 60ch; margin-inline: auto; margin-bottom: 2rem; }
.hero .search { max-width: 560px; margin-inline: auto; }
.hero .search-hint { margin-top: .8rem; color: var(--ink-500); font-size: .88rem; }
.hero .search-hint a { font-weight: 600; }

/* Trust strip ------------------------------------------------------------ */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
  padding-block: 1.2rem;
  border-bottom: 1px solid var(--line-200);
  background: var(--surface-1);
}
.trust-strip span { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--ink-700); font-weight: 500; }
.trust-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Action bar under calculator ------------------------------------------- */
.calc-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* Related tools ---------------------------------------------------------- */
.related { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.related a {
  display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  font-weight: 600;
  color: var(--brand-900);
}
.related a:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); text-decoration: none; }
.related .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-100); display: grid; place-items: center; font-size: 1rem; }

/* Meta / reviewed line --------------------------------------------------- */
.meta-line { font-size: .82rem; color: var(--ink-500); display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin-top: .5rem; }
.meta-line a { font-weight: 600; }

/* Utilities -------------------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.no-js .calc-card__body form .btn--primary { /* no special treatment */ }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* Print ------------------------------------------------------------------ */
@media print {
  .site-header, .site-footer, .site-nav, .skip-link,
  .calc-actions, .search, .note--info, .related, .breadcrumb, .trust-strip { display: none !important; }
  body { color: #000; background: #fff; }
  .calc-card { box-shadow: none; border: 1px solid #ccc; }
  .result-card { break-inside: avoid; }
  a { color: #000; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

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

/* Link lists (inline nav of tools) --------------------------------------- */
.link-list {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin: .25rem 0 1rem;
}
.link-list a {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .8rem;
  background: var(--surface-1);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-pill);
  color: var(--brand-800);
  font-size: .9rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.link-list a:hover { background: var(--brand-50); border-color: var(--brand-100); }
.link-list a::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-500);
}

/* Tag / chip ------------------------------------------------------------- */
.tag {
  display: inline-block;
  padding: .15rem .6rem;
  background: var(--brand-100);
  color: var(--brand-800);
  border-radius: var(--radius-pill);
  font-size: .78rem; font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Key takeaways ---------------------------------------------------------- */
.takeaway {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-left: 4px solid var(--brand-600);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-block: 1.25rem;
}
.takeaway h3 {
  font-size: 1rem; font-weight: 800;
  color: var(--brand-900);
  margin-bottom: .6rem;
}
.takeaway ul { margin: 0; padding-left: 1.15rem; }
.takeaway li { margin: .35rem 0; color: var(--ink-700); }
.takeaway li::marker { color: var(--brand-600); }

/* Source note ------------------------------------------------------------ */
.source-note {
  font-size: .85rem; color: var(--ink-500);
  margin-block: 1.25rem; padding-top: .9rem;
  border-top: 1px solid var(--line-200);
}
.source-note a { color: var(--brand-700); }

/* Debt table (multi-debt input rows) ------------------------------------- */
.debt-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.debt-table th {
  text-align: left; font-size: .78rem; font-weight: 700;
  color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em;
  padding: .4rem .5rem;
}
.debt-table td { padding: .35rem .4rem; vertical-align: middle; }
.debt-table td input, .debt-table td select {
  width: 100%; padding: .55rem .7rem;
  border: 1px solid var(--line-300); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink-900); background: var(--surface-0);
}
.debt-table .remove-debt {
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line-300); border-radius: 8px;
  background: var(--surface-0); color: var(--ink-500);
  cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.debt-table .remove-debt:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.debt-table .row-num { color: var(--ink-300); font-weight: 700; width: 2rem; }

/* Mobile: allow debt table to scroll ------------------------------------- */
@media (max-width: 560px) {
  .debt-table { display: block; overflow-x: auto; white-space: nowrap; max-width: 100%; }
  .debt-table th, .debt-table td { padding: .4rem .45rem; }
}
