/* Dollar Math · site styles. Apple-style (user decision 2026-09-30): white and #F5F5F7 sections,
   system font (SF on Apple devices, Inter elsewhere), one blue accent, green = good, red = debt/interest. */
:root {
  --bg: #ffffff;
  --bg2: #f5f5f7;
  --ink: #1d1d1f;
  --ink2: #6e6e73;
  --ink3: #86868b;
  --line: #d2d2d7;
  --hair: #e5e5ea;
  --blue: #0071e3;
  --blue-h: #0077ed;
  --green: #248a3d;
  --green-f: #34c759;
  --red: #d70015;
  --red-f: #ff3b30;
  --card: #ffffff;
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.47;
  letter-spacing: -0.022em; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.8); backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.nav .wrap { height: 52px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand:hover { text-decoration: none; }
.nav nav { margin-left: auto; display: flex; gap: 22px; font-size: 13px; }
.nav nav a { color: var(--ink); opacity: 0.8; }
.nav nav a:hover { opacity: 1; text-decoration: none; }
.nav .buy { background: var(--blue); color: #fff; opacity: 1; border-radius: 980px; padding: 4px 12px; }
@media (max-width: 640px) { .nav nav a:not(.buy) { display: none; } }

/* type */
.eyebrow { font-size: 17px; font-weight: 600; color: var(--ink2); margin: 0 0 8px; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.05; letter-spacing: -0.015em; font-weight: 700; margin: 0; }
h2 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.01em; font-weight: 700; margin: 0; }
h3 { font-size: 21px; line-height: 1.2; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.lead { font-size: clamp(19px, 2.4vw, 24px); line-height: 1.35; color: var(--ink2); margin: 18px 0 0; letter-spacing: -0.01em; }
.muted { color: var(--ink2); }
.small { font-size: 13px; color: var(--ink3); letter-spacing: -0.01em; }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 30px; }
.btn { display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 980px; padding: 12px 24px;
  font: 400 17px/1.2 var(--font); letter-spacing: -0.02em; cursor: pointer; }
.btn:hover { background: var(--blue-h); text-decoration: none; }
.link-more::after { content: " ›"; }

/* sections */
section { padding: 88px 0; }
.alt { background: var(--bg2); }
.center { text-align: center; }
.hero { padding: 96px 0 72px; text-align: center; }
.hero .btns { justify-content: center; }
.hero .small { margin-top: 18px; }

/* calculator */
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; margin-top: 44px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.06); min-width: 0; }
.card h3 { margin-bottom: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }
label.f { display: block; font-size: 13px; color: var(--ink2); }
label.f input { margin-top: 6px; }
input, select { width: 100%; min-width: 0; font: 400 17px/1.2 var(--font); letter-spacing: -0.02em; color: var(--ink); background: #fbfbfd;
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16); }
.debts { width: 100%; border-collapse: collapse; table-layout: fixed; }
.debts th { font-size: 12px; font-weight: 600; color: var(--ink3); text-align: left; padding: 0 4px 8px; }
.debts td { padding: 4px; }
.debts td input { padding: 10px 8px; font-size: 15px; border-radius: 10px; }
.debts .x { width: 32px; }
.debts .x button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--bg2); color: var(--ink2); cursor: pointer; font-size: 16px; line-height: 28px; padding: 0; }
.debts col.c-name { width: 34%; }
.add { margin-top: 12px; background: none; border: 0; color: var(--blue); font: 400 15px var(--font); cursor: pointer; padding: 6px 0; }
.warn { margin-top: 14px; font-size: 14px; color: var(--red); min-height: 20px; }
.ok { color: var(--green); }

.results { display: grid; gap: 12px; }
.res { border-radius: 18px; padding: 18px 20px; background: var(--bg2); display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: baseline; }
.res .name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.res .name i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.res .date { font-size: 28px; font-weight: 700; letter-spacing: -0.015em; grid-column: 1; }
.res .meta { font-size: 14px; color: var(--ink2); grid-column: 1 / -1; }
.res .tag { grid-row: 1; grid-column: 2; font-size: 12px; font-weight: 600; color: #fff; background: var(--green-f); border-radius: 980px; padding: 3px 10px; visibility: hidden; }
.res.best .tag { visibility: visible; }
.res.best { background: #eaf8ee; }
.verdict { font-size: 17px; font-weight: 600; margin: 18px 0 0; }
.chart { margin-top: 18px; }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: currentColor; }
.order { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: o; }
.order li { counter-increment: o; display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 15px; }
.order li::before { content: counter(o); color: var(--ink3); width: 22px; flex: none; }
.order li span:first-of-type { flex: 1; }
.order li span:last-child { color: var(--ink2); font-variant-numeric: tabular-nums; }
.privacy-note { margin-top: 16px; }

/* free sheet */
.capture { max-width: 680px; margin: 36px auto 0; }
.capture form { display: flex; gap: 12px; margin-top: 8px; }
.capture form input { flex: 1; }
@media (max-width: 520px) { .capture form { flex-direction: column; } }
.pill-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.pill-list span { background: var(--bg2); border-radius: 980px; padding: 8px 16px; font-size: 14px; color: var(--ink2); }

/* product */
.product-head { text-align: center; }
.price { font-size: 21px; font-weight: 600; margin-top: 18px; }
.price span { color: var(--ink2); font-weight: 400; font-size: 17px; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.shots img { border-radius: 18px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08); background: #fff; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; } }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.feature { background: #fff; border-radius: 18px; padding: 24px; }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--bg2); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature .ic svg { width: 26px; height: 26px; }
.feature p { margin: 8px 0 0; color: var(--ink2); font-size: 15px; line-height: 1.4; }

/* faq */
.faq { max-width: 760px; margin: 36px auto 0; }
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-size: 19px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--ink3); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--ink2); margin: 12px 0 0; }

/* footer */
footer { background: var(--bg2); padding: 30px 0 40px; font-size: 12px; color: var(--ink3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
footer a { color: var(--ink2); }

/* simple pages */
.page { padding: 72px 22px; max-width: 720px; }
.page h1 { font-size: clamp(34px, 6vw, 56px); }
.page h2 { font-size: 24px; margin-top: 36px; }
.page p, .page li { color: var(--ink2); }
.check { width: 72px; height: 72px; border-radius: 50%; background: var(--green-f); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }

/* phones: every debt becomes a small card (name on top, three numbers below) */
@media (max-width: 600px) {
  .debts thead, .debts colgroup { display: none; }
  .debts, .debts tbody { display: block; }
  .debts tr { display: grid; grid-template-columns: 1fr 1fr 1fr 32px; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
  .debts td { display: block; padding: 0; min-width: 0; }
  .debts td:first-child { grid-column: 1 / 4; }
  .debts td.x { grid-column: 4; grid-row: 1; align-self: center; }
  .debts td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--ink3); margin: 0 0 4px 2px; }
  .card { padding: 20px; }
}
