/* The Simple Money Plan v6 "Legal Pad" - Ali Abdaal warmth x the locked Ink & Marker channel palette.
   Warm paper, friendly wonky serif, hand-drawn swashes, coral pill CTAs.
   Palette tokens mean one thing each: teal = the right answer, coral = action/mistake,
   amber = attention/lifestyle, graphite = inert. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --paper: #F7F2E8; --paper-deep: #F0E9DB; --card: #FFFDF8; --line: #E2D9C8;
  --ink: #141414; --ink-soft: #3A3733; --graphite: #6E7278; --muted: #8B857C;
  --teal: #1F8A8C; --teal-deep: #166A6C; --teal-wash: #E4F0EF;
  --coral: #F2685E; --coral-deep: #DD5348; --coral-wash: #FDEAE7;
  --amber: #E8A33D; --amber-wash: #FBF0DC;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
html { scroll-behavior: smooth; }
body { background: var(--paper-deep); font-family: 'Figtree', sans-serif; color: var(--ink-soft); font-size: 18px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: 'Fraunces', serif; font-variation-settings: 'SOFT' 40, 'WONK' 1; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; line-height: 1.06; }

/* Floating paper shell, Ali-style */
.shell { max-width: 1360px; margin: 18px auto; background: var(--paper); border-radius: 36px; padding: 0 clamp(20px, 4vw, 60px) 0; overflow: hidden; }

nav.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 4px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { font-family: 'Fraunces', serif; font-variation-settings: 'SOFT' 40, 'WONK' 1; font-weight: 700; font-size: 19.5px; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.wordmark .wm-the { font-size: 0.72em; opacity: 0.62; margin-right: 1px; }
.wordmark em { font-style: normal; color: var(--teal); }
.nav-links { display: flex; gap: 28px; font-size: 16px; font-weight: 500; color: var(--ink-soft); }
.nav-links a { transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--teal); }
.btn-coral { display: inline-block; background: var(--coral); color: #FFF9F7; font-weight: 600; font-size: 16px; padding: 12px 24px; border-radius: 999px; border: none; cursor: pointer; font-family: 'Figtree', sans-serif; transition: transform .2s var(--ease), background .2s var(--ease); }
.btn-coral:hover { background: var(--coral-deep); transform: translateY(-2px); }
.btn-coral:active { transform: translateY(0); }
.btn-coral.big { font-size: 17px; padding: 16px 30px; }
.btn-ink { display: inline-block; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 17px; padding: 16px 32px; border-radius: 999px; transition: transform .2s var(--ease), background .2s var(--ease); }
.btn-ink:hover { background: #2A2A2A; transform: translateY(-2px); }
.btn-plain { font-weight: 600; font-size: 17px; color: var(--ink); border-bottom: 2px solid var(--amber); padding-bottom: 2px; }
.btn-plain:hover { color: var(--teal); border-color: var(--teal); }

/* Hero */
.hero { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding: 40px 4px 76px; }
.hero-art { position: relative; }
.hero-art img { position: relative; z-index: 1; border-radius: 50%; aspect-ratio: 1; object-fit: cover; object-position: 50% 22%; }
.blob { position: absolute; inset: 8% 6% 12% 10%; background: var(--amber); border-radius: 58% 42% 47% 53% / 52% 46% 54% 48%; z-index: 0; }
.arc { position: absolute; inset: -4% auto auto -6%; width: 108%; height: 108%; z-index: 0; }
.greeting { font-family: 'Fraunces', serif; font-variation-settings: 'SOFT' 60, 'WONK' 1; font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; color: var(--graphite); margin-bottom: 10px; }
.wave { display: inline-block; animation: wave 2.6s var(--ease) infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100% { transform: rotate(0deg); } 70% { transform: rotate(16deg); } 80% { transform: rotate(-8deg); } 90% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .wave { animation: none; } }
.hero h1 { font-size: clamp(44px, 6.4vw, 86px); margin-bottom: 22px; }
.mark-teal, .mark-amber { position: relative; display: inline-block; }
.mark-teal .swash { position: absolute; left: -2%; bottom: -0.22em; width: 104%; height: 0.3em; overflow: visible; }
.mark-amber { color: var(--amber); }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 560px; margin-bottom: 30px; }
.btn-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.micro { font-size: 15px; color: var(--muted); margin-top: 16px; }

/* Belief strip */
.belief { padding: 0 0 76px; }
.belief-inner { background: var(--card); border: 2px solid var(--line); border-radius: 28px; padding: clamp(28px, 4vw, 44px); }
.belief p { font-family: 'Fraunces', serif; font-variation-settings: 'SOFT' 40, 'WONK' 1; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; color: var(--ink); font-weight: 500; }
.belief strong { color: var(--teal); font-weight: 700; }
.strike { position: relative; color: var(--graphite); }
.strike::after { content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: 3px; background: var(--coral); transform: rotate(-1.4deg); border-radius: 3px; }

.section { padding: 0 0 84px; }
.sec-head { max-width: 640px; margin-bottom: 40px; }
.sec-head.centered { margin-left: auto; margin-right: auto; text-align: center; max-width: 760px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--coral); margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(32px, 4.2vw, 52px); margin-bottom: 16px; }
.sec-head h2 .swash { position: absolute; left: -2%; bottom: -0.2em; width: 104%; height: 0.28em; overflow: visible; }
.sec-sub { font-size: 18px; color: var(--ink-soft); }

