/* Calculane — shared stylesheet */

/* Brand palette — White #FFFFFF · Navy #172B4D · Blue #285DE5 · Teal #087F75 */

:root {
  --navy: #172b4d;
  --blue: #285de5;
  --teal: #087f75;

  --bg: #f3f7fd;
  --surface: #ffffff;
  --surface-2: #eef3fb;
  --text: #172b4d;
  --muted: #5f6f8c;
  --border: #e4ebf7;
  --brand: #285de5;
  --brand-ink: #1a47bd;
  --on-brand: #ffffff;
  --brand-soft: #e4ecfd;
  --result-tint: color-mix(in srgb, var(--accent) 12%, var(--surface));
  --result-edge: color-mix(in srgb, var(--accent) 32%, var(--border));
  --accent: #087f75;
  --good: #087f75;
  --good-soft: #cbe9e2;
  --warn: #b45309;
  --warn-soft: #fdf1e0;
  --bad: #c0342c;
  --bad-soft: #fbeae8;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(23, 43, 77, .04), 0 14px 34px -12px rgba(23, 43, 77, .14);
  --maxw: 1080px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --page-wash: radial-gradient(78% 46% at 50% -6%, rgba(40, 93, 229, .07) 0%, transparent 68%);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --bg: #0e1728;
  --surface: #172b4d;
  --surface-2: #1e3558;
  --text: #e8eef8;
  --muted: #9fb0cc;
  --border: #2a4067;
  --brand: #6e96ff;
  --brand-ink: #a9c2ff;
  --on-brand: #0e1728;
  --brand-soft: #1c3163;
  --result-tint: color-mix(in srgb, var(--accent) 20%, var(--surface));
  --result-edge: color-mix(in srgb, var(--accent) 42%, var(--border));
  --accent: #2fb3a6;
  --good: #3fcbb8;
  --good-soft: #10352f;
  --warn: #f5b942;
  --warn-soft: #3a2a12;
  --bad: #f08c86;
  --bad-soft: #3a1e1c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --page-wash: radial-gradient(78% 46% at 50% -6%, rgba(110, 150, 255, .10) 0%, transparent 68%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0e1728;
    --surface: #172b4d;
    --surface-2: #1e3558;
    --text: #e8eef8;
    --muted: #9fb0cc;
    --border: #2a4067;
    --brand: #6e96ff;
    --brand-ink: #a9c2ff;
    --on-brand: #0e1728;
    --brand-soft: #1c3163;
    --result-tint: color-mix(in srgb, var(--accent) 20%, var(--surface));
    --result-edge: color-mix(in srgb, var(--accent) 42%, var(--border));
    --accent: #2fb3a6;
    --good: #3fcbb8;
    --good-soft: #10352f;
    --warn: #f5b942;
    --warn-soft: #3a2a12;
    --bad: #f08c86;
    --bad-soft: #3a1e1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --page-wash: radial-gradient(78% 46% at 50% -6%, rgba(110, 150, 255, .10) 0%, transparent 68%);
  }
}

* { box-sizing: border-box; }

/* our display rules would otherwise beat the browser default for [hidden] */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--page-wash);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 18px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 62px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover { text-decoration: none; }

.logo-mark { width: 32px; height: 24px; flex-shrink: 0; display: block; }
.logo-word { font-weight: 800; letter-spacing: -.03em; }

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 8px;
}

.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* ---------- Nav dropdown ---------- */

.menu { position: relative; }

.menu > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  user-select: none;
}

.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--surface-2); color: var(--text); }
.menu[open] > summary { background: var(--surface-2); color: var(--text); }
.menu .chev { font-size: 10px; transition: transform .15s; }
.menu[open] .chev { transform: rotate(180deg); }

.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 232px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu-panel a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.menu-panel a:hover { background: var(--surface-2); text-decoration: none; }
.menu-panel .mdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.menu-panel .menu-all {
  margin-top: 5px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 9px 9px;
  color: var(--brand);
  font-weight: 600;
}

@media (max-width: 420px) {
  .menu-panel { min-width: 196px; }
}

/* ---------- Category page ---------- */

.cat-head { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; }
.cat-head .cat-chip {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
}

.theme-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.theme-btn:hover { color: var(--text); border-color: var(--brand); }

@media (max-width: 720px) {
  .nav a { padding: 7px 8px; font-size: 13.5px; }
  .nav a.hide-sm { display: none; }
  .menu > summary { padding: 7px 8px; font-size: 13.5px; }
  .logo { font-size: 17px; }
  .header-row { gap: 8px; }
}

@media (max-width: 380px) {
  .logo-word { font-size: 16px; }
  .nav a, .menu > summary { padding: 7px 6px; font-size: 13px; }
}

/* ---------- Generic blocks ---------- */

