/* Peso Pinchers — mobile-first, light/dark via tokens. */

:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --surface-2: #f4eee3;
  --ink: #1d2a24;
  --muted: #5b6962;
  --line: #e4dccd;
  --brand: #0f6b4f;
  --brand-strong: #0b5640;
  --on-brand: #ffffff;
  --accent: #f2a007;
  --accent-soft: #fff1d6;
  --warn-bg: #fff4e2;
  --warn-line: #d98b1c;
  --warn-ink: #6b3d00;
  --bank: #1d5fa8;
  --bank-soft: #e5effa;
  --sofipo: #a14b00;
  --sofipo-soft: #fdebd9;
  --good: #1f7a4d;
  --shadow: 0 1px 2px rgb(29 42 36 / 6%), 0 6px 24px rgb(29 42 36 / 6%);
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111714;
    --surface: #18201c;
    --surface-2: #1f2924;
    --ink: #e9eee9;
    --muted: #a2b0a8;
    --line: #2c3832;
    --brand: #3fb488;
    --brand-strong: #5cc79c;
    --on-brand: #0b1a13;
    --accent: #f5b544;
    --accent-soft: #33280f;
    --warn-bg: #2b2010;
    --warn-line: #c98a2b;
    --warn-ink: #f6d39b;
    --bank: #7fb2ec;
    --bank-soft: #18283a;
    --sofipo: #f0a466;
    --sofipo-soft: #33210f;
    --good: #5cc79c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111714; --surface: #18201c; --surface-2: #1f2924; --ink: #e9eee9; --muted: #a2b0a8;
  --line: #2c3832; --brand: #3fb488; --brand-strong: #5cc79c; --on-brand: #0b1a13; --accent: #f5b544;
  --accent-soft: #33280f; --warn-bg: #2b2010; --warn-line: #c98a2b; --warn-ink: #f6d39b; --bank: #7fb2ec;
  --bank-soft: #18283a; --sofipo: #f0a466; --sofipo-soft: #33210f; --good: #5cc79c;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 24px rgb(0 0 0 / 25%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--font); overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
h3 { font-size: 1.25rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.logo svg { width: 30px; height: 30px; }
.coin { fill: var(--accent); }
.coin-ring { fill: none; stroke: color-mix(in srgb, var(--ink) 25%, transparent); stroke-width: 1.2; stroke-dasharray: 2 2.2; }
.coin-sign { font: 700 15px var(--display); fill: #1d2a24; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--brand); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }
@media (max-width: 400px) { .logo { font-size: 1rem; gap: 8px; } .nav .btn-small { padding: 6px 11px; font-size: .82rem; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: var(--on-brand); text-decoration: none; font-weight: 600;
  padding: 12px 20px; border-radius: 999px; border: 2px solid var(--brand); cursor: pointer;
  transition: background .15s, transform .15s; font-size: 1rem;
}
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.btn-small { padding: 7px 14px; font-size: .9rem; }
.btn-block { width: 100%; }

/* hero */
.hero { padding: 48px 0 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--brand); margin-bottom: 14px; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 32px; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.trust li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: .95rem; color: var(--muted); }
.trust strong { color: var(--ink); }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(3, 1fr); } .hero { padding: 72px 0 56px; } }

