/* tipcalctool.com - cool-editorial design (talaria-site-designer)
   Generic-Utility archetype, "receipt with a coin" signature.
   Archivo heads, Inter body, JetBrains Mono figures.
   Token prefix: t. Light header, dark footer bookend, perforated-receipt-edge motif. */

:root {
  --t-ink:     #2a1d2a;
  --t-ink2:    #503f50;
  --t-muted:   #7f6c7e;
  --t-line:    #ebe0ea;
  --t-line2:   #ddccdc;
  --t-paper:   #f9f5f9;
  --t-card:    #ffffff;
  --t-pop:     #be4bbc;
  --t-pop-dk:  #8e338d;
  --t-pop-lt:  #f2def1;
  --t-good:    #2f8f63;
  --t-navdark: #241a24;
  --t-r:       10px;
  --t-maxw:    1080px;
  --t-head:    'Archivo', system-ui, sans-serif;
  --t-body:    'Inter', system-ui, sans-serif;
  --t-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ---- reset / base ---- */
*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  font-family: var(--t-body);
  color: var(--t-ink);
  background: var(--t-paper);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block }
a { color: var(--t-pop-dk); text-underline-offset: 2px }
a:hover { text-decoration: underline }
.wrap { max-width: var(--t-maxw); margin: 0 auto; padding: 0 22px }
h1, h2, h3, h4 {
  font-family: var(--t-head);
  font-weight: 700;
  line-height: 1.14;
  color: var(--t-ink);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem) }
h2 { font-size: clamp(1.25rem, 2.3vw, 1.55rem) }
h3 { font-size: 1.08rem }
p { margin: 0 0 1rem }
ul, ol { padding-left: 1.35em; margin: .5rem 0 1rem }
li { margin-bottom: .4em }
:focus-visible { outline: 2px solid var(--t-pop); outline-offset: 2px }
a, button, select, input { transition: background-color .14s ease, border-color .14s ease, color .14s ease, transform .1s ease }
button:active, .cta:active, .btn:active { transform: scale(.98) }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto } animation: none !important }

/* ---- header (light) ---- */
header {
  background: #fff;
  color: var(--t-ink);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--t-line);
}
header .wrap {
  max-width: var(--t-maxw);
  margin: 0 auto;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none }
.logo:hover { text-decoration: none }
.logomark {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--t-ink);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.logomark svg rect { fill: var(--t-ink) }
.logomark svg text { fill: #fff }
.logotype { display: flex; flex-direction: column; line-height: 1.05 }
.lt-name { font-family: var(--t-head); font-weight: 700; font-size: 1.12rem; color: var(--t-ink); letter-spacing: -.01em }
.lt-name .ac { color: var(--t-pop) }
.lt-tag {
  font-family: var(--t-mono); font-size: .56rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--t-muted); margin-top: 2px;
}
header nav { display: flex; align-items: center; gap: 2px }
header nav a {
  color: var(--t-ink2); text-decoration: none; margin-left: 10px; font-size: .88rem; font-weight: 600;
  padding: 7px 11px; border-radius: 7px;
}
header nav a:hover { color: var(--t-ink); background: var(--t-paper); text-decoration: none }

/* ---- hero (homepage: two-column split-screen, light paper bg) ---- */
.hero { background: var(--t-paper); border-bottom: 1px solid var(--t-line); overflow: hidden }
.hero-row {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 30px;
  align-items: stretch;
  padding: 40px 0 36px;
}
@media (max-width: 860px) { .hero-row { grid-template-columns: 1fr; gap: 0; padding: 26px 0 0 } }
.hero-left { display: flex; flex-direction: column; min-width: 0 }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--t-pop-lt); color: var(--t-pop-dk);
  padding: 4px 12px; border-radius: 20px;
  font-family: var(--t-mono); font-size: .68rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 14px; width: fit-content;
}
.hero-left h1 { margin-bottom: .32em; max-width: 14ch }
.hero-left > p.answer { font-size: 1.05rem; color: var(--t-ink2); max-width: 46ch; margin-bottom: 18px }
.hero-mascot { margin-top: auto; padding-top: 14px; max-width: 320px }
@media (max-width: 860px) { .hero-mascot { display: none } }
.hero-right { display: flex; flex-direction: column; min-width: 0; padding-bottom: 6px }
@media (max-width: 860px) { .hero-right { padding-bottom: 22px } }

