@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=JetBrains+Mono:wght@400..700&display=swap');

/* ============================================================
   CalcKit — shared styles
   Used by the calculator (index.html) and content/guide pages.
   Type: Bricolage Grotesque (display) + JetBrains Mono (numbers),
   system sans for body. Words in a crafted grotesque, numbers in
   an engineer's monospace — fitting for a tool about numbers.
   ============================================================ */

:root {
  /* Palette: fresh emerald + honey on warm paper */
  --bg:          #F4F3EE;
  --surface:     #FFFFFF;
  --ink:         #18302B;   /* deep pine — primary text */
  --ink-soft:    #5E6B66;   /* muted text */
  --line:        #E2E1D8;   /* hairlines */
  --line-strong: #CFD3CB;

  --brand:       #0E9E6E;   /* fresh emerald — accents, borders, tints */
  --brand-deep:  #0A6E4C;   /* AA text/fills on white */
  --brand-tint:  #E7F4EE;
  --honey:       #C77B12;   /* warm secondary — kept readable */
  --honey-tint:  #FBEFD8;

  --shadow:      0 1px 2px rgba(24,48,43,.05), 0 12px 28px -16px rgba(24,48,43,.22);

  /* Type */
  --display: "Bricolage Grotesque", "Hanken Grotesk", -apple-system, "Segoe UI", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;

  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      460px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select, button { font-family: inherit; }
a { color: var(--brand-deep); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }

/* Headings + wordmark in the display face; optical sizing on for Bricolage */
h1, h2, h3, .wordmark__text { font-family: var(--display); font-optical-sizing: auto; }

.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;
}
.skip-link {
  position: absolute; left: 12px; top: -44px; z-index: 10;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

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

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------- Shell ---------- */
.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px 6px;
  padding-top: max(18px, env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.wordmark__mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand-deep); color: #fff;
  font-weight: 800; font-size: 16px;
  box-shadow: 0 2px 6px -2px rgba(10,110,76,.6);
}
.wordmark__text { font-weight: 750; letter-spacing: -.02em; font-size: 1.05rem; }
.site-nav { display: inline-flex; gap: 18px; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--brand-deep); }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px 40px;
}

.intro { margin: 14px 2px 22px; }
.intro__title {
  font-size: clamp(1.7rem, 7vw, 2.15rem);
  line-height: 1.08; letter-spacing: -.03em; font-weight: 800;
  margin: 0 0 8px;
}
.intro__lede { margin: 0; color: var(--ink-soft); font-size: 1rem; max-width: 34ch; }

/* ---------- Order card ---------- */
.order {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 6px;
}
.field { border: 0; margin: 0 0 18px; padding: 0; }
.field__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field__label {
  display: block; font-weight: 700; font-size: .82rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 9px; padding: 0;
}

/* Currency select */
.currency { position: relative; margin: 0 0 9px; }
.currency__select {
  appearance: none; -webkit-appearance: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 30px 6px 12px; font-size: .82rem; font-weight: 700; color: var(--ink);
}
.currency::after {
  content: ""; position: absolute; right: 12px; top: 50%; pointer-events: none;
  width: 7px; height: 7px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-65%) rotate(45deg);
}

/* Amount input */
.amount-input {
  display: flex; align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.amount-input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
}
.amount-input__symbol { color: var(--ink-soft); font-size: 1.5rem; font-weight: 600; padding-right: 6px; }
.amount-input__field {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 2rem; font-weight: 600; color: var(--ink);
  padding: 14px 0;
}
.amount-input__field::placeholder { color: var(--line-strong); }

/* Tip chips */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 0; padding: 0 8px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-weight: 700; font-size: 1rem; color: var(--ink);
  transition: transform .08s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--line-strong); }