/* sections */
section { padding: 40px 0; }
.section-head { margin-bottom: 20px; }
.section-head p { color: var(--muted); max-width: 760px; }
.calc-section { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* quick estimate */
.quick { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .quick { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .quick-result { position: sticky; top: 76px; } }
.quick-form, fieldset.panel-box {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 18px; margin: 0 0 16px; min-width: 0;
}
.quick-form { margin: 0; }
fieldset.panel-box legend { font-family: var(--display); font-weight: 700; font-size: 1.1rem; padding: 0 6px; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > label, .field-label { font-weight: 600; font-size: .95rem; }
.field small, .check small, .stepper-field small { color: var(--muted); font-size: .84rem; }
.money { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 0 12px; }
.money:focus-within, select:focus, .spend-item input:focus, .stepper:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.money > span { color: var(--muted); font-size: .9rem; }
.money input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 600 1.1rem var(--font); padding: 11px 8px; outline: none; }
.money select { width: auto; border: 0; background: transparent; padding: 11px 2px; font-weight: 600; color: var(--muted); outline: none; }
select {
  width: 100%; font: 500 1rem var(--font); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
}
.steppers { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.stepper-field { display: grid; gap: 6px; font-size: .92rem; align-content: start; }
.stepper { display: inline-flex; align-items: center; justify-self: start; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.stepper button { width: 42px; height: 42px; border: 0; background: transparent; color: var(--brand); font: 600 1.3rem var(--font); cursor: pointer; }
.stepper button:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.stepper input { width: 40px; text-align: center; border: 0; background: transparent; color: var(--ink); font: 600 1.05rem var(--font); outline: none; padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.check small { display: block; margin-top: 2px; }
.household-note { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin: 4px 0 0; }
.small-note { font-size: .86rem; color: var(--muted); margin: 0 0 12px; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.seg label { flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); cursor: pointer; font-weight: 500; font-size: .95rem;
}
.seg input:checked + span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.spend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.spend-item { display: grid; gap: 4px; font-size: .86rem; color: var(--muted); align-content: end; }
.spend-item input {
  width: 100%; font: 600 1rem var(--font); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; outline: none;
}
@media (max-width: 360px) { .spend-grid { grid-template-columns: 1fr; } }

.toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin: 4px 0 6px; font-size: .95rem; }
.toggle input { position: absolute; opacity: 0; }
.switch { flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; margin-top: 1px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); }
.toggle input:checked + .switch { background: var(--brand); }
.toggle input:checked + .switch::after { transform: translateX(18px); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--brand); outline-offset: 2px; }

/* quick result */
.card.qr { background: var(--brand); color: var(--on-brand); border: 0; }
.qr .qr-label { font-size: .92rem; opacity: .9; margin: 0 0 4px; }
.qr-big { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 8vw, 3.3rem); line-height: 1.05; margin: 0 0 8px; }
.qr-big small { display: block; font-family: var(--font); font-size: 1rem; font-weight: 500; opacity: .9; margin-top: 6px; letter-spacing: 0; }
.qr-second { font-size: 1.12rem; font-weight: 600; margin: 0 0 4px; }
.qr-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 6px 0 4px; }
.qr-mid { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 5.5vw, 2.2rem); line-height: 1.1; margin: 0 0 4px; }
.qr-cap { font-size: .9rem; opacity: .9; margin: 0; }
.qr-year { font-size: .95rem; margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--on-brand) 25%, transparent); opacity: .95; }
.qr-assume { font-size: .84rem; opacity: .85; margin: 0 0 16px; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qr .btn { background: var(--on-brand); color: var(--brand); border-color: var(--on-brand); }
.qr .btn:hover { background: color-mix(in srgb, var(--on-brand) 88%, transparent); }
.qr .btn-ghost { background: transparent; color: var(--on-brand); }
.qr .btn-ghost:hover { background: color-mix(in srgb, var(--on-brand) 14%, transparent); color: var(--on-brand); }
.quick-result .empty + .btn { margin-top: 12px; }

/* details */
.household-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 8px 0 18px; }
.tabs [role="tab"] {
  flex: 1 1 0; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  padding: 10px 8px; font: 600 1rem var(--font); color: var(--muted); cursor: pointer; text-align: center;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 6px; }
.tab-num { display: block; font-weight: 500; font-size: .85rem; color: var(--brand); min-height: 1.2em; }
.panel-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 980px) { .panel-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.panel-results { display: grid; gap: 16px; }
.reco { font-size: .92rem; background: var(--surface-2); border-left: 4px solid var(--brand); border-radius: 8px; padding: 10px 12px; }
.humor { font-size: .9rem; color: var(--muted); margin: 0; }
.cta-strip {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
  background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); padding: 18px 20px; margin-top: 28px;
}
.cta-strip h3 { margin: 0 0 4px; }
.cta-strip p { margin: 0; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }

/* warning */
.warning {
  border: 2px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink);
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; font-size: .92rem;
}
.warning > summary { margin: 0; }
.warning ul { margin: 6px 0 8px; padding-left: 18px; }
.warning li { margin-bottom: 4px; }
.warning p { margin: 0 0 6px; }
.warning a { color: inherit; }
.warning-soft { border-width: 1px; }

