/* Last Payment Day – warm, encouraging, not bank-like. Fonts are self-hosted (see fonts/OFL-NOTE.txt). */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/PlusJakartaSans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --brand: #0f766e;        /* teal */
  --brand-dark: #0b4f4a;
  --brand-soft: #dff4ec;   /* mint */
  --brand-mid: #9fdcc9;
  --sun: #f7b93e;
  --sun-soft: #fff1cf;
  --sun-ink: #4a3300;
  --accent: #c2410c;       /* avalanche / warm accent */
  --ink: #12302d;
  --muted: #4d5f5b;
  --line: #e3dccb;
  --bg: #fbf8f1;
  --card: #ffffff;
  --warn-bg: #fff1cf;
  --warn-ink: #5a3b00;
  --err-bg: #fde8e4;
  --err-ink: #8a1c10;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(18, 48, 45, .06), 0 8px 24px -12px rgba(18, 48, 45, .18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand-dark); }

/* header */
header.site { background: var(--bg); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; color: var(--brand-dark); text-decoration: none; }
.logo span { color: var(--accent); font-weight: 800; }
.logo svg { width: 32px; height: 32px; flex: 0 0 auto; }

/* typography */
h1 { font-size: 2rem; line-height: 1.12; letter-spacing: -.03em; margin: 8px 0 12px; font-weight: 800; }
h2 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 1.05rem; margin: 0 0 6px; font-weight: 700; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 1.05rem; max-width: 52ch; }
.hint { color: var(--muted); font-size: .88rem; }