.chip:active { transform: scale(.96); }
.chip.is-selected {
  background: var(--brand-deep); border-color: var(--brand-deep); color: #fff;
  box-shadow: 0 4px 12px -4px rgba(10,110,76,.5);
}
.chip--custom { padding: 0 10px; cursor: text; gap: 1px; }
.chip--custom:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.chip__input {
  flex: 1 1 0; width: auto; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--mono); font-weight: 700; font-size: 1rem; text-align: center; color: var(--ink);
}
.chip__input::placeholder { color: var(--ink-soft); font-family: var(--sans); font-weight: 600; }
/* the % only appears once a custom value is entered, so the placeholder fits */
.chip__suffix { display: none; color: var(--ink-soft); font-weight: 700; }
.chip__input:not(:placeholder-shown) + .chip__suffix { display: inline; }
.chip--custom.is-selected { background: var(--brand-deep); border-color: var(--brand-deep); }
.chip--custom.is-selected .chip__input,
.chip--custom.is-selected .chip__suffix { color: #fff; }
.chip--custom.is-selected .chip__input::placeholder { color: rgba(255,255,255,.7); }

.tip-quality {
  margin: 11px 2px 0; min-height: 1.2em;
  font-size: .9rem; font-weight: 600; color: var(--brand-deep);
}

/* People stepper */
.stepper {
  display: flex; align-items: stretch;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden;
}
.stepper__btn {
  width: 56px; flex: none; background: transparent; border: 0;
  font-size: 1.6rem; font-weight: 500; color: var(--brand-deep);
  transition: background .15s ease;
}
.stepper__btn:hover { background: var(--brand-tint); }
.stepper__btn:active { background: #d8ede3; }
.stepper__value {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 0; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line);
}
.stepper__input {
  width: 100%; border: 0; background: transparent; outline: none; text-align: center;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 1.5rem; font-weight: 700; color: var(--ink);
}
.stepper__unit { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }

/* ============================================================
   THE CHECK — receipt-style results (the signature element)
   ============================================================ */
.receipt {
  position: relative;
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 22px 22px 26px;
  box-shadow: 0 14px 30px -22px rgba(24,48,43,.4);
}
/* perforated scalloped top + bottom edges */
.receipt::before,
.receipt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background-image: radial-gradient(circle at 7px 50%, var(--bg) 5px, transparent 5.5px);
  background-size: 14px 12px; background-repeat: repeat-x;
  pointer-events: none;
}
.receipt::before { top: -6px; }
.receipt::after  { bottom: -6px; }

.receipt__head {
  margin: 0 0 16px;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .22em;
  font-size: .72rem; font-weight: 700; color: var(--ink-soft); text-align: center;
}

.line { display: flex; align-items: baseline; gap: 8px; margin: 11px 0; }
.line__label { font-weight: 600; color: var(--ink); white-space: nowrap; }
.line__leader { flex: 1; border-bottom: 1.5px dotted var(--line-strong); transform: translateY(-4px); }
.line__amount { font-size: 1.05rem; font-weight: 600; white-space: nowrap; }

.receipt__rule { height: 0; border-top: 1.5px dashed var(--line-strong); margin: 16px 0; }

.per-person { background: var(--brand-tint); border-radius: var(--radius-sm); padding: 14px 16px; }
.per-person__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.per-person__label { font-weight: 750; font-size: 1.05rem; letter-spacing: -.01em; }
.per-person__amount { font-size: 1.9rem; font-weight: 700; color: var(--brand-deep); }
.per-person__note { margin: 6px 0 0; font-size: .85rem; color: var(--ink-soft); }

/* round-up toggle */
.roundup {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 4px 2px; cursor: pointer; user-select: none;
}
.roundup__check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.roundup__track {
  flex: none; width: 46px; height: 28px; border-radius: 999px;
  background: var(--line-strong); position: relative; transition: background .18s ease;
}
.roundup__thumb {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s ease;
}
.roundup__check:checked + .roundup__track { background: var(--brand-deep); }
.roundup__check:checked + .roundup__track .roundup__thumb { transform: translateX(18px); }
.roundup__check:focus-visible + .roundup__track { outline: 3px solid var(--brand); outline-offset: 2px; }
.roundup__text { font-weight: 600; font-size: .95rem; }

.receipt__perf { height: 0; border-top: 1.5px dashed var(--line); margin: 20px 0 14px; }

.reset {
  display: block; width: 100%; padding: 12px; background: transparent; border: 0;
  color: var(--ink-soft); font-weight: 700; font-size: .9rem;
  letter-spacing: .02em; border-radius: 10px; transition: color .15s ease, background .15s ease;
}
.reset:hover { color: var(--ink); background: var(--bg); }

/* update pulse */
@keyframes pulse { 0% { color: var(--honey); } 100% { color: inherit; } }
.is-updating { animation: pulse .4s ease-out; }

