/* Duesy marketing site — shared styles (getduesy.com).
   Every page in public/landing links this file. Light theme by default; the
   dark tokens follow the visitor's system setting (or <html data-theme>), as
   the site always has. The hero/dark bands use fixed colours in both themes. */

:root {
  --page: #F7FAF8;
  --surface: #FFFFFF;
  --soft: #F2F6F3;
  --line: #DCE7E0;
  --line-2: #E3EBE6;
  --track: #EEF3F0;
  --seg: #E3EBE6;
  --ink: #0F2219;
  --body: #22352B;
  --ink-2: #34463C;
  --muted: #4E6458;
  --faint: #8AA096;
  --brand: #0F7D53;
  --brand-hover: #0B6B47;
  --on-brand: #FFFFFF;
  --brand-ink: #0B6B47;
  --mint: #3DBE85;
  --mint-ink: #062A1B;
  --tile: #E6F3EC;
  --gold: #F2A33A;
  --gold-ink: #3B2200;
  --gold-tile: #FFF4E3;
  --gold-line: #F5DDB5;
  --gold-text: #5B3D0A;
  --gold-soft-text: #6B4A12;
  --dark: #0A2A1D;
  --on-dark: #EAF6EF;
  --on-dark-2: #B9D0C3;
  --on-dark-3: #9DB7A9;
  --hero-accent: #7EE2B3;
  --shadow-lg: 0 24px 60px rgba(16,35,26,.12);
  --shadow-sm: 0 1px 4px rgba(16,35,26,.12);
  --display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1240px;
  --gut: 32px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0C1511; --surface: #13201A; --soft: #172620; --line: #26392F; --line-2: #22342B;
    --track: #1F3028; --seg: #1B2A23; --ink: #E8F2EC; --body: #CFDDD5; --ink-2: #BCCDC3;
    --muted: #93AA9E; --faint: #6E8579; --brand: #1F9466; --brand-hover: #23A673; --brand-ink: #7EE2B3;
    --tile: #1A3528; --gold-tile: #2A2215; --gold-line: #4A3A1E; --gold-text: #F3D7A6; --gold-soft-text: #E5C590;
    --shadow-lg: 0 24px 60px rgba(0,0,0,.45); --shadow-sm: 0 1px 4px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0C1511; --surface: #13201A; --soft: #172620; --line: #26392F; --line-2: #22342B;
  --track: #1F3028; --seg: #1B2A23; --ink: #E8F2EC; --body: #CFDDD5; --ink-2: #BCCDC3;
  --muted: #93AA9E; --faint: #6E8579; --brand: #1F9466; --brand-hover: #23A673; --brand-ink: #7EE2B3;
  --tile: #1A3528; --gold-tile: #2A2215; --gold-line: #4A3A1E; --gold-text: #F3D7A6; --gold-soft-text: #E5C590;
  --shadow-lg: 0 24px 60px rgba(0,0,0,.45); --shadow-sm: 0 1px 4px rgba(0,0,0,.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body.bg-white { background: var(--surface); }
img, svg { max-width: 100%; }
a { color: var(--brand-ink); }
a:hover { color: var(--brand-hover); }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2.5px solid var(--mint); outline-offset: 2px; }
[hidden] { display: none !important; }
.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; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.display { font-family: var(--display); font-weight: 800; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--brand-ink); }
.h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.02; letter-spacing: -1.4px; color: var(--ink); }
.lead { margin: 0; font-size: 17.5px; line-height: 1.6; color: var(--muted); }
.badge-new { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); font-size: 11.5px; font-weight: 800; letter-spacing: .2px; line-height: 1.4; }
.badge-new--gold { background: var(--gold); color: var(--gold-ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 999px; border: 0; font-size: 15px; font-weight: 700; text-decoration: none; transition: background .15s ease, transform .1s ease, border-color .15s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--lg { height: 54px; padding: 0 26px; font-size: 16px; }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn--mint { background: var(--mint); color: var(--mint-ink); }
.btn--mint:hover { background: #4fd096; color: var(--mint-ink); }
.btn--ghost-dark { border: 1px solid rgba(255,255,255,.22); color: #fff; font-weight: 600; }
.btn--ghost-dark:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn--outline { border: 1.5px solid var(--brand); color: var(--brand-ink); background: transparent; }
.btn--outline:hover { background: var(--tile); color: var(--brand-ink); }
.btn--block { width: 100%; }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 30; }
.site-header .bar { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gut); display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -.3px; flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; overflow: hidden; display: block; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.nav-main { display: flex; gap: 24px; margin-left: 24px; font-size: 14.5px; }
.nav-main a { color: var(--ink-2); text-decoration: none; }
.nav-main a:hover { color: var(--brand-ink); }
.nav-main a[aria-current="page"] { color: var(--brand-ink); font-weight: 700; }
.bar-spacer { flex: 1; }
.nav-login { color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 10px 14px; }
.nav-login:hover { color: var(--brand-ink); }
.nav-cta { background: var(--brand); color: #fff; text-decoration: none; font-size: 14.5px; font-weight: 700; padding: 11px 20px; border-radius: 999px; white-space: nowrap; }
.nav-cta:hover { background: var(--brand-hover); color: #fff; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }
.site-header--light { background: var(--surface); border-bottom: 1px solid var(--line-2); }
.site-header--plain { border-bottom: 1px solid var(--line-2); background: var(--surface); }

/* dark (home hero) variant */
.site-header--dark .brand, .site-header--dark .brand:hover { color: #fff; font-size: 22px; }
.site-header--dark .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.site-header--dark .bar { padding-top: 22px; padding-bottom: 22px; }
.site-header--dark .nav-main { gap: 26px; margin-left: 28px; }
.site-header--dark .nav-main a { color: #C9DDD2; }
.site-header--dark .nav-main a:hover { color: #fff; }
.site-header--dark .nav-login { color: #EAF6EF; }
.site-header--dark .nav-login:hover { color: #fff; }
.site-header--dark .nav-cta { background: var(--mint); color: var(--mint-ink); }
.site-header--dark .nav-cta:hover { background: #4fd096; color: var(--mint-ink); }
.site-header--dark .menu-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }

/* currency switch */
.cur-switch { display: flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.cur-switch button { height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: #C9DDD2; font-size: 12.5px; font-weight: 700; transition: background .2s, color .2s; }
.cur-switch button:hover { color: #fff; }
.cur-switch button[aria-pressed="true"] { background: var(--mint); color: var(--mint-ink); }

/* mobile menu panel */
.menu-panel { display: none; }
@media (max-width: 1000px) {
  .site-header .nav-main, .site-header .bar > .cur-switch, .site-header .nav-login { display: none; }
  .menu-btn { display: grid; }
  .menu-panel { position: absolute; left: 12px; right: 12px; top: calc(100% - 6px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 10px; flex-direction: column; gap: 2px; }
  .site-header.is-open .menu-panel { display: flex; }
  .menu-panel a { padding: 12px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
  .menu-panel a:hover { background: var(--soft); }
  .menu-panel .menu-cur { padding: 10px 14px 4px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
  .menu-panel .cur-switch { background: var(--soft); border-color: var(--line); align-self: flex-start; }
  .menu-panel .cur-switch button { color: var(--muted); }
}
@media (max-width: 560px) {
  :root { --gut: 16px; }
  .site-footer .cols { gap: 32px 20px; }
  .site-footer .col { flex-basis: 140px; }
  .site-header .bar { gap: 10px; padding-top: 14px; padding-bottom: 14px; }
  .nav-cta { padding: 10px 16px; font-size: 14px; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: var(--on-dark-2); }
.site-footer .cols { max-width: var(--wrap); margin: 0 auto; padding: 64px var(--gut) 36px; display: flex; flex-wrap: wrap; gap: 40px 48px; }
.site-footer .about { flex: 1 1 260px; display: flex; flex-direction: column; gap: 14px; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; font-size: 22px; }
.site-footer .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.site-footer .tag { font-size: 14.5px; line-height: 1.6; max-width: 280px; }
.site-footer .col { flex: 1 1 160px; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.site-footer .col h2 { margin: 0; color: #fff; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; font-weight: 700; font-family: var(--sans); }
.site-footer .col a { color: var(--on-dark-2); text-decoration: none; }
.site-footer .col a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal { max-width: var(--wrap); margin: 0 auto; padding: 20px var(--gut) 32px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }

/* ---------- segmented controls / pills ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px; border-radius: 14px; background: var(--track); }
.seg button { height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 700; transition: background .2s, color .2s, box-shadow .2s; padding: 0 8px; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-sm); }
.seg--pill { border-radius: 999px; background: var(--seg); display: inline-grid; }
.seg--pill button { height: 40px; border-radius: 999px; padding: 0 20px; font-size: 14px; }

.switch { width: 48px; height: 28px; border-radius: 999px; background: #C9D6CE; position: relative; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
[aria-pressed="true"] > .switch, [aria-checked="true"] > .switch { background: var(--brand); }
[aria-pressed="true"] > .switch::after, [aria-checked="true"] > .switch::after { left: 23px; }

.bar-track { height: 10px; border-radius: 10px; background: var(--track); overflow: hidden; display: block; }
.bar-fill { display: block; height: 100%; border-radius: 10px; background: var(--brand); transition: width .45s cubic-bezier(.2,.8,.2,1); }

.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--brand-ink); font-size: 22px; line-height: 1; display: grid; place-items: center; flex: none; }
.round-btn--plus { border: 0; background: var(--tile); }
.round-btn:hover { border-color: var(--brand); }

/* ---------- article pages (guides, tools, legal) ---------- */
.title-band { background: var(--soft); }
.title-band .inner { padding-top: 48px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.title-band .copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.crumbs { font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(38px, 5.2vw, 60px); line-height: 1; letter-spacing: -1.8px; color: var(--ink); }
.page-lede { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 640px; }
.byline { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); }
.byline .av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.cta-row .btn { white-space: normal; text-align: center; height: auto; min-height: 54px; padding-top: 10px; padding-bottom: 10px; max-width: 100%; }

.doc { padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.toc { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; position: sticky; top: 24px; }
.toc-h { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding: 0 12px 6px; font-weight: 700; }
.toc a { text-align: left; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; display: flex; gap: 10px; }
.toc a:hover { background: var(--soft); color: var(--brand-ink); }
.toc a.is-on { background: var(--tile); color: var(--brand-ink); font-weight: 700; }
.toc a .n { width: 18px; color: var(--faint); flex: none; }
.article { flex: 999 1 560px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 20px; font-size: 17.5px; line-height: 1.75; color: var(--body); }
.article > h2, .article .sec > h2 { margin: 16px 0 0; font-family: var(--display); font-size: clamp(27px, 3.2vw, 34px); line-height: 1.1; letter-spacing: -.6px; color: var(--ink); scroll-margin-top: 24px; font-weight: 800; }
.article > h2:first-child { margin-top: 0; }
.article p { margin: 0; }
.article ul, .article ol { margin: 0; padding-left: 22px; }
.article li { margin: 0 0 .45em; }
.article strong, .article b { color: var(--ink); }
@media (max-width: 860px) {
  .toc { position: static; max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .toc-h { width: 100%; padding-bottom: 2px; }
  .toc a { background: var(--soft); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; }
  .doc { gap: 28px; padding-top: 32px; }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.tile { padding: 18px; border-radius: 18px; background: var(--soft); }
.tile h3 { display: block; margin: 0 0 4px; font-size: 16px; line-height: 1.35; color: var(--ink); font-family: var(--sans); font-weight: 700; }
.tile p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.tile p a { font-weight: 600; }
.steps { display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 16px; padding: 16px 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.step .n { width: 36px; height: 36px; border-radius: 50%; background: var(--tile); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 15px; }
.step h3 { margin: 0; font-size: 17px; color: var(--ink); line-height: 1.35; font-family: var(--sans); font-weight: 700; }
.step p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.callout { display: flex; gap: 16px; padding: 20px; border-radius: 20px; background: var(--gold-tile); border: 1px solid var(--gold-line); }
.callout .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; flex: none; }
.callout .tx { font-size: 15.5px; line-height: 1.6; color: var(--gold-text); }
.callout .tx b, .callout .tx strong { color: inherit; }

.pill-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-links a { height: 38px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; }
.pill-links a:hover { border-color: var(--brand); color: var(--brand-ink); }
.pill-links a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* FAQ accordion (native <details>, so it works without JS and stays crawlable) */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { border-radius: 20px; border: 1px solid var(--line); background: transparent; transition: background .2s; }
.faq details[open] { background: var(--surface); }
.faq summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 18px 20px; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.4; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q { flex: 1; }
.faq summary .pm { width: 32px; height: 32px; border-radius: 50%; background: var(--tile); color: var(--brand-ink); display: grid; place-items: center; transition: transform .25s, background .2s, color .2s; flex: none; }
.faq details[open] summary .pm { transform: rotate(45deg); background: var(--brand); color: #fff; }
.faq .a { padding: 0 20px 20px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); animation: fadein .3s ease-out; }
.faq .a p { margin: 0; }
.article .faq { margin-top: 4px; }
.bg-white .faq details[open] { background: var(--soft); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 460px; font-size: 15px; line-height: 1.45; }
.table-wrap caption { text-align: left; padding: 14px 16px 0; font-size: 13px; color: var(--muted); }
.table-wrap th, .table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); text-align: left; }
.table-wrap thead th { font-size: 13px; color: var(--muted); font-weight: 700; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap .duesy { color: var(--brand-ink); }
.table-wrap td.yes { color: var(--brand-ink); font-weight: 700; }
.table-wrap td.mid { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); line-height: 1.55; }

.related { background: var(--soft); }
.related .inner { padding-top: 56px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 22px; }
.related h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -.6px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.rel-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: 150px; transition: border-color .2s, transform .2s; }
.rel-card:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }
.rel-card .tag { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.rel-card b { font-size: 18px; line-height: 1.3; }
.rel-card .go { margin-top: auto; font-size: 14px; color: var(--brand-ink); font-weight: 700; }
.tag--green { background: #E6F3EC; color: #0B6B47; }
.tag--blue { background: #E5EDFA; color: #2F5BA8; }
.tag--gold { background: #FFF4E3; color: #8A5200; }
.tag--plum { background: #F3E8FB; color: #7B3FA8; }
.tag--rose { background: #FDECE3; color: #B4471B; }

/* final CTA band */
.final-cta { padding-top: 40px; padding-bottom: 90px; }
.final-cta .box { position: relative; border-radius: 40px; background: #0F7D53; color: #fff; padding: clamp(32px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 40px; align-items: center; overflow: hidden; }
.final-cta .dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.final-cta .copy { position: relative; flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.final-cta h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5vw, 60px); line-height: .98; letter-spacing: -1.8px; color: #fff; }
.final-cta p { margin: 0; font-size: 17px; color: #D4F0E2; line-height: 1.55; }
.final-cta .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--white { background: #fff; color: #0B6B47; font-weight: 800; }
.btn--white:hover { background: #F0FFF6; color: #0B6B47; }
.btn--ghost-white { border: 1.5px solid rgba(255,255,255,.5); color: #fff; }
.btn--ghost-white:hover { background: rgba(255,255,255,.1); color: #fff; }
.final-cta .note a { color: #fff; }
.final-cta--compact .box { border-radius: 32px; }
.final-cta--compact h2 { font-size: clamp(30px, 4vw, 44px); }

/* calculators (shared by tools + guide widgets) */
.calc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.calc-card--float { border: 0; box-shadow: var(--shadow-lg); padding: 24px; gap: 16px; }
.cc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cc-head b { font-size: 16px; }
.cc-head span { font-size: 12.5px; color: var(--muted); }
.amount-row { display: flex; align-items: center; gap: 10px; }
.amount-input { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 4px; font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -.8px; color: var(--ink); border-radius: 14px; padding: 2px 6px; }
.amount-input:focus-within { background: var(--soft); }
.amount-input .sym { font-size: .7em; color: var(--muted); flex: none; }
.amount-input input { width: 6.5ch; min-width: 2ch; max-width: 100%; field-sizing: content; border: 0; background: transparent; font: inherit; color: inherit; letter-spacing: inherit; text-align: center; padding: 0; outline: none; -moz-appearance: textfield; }
.amount-input input::-webkit-outer-spin-button, .amount-input input::-webkit-inner-spin-button, .num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-row { display: flex; align-items: center; gap: 14px; }
.field-row .lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.field-row .lbl b { font-size: 16px; }
.field-row .lbl span { font-size: 13px; color: var(--muted); }
.field-row .val { width: 170px; flex: none; min-width: 0; text-align: center; font-family: var(--display); font-weight: 800; font-size: 28px; }
.field-row .val input { width: 100%; text-align: center; border: 0; background: transparent; font: inherit; color: var(--ink); outline: none; border-radius: 10px; -moz-appearance: textfield; }
.field-row .val input:focus { background: var(--soft); }
.toggle-row { display: flex; align-items: center; gap: 14px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; width: 100%; }
.toggle-row .lbl { flex: 1; display: flex; flex-direction: column; }
.toggle-row .lbl b { font-size: 16px; }
.toggle-row .lbl span { font-size: 13px; color: var(--muted); }
.inline-num { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.num { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font-size: 15px; font-weight: 600; width: 100%; min-width: 0; -moz-appearance: textfield; }
.num:focus, .txt:focus, .sel:focus { outline: none; border-color: var(--brand); }
.txt { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font-size: 15px; width: 100%; min-width: 0; }
.sel { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; font-size: 14.5px; font-weight: 600; min-width: 0; }
.chip-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.chip-grid button { height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 700; }
.chip-grid button[aria-pressed="true"] { border: 2px solid var(--brand); background: var(--tile); }
.result-card { background: var(--dark); color: var(--on-dark); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.result-card .lead-t { font-size: 14px; color: var(--on-dark-3); }
.result-card .big { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 6vw, 68px); letter-spacing: -2px; line-height: 1; color: #fff; overflow-wrap: anywhere; }
.result-card .big.bump { animation: bump .35s ease-out; }
.result-card .lines { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); font-size: 14.5px; }
.result-card .lines div { display: flex; justify-content: space-between; gap: 12px; }
.result-card .lines span { color: var(--on-dark-2); }
.result-card .acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 6px; }
.result-card .acts .btn { height: 50px; padding: 0 12px; font-size: 15px; white-space: normal; text-align: center; line-height: 1.2; }
.msg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.msg-card .h { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.msg-bubble { background: var(--soft); border-radius: 6px 16px 16px 16px; padding: 12px 14px; font-size: 14.5px; line-height: 1.55; white-space: pre-line; color: var(--ink); overflow-wrap: anywhere; }
.msg-card .wa { align-self: flex-start; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; color: var(--brand-ink); }
.add-link { align-self: flex-start; border: 1px dashed var(--line); background: transparent; color: var(--brand-ink); font-size: 14px; font-weight: 700; padding: 9px 14px; border-radius: 999px; }
.add-link:hover { border-color: var(--brand); }
.x-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--faint); font-size: 20px; line-height: 1; flex: none; }
.x-btn:hover { background: var(--soft); color: var(--ink); }
.settle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.settle-row b { color: #fff; }
.settle-row .arrow { color: var(--hero-accent); }
@media (max-width: 560px) {
  .calc-card { padding: 20px; border-radius: 24px; }
  .result-card { padding: 22px; border-radius: 24px; }
  .chip-grid { gap: 6px; }
  .chip-grid button { font-size: 14px; padding: 0; }
  .field-row .val { width: 96px; font-size: 24px; }
  .field-row > .amount-input { flex: 0 0 120px !important; font-size: 24px !important; }
  .field-row { gap: 8px; }
  .round-btn { width: 40px; height: 40px; }
  .page-title { letter-spacing: -1.2px; }
  .final-cta .box { border-radius: 28px; }
}

/* ---------- motion ---------- */
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- tool pages ---------- */
.tool-page { background: var(--soft); }
.tool-page .related, .tool-page .title-band { background: var(--page); }
.tool-top { padding-top: 40px; display: flex; flex-direction: column; gap: 18px; }
.tool-top .page-title { font-size: clamp(38px, 5vw, 56px); letter-spacing: -1.6px; margin-top: 4px; }
.tool-top .page-lede { font-size: 17.5px; max-width: 620px; }
.tool-grid { padding-top: 32px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.tool-grid > .calc-card { flex: 1 1 460px; }
.tool-result { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.cur-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.cur-row b { color: var(--ink); font-size: 16px; }
.field-row .val input.num-big { font-family: var(--display); font-weight: 800; font-size: 28px; }
.sub-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); padding-left: 2px; }
.sub-row .num { width: 110px; flex: none; }
.money-in { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding-left: 12px; background: var(--surface); min-width: 0; }
.money-in span { color: var(--muted); font-size: 14px; flex: none; }
.money-in .num { border: 0; padding-left: 0; height: 38px; }
.money-in:focus-within { border-color: var(--brand); }
.blk-h { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); font-family: var(--sans); }
.blk-sub { margin: -14px 0 0; font-size: 13px; color: var(--muted); }
.person-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; gap: 8px; align-items: center; }
.person-row:has(.wt) { grid-template-columns: minmax(0, 1fr) 90px auto 36px; }
.person-row .amt { min-width: 84px; text-align: right; font-size: 15px; }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 2px 2px 4px; background: var(--surface); }
.pchip .txt { border: 0; height: 34px; width: 110px; padding: 0 8px; background: transparent; border-radius: 999px; }
.pchip:focus-within { border-color: var(--brand); }
.pchip .x-btn { width: 30px; height: 30px; font-size: 18px; }
.exp-list { display: flex; flex-direction: column; gap: 10px; }
.exp-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 36px; grid-template-areas: "d a x" "p p x"; gap: 8px; padding: 12px; border-radius: 16px; background: var(--soft); align-items: center; }
.exp-row > .txt { grid-area: d; }
.exp-row > .money-in { grid-area: a; }
.exp-row > .paid { grid-area: p; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.exp-row > .paid .sel { flex: 1; }
.exp-row > .x-btn { grid-area: x; align-self: start; }
.settle { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); font-size: 15px; }
.settle-h { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--on-dark-3); }
.settle-empty { margin: 0; color: var(--on-dark-2); font-size: 14.5px; }
.tip-custom { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.tip-custom .num { width: 96px; }
@media (max-width: 860px) { .tool-result { position: static; } }
@media (max-width: 560px) {
  .tool-top { padding-top: 24px; }
  .pill-links { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 4px; scrollbar-width: none; }
  .pill-links a { flex: none; }
  .person-row:has(.wt) { grid-template-columns: minmax(0, 1fr) 70px 36px; }
  .person-row:has(.wt) .amt { grid-column: 1 / 3; text-align: left; }
  .pchip .txt { width: 92px; }
}