main { padding-block: 28px 48px; }

h1 { font-size: clamp(26px, 4.6vw, 36px); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 10px; }
h2 { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.3; letter-spacing: -.015em; margin: 34px 0 12px; }
h3 { font-size: 17px; margin: 22px 0 8px; }

.lede { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 62ch; }

.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin-inline: 6px; opacity: .5; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Calculator ---------- */

.calc-layout { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .calc-layout { grid-template-columns: 1.05fr .95fr; align-items: start; } }

.calc-panel { padding: 20px; }
@media (min-width: 620px) { .calc-panel { padding: 24px; } }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field label.flabel {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field .fhint { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.45; }

.input-row { display: flex; gap: 8px; }
.input-row > * { min-width: 0; }

.control {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}

.control:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.control::-webkit-outer-spin-button,
.control::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"].control { -moz-appearance: textfield; }

select.control {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.with-suffix { position: relative; flex: 1; }
.with-suffix .control { padding-right: 52px; }
.with-suffix .suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
  font-weight: 500;
}

.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  width: 100%;
}

.seg button {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* long option labels must never push the page sideways on a phone */
@media (max-width: 470px) {
  .seg button { font-size: 13px; padding: 8px 6px; }
  .seg.compact button { padding: 8px 9px; }
}

.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.seg.compact { width: auto; flex-shrink: 0; }
/* a compact unit toggle sits beside an input — size it to its labels, never squeeze them */
.seg.compact button { flex: 0 0 auto; min-width: auto; padding: 8px 14px; font-size: 13.5px; overflow: visible; }

/* ---------- Repeating debt rows ---------- */

.debt-head { display: none; }

.debt-row {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr;
  align-items: end;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 10px;
}

.dcell { display: block; min-width: 0; }
.dcell .with-suffix { display: block; position: relative; }
/* these columns are narrow — the % badge must not eat the number */
.dcell .with-suffix .control { padding-right: 27px; }
.dcell .with-suffix .suffix { right: 8px; font-size: 12.5px; }
.debt-row .control { padding-inline: 10px; }

.dcell::before {
  content: attr(data-label);
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.debt-del {
  justify-self: end;
  width: 40px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}

.debt-del:hover { color: var(--bad); border-color: var(--bad); }

@media (min-width: 720px) {
  .debt-head,
  .debt-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr .78fr .95fr auto;
    gap: 8px;
  }
  .debt-head {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .debt-row { padding: 0; border: 0; background: none; margin-bottom: 8px; }
  .dcell::before { display: none; }
}

.btn-sm { padding: 8px 14px; font-size: 14px; }

.calc-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); }

/* ---------- Results ---------- */

/* Brand treatment: the answer sits in a soft teal card, the number itself in teal. */
.result-panel {
  padding: 20px;
  position: sticky;
  top: 78px;
  background: var(--result-tint);
  border-color: var(--result-edge);
}

/* On phones the answer must be visible without scrolling past the whole form. */
@media (max-width: 899px) {
  .result-panel { position: static; order: -1; }
}
@media (min-width: 620px) { .result-panel { padding: 24px; } }

.result-empty { color: var(--muted); font-size: 15px; }

.result-primary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.result-value {
  font-size: clamp(34px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.result-unit { font-size: 17px; color: var(--muted); font-weight: 600; }
.result-label { font-size: 13.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; margin-bottom: 8px; }

.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 650;
  padding: 4px 11px;
  border-radius: 999px;
  margin-top: 8px;
}

.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--brand-soft); color: var(--brand-ink); }

.result-rows { margin-top: 20px; border-top: 1px solid var(--border); }

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}

.result-row:last-child { border-bottom: 0; }
.result-row .rk { color: var(--muted); }
.result-row .rv { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }

.result-note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.result-error { color: var(--bad); font-size: 14.5px; font-weight: 600; }

/* scale bar */
.scale { margin-top: 18px; }
.scale-track { display: flex; height: 9px; border-radius: 999px; overflow: hidden; }
.scale-seg { flex: 1; }
.scale-marks { display: flex; margin-top: 7px; font-size: 11.5px; color: var(--muted); }
.scale-marks span { flex: 1; text-align: center; }
.scale-marks span.on { color: var(--text); font-weight: 700; }

/* ---------- Content ---------- */

.prose { max-width: 68ch; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { font-weight: 650; }

.formula {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin: 0 0 16px;
  overflow-x: auto;
  white-space: pre;
}

.table-wrap { overflow-x: auto; margin: 0 0 18px; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 320px;
}

table.data th, table.data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
table.data th { font-weight: 650; background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }

details.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 9px;
  overflow: hidden;
}

details.faq summary {
  cursor: pointer;
  padding: 13px 15px;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-size: 19px; font-weight: 400; flex-shrink: 0; }