/* results */
.results-col { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 1.15rem; }
.sum-label { font-size: .9rem; color: var(--muted); margin: 0; }
.sum-big { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1.1; margin: 2px 0 4px; color: var(--brand); }
.sum-big small { font-family: var(--font); font-size: .95rem; font-weight: 500; color: var(--muted); }
.sum-sub { margin: 0; color: var(--muted); font-size: .92rem; }

.rows { display: grid; gap: 0; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .main { min-width: 0; }
.row .name { font-weight: 600; }
.row .meta { color: var(--muted); font-size: .84rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.row .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .num .amt { font-weight: 600; }
.row .num .per { color: var(--muted); font-size: .84rem; }
.row.total { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px; }
.badge-bank { background: var(--bank-soft); color: var(--bank); }
.badge-sofipo { background: var(--sofipo-soft); color: var(--sofipo); }

.list { margin: 0; padding-left: 20px; }
.list li { margin-bottom: 8px; }
.tax-card .small-note { margin: 8px 0 0; }
.decision { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.decision:last-child { border-bottom: 0; }
.decision .verdict { font-weight: 600; text-align: right; }
.yes { color: var(--good); }
.no { color: var(--muted); }

.note { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; font-size: .92rem; margin: 0; }
.card .note { margin-top: 10px; }
.empty { text-align: center; color: var(--muted); }

/* directory */
.legend-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.legend { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: baseline; font-size: .9rem; color: var(--muted); }
.legend-row { display: contents; }
.legend-row > :first-child { justify-self: start; white-space: nowrap; }
.dir-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .dir-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .dir-grid { grid-template-columns: 1fr 1fr 1fr; } }
.dir-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.dir-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.dir-card h3 { margin: 0; font-size: 1.2rem; }
.dir-card .best { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.dir-card .head { font-weight: 600; margin-bottom: 12px; }
.facet { margin-bottom: 12px; }
.facet-label { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.facet-note { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; }
.pill { border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); }
.pill.yes { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill.maybe { color: var(--warn-ink); border-color: var(--warn-line); background: var(--warn-bg); }
.pill.no { color: var(--muted); text-decoration: line-through; }
.mini { border-top: 1px solid var(--line); padding: 8px 0; }
.mini > summary { display: flex; align-items: baseline; gap: 10px; }
.mini > summary .facet-label { margin: 0; flex: none; }
.mini-gist { font-size: .88rem; flex: 1; min-width: 0; }
.mini > summary::after { content: "+"; font-weight: 600; color: var(--brand); flex: none; }
.mini[open] > summary::after { content: "−"; }
.mini[open] > summary { margin-bottom: 8px; }
.mini .facet-note { margin: 0 0 6px; }
.dir-card ul { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--muted); }
.dir-card footer { padding-top: 10px; }
.filters { display: grid; gap: 10px; margin-bottom: 18px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--muted); margin-right: 4px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: .88rem; font-weight: 500; cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.chip input:checked + span::before { content: "✓ "; }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.more-filters > summary { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; font-weight: 600; color: var(--brand); }
.more-filters > summary::after { content: "▾"; font-size: .8rem; }
.more-filters[open] > summary::after { content: "▴"; }
.more-filters[open] > summary { margin-bottom: 10px; }
.more-filters .filter-row + .filter-row { margin-top: 10px; }
.filter-status { font-size: .86rem; color: var(--muted); margin: 0; }
.no-match { text-align: center; color: var(--muted); padding: 24px 0; }
.dir-card li { margin-bottom: 4px; }
.dir-card footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.app-note { margin-top: 16px; }

/* plan */
.plan-section { background: var(--surface-2); border-top: 1px solid var(--line); }
.plan-grid { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .plan-grid { grid-template-columns: 3fr 2fr; } }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 12px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 4px var(--accent-soft); }
.price-card { background: var(--surface); border: 2px solid var(--brand); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.price-label { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.price { font-family: var(--display); font-weight: 700; font-size: 3.2rem; line-height: 1; margin-bottom: 12px; }
.price > span { font-size: 1.8rem; vertical-align: top; }
.price small { font-family: var(--font); font-size: 1rem; font-weight: 500; color: var(--muted); }
.cta-buttons { display: grid; gap: 10px; margin: 16px 0; }
.contact-line { font-size: .88rem; color: var(--muted); text-align: center; margin: 0; }
.fine { font-size: .84rem; color: var(--muted); margin: 0; }

/* about */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* progressive disclosure: a title and one-line gist, expanding to the full detail */
summary { cursor: pointer; }
.disclose > summary, .g-item > summary, .mini > summary, .more-filters > summary { list-style: none; }
.disclose > summary::-webkit-details-marker, .g-item > summary::-webkit-details-marker,
.mini > summary::-webkit-details-marker, .more-filters > summary::-webkit-details-marker { display: none; }
.disclose > summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.disc-head { display: grid; gap: 4px; min-width: 0; }
.disc-head h3, .card .disc-head h3 { margin: 0; }
.disc-title { font-weight: 700; font-size: 1.02rem; }
.disc-gist { color: var(--muted); font-size: .92rem; }
.warning .disc-gist { color: inherit; opacity: .85; }
.disclose[open] > summary .disc-gist { display: none; }
.disclose[open] > summary { margin-bottom: 12px; }
.disc-icon, .chev { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid currentColor; opacity: .55; position: relative; margin-top: 1px; }
.disc-icon::before, .chev::before {
  content: ""; position: absolute; left: 50%; top: 46%; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translate(-50%, -50%) rotate(45deg);
}
.disclose[open] > summary .disc-icon::before { transform: translate(-50%, -20%) rotate(-135deg); }
.disclose > summary:hover .disc-icon { opacity: .9; }
summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

/* glossary, fine print */
.gloss-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 1.6em; }
.gloss-head h3 { margin: 0 0 .5em; }
.glossary { margin: 0 0 24px; border-top: 1px solid var(--line); }
.g-item { border-bottom: 1px solid var(--line); scroll-margin-top: 80px; border-radius: 6px; }
.g-item > summary { display: flex; align-items: baseline; gap: 8px; padding: 10px 8px; }
.g-item > summary::after { content: "+"; margin-left: auto; font-weight: 600; color: var(--brand); }
.g-item[open] > summary::after { content: "−"; }
.g-term { font-weight: 700; flex: none; }
.g-long { font-style: italic; color: var(--muted); font-size: .9rem; min-width: 0; }
.g-item p { margin: 0 8px 12px; color: var(--muted); }
.g-item:target { background: var(--accent-soft); }
.disclaimer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: .95rem; margin-top: 8px; }
.disclaimer p:last-child { margin: 0; }
#disclaimer, #glossary, #sofipo-warning { scroll-margin-top: 80px; }

/* tap-to-explain terms */
.term {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: help;
  text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.term[data-term]:hover, .term[aria-expanded="true"] { text-decoration-style: solid; }
.term-demo { cursor: default; }
.term-pop {
  position: absolute; z-index: 50; width: min(320px, calc(100vw - 24px));
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 25%); font-size: .9rem; line-height: 1.45;
}
.term-pop p { margin: 0 0 8px; }
.term-pop .tp-title { font-weight: 700; margin: 0; }
.term-pop .tp-long { font-style: italic; opacity: .75; font-size: .84rem; margin-bottom: 6px; }
.term-pop .tp-more { color: var(--accent); font-weight: 600; font-size: .85rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 96px; font-size: .88rem; color: var(--muted); }
.site-footer strong { color: var(--ink); }

/* sticky mobile total */
.sticky-total {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--ink); color: var(--bg); text-decoration: none; border-radius: 999px;
  padding: 12px 18px; box-shadow: 0 8px 24px rgb(0 0 0 / 25%); font-weight: 600; font-size: .88rem;
}
.sticky-total[hidden] { display: none; }
.sticky-total .go { font-weight: 500; opacity: .8; font-size: .9rem; }
@media (min-width: 980px) { .sticky-total { display: none !important; } }

.noscript { background: var(--warn-bg); color: var(--warn-ink); padding: 12px 16px; text-align: center; }

[hidden] { display: none !important; }
