@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #f3f4f7;
  --card: #ffffff;
  --ink: #14213a;
  --muted: #5b6477;
  --soft: #8a92a3;
  --line: #e3e6ed;
  --teal: #0f8b7d;
  --teal-tint: #dff3ef;
  --amber: #c97a10;
  --amber-tint: #fdf0dc;
  --red: #d0432c;
  --red-tint: #fbe4df;
  --blue-tint: #e6eefc;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "tnum" 1;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Demo bar */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 14px; padding: 2px 14px; background: var(--ink); color: #e8ecf5; font-size: 14px; }
.demo-bar__note { margin: 0; display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.demo-bar__note strong { padding: 1px 10px; border-radius: 6px; background: #ffd166; color: var(--ink); font-weight: 700; }
.demo-bar__actions { display: flex; gap: 4px; margin-left: auto; }
.demo-bar__reset, .demo-bar__made { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border: 0; background: none; color: #e8ecf5; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__made { color: #9fd8cf; }

.shell { max-width: 1160px; margin: 0 auto; padding: 24px 16px 48px; }

.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 18px; }
.top__who { margin: 0; font-size: 14px; font-weight: 600; color: var(--teal); }
.top h1 { margin: 2px 0 0; font-size: clamp(40px, 10vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -0.035em; }
.top__lede { margin: 10px 0 0; max-width: 46ch; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #22345a; }
.btn--cat { background: var(--cat); color: #fff; }
.btn--line { border-color: var(--line); background: #fff; color: var(--ink); }
.btn--line:hover { border-color: var(--soft); }
.link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: -12px 0 -12px 4px; border: 0; background: none; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--soft); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.stat p { margin: 0; font-size: 13px; line-height: 1.3; color: var(--muted); }
.stat strong { display: block; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.stat__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; }
.stat__icon--amber { background: var(--amber-tint); color: var(--amber); }
.stat__icon--red { background: var(--red-tint); color: var(--red); }
.stat__icon--teal { background: var(--teal-tint); color: var(--teal); }

.layout { display: grid; gap: 18px; }
.col { display: grid; gap: 18px; align-content: start; min-width: 0; }

/* Next up */
.next {
  position: relative;
  padding: 20px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--cat) 9%, #fff) 0%, #fff 55%);
  box-shadow: 0 1px 0 var(--line), 0 24px 40px -32px rgb(20 33 58 / 0.6);
  overflow: hidden;
}
.next::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--cat); }
.next__kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cat); }
.next__main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; }
.next__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--cat); color: #fff; }
.next__icon .icon { width: 28px; height: 28px; }
.next__titles h2 { margin: 0; font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.next__titles p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.next__count {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 0;
  font-weight: 700;
  color: var(--muted);
}
.next__count strong { font-size: 54px; line-height: 1; letter-spacing: -0.04em; color: var(--ink); }
.next__count--soon strong { color: var(--amber); }
.next__count--overdue strong { color: var(--red); }
.next__price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.next__price div { display: grid; }
.next__price span { font-size: 12px; font-weight: 600; color: var(--soft); text-transform: uppercase; letter-spacing: 0.04em; }
.next__price strong { font-size: 18px; }
.next__price .up { color: var(--red); }
.next__arrow { font-size: 20px; color: var(--soft); }
.next__pct { margin: 0 0 0 auto; padding: 4px 10px; border-radius: 999px; background: var(--red-tint); color: var(--red); font-weight: 800; }
.next__amount { margin: 12px 0 0; font-weight: 700; }
.next__note { display: flex; gap: 8px; margin: 12px 0 0; color: var(--ink); }
.next__note .icon { color: var(--amber); margin-top: 2px; }
.next__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.next__mail > .icon { color: var(--teal); }
.next__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Panels */
.panel { padding: 18px 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.panel__head { display: grid; gap: 10px; margin-bottom: 8px; }
.panel__head h2, .panel__title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.panel__title { margin-bottom: 12px; }
.panel__hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; color: var(--muted); }
.chip--on { border-color: var(--ink); background: var(--ink); color: #fff; }

/* Timeline */
.timeline__group + .timeline__group { margin-top: 10px; }
.timeline__month { margin: 12px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.timeline__month--late { color: var(--red); }
.timeline ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "date text actions" "date pill actions";
  align-items: center;
  gap: 2px 12px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.row--overdue { border-color: #f1c0b6; background: #fff8f6; }
.row__date { grid-area: date; display: grid; justify-items: center; line-height: 1.05; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--soft); }
.row__date strong { font-size: 22px; color: var(--ink); }
.row__icon { display: none; }
.row__text { grid-area: text; display: grid; min-width: 0; }
.row__text strong { font-weight: 700; line-height: 1.25; }
.row__text small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { grid-area: pill; justify-self: start; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill--soon { background: var(--amber-tint); color: var(--amber); }
.pill--overdue { background: var(--red-tint); color: var(--red); }
.pill--later { background: #eef0f4; color: var(--muted); }
.row__actions { grid-area: actions; display: flex; gap: 6px; }

/* Year strip */
.year__bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 120px; }
.year__col { display: grid; grid-template-rows: 1fr auto; height: 100%; align-items: end; justify-items: center; gap: 6px; }
.year__stack { display: flex; flex-direction: column-reverse; gap: 2px; width: 100%; max-width: 22px; min-height: 4px; }
.year__stack span { flex: 1; min-height: 8px; border-radius: 4px; }
.year__label { font-size: 12px; font-weight: 700; color: var(--soft); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend span { width: 10px; height: 10px; border-radius: 3px; }

/* Prices and recent */
.rises, .recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rises li, .recent li { display: flex; align-items: center; gap: 12px; }
.rises__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--cat) 14%, #fff); color: var(--cat); }
.rises__text, .recent li > span:last-child { display: grid; min-width: 0; flex: 1; }
.rises__text small, .recent small { font-size: 13px; color: var(--muted); }
.rises__up { display: grid; justify-items: end; font-weight: 800; color: var(--red); }
.rises__up small { font-size: 11px; font-weight: 600; color: var(--soft); }
.recent__tick { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--teal-tint); color: var(--teal); }

/* Settings */
.settings__to { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.settings__to strong { color: var(--ink); }
.toggle { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; cursor: pointer; }
.toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.toggle__track { position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px; background: #d4d9e2; transition: background 0.2s ease; }
.toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.2s ease; }
.toggle input:checked + .toggle__track { background: var(--teal); }
.toggle input:checked + .toggle__track::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle__track { outline: 3px solid #2f6fed; outline-offset: 2px; }
.toggle__text { display: grid; }
.toggle__text small { font-size: 13px; color: var(--muted); }

/* Make your own */
.own { margin-top: 32px; padding: 20px; border: 1.5px dashed #c5ccd8; border-radius: 20px; background: rgb(255 255 255 / 0.6); }
.own__label { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.own__words { margin: 8px 0; font-size: 20px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.own__note { margin: 0; font-size: 14px; color: var(--muted); }

/* Dialog */
.dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 30px 70px -20px rgb(20 33 58 / 0.5); }
.dialog::backdrop { background: rgb(20 33 58 / 0.5); }
.dialog__body { padding: 20px 20px 22px; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dialog__title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.dialog__close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dialog__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form__lead { margin: 0; color: var(--muted); }
.form__lead strong { color: var(--ink); }
.form__note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--teal-tint); color: #0b5e55; font-size: 14px; font-weight: 600; }
.field { display: grid; gap: 6px; min-width: 0; }
.field__label { font-weight: 700; font-size: 14px; }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid #ccd2dd; border-radius: 12px; background: #fff; font-size: 16px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(20 33 58 / 0.12); }
.money-input { display: flex; align-items: center; border: 1px solid #ccd2dd; border-radius: 12px; background: #fff; }
.money-input span { padding-left: 14px; font-weight: 700; color: var(--muted); }
.money-input input { border: 0; box-shadow: none !important; }
.form__problem { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--red-tint); color: var(--red); font-weight: 700; }
.form__actions { display: flex; justify-content: flex-end; }
.mail { display: grid; gap: 14px; }
.mail__head { margin: 0; display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bg); font-size: 14px; }
.mail__head div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.mail__head dt { color: var(--soft); font-weight: 600; }
.mail__head dd { margin: 0; font-weight: 700; }
.mail__body p { margin: 0 0 10px; }
.mail__cta { padding: 10px 12px; border-left: 3px solid var(--teal); background: var(--teal-tint); border-radius: 0 10px 10px 0; }
.mail__demo { margin: 0; font-size: 13px; font-weight: 600; color: var(--soft); }

.toast-region { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 20; display: grid; justify-items: center; pointer-events: none; }
.toast { margin: 0 16px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 16px 30px -12px rgb(20 33 58 / 0.6); animation: toast-in 0.25s ease; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (min-width: 640px) {
  .row { grid-template-columns: 44px 40px minmax(0, 1fr) auto auto; grid-template-areas: "date icon text pill actions"; }
  .row__icon { grid-area: icon; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--cat) 13%, #fff); color: var(--cat); }
  .pill { justify-self: end; }
  .next__main { grid-template-columns: auto minmax(0, 1fr) auto; }
  .next__count { grid-column: auto; flex-direction: column; align-items: flex-end; gap: 0; margin: 0; font-size: 13px; }
}

@media (min-width: 1000px) {
  .shell { padding: 36px 28px 64px; }
  .layout { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
  .stats { gap: 14px; }
  .stat { grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 16px 18px; }
  .stat__icon { width: 44px; height: 44px; grid-row: span 1; }
  .next { padding: 26px 26px 22px; }
  .next__titles h2 { font-size: 32px; }
  .panel { padding: 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