/* ---------- SEO copy ---------- */
.seo-copy { margin-top: 34px; color: var(--ink-soft); }
.seo-copy h2 { color: var(--ink); font-size: 1.15rem; letter-spacing: -.01em; margin: 0 0 8px; }
.seo-copy p { margin: 0 0 12px; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 26px 20px;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .85rem;
  display: flex; flex-direction: column; gap: 10px;
}
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--brand-deep); }

/* ============================================================
   Prose — for guide / content pages
   ============================================================ */
.prose { max-width: var(--maxw); margin: 0 auto; padding: 8px 20px 40px; }
.prose .eyebrow {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; font-weight: 700; color: var(--brand-deep); margin: 8px 0 6px;
}
.prose h1 { font-size: clamp(1.7rem, 6.5vw, 2.1rem); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 10px; }
.prose h2 { font-size: 1.25rem; letter-spacing: -.01em; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--ink); font-size: 1rem; }
.prose .lede { color: var(--ink-soft); font-size: 1.08rem; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin: 6px 0; }
.prose .callout {
  background: var(--brand-tint); border: 1px solid #cfe7dc;
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 20px 0;
  font-size: .95rem;
}
.prose .callout strong { color: var(--brand-deep); }
.prose .back { display: inline-block; margin-top: 28px; font-weight: 700; text-decoration: none; }
.prose .back::before { content: "← "; }

/* Guide index cards */
.guide-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.guide-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .15s ease;
}
.guide-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.guide-card h2 { margin: 0 0 4px; font-size: 1.1rem; letter-spacing: -.01em; }
.guide-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  :root { --maxw: 500px; }
  .order { padding: 22px 22px 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   CALCULATOR SUITE — hub directory + generic tool UI kit
   Shares every token above, so new calculators match CalcKit.
   ============================================================ */

/* Per-page container widths (header / main / footer stay aligned) */
body.page-hub  .site-header,
body.page-hub  main,
body.page-hub  .site-footer  { max-width: 960px; }
body.page-tool .site-header,
body.page-tool main,
body.page-tool .site-footer  { max-width: 560px; }

/* ---------- Hub: hero + search ---------- */
.hub-hero { margin: 14px 2px 18px; }
.hub-hero h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 800; margin: 0 0 8px; }
.hub-hero p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; max-width: 56ch; }

.search { position: relative; margin: 18px 2px 6px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
.search input {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 14px 18px 14px 46px; font-size: 1rem; color: var(--ink); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.search-empty { margin: 18px 2px; color: var(--ink-soft); }

/* ---------- Homepage: hero actions, trust, sections, why-us ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hero-actions .btn { width: auto; padding: 13px 22px; }
.hero-trust { margin: 18px 2px 0; font-size: .9rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 8px 18px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .ico-svg { width: 16px; height: 16px; color: var(--brand-deep); }

.sec-head { margin: 40px 2px 16px; }
.sec-head h2 { font-size: clamp(1.4rem, 5vw, 1.85rem); letter-spacing: -.02em; margin: 0 0 6px; }
.sec-head p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.why-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .why-grid { grid-template-columns: repeat(3, 1fr); } }
.why-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.why-card__ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-deep); display: grid; place-items: center; margin-bottom: 13px; }
.why-card__ico .ico-svg { width: 22px; height: 22px; }
.why-card h3 { margin: 0 0 6px; font-size: 1.05rem; letter-spacing: -.01em; }
.why-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }

/* readable column for long-form + FAQ on the wide hub */
.readable { max-width: 720px; margin-inline: auto; }
/* collapse the marketing sections while the user is searching */
body.is-searching .home-extra { display: none; }

/* ---------- Category sections ---------- */
.cat { margin: 26px 0 6px; }
.cat.is-empty { display: none; }
.cat__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.cat__title { font-size: 1.2rem; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 9px; }
.cat__title .ico { font-size: 1.15em; line-height: 1; }
.cat__count { font-size: .82rem; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }

.calc-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .calc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .calc-grid { grid-template-columns: repeat(3, 1fr); } }

.calc-card {
  display: flex; gap: 13px; align-items: flex-start; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .15s ease;
}
.calc-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.calc-card__ico { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-tint); font-size: 1.2rem; }
.calc-card__body h3 { margin: 0 0 3px; font-size: 1rem; letter-spacing: -.01em; }
.calc-card__body p { margin: 0; font-size: .85rem; color: var(--ink-soft); line-height: 1.4; }
.calc-card.is-hidden { display: none; }
.calc-card[aria-disabled="true"] { opacity: .62; pointer-events: none; box-shadow: none; }
.calc-card[aria-disabled="true"] .calc-card__ico { background: var(--bg); }
.badge {
  display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--honey); background: var(--honey-tint); border-radius: 999px; padding: 2px 7px; margin-left: 7px; vertical-align: middle;
}