/* byline - shown on inner pages, never on homepage */
.byline { display: flex; align-items: center; gap: 10px; color: var(--t-muted); font-size: .84rem; margin: 6px 0 18px }
.byline b { color: var(--t-ink); font-weight: 600 }
.byline .av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--t-line); flex: 0 0 auto }
.hero .byline, .hero-left .byline { display: none }

/* ---- main content ---- */
main { max-width: var(--t-maxw); margin: 0 auto; padding: 26px 22px 8px }
main h2 { font-size: clamp(1.18rem, 2.2vw, 1.5rem); margin: 1.8em 0 .5em; padding-bottom: .32em; border-bottom: 1px solid var(--t-line) }
main h2:first-child { margin-top: 0 }
main p { color: var(--t-ink2) }
main ul li, main ol li { color: var(--t-ink2) }
main strong { color: var(--t-ink) }
body:not(:has(.calc-layout)) .tool-hero .wrap { max-width: 760px }

/* ---- inner-page (prose/guide) hero + body alignment: constrain to 760 to match .prose ---- */
.page-hero { background: var(--t-paper); border-bottom: 1px solid var(--t-line); padding: 26px 0 18px }
.page-hero .wrap { max-width: 760px }
.page-hero h1 { margin-bottom: .28em }
main.prose { max-width: 760px }

/* ---- crumbs ---- */
.crumbs { font-size: .82rem; color: var(--t-muted); margin: 0 0 10px }
.crumbs a { color: var(--t-muted) }
.crumbs a:hover { color: var(--t-pop-dk) }

/* ---- calculator card (perforated-receipt-edge signature) ---- */
.calc {
  background: var(--t-card);
  border: 1px solid var(--t-line);
  border-radius: var(--t-r);
  padding: 26px 26px 22px;
  position: relative;
  box-shadow: 0 4px 24px rgba(42,29,42,.07);
  flex: 1;
}
/* the torn/perforated top edge, like tearing off a receipt roll */
.calc::before {
  content: "";
  position: absolute;
  top: -9px; left: 14px; right: 14px; height: 18px;
  background-image: radial-gradient(circle at 9px 9px, var(--t-paper) 8px, transparent 8.5px);
  background-size: 18px 18px;
  background-repeat: repeat-x;
  background-position: center top;
}
.calc h2 { font-family: var(--t-head); font-size: 1.2rem; font-weight: 700; border: none; margin: 6px 0 16px; padding: 0 }

/* form fields */
.fld { display: flex; flex-direction: column; gap: 5px; margin: 13px 0; font-weight: 600; font-size: .88rem; color: var(--t-ink2) }
.fld input, .fld select, .qty input {
  padding: 11px 13px; border: 1px solid var(--t-line2); border-radius: 7px;
  font-size: 1rem; font-family: var(--t-body); background: var(--t-paper); color: var(--t-ink);
}
.fld input:focus, .fld select:focus, .qty input:focus {
  outline: none; border-color: var(--t-pop); background: #fff; box-shadow: 0 0 0 3px rgba(190,75,188,.14);
}
.hint { display: block; color: var(--t-muted); font-weight: 400; font-size: .77rem; margin-top: 3px }
.qty { display: flex; align-items: center; gap: 12px; margin: 13px 0; font-weight: 600; font-size: .88rem; color: var(--t-ink2) }
.qty input { width: 84px }
.tip-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px }
.tip-quick button {
  border: 1px solid var(--t-line2); background: #fff; color: var(--t-ink2);
  padding: 8px 14px; border-radius: 7px; font-family: var(--t-mono); font-size: .86rem;
  font-weight: 500; cursor: pointer;
}
.tip-quick button:hover, .tip-quick button.on { border-color: var(--t-pop); color: var(--t-pop-dk); background: var(--t-pop-lt) }

