/* Thicker Wallet · direction C (Warm brand). All colours live here as variables. */
:root {
  color-scheme: light;
  --bg: #FFFBF2;
  --band: #FFF4DC;
  --text: #2A1D0F;
  --muted: #5E4B36;
  --line: #EFE3CB;
  --card: #FFFFFF;
  --soft: #FFF6E5;
  --toggle-bg: rgba(42, 29, 15, 0.08);
  --btn: #2A1D0F;
  --btn-text: #FFF4DC;
  --pill: #FFFFFF;
  --pill-border: #EADBBE;
  --green: #DDF3E2;  --green-ink: #166534;
  --gold: #FFE9B0;   --gold-ink: #8A5A00;
  --brown: #F1E2D2;  --brown-ink: #6B3F17;
  --tag: #F3ECDD;    --tag-ink: #5E4B36;
  --input-border: #8C7759;
  --focus: #2A1D0F;
  --radius: 20px;
  --max: 1120px;
  --pad: clamp(20px, 5vw, 48px);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark: chosen with the toggle (data-theme) … */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16120C;
  --band: #241C10;
  --text: #F7EEDD;
  --muted: #CBBDA6;
  --line: #352A1B;
  --card: #1E1810;
  --soft: #221A0F;
  --toggle-bg: rgba(247, 238, 221, 0.1);
  --btn: #F5C451;
  --btn-text: #241C10;
  --pill: rgba(247, 238, 221, 0.1);
  --pill-border: transparent;
  --green: #16301F;  --green-ink: #86EFAC;
  --gold: #3A2C0D;   --gold-ink: #F5C451;
  --brown: #33241A;  --brown-ink: #E8C3A0;
  --tag: #2C2316;    --tag-ink: #CBBDA6;
  --input-border: #8F7E64;
  --focus: #F5C451;
}
/* … or by the system setting when JavaScript is off. Keep in step with the block above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #16120C; --band: #241C10; --text: #F7EEDD; --muted: #CBBDA6; --line: #352A1B;
    --card: #1E1810; --soft: #221A0F; --toggle-bg: rgba(247, 238, 221, 0.1);
    --btn: #F5C451; --btn-text: #241C10; --pill: rgba(247, 238, 221, 0.1); --pill-border: transparent;
    --green: #16301F; --green-ink: #86EFAC; --gold: #3A2C0D; --gold-ink: #F5C451;
    --brown: #33241A; --brown-ink: #E8C3A0; --tag: #2C2316; --tag-ink: #CBBDA6;
    --input-border: #8F7E64; --focus: #F5C451;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.skip-link { position: absolute; left: 12px; top: -60px; padding: 10px 16px; background: var(--btn); color: var(--btn-text); border-radius: 10px; font-weight: 700; z-index: 10; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Header */
.band { background: var(--band); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 800; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-weight: 600; color: var(--muted); }
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--text); }
.theme-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 999px; background: var(--toggle-bg); color: var(--text); cursor: pointer; }
.theme-toggle svg { width: 20px; height: 20px; }
:root[data-theme="dark"] .icon-moon, :root:not([data-theme="dark"]) .icon-sun { display: none; }

/* Hero */
.hero { display: flex; flex-wrap: wrap-reverse; align-items: center; gap: 32px 56px; padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(48px, 8vw, 96px); }
.hero-text { flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-art { flex: 1 1 220px; display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 340px; border-radius: 40px; }
h1 { margin: 0; font-weight: 800; font-size: clamp(36px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.03em; }
.lead { margin: 0; font-size: clamp(17px, 2vw, 20px); line-height: 1.6; color: var(--muted); max-width: 46ch; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pill { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--pill-border); background: var(--pill); color: var(--text); text-decoration: none; font-weight: 700; font-size: 16px; }
.pill:hover { border-color: var(--text); }
.pill.primary { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }

/* Sections */
main.wrap { display: flex; flex-direction: column; gap: 64px; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }
.section { display: flex; flex-direction: column; gap: 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
h2 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.section-head p { margin: 0; font-size: 15px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.card h3 { margin: 0; font-size: 22px; font-weight: 800; }
.card p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }

.icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.icon svg { width: 22px; height: 22px; }
.icon.green { background: var(--green); color: var(--green-ink); }
.icon.gold { background: var(--gold); color: var(--gold-ink); }
.icon.brown { background: var(--brown); color: var(--brown-ink); }

.calc-card { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text); min-height: 88px; }
a.calc-card:hover { border-color: var(--text); }
.calc-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.calc-card .title { font-size: 18px; font-weight: 800; }
.calc-card .desc { font-size: 15px; line-height: 1.5; color: var(--muted); }
.calc-card .arrow { flex: none; width: 20px; height: 20px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--tag); color: var(--tag-ink); font-size: 13px; font-weight: 700; }

.soft-box { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 32px; border-radius: 24px; background: var(--soft); }
.soft-box h2 { flex: 1 1 200px; font-size: 26px; }
.soft-box p { margin: 0; flex: 999 1 320px; font-size: 17px; line-height: 1.65; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 28px; padding-bottom: 40px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.site-footer p { margin: 0; }

/* Calculator page */
.calc-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.calc-form { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; font-size: 16px; }
.field .hint { font-size: 14px; color: var(--muted); margin: 0; }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 14px; font: inherit; font-size: 18px; font-weight: 600; color: var(--text); background: var(--bg); border: 1.5px solid var(--input-border); border-radius: 12px; }
.money input { padding-left: 30px; }
.calc-result { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--radius); background: var(--soft); }
.result-label { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); }
.big-number { margin: 0; font-size: clamp(44px, 8vw, 64px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.result-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.result-list li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.result-list b { white-space: nowrap; }
.notes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.notes:empty { display: none; }
.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 1.65; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose a { font-weight: 600; }
.small { font-size: 14px; color: var(--muted); }