details.faq[open] summary::after { content: "−"; }
details.faq .faq-body { padding: 0 15px 14px; color: var(--muted); font-size: 14.5px; }
details.faq .faq-body p { margin: 0 0 10px; }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Home ---------- */

/* ---------- Hero band (always navy, in both themes — it's the brand block) ---------- */

.hero-band {
  position: relative;
  overflow: hidden;
  margin-top: -28px;
  margin-bottom: 44px;
  padding-block: 54px 46px;
  background:
    radial-gradient(70% 130% at 15% 0%, rgba(40, 93, 229, .55) 0%, transparent 62%),
    radial-gradient(65% 125% at 90% 18%, rgba(13, 178, 163, .62) 0%, transparent 62%),
    linear-gradient(165deg, #1b3360 0%, #172b4d 55%, #101f3a 100%);
  color: #fff;
  text-align: center;
}

/* faint grid, like squared paper — calculators, not decoration for its own sake */
.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(75% 90% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(75% 90% at 50% 0%, #000 0%, transparent 78%);
  pointer-events: none;
}

.hero-band > .wrap { position: relative; }

.hero-band h1 {
  color: #fff;
  max-width: 18ch;
  margin: 0 auto 12px;
  text-wrap: balance;
  font-size: clamp(30px, 5.4vw, 46px);
  font-weight: 800;
}

.hero-band .hero-lede {
  color: #c3d2ea;
  font-size: 17px;
  line-height: 1.55;
  max-width: 54ch;
  margin: 0 auto 26px;
}

.search-box { max-width: 520px; margin: 0 auto; position: relative; }

.search-box .control {
  padding: 14px 16px 14px 44px;
  font-size: 16px;
  background: #fff;
  color: #172b4d;
  border-color: transparent;
  box-shadow: 0 8px 26px rgba(8, 18, 38, .3);
}

.search-box .control::placeholder { color: #7d8ba4; }
.search-box .control:focus { box-shadow: 0 0 0 3px rgba(110, 150, 255, .55), 0 8px 26px rgba(8, 18, 38, .3); }
.search-box .sicon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #7d8ba4; font-size: 16px; pointer-events: none; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 26px;
  font-size: 13.5px;
  color: #b9cae6;
}

.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row .tick { color: #2dd4bf; font-weight: 700; }

@media (max-width: 560px) {
  .hero-band { padding-block: 40px 34px; margin-bottom: 32px; }
  .trust-row { gap: 8px 18px; font-size: 12.5px; }
}

/* ---------- Featured calculator ---------- */

.featured {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--border));
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--brand) 7%, var(--surface)) 0%, var(--surface) 62%);
  box-shadow: var(--shadow);
}

@media (min-width: 760px) { .featured { grid-template-columns: 1fr auto; gap: 30px; padding: 30px 32px; } }

.featured .eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
}

.featured h3 { margin: 0 0 7px; font-size: clamp(20px, 3vw, 25px); letter-spacing: -.02em; }
.featured p { margin: 0; color: var(--muted); font-size: 15px; max-width: 52ch; }

.btn-primary:hover { text-decoration: none; }
a.btn { display: inline-block; text-decoration: none; white-space: nowrap; }
a.btn:hover { text-decoration: none; }

/* ---------- Why strip ---------- */

.why-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.why-item { padding: 4px 2px; }

.why-item .wicon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  margin-bottom: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}

.why-item .wicon svg { width: 18px; height: 18px; }
.why-item h3 { margin: 0 0 5px; font-size: 15.5px; }
.why-item p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- Coming soon ---------- */

/* fixed tracks so six items land as two full rows, never an orphan */
.soon-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .soon-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 820px) { .soon-grid { grid-template-columns: repeat(3, 1fr); } }

.soon-tile {
  padding: 13px 15px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14.5px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.soon-tile .scat {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: 4px;
  opacity: .75;
}

.cat-title { display: flex; align-items: center; gap: 9px; }
.cat-title .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tile {
  display: block;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.tile:hover {
  text-decoration: none;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tile .tname { font-weight: 650; font-size: 15.5px; margin-bottom: 5px; display: flex; align-items: center; gap: 9px; }

.tglyph {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tglyph svg { width: 16px; height: 16px; display: block; }
.tile .tdesc { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

.empty-msg { color: var(--muted); font-size: 15px; padding: 10px 0; }

/* ---------- Ads ---------- */

.ad-slot {
  margin: 26px 0;
  min-height: 90px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--muted) 62%, transparent);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: 30px;
  margin-top: 40px;
  font-size: 14px;
}

.footer-grid { display: flex; flex-wrap: wrap; gap: 26px 40px; justify-content: space-between; }
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 9px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: var(--text); font-size: 14px; }
.legal { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

.disclaimer {
  margin-top: 30px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