/* result display - mono figures, perforated bottom edge like a torn stub */
.result {
  margin-top: 18px; padding: 20px 22px 24px;
  background: var(--t-navdark); color: #fff;
  border-radius: var(--t-r);
  position: relative;
  border-top: 3px solid var(--t-pop);
}
.result::after {
  content: "";
  position: absolute; bottom: -9px; left: 14px; right: 14px; height: 18px;
  background-image: radial-gradient(circle at 9px 9px, var(--t-paper) 8px, transparent 8.5px);
  background-size: 18px 18px; background-repeat: repeat-x; background-position: center top;
}
.result .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.12) }
.result .row:last-child { border-bottom: 0 }
.result .row .lbl { color: rgba(255,255,255,.68); font-weight: 600; font-size: .86rem }
.result .row .val { font-family: var(--t-mono); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 1.15rem; color: #fff }
.result .row.big .val { font-size: 1.9rem; color: var(--t-pop-lt) }
.result.empty { background: var(--t-paper); color: var(--t-muted); border-top-color: var(--t-line) }
.result.empty .row .lbl, .result.empty .row .val { color: var(--t-muted) }

/* authority strip */
.authority {
  display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px;
  font-size: .78rem; color: var(--t-muted); font-family: var(--t-mono);
}
.authority span { display: inline-flex; align-items: center; gap: 6px }
.authority b { color: var(--t-ink2); font-weight: 600 }

/* lead / CTA block */
.lead-box { margin-top: 16px; background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--t-r); padding: 16px 18px }
.cta { display: inline-block; margin-top: 8px; background: var(--t-pop); color: #fff; padding: 11px 20px; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: .9rem }
.cta:hover { background: var(--t-pop-dk); color: #fff; text-decoration: none }
.cta.ghost { background: #fff; color: var(--t-pop-dk); border: 1px solid var(--t-pop) }
.cta.ghost:hover { background: var(--t-pop-lt) }

/* ---- data tables ---- */
table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--t-r); overflow: hidden; font-size: .93rem }
th { font-family: var(--t-body); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--t-muted); text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--t-line); background: var(--t-paper) }
td { text-align: left; border-bottom: 1px solid var(--t-line); padding: 10px 13px; color: var(--t-ink2) }
tr:last-child td { border-bottom: 0 }
tr td:first-child { font-weight: 600; color: var(--t-ink) }
td:nth-child(n+2) { font-family: var(--t-mono); font-variant-numeric: tabular-nums; white-space: nowrap }

/* ---- FAQ ---- */
.faq { background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--t-r); padding: 2px 18px; margin: 8px 0 }
.faq summary, details.faq summary {
  font-family: var(--t-head); font-weight: 600; font-size: 1rem; cursor: pointer; padding: 14px 0;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--t-ink);
}
.faq summary::-webkit-details-marker { display: none }
.faq summary::after { content: "+"; font-family: var(--t-mono); font-size: 1.25rem; color: var(--t-pop); font-weight: 400; flex: 0 0 auto }
.faq details[open] summary::after { content: "\2212" }
.faq details p { color: var(--t-ink2); margin: 0 0 16px }
section.faq, div.faq { padding: 4px 18px }
section.faq details, div.faq details { border-top: 1px solid var(--t-line); padding: 4px 0 }
section.faq details:first-of-type, div.faq details:first-of-type { border-top: 0 }

/* ---- guide cards ---- */
.guides { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 10px 0 20px }
.gcard { display: block; border: 1px solid var(--t-line); border-radius: var(--t-r); padding: 16px 18px; background: var(--t-card); text-decoration: none; color: var(--t-ink); transition: border-color .14s, transform .12s }
.gcard:hover { border-color: var(--t-pop); transform: translateY(-2px); text-decoration: none }
.gcard strong { display: block; color: var(--t-pop-dk); font-family: var(--t-head); font-size: 1rem; font-weight: 700; margin-bottom: 5px; line-height: 1.25 }
.gcard small { color: var(--t-muted); font-size: .8rem }

/* ---- spec label ---- */
.spec-label { font-family: var(--t-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--t-pop-dk); margin: 0 0 6px; display: block }

/* ---- ad placeholder ---- */
.ad { margin: 24px 0; min-height: 90px; background: none; border: 1px solid var(--t-line); border-radius: var(--t-r); display: flex; align-items: center; justify-content: center; color: var(--t-muted); font-family: var(--t-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase }

/* ---- disclaimer ---- */
.disc { font-size: .8rem; color: var(--t-muted); background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--t-r); padding: 13px 16px; margin-top: 18px; line-height: 1.6 }

/* ---- form card (contact) ---- */
.form-card { background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--t-r); padding: 24px; max-width: 560px }
.field { display: flex; flex-direction: column; gap: 5px; margin: 12px 0; font-weight: 600; font-size: .88rem; color: var(--t-ink2) }
.field input, .field textarea { padding: 11px 13px; border: 1px solid var(--t-line2); border-radius: 7px; font-size: 1rem; font-family: var(--t-body); background: var(--t-paper); color: var(--t-ink) }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--t-pop); background: #fff; box-shadow: 0 0 0 3px rgba(190,75,188,.14) }