/* ---------- Tool pages: breadcrumb + heading ---------- */
.breadcrumb { margin: 12px 2px 4px; font-size: .85rem; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--brand-deep); }
.tool-title { font-size: clamp(1.6rem, 6vw, 2.05rem); line-height: 1.1; letter-spacing: -.03em; margin: 4px 2px 6px; font-weight: 800; }
.tool-lede { margin: 0 2px 16px; color: var(--ink-soft); }

/* ---------- Generic calculator card + fields ---------- */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.calc-field { margin: 0 0 16px; }
.calc-field:last-child { margin-bottom: 0; }
.calc-label { display: block; font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 8px; }
.field-hint { margin: 7px 2px 0; font-size: .82rem; color: var(--ink-soft); }

.calc-input, .calc-select {
  width: 100%; border: 1.5px solid var(--line); background: var(--bg); border-radius: var(--radius-sm);
  padding: 13px 14px; font-size: 1.05rem; color: var(--ink); outline: none; font-family: var(--sans);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.calc-input:focus, .calc-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.calc-input.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.calc-input::placeholder { color: var(--line-strong); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; pointer-events: none;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: translateY(-70%) rotate(45deg);
}
.calc-select { appearance: none; -webkit-appearance: none; padding-right: 38px; }

.calc-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 400px) { .calc-2 { grid-template-columns: 1fr; } }

/* Tabs / mode switch */
.tabs { display: inline-flex; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 16px; max-width: 100%; }
.tab { border: 0; background: transparent; padding: 8px 15px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
.tab.is-active { background: var(--brand-deep); color: #fff; box-shadow: 0 3px 9px -3px rgba(10,110,76,.5); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px; border: 0; border-radius: var(--radius-sm); background: var(--brand-deep); color: #fff;
  font-weight: 750; font-size: 1rem; box-shadow: 0 6px 16px -7px rgba(10,110,76,.55);
  transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: #0a5f43; }
.btn:active { transform: scale(.99); }
.btn--ghost { background: transparent; color: var(--ink-soft); box-shadow: none; }
.btn--ghost:hover { background: var(--bg); color: var(--ink); }

/* Result panels (reuse the receipt look + .line rows from the tip tool) */
.result { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.result__head { font-family: var(--mono); text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 700; color: var(--ink-soft); text-align: center; margin: 0 0 14px; }
.headline { background: var(--brand-tint); border-radius: var(--radius-sm); padding: 18px 16px; text-align: center; }
.headline__value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 800; color: var(--brand-deep); line-height: 1.04; letter-spacing: -.02em; }
.headline__label { font-size: .85rem; color: var(--ink-soft); font-weight: 600; margin-top: 5px; }
.result .line:first-of-type { margin-top: 14px; }
/* empty-value placeholder, rendered once here instead of hardcoded in each tool */
.headline__value:empty::before,
.line__amount:empty::before { content: "\2014"; color: var(--line-strong); font-weight: 600; }

/* Dynamic rows (e.g. GPA courses) */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row-item { display: grid; grid-template-columns: 1fr 96px 40px; gap: 8px; align-items: center; }
.row-item .calc-input { padding: 11px 12px; font-size: 1rem; }
.icon-btn { width: 40px; height: 40px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 11px; color: var(--ink-soft); font-size: 1.25rem; display: grid; place-items: center; transition: border-color .15s ease, color .15s ease; }
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }

/* Checkboxes / ranges (password generator, options) */
.check { display: flex; align-items: center; gap: 11px; padding: 9px 0; cursor: pointer; font-weight: 600; }
.check input { width: 19px; height: 19px; accent-color: var(--brand-deep); }
input[type="range"] { width: 100%; accent-color: var(--brand-deep); }

/* Output box (copyable, e.g. password) */
.output { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 14px; font-family: var(--mono); font-size: 1.15rem; word-break: break-all; min-height: 56px; }
.output span { flex: 1; }

/* Small helpers */
.stack-gap > * + * { margin-top: 16px; }
.muted { color: var(--ink-soft); font-size: .85rem; }
.related { margin-top: 30px; }
.related h2 { font-size: 1.05rem; margin: 0 0 12px; letter-spacing: -.01em; }
.related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related a {
  display: inline-block; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--ink);
  transition: border-color .15s ease, color .15s ease;
}
.related a:hover { border-color: var(--line-strong); color: var(--brand-deep); }