/* Cast */
.cast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cast-card { background: var(--card); border: 2px solid var(--line); border-radius: 26px; padding: 22px 22px 26px; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.cast-card:hover { transform: translateY(-4px); border-color: var(--ink); }
.cast-art { position: relative; border-radius: 20px; overflow: hidden; margin-bottom: 18px; aspect-ratio: 1; display: flex; align-items: flex-end; justify-content: center; }
.cast-art.amber { background: var(--amber-wash); }
.cast-art.teal { background: var(--teal-wash); }
.cast-art.coral { background: var(--coral-wash); }
.cast-art.green { background: #E9EFE4; }
.cast-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.cast-card h3 { font-size: 26px; margin-bottom: 2px; }
.cast-role { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.cast-line { font-size: 16px; line-height: 1.55; color: var(--ink-soft); }

/* System figure */
.system-figure { background: var(--card); border: 2px solid var(--line); border-radius: 28px; padding: clamp(16px, 2.4vw, 28px); margin-bottom: 44px; }
.system-figure img { border-radius: 18px; width: 100%; }
.system-figure figcaption { text-align: center; font-size: 16px; color: var(--muted); margin-top: 18px; font-style: italic; }
.three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { padding: 4px 6px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color: #FFF; font-family: 'Fraunces', serif; font-weight: 700; font-size: 20px; margin-bottom: 14px; }
.step h3 { font-size: 23px; margin-bottom: 8px; }
.step p { font-size: 16.5px; color: var(--ink-soft); }

/* Watch */
.watch-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: start; }
.watch-card .thumb { position: relative; border-radius: 22px; overflow: hidden; border: 2px solid var(--line); }
.watch-card .thumb img { width: 100%; }
.play { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; background: rgba(20,20,20,0.82); color: #FFF; display: flex; align-items: center; justify-content: center; font-size: 24px; padding-left: 5px; transition: transform .25s var(--ease), background .25s var(--ease); }
.watch-card:hover .play { transform: scale(1.08); background: var(--coral); }
.watch-card h3 { font-size: 27px; margin: 18px 0 6px; }
.watch-card p { font-size: 16.5px; color: var(--ink-soft); }
.watch-list { display: flex; flex-direction: column; gap: 10px; }
.watch-row { display: flex; align-items: center; gap: 14px; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 16px 18px; transition: transform .2s var(--ease), border-color .2s var(--ease); }
.watch-row:hover { transform: translateX(4px); border-color: var(--ink); }
.watch-row h4 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.wr-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; flex: none; color: var(--ink); }
.wr-tag.teal { background: var(--teal-wash); color: var(--teal-deep); }
.wr-tag.amber { background: var(--amber-wash); }
.wr-tag.coral { background: var(--coral-wash); color: var(--coral-deep); }
.wr-tag.graphite { background: #EAE7E1; color: var(--graphite); }

/* Check-up */
.checkup { background: var(--teal-wash); border-radius: 32px; padding: clamp(28px, 4vw, 56px); display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.checkup h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 16px; }
.checkup > .checkup-copy > p { font-size: 18px; color: var(--ink-soft); margin-bottom: 20px; max-width: 560px; }
.check-list { list-style: none; margin-bottom: 26px; }
.check-list li { position: relative; padding-left: 32px; margin-bottom: 9px; font-size: 17px; color: var(--ink); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #FFF; font-size: 13px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; max-width: 620px; }
.field-row input { flex: 1; min-width: 170px; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 14px 22px; font-size: 16px; font-family: 'Figtree', sans-serif; color: var(--ink); }
.field-row input::placeholder { color: var(--muted); }
.field-row input:focus { outline: none; border-color: var(--teal); }
.honey { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-error { margin-top: 10px; font-size: 15px; color: var(--coral-deep); min-height: 18px; }
.form-success { display: none; }
.form-success.on { display: block; }
.form-success strong { font-family: 'Fraunces', serif; font-size: 26px; color: var(--ink); display: block; margin-bottom: 6px; }
.form-success p { margin-bottom: 16px; }
.checkup-art { position: relative; }
.checkup-art img { position: relative; z-index: 1; border-radius: 22px; width: 100%; border: 2px solid var(--line); }
.teal-blob { background: var(--teal); opacity: 0.16; inset: 6%; }

/* FAQ */
.faq details { background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 22px 26px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-family: 'Fraunces', serif; font-variation-settings: 'SOFT' 40, 'WONK' 1; font-weight: 600; font-size: 21px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--coral); font-size: 26px; font-family: 'Figtree', sans-serif; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; font-size: 17px; color: var(--ink-soft); max-width: 720px; }

/* Closer */
.closer { padding: 0 0 84px; }
.closer-card { background: var(--ink); border-radius: 32px; padding: clamp(44px, 6vw, 84px) clamp(24px, 4vw, 60px); text-align: center; }
.closer-card h2 { color: var(--paper); font-size: clamp(28px, 3.8vw, 46px); line-height: 1.24; margin-bottom: 32px; }
.closer-card .mark-amber { color: var(--amber); }
.closer-card .btn-ink { background: var(--paper); color: var(--ink); }
.closer-card .btn-ink:hover { background: #FFF; }

footer { border-top: 2px solid var(--line); padding: 40px 4px 48px; display: grid; grid-template-columns: auto 1fr; gap: 20px 48px; align-items: center; }
.f-brand { display: flex; align-items: center; gap: 9px; font-family: 'Fraunces', serif; font-weight: 700; font-size: 18px; color: var(--ink); white-space: nowrap; }
.f-brand .wm-the { font-size: 0.72em; opacity: 0.62; margin-right: 1px; }
.f-brand em { font-style: normal; color: var(--teal); }
.f-links { display: flex; gap: 24px; font-size: 16px; font-weight: 500; justify-self: end; }
.f-links a:hover { color: var(--teal); }
.fine { grid-column: 1 / -1; font-size: 14px; color: var(--muted); max-width: 780px; line-height: 1.6; }

/* Sub pages (tools, privacy) inherit the shell */
.hero.sub { display: block; padding: 30px 4px 50px; }
.hero.sub h1 { font-size: clamp(38px, 5vw, 62px); max-width: 760px; }
.hero.sub .lede { max-width: 620px; }
.calc-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 34px; }
.calc-tabs button { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 12px 22px; font-family: 'Figtree', sans-serif; font-size: 15.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all .2s var(--ease); }
.calc-tabs button:hover { border-color: var(--ink); }
.calc-tabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.calc-panel { display: none; background: var(--card); border: 2px solid var(--line); border-radius: 28px; padding: clamp(26px, 3.4vw, 46px); max-width: 940px; margin: 0 auto; }
.calc-panel.on { display: block; }
.calc-panel .eyebrow { display: none; }
.calc-panel h2 { font-size: 32px; margin-bottom: 10px; }
.calc-panel .intro { font-size: 17px; color: var(--ink-soft); margin-bottom: 28px; max-width: 620px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-bottom: 28px; }
.calc-field span.lbl { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.inp { display: flex; align-items: center; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 0 16px; }
.inp:focus-within { border-color: var(--teal); }
.inp span { color: var(--muted); font-size: 15px; }
.inp input, .inp select { flex: 1; background: transparent; border: none; outline: none; padding: 13px 8px; font-family: 'Figtree', sans-serif; font-size: 17px; font-weight: 600; color: var(--ink); width: 100%; }
.checks { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.checks label { display: flex; gap: 10px; align-items: center; }
.checks input { accent-color: var(--teal); }
.results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.result { background: var(--paper); border-radius: 18px; padding: 16px 18px; }
.result span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.result strong { font-family: 'Fraunces', serif; font-size: 22px; color: var(--ink); }
.result.hot { background: var(--teal-wash); }
.result.hot strong { color: var(--teal-deep); }
.calc-warning { color: var(--coral-deep); font-size: 16px; margin-bottom: 24px; }
.next-step { background: var(--amber-wash); border-radius: 18px; padding: 16px 20px; margin-bottom: 22px; }
.next-step span { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #A9701C; margin-bottom: 6px; }
.next-step p { font-size: 16px; color: var(--ink-soft); }
.calc-note { font-size: 14.5px; color: var(--muted); border-top: 2px solid var(--line); padding-top: 16px; }
.legal { max-width: 760px; padding: 20px 4px 70px; }
.legal h1 { font-size: 46px; margin-bottom: 8px; }
.legal .updated { font-size: 15px; color: var(--muted); margin-bottom: 32px; }
.legal h2 { font-size: 24px; margin: 30px 0 8px; }
.legal p { font-size: 17px; color: var(--ink-soft); }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-art { opacity: 0; transform: translateY(14px); animation: rise .8s var(--ease) forwards; }
  .hero-copy .greeting { animation-delay: .04s; } .hero-copy h1 { animation-delay: .1s; }
  .hero-copy .lede { animation-delay: .18s; } .hero-copy .btn-row { animation-delay: .26s; }
  .hero-copy .micro { animation-delay: .32s; } .hero-art { animation-delay: .12s; }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }
  [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  [data-reveal].in { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1000px) {
  .shell { border-radius: 26px; margin: 10px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-bottom: 56px; }
  .hero-art { max-width: 340px; margin: 0 auto; }
  .cast { grid-template-columns: 1fr 1fr; }
  .three-up { grid-template-columns: 1fr; gap: 26px; }
  .watch-grid { grid-template-columns: 1fr; }
  .checkup { grid-template-columns: 1fr; }
  .checkup-art { max-width: 360px; margin: 0 auto; }
  .nav-links { display: none; }
  .results, .calc-grid { grid-template-columns: 1fr 1fr; }
  footer { grid-template-columns: 1fr; }
  .f-links { justify-self: start; flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .cast { grid-template-columns: 1fr; }
  .results, .calc-grid { grid-template-columns: 1fr; }
}

/* ---- v6.1 new sections ---- */
.wide-figure { background: var(--card); border: 2px solid var(--line); border-radius: 28px; padding: clamp(14px, 2vw, 24px); }
.wide-figure img { border-radius: 18px; width: 100%; }
.wide-figure figcaption { text-align: center; font-size: 16px; color: var(--muted); margin-top: 16px; font-style: italic; }

.split-figure { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.split-copy h2 { font-size: clamp(30px, 3.8vw, 46px); margin-bottom: 16px; }
.split-copy > p { font-size: 17.5px; color: var(--ink-soft); margin-bottom: 20px; max-width: 520px; }
.tick-list { list-style: none; margin-bottom: 24px; }
.tick-list li { position: relative; padding-left: 32px; margin-bottom: 10px; font-size: 17px; color: var(--ink); }
.tick-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #FFF; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.split-art { background: var(--card); border: 2px solid var(--line); border-radius: 26px; padding: 16px; }
.split-art img { border-radius: 16px; width: 100%; }

.peace { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 4vw, 56px); align-items: center; background: var(--amber-wash); border-radius: 32px; padding: clamp(20px, 3vw, 36px); }
.peace-art { border-radius: 22px; overflow: hidden; }
.peace-art img { width: 100%; }
.peace-copy { padding: clamp(6px, 2vw, 24px); }
.peace-copy h2 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 16px; }
.peace-copy p { font-size: 17.5px; color: var(--ink-soft); margin-bottom: 14px; max-width: 460px; }

.three-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.way-card { background: var(--card); border: 2px solid var(--line); border-radius: 26px; padding: 28px 26px 26px; display: flex; flex-direction: column; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.way-card:hover { transform: translateY(-4px); border-color: var(--ink); }
.way-num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; font-family: 'Fraunces', serif; font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 16px; }
.amber-chip { background: var(--amber-wash); }
.teal-chip { background: var(--teal-wash); }
.coral-chip { background: var(--coral-wash); }
.way-card h3 { font-size: 25px; margin-bottom: 8px; }
.way-card p { font-size: 16.5px; color: var(--ink-soft); flex: 1; margin-bottom: 16px; }
.way-go { font-weight: 700; font-size: 16px; color: var(--teal); }

.about { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.about-copy h2 { font-size: clamp(30px, 3.8vw, 46px); margin-bottom: 16px; }
.about-copy p { font-size: 17.5px; color: var(--ink-soft); margin-bottom: 14px; max-width: 520px; }
.about-note { font-size: 15.5px !important; color: var(--muted) !important; border-left: 3px solid var(--amber); padding-left: 16px; margin-top: 20px; }
.about-art { position: relative; }
.about-art img { position: relative; z-index: 1; border-radius: 24px; border: 2px solid var(--line); }
.amber-blob { background: var(--amber); opacity: 0.2; inset: -6% -4% 6% -6%; }

@media (max-width: 1000px) {
  .split-figure, .peace, .about { grid-template-columns: 1fr; }
  .three-cards { grid-template-columns: 1fr; }
  .peace-copy, .about-copy { order: 2; }
}

@media (max-width: 1000px) { .checkup-art { max-width: none; } }