/* ---- dataset page ---- */
.dataset-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--t-mono); font-size: .8rem; color: var(--t-muted); margin: 4px 0 18px }
.dataset-meta b { color: var(--t-ink2) }
.cite-box { background: var(--t-card); border: 1px solid var(--t-line); border-left: 3px solid var(--t-pop); border-radius: 0 var(--t-r) var(--t-r) 0; padding: 14px 18px; font-size: .86rem; color: var(--t-ink2); margin: 18px 0 }
.cite-box code { font-family: var(--t-mono); font-size: .82rem; background: var(--t-paper); padding: 2px 6px; border-radius: 4px }
.csv-dl { display: inline-flex; align-items: center; gap: 8px; background: var(--t-ink); color: #fff; padding: 10px 18px; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: .88rem; font-family: var(--t-mono) }
.csv-dl:hover { background: var(--t-pop-dk); color: #fff; text-decoration: none }

/* ---- footer (dark bookend, EVEN GRID, never flex) ---- */
footer { background: var(--t-navdark); color: rgba(255,255,255,.62); margin-top: 40px; border-top: 3px solid var(--t-pop) }
footer .wrap { max-width: var(--t-maxw); margin: 0 auto; padding: 40px 22px 24px; font-size: .87rem }
footer a { color: rgba(255,255,255,.72); text-decoration: none }
footer a:hover { color: var(--t-pop-lt); text-decoration: none }
footer .brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px }
footer .brand svg rect { fill: #fff }
footer .brand .name { color: #fff; font-family: var(--t-head); font-weight: 700; font-size: 1.05rem }
footer .cols { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 32px; align-items: start; margin-bottom: 22px }
footer .cols a { display: block; margin: 0 0 9px }
@media (max-width: 760px) { footer .cols { grid-template-columns: 1fr 1fr } }
footer .cols h4 { font-family: var(--t-head); font-size: .78rem; color: #fff; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em }
footer p { color: rgba(255,255,255,.55); margin: 6px 0 0 }
footer small { color: rgba(255,255,255,.42) }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; margin-top: 6px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .78rem; color: rgba(255,255,255,.42) }

/* related mesh in footer */
.related-mesh { margin-top: 14px; font-size: .8rem; line-height: 1.8; color: rgba(255,255,255,.42); border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px }
.related-mesh a { color: rgba(255,255,255,.55); text-decoration: underline; text-underline-offset: 2px; margin-right: 0 }
.related-mesh a:hover { color: var(--t-pop-lt) }

/* ---- cookie consent banner ---- */
#cc-banner { background: var(--t-navdark) !important; border-top: 1px solid rgba(255,255,255,.12) }
.cc-ok, #cc-acc { background: var(--t-pop) !important; color: #fff !important; border: 0 !important; border-radius: 6px !important; padding: 8px 16px !important; cursor: pointer !important; font-weight: 600 !important }
.cc-ok:hover, #cc-acc:hover { background: var(--t-pop-dk) !important }
.cc-no, #cc-rej { background: transparent !important; color: rgba(255,255,255,.8) !important; border: 1px solid rgba(255,255,255,.2) !important; border-radius: 6px !important }

/* ---- number highlights (mono) ---- */
.num, .mono { font-family: var(--t-mono); font-variant-numeric: tabular-nums }

/* ---- voice band (one blunt display sentence, full-bleed accent) ---- */
.voice-band { background: var(--t-ink); color: #fff; padding: 30px 0; margin: 34px 0 0 }
.voice-band .wrap { max-width: 780px }
.voice-band p { font-family: var(--t-head); font-size: clamp(1.15rem,2.6vw,1.55rem); font-weight: 700; margin: 0; color: #fff; letter-spacing: -.01em }
.voice-band .accent { color: var(--t-pop-lt) }

/* ---- mobile ---- */
@media (max-width: 640px) {
  header .wrap { padding: 12px 16px }
  header nav a { margin-left: 6px; font-size: .8rem; padding: 6px 8px }
  .lt-tag { display: none }
  main { padding: 20px 16px 4px }
  .calc { padding: 20px 18px 18px }
  .result .row.big .val { font-size: 1.5rem }
  footer .wrap { padding: 28px 16px 18px }
  footer .cols { gap: 20px }
}
