/* Public pages (home and calculators): the notebook look, without the app's JavaScript. */
@font-face { font-family: Caveat; font-weight: 700; font-display: swap; src: url(/seo/caveat-700.woff) format('woff'); }
@font-face { font-family: Kalam; font-weight: 400; font-display: swap; src: url(/seo/kalam-400.woff) format('woff'); }
@font-face { font-family: Kalam; font-weight: 700; font-display: swap; src: url(/seo/kalam-700.woff) format('woff'); }

:root {
  --paper: #fcfcf9;
  --grid: #e6edf6;
  --margin: #f0a9a9;
  --text: #1d2430;
  --muted: #555f70;
  --faint: #8f98a8;
  --accent: #2348a6;
  --accent-soft: #e2e9f8;
  --cover: #1f2c52;
  --band: #0d1328;
  --note: #fff1a6;
  --note-border: #e8d774;
  --highlight: #ffe36e;
  --income: #17784a;
  --surface: #ffffff;
  --border: #d6e1ee;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font: 400 18px/1.6 Kalam, 'Segoe Print', 'Comic Sans MS', system-ui, sans-serif;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: Caveat, cursive; font-weight: 700; line-height: 1.1; margin: 0 0 12px; }
h1 { font-size: clamp(44px, 7vw, 72px); }
h2 { font-size: clamp(36px, 5vw, 50px); }
h3 { font-size: 30px; }
p { margin: 0 0 14px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Cover band on top */
.top { background: var(--cover); color: #e9eef8; border-bottom: 10px solid var(--band); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 26px Caveat, cursive; }
.brand svg { width: 34px; height: 34px; flex: none; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 16px; }
.top nav a { color: #e9eef8; text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
@media (max-width: 640px) { .top nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 24px; border-radius: 6px;
  border: 2px solid var(--text); font: 700 19px Kalam, sans-serif; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 4px 4px 0 var(--text); }
.btn-secondary { background: var(--surface); color: var(--text); box-shadow: 4px 4px 0 var(--text); }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--text); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text); }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 16px; box-shadow: 3px 3px 0 var(--text); }
.top .btn-sm { border-color: #fff; box-shadow: 3px 3px 0 var(--band); }

/* Hero */
.hero { padding: 48px 0 32px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } }
.hl { background: linear-gradient(transparent 55%, var(--highlight) 55%, var(--highlight) 92%, transparent 92%); padding: 0 4px; }
.lead { font-size: 21px; color: var(--muted); max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 12px; }
.small { font-size: 15px; color: var(--muted); }
.flag { display: inline-flex; flex-direction: column; width: 26px; height: 16px; border-radius: 2px; overflow: hidden; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.flag i { flex: 1; display: block; }
.flag i:nth-child(1), .flag i:nth-child(5) { background: #002b7f; }
.flag i:nth-child(2), .flag i:nth-child(4) { background: #fff; }
.flag i:nth-child(3) { flex: 2; background: #ce1126; }

/* Phone frame around real screenshots */
.phone { width: min(320px, 82vw); margin: 0 auto; border: 10px solid var(--text); border-radius: 34px; overflow: hidden; background: var(--paper);
  box-shadow: 10px 12px 0 rgba(29, 36, 48, .18); transform: rotate(2deg); }
.phone img { width: 100%; }

/* Sticky notes and cards */
.note { background: var(--note); border: 1px solid var(--note-border); padding: 20px 22px; box-shadow: 4px 4px 0 rgba(29,36,48,.12); position: relative; }
.note::before { content: ''; position: absolute; top: -11px; left: 50%; width: 86px; height: 22px; margin-left: -43px; background: rgba(235,222,180,.85); transform: rotate(-3deg); }
.tilt-l { transform: rotate(-1deg); }
.tilt-r { transform: rotate(1deg); }

section { padding: 44px 0; }
.section-title { text-align: center; margin-bottom: 30px; }
.section-title p { color: var(--muted); max-width: 640px; margin: 0 auto; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 18px; box-shadow: 3px 3px 0 rgba(29,36,48,.08); }
.feature img { border-radius: 10px; border: 1px solid var(--border); margin-bottom: 14px; aspect-ratio: 540 / 895; object-fit: cover; object-position: top; }
.feature p { color: var(--muted); font-size: 17px; margin: 0; }

.ticos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.ticos .note h3 { font-size: 28px; margin-bottom: 6px; }
.ticos .note p { margin: 0; font-size: 17px; }

.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.trust div { border-left: 4px solid var(--income); padding: 4px 14px; }
.trust strong { display: block; font-size: 19px; }
.trust span { color: var(--muted); font-size: 16px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 12px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font: 700 26px/1 Caveat, cursive; color: var(--accent); }
.faq details[open] summary::after { content: '−'; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--muted); }

.cta-final { text-align: center; }
.cta-final .note { max-width: 640px; margin: 0 auto; padding: 32px 26px; }

footer { background: var(--cover); color: #c9d2e6; padding: 28px 0; margin-top: 40px; font-size: 15px; border-top: 10px solid var(--band); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a { color: #e9eef8; }
footer nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 22px; box-shadow: 3px 3px 0 rgba(29,36,48,.08); }
.cr-box { display: flex; gap: 14px; align-items: flex-start; background: var(--accent-soft); border: 2px solid var(--accent); border-radius: 6px; padding: 14px 18px; margin-bottom: 20px; }
.cr-box .flag { width: 40px; height: 25px; flex: none; margin-top: 4px; }
.cr-box p { margin: 0; font-size: 16px; color: var(--muted); }
.seg { display: flex; border: 2px solid var(--text); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.seg label { flex: 1; text-align: center; padding: 10px; cursor: pointer; font-weight: 700; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { background: var(--highlight); }
.seg label span { display: block; margin: -10px; padding: 10px; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.period { text-align: center; font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.money { display: flex; align-items: center; gap: 6px; border-bottom: 2px solid var(--muted); }
.money span { font: 700 26px Caveat, cursive; color: var(--muted); }
.money input { flex: 1; min-width: 0; border: 0; background: transparent; font: 700 20px 'Courier New', monospace; padding: 8px 2px; color: var(--text); }
.money input:focus { outline: none; }
.money:focus-within { border-color: var(--accent); }
.quick { display: flex; gap: 12px; align-items: flex-end; margin: 8px 0 18px; }
.quick .money { flex: 1; }
.months { display: grid; gap: 4px; }
.months .row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.months .row label { flex: 1; font-size: 17px; }
.months .row small { display: block; font-size: 13px; color: var(--faint); }
.months .money { width: 170px; border-bottom-width: 1px; }
.months .money input { font-size: 17px; text-align: right; }
.result { position: sticky; top: 16px; }
.result .note { padding: 24px; }
.result .amount { font: 700 46px 'Courier New', monospace; letter-spacing: -2px; margin: 4px 0 8px; word-break: break-all; }
.result .label { font-weight: 700; }
.content h2 { margin-top: 36px; }
.content ul { padding-left: 22px; }
.content li { margin-bottom: 6px; }
.table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 17px; background: var(--surface); }
.table th, .table td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.table th { background: var(--accent-soft); }
.crumbs { font-size: 15px; color: var(--muted); margin: 18px 0 0; }
.crumbs a { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.brand, .top .btn-sm { white-space: nowrap; }
@media (max-width: 440px) {
  .brand { font-size: 22px; gap: 8px; }
  .brand svg { width: 28px; height: 28px; }
  .top .btn-sm { padding: 6px 12px; font-size: 15px; }
}

/* Phones: the result stays in view while typing the months. */
.mini { display: none; }
@media (max-width: 900px) {
  .mini { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--note); border: 2px solid var(--text); border-radius: 8px; padding: 10px 16px; box-shadow: 4px 4px 0 var(--text);
    transition: transform .2s, opacity .2s; }
  .mini b { font: 700 24px 'Courier New', monospace; letter-spacing: -1px; }
  .mini.hide { transform: translateY(140%); opacity: 0; }
  body:has(.mini) footer { padding-bottom: 96px; }
}