/* hero */
.hero { display: grid; gap: 22px; padding: 22px 0 8px; align-items: center; }
.hero-copy { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .82rem; }
.eyebrow svg { width: 16px; height: 16px; }
.perks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: .98rem; }
.perks svg { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; }
.example { position: relative; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px 16px 14px; box-shadow: var(--shadow); overflow: hidden; }
.example::before { content: ''; position: absolute; right: -50px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: var(--sun-soft); z-index: 0; }
.example > * { position: relative; z-index: 1; }
.example-flag { display: inline-block; background: var(--sun); color: var(--sun-ink); font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; }
.example-meta { color: var(--muted); font-size: .85rem; margin: 6px 0 10px; }
.ex-date-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.ex-date { font-size: 2.2rem; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; color: var(--brand-dark); }
.ex-sub { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.ex-body { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.ex-ring { width: 96px; height: 96px; }
.ex-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ex-mini div { background: var(--bg); border-radius: 12px; padding: 8px 10px; font-size: .82rem; color: var(--muted); }
.ex-mini strong { display: block; font-size: 1rem; color: var(--ink); }
.ex-mini .win { background: var(--brand-soft); }
.example figcaption { margin-top: 10px; font-size: .78rem; color: var(--muted); }

/* progress ring + bars (hero example and live results) */
.ring { display: block; }
.ring .track { stroke: #e6efe9; }
.ring .val { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .9s ease-out; }
.ring text { font-family: inherit; fill: var(--ink); }
.bars { display: grid; gap: 10px; }
.bar-row .bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; font-weight: 600; margin-bottom: 3px; }
.bar-track { height: 14px; background: #efe9d9; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: var(--w, 100%); border-radius: 99px; background: #8b8f86; animation: grow .9s ease-out; }
.bar-fill.plan { background: linear-gradient(90deg, var(--brand), #14a38f); }
@keyframes grow { from { width: 0; } }

/* cards + forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
label, .lbl { display: block; font-size: .88rem; font-weight: 700; margin-bottom: 4px; }
input, select, button { font: inherit; }
input[type=text], input[type=number], input[type=email], input[type=month], input[type=date], select {
  width: 100%; min-height: 46px; padding: 8px 12px; border: 1.5px solid #7a8a86; border-radius: 12px; background: #fff; color: var(--ink);
}
input:hover, select:hover { border-color: var(--brand); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 3px solid #1d4ed8; outline-offset: 2px;
}
.row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.row .full { grid-column: 1 / -1; }
.debt { border: 1px solid var(--line); border-left: 6px solid var(--brand-mid); border-radius: 14px; padding: 12px; margin-bottom: 12px; background: #fffdf8; }
.debt:nth-child(3n+2) { border-left-color: var(--sun); }
.debt:nth-child(3n+3) { border-left-color: #f1a08a; }
.debt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 20px;
  border-radius: 99px; border: 2px solid var(--brand); background: var(--brand); color: #fff; font-weight: 800; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--brand-dark); }
.btn.secondary:hover { background: var(--brand-soft); border-color: var(--brand); }
.btn.link { border: 0; background: none; color: var(--brand-dark); text-decoration: underline; min-height: 44px; padding: 8px; font-weight: 700; cursor: pointer; }
.btn.link:hover { background: none; text-decoration-thickness: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.msg { border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.msg.err { background: var(--err-bg); color: var(--err-ink); }
.msg.warn { background: var(--warn-bg); color: var(--warn-ink); }
.msg.ok { background: var(--brand-soft); color: var(--brand-dark); }

/* results */
.hero-result { display: grid; gap: 16px; background: linear-gradient(160deg, var(--brand-soft), #f4fbf6 60%, var(--sun-soft)); border-radius: 18px; padding: 18px 16px; margin-bottom: 16px; }
.hr-date-label { color: var(--brand-dark); font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.hr-date-label svg { width: 18px; height: 18px; }
.hr-date { font-size: 2.35rem; line-height: 1.05; font-weight: 800; letter-spacing: -.035em; color: var(--brand-dark); margin: 2px 0; }
.hr-sub { color: var(--muted); font-weight: 600; }
.hr-viz { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center; }
.hr-viz .ring { width: 104px; height: 104px; }
.hr-viz.solo { grid-template-columns: 1fr; }
.hr-msg { margin: 0; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--brand-mid); color: var(--brand-dark); border-radius: 99px; padding: 4px 12px; font-weight: 800; font-size: .82rem; width: fit-content; }
.pill svg { width: 16px; height: 16px; }
.grid3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.method { border: 2px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; }
.method.best { border-color: var(--brand); background: #f6fcf9; }
.method .big { font-size: 1.55rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--brand-dark); }
.method .small { color: var(--muted); font-size: .92rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; background: var(--brand); color: #fff; border-radius: 99px; padding: 2px 9px; margin-left: 6px; vertical-align: middle; }
.verdict { font-size: 1.02rem; font-weight: 600; margin: 4px 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
td.num, th.num { text-align: right; white-space: nowrap; }
.tablewrap { overflow-x: auto; }
.chart { width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; margin-top: 6px; }
.legend i { display: inline-block; width: 16px; height: 5px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* placeholders (stay visible until the owner fills them in) */
.ph { background: #fff3a3; color: #5c4a00; padding: 0 3px; border-radius: 3px; font-weight: 700; }
.ph-block { border: 2px dashed #d4a800; background: #fffbe0; border-radius: 12px; padding: 12px; margin: 10px 0; color: #5c4a00; }

/* extra / gift card */
.extra { position: relative; border: 2px solid var(--brand); background: linear-gradient(180deg, #fff, #f6fcf9); overflow: hidden; }
.extra-head { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; margin-bottom: 8px; }
.extra-art { width: 84px; height: 100px; }
.extra h2 { margin-bottom: 4px; }
.extra-head p { margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 10px; }
legend { font-weight: 700; font-size: .9rem; padding: 0; margin-bottom: 4px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-right: 14px; min-height: 40px; }
.radios input { width: 20px; height: 20px; accent-color: var(--brand); }

footer.site { margin-top: 32px; padding: 22px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; background: #f4efe1; }
footer.site a { color: var(--brand-dark); }
.disclaimer { font-size: .88rem; color: var(--muted); margin-top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prose h2 { margin-top: 24px; }
.prose p, .prose li { max-width: 70ch; }
details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
textarea { width: 100%; min-height: 70px; font: inherit; padding: 8px 12px; border: 1.5px solid #7a8a86; border-radius: 12px; }

@media (min-width: 640px) {
  h1 { font-size: 2.7rem; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .row.r4 { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .row.r4 .full { grid-column: auto; }
  .card { padding: 22px; }
  .hr-date { font-size: 3.2rem; }
  .ex-date { font-size: 2.6rem; }
}
@media (min-width: 820px) {
  .hero { grid-template-columns: 1.1fr .9fr; gap: 36px; padding: 36px 0 12px; }
  .hero-result { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 24px; padding: 24px; }
}
@media (max-width: 639px) { .row.r4 { grid-template-columns: 1fr 1fr; } .row.r4 .name { grid-column: 1 / -1; } }
@media (max-width: 639px) { .row.stack { grid-template-columns: 1fr; } td.num { white-space: normal; } }

[hidden] { display: none !important; }

/* Payoff order: stacked cards on narrow screens */
@media (max-width: 639px) {
  #order thead { display: none; }
  #order, #order tbody, #order tr, #order td { display: block; width: 100%; }
  #order tr { border: 1px solid var(--line); border-left: 6px solid var(--brand-mid); border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; background: #fffdf8; }
  #order td { border: 0; padding: 4px 0; text-align: left; display: flex; justify-content: space-between; gap: 12px; }
  #order td.num { text-align: right; white-space: normal; }
  #order td::before { content: attr(data-label); font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; align-self: center; flex: 0 0 auto; }
  #order td:first-child { font-size: 1.05rem; padding-bottom: 6px; }
  #order td:first-child::before { content: none; }
}

@media (max-width: 479px) {
  .hr-viz { grid-template-columns: 88px 1fr; gap: 12px; }
  .hr-viz .ring { width: 88px; height: 88px; }
  .bar-row .bar-top { font-size: .78rem; white-space: nowrap; }
  .ex-body { grid-template-columns: 88px 1fr; gap: 12px; }
  .ex-ring { width: 88px; height: 88px; }
}

.hr-msg { margin-top: 12px; }

/* collapsible "Move my data" button */
details.move { margin-top: 18px; border: 2px solid var(--brand-mid); border-radius: 16px; background: #fff; }
details.move > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 16px; font-weight: 800; color: var(--brand-dark); border-radius: 14px; }
details.move > summary::-webkit-details-marker { display: none; }
details.move > summary:hover { background: var(--brand-soft); }
details.move .move-ico { width: 22px; height: 22px; flex: 0 0 auto; }
details.move .chev { width: 22px; height: 22px; margin-left: auto; flex: 0 0 auto; transition: transform .2s ease; }
details.move[open] .chev { transform: rotate(180deg); }
details.move[open] > summary { border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
details.move .move-body { padding: 12px 16px 16px; }