/* ---------- SEO article + FAQ (below the calculator) ---------- */
.article { margin-top: 32px; }
.article h2 { font-size: 1.3rem; margin: 0 0 10px; letter-spacing: -.01em; }
.article h3 { font-size: 1rem; margin: 22px 0 6px; }
.article p { color: var(--ink); font-size: .98rem; line-height: 1.65; margin: 0 0 12px; }
.article ul { color: var(--ink); font-size: .98rem; line-height: 1.6; padding-left: 1.1rem; margin: 0 0 12px; }
.article li { margin: 5px 0; }
.article a { color: var(--brand-deep); font-weight: 600; }
.formula {
  font-family: var(--mono); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px; font-size: .92rem; color: var(--ink);
  overflow-x: auto; margin: 0 0 12px; line-height: 1.5;
}

.faq { margin-top: 30px; }
.faq h2 { font-size: 1.3rem; margin: 0 0 6px; letter-spacing: -.01em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 15px 0; font-weight: 700; font-size: 1rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-deep); font-size: 1.4rem; font-weight: 400; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); line-height: 1.65; font-size: .95rem; }

/* ---------- Inline SVG icons (replaces emoji) ---------- */
.ico-svg {
  width: 1.25rem; height: 1.25rem; display: inline-block; vertical-align: middle;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.cat__title .ico-svg { width: 22px; height: 22px; color: var(--brand-deep); }
.calc-card__ico { color: var(--brand-deep); }
.calc-card__ico .ico-svg { width: 22px; height: 22px; }
.calc-card[aria-disabled="true"] .calc-card__ico { color: var(--ink-soft); }
.icon-btn .ico-svg { width: 18px; height: 18px; }

/* ---------- Metric / Imperial unit toggling ---------- */
[data-units="metric"]   .only-imperial { display: none; }
[data-units="imperial"] .only-metric   { display: none; }

/* ============================================================
   Ads + cookie consent (injected by site.js)
   Slots reserve height so ads don't cause layout shift (good CWV).
   ============================================================ */
.ad-slot {
  margin: 20px auto; width: 100%; min-height: 100px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ad-slot--placeholder {
  min-height: 110px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink-soft); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: repeating-linear-gradient(45deg, transparent, transparent 11px, rgba(24,48,43,.025) 11px, rgba(24,48,43,.025) 22px);
}
.ad-slot .adsbygoogle { display: block; width: 100%; }

/* Sticky bottom anchor — mobile only */
.ad-anchor { display: none; }
@media (max-width: 768px) {
  .ad-anchor {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 4px;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px -8px rgba(24,48,43,.3);
  }
  .ad-anchor .ad-slot { margin: 0; min-height: 50px; }
  .ad-anchor .ad-slot--placeholder { min-height: 50px; }
  .ad-anchor__close {
    position: absolute; top: -25px; right: 10px; width: 26px; height: 25px;
    border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0;
    background: var(--surface); color: var(--ink-soft); font-size: 1.1rem; line-height: 1; cursor: pointer;
  }
  body.has-anchor { padding-bottom: 74px; }
}

/* Consent banner */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 14px 34px -12px rgba(0,0,0,.45);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  max-width: 760px; margin: 0 auto;
}
.consent p { margin: 0; font-size: .9rem; line-height: 1.5; flex: 1 1 240px; }
.consent a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.consent__btns { display: flex; gap: 8px; flex: 0 0 auto; }
.consent__btn {
  border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700; font-size: .9rem;
  font-family: inherit; background: var(--brand); color: #fff; cursor: pointer;
}
.consent__btn:hover { background: var(--brand-deep); }
.consent__btn--ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.consent__btn--ghost:hover { background: rgba(255,255,255,.1); }
@media (max-width: 768px) { body.has-anchor .consent { bottom: 86px; } }
