/* Subscription Tracker – design system (marketing site, policy pages, checkout).
   Warm off-white, near-black ink, one indigo accent. Type does the work. */

:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --surface: #fdfcfa;
  --sunken: #ece9e2;
  --ink: #16161a;
  --ink-2: #4a4a52;
  --muted: #7c7b74;
  --line: #e0dcd3;
  --accent: #4f46e5;
  --accent-hover: #4038c9;
  --accent-soft: #e8e6fb;
  --good: #1f7a4d;
  --warn: #a8500a;
  --radius: 8px;
  --radius-sm: 5px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Older names still used by pay.html */
  --text: var(--ink);
  --text-2: var(--ink-2);
  --border: var(--line);
  --track: var(--sunken);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 400 16px/1.6 var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent-soft); }

/* ---------- type ---------- */
.display {
  font-size: clamp(38px, 5vw, 58px); line-height: 1.03; letter-spacing: -.035em; font-weight: 600; margin: 0;
}
h1, h2, h3 { text-wrap: balance; }
p, .lead { text-wrap: pretty; }
h2, .h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.028em; font-weight: 600; margin: 0; }
h3 { font-size: 17px; line-height: 1.35; letter-spacing: -.01em; font-weight: 600; margin: 0; }
p { margin: 0; }
.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: var(--ink-2); }
.caption { font-size: 13px; line-height: 1.5; color: var(--muted); }
.mono, .num { font-family: var(--mono); font-feature-settings: "tnum"; letter-spacing: -.01em; }
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
mark.fill { background: #fff1a8; color: #5c4400; padding: 0 3px; border-radius: 3px; font-weight: 500; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
section { padding-block: clamp(64px, 9vw, 112px); }
.section-head { display: grid; grid-template-columns: 180px 1fr; gap: 24px; margin-bottom: 48px; align-items: baseline; }
.section-head .lead { max-width: 560px; margin-top: 12px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), color .15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: #2b2b31; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-hover); }
.btn.quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.quiet:hover { border-color: var(--ink-2); }
.btn.small { height: 34px; padding: 0 13px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
.link { color: var(--accent); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.arrow::after { content: "→"; display: inline-block; margin-left: 4px; transition: transform .15s var(--ease); }
.arrow:hover::after { transform: translateX(3px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.wordmark { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -.015em; text-decoration: none; white-space: nowrap; }
.wordmark img { width: 22px; height: 22px; border-radius: 5px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a, .nav-login { font-size: 14.5px; color: var(--ink-2); text-decoration: none; transition: color .15s; }
.nav-links a:hover, .nav-login:hover { color: var(--ink); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.menu { display: none; margin-left: auto; }
.menu summary {
  list-style: none; cursor: pointer; font-size: 14.5px; font-weight: 500; padding: 8px 2px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { color: var(--accent); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 8px 24px 20px; display: grid;
}
.menu-panel a { padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 17px; }
.menu-panel .btn { margin-top: 16px; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 88px) clamp(56px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .lead { margin: 22px 0 30px; max-width: 470px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .caption { margin-top: 18px; }

/* ---------- lists of subscriptions ---------- */
.sub-list { list-style: none; margin: 0; padding: 0; }
.sub-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 6px; border-top: 1px solid var(--line);
}
.sub-row:first-child { border-top: 0; }
.mark {
  width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center;
  font: 600 13px var(--sans); color: #fff;
}
.sub-row .name { font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.sub-row .meta { font-size: 12.5px; color: var(--muted); }
.sub-row .amt { font: 500 14px var(--mono); text-align: right; }
.sub-row .amt small { display: block; font: 12px var(--mono); color: var(--muted); }
.soon { color: var(--warn); }

/* ---------- value strip ---------- */
.values { padding-block: 0; }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value { padding: 22px 24px 22px 0; }
.value + .value { padding-left: 24px; border-left: 1px solid var(--line); }
.value h3 { font-size: 15px; margin-bottom: 4px; }
.value p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* ---------- how it works ---------- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.flow::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; border-top: 1px solid var(--line); }
.flow li { position: relative; padding-right: 32px; }
.flow .step-no {
  display: inline-block; position: relative; background: var(--bg); padding-right: 12px;
  font: 500 13px var(--mono); color: var(--accent);
}
.flow h3 { margin: 18px 0 8px; font-size: 22px; letter-spacing: -.02em; }
.flow p { color: var(--ink-2); max-width: 300px; }
.flow .caption { margin-top: 10px; }

/* ---------- interactive demo ---------- */
.demo { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); border-top: 1px solid var(--ink); }
.demo-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.demo-table th { text-align: left; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line); }
.demo-table th.r, .demo-table td.r { text-align: right; }
.demo-table td { padding: 13px 10px; border-bottom: 1px solid var(--line); }
.demo-table tbody tr { cursor: pointer; transition: background-color .15s; }
.demo-table tbody tr:hover { background: color-mix(in srgb, var(--sunken) 60%, transparent); }
.demo-table tbody tr[aria-selected="true"] { background: var(--sunken); }
.demo-table tbody tr[aria-selected="true"] td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.demo-table .svc { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.demo-table .mark { width: 24px; height: 24px; font-size: 12px; }
.demo-table td.mono { font-size: 13.5px; }
.detail { border-left: 1px solid var(--line); padding: 22px 0 22px 28px; }
.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.detail-head .mark { width: 36px; height: 36px; font-size: 16px; border-radius: 8px; }
.detail-price { font: 600 34px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.detail-price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 22px 0 0; font-size: 14px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; text-align: right; }
.share-bar { height: 4px; background: var(--sunken); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.share-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s var(--ease); }
.fade { animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---------- insights ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.stat .label { display: block; margin-bottom: 8px; }
.stat b { font: 600 clamp(30px, 3.6vw, 44px)/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.stat b small { font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.stat p { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.bars { display: grid; gap: 4px; }
.bar-row {
  display: grid; grid-template-columns: 120px 1fr 96px; gap: 16px; align-items: center;
  padding: 8px 6px; border-radius: 4px; cursor: default; transition: background-color .15s;
}
.bar-row:hover, .bar-row:focus-visible { background: var(--surface); }
.bar-row .track { height: 10px; background: var(--sunken); border-radius: 2px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; background: var(--ink); border-radius: 2px; transition: width .5s var(--ease), background-color .15s; }
.bar-row:hover .track i, .bar-row:focus-visible .track i { background: var(--accent); }
.bar-row .amt { font: 500 14px var(--mono); text-align: right; }
.bar-row .who { grid-column: 2 / 4; font-size: 12.5px; color: var(--muted); max-height: 0; overflow: hidden; transition: max-height .2s var(--ease); }
.bar-row:hover .who, .bar-row:focus-visible .who { max-height: 40px; }

/* ---------- reminders ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split .lead { margin-top: 14px; }
.notif {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 18px 40px -26px rgba(22,22,26,.35); max-width: 400px;
}
.notif img { width: 36px; height: 36px; }
.notif b { display: block; font-size: 14.5px; font-weight: 600; }
.notif span { font-size: 13.5px; color: var(--ink-2); }
.notif time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.prefs { margin-top: 28px; max-width: 400px; border-top: 1px solid var(--line); }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pref .caption { margin-top: 2px; }
.pref select {
  font: 500 14px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 7px 10px;
}
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 11px; background: var(--line); transition: background-color .2s; pointer-events: none; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- extension ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; margin-top: 8px; }
.fact h3 { margin-bottom: 6px; }
.fact p { font-size: 15px; color: var(--ink-2); }
.shot { margin: 0; }
.shot img { display: block; width: 100%; max-width: 346px; margin-inline: auto; border-radius: 12px; box-shadow: 0 24px 50px -30px rgba(22,22,26,.45); }
.shot figcaption { text-align: center; margin-top: 14px; }
.hero-shot img { max-width: 380px; }

/* ---------- security ---------- */
.security { background: var(--ink); color: #ecebe6; }
.security .label { color: #8f8e88; }
.security .lead { color: #b9b8b1; }
.sec-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; margin: 0; }
.sec-item { padding: 20px 0; border-top: 1px solid #2e2e34; }
.sec-item dt { font-weight: 600; margin-bottom: 4px; }
.sec-item dd { margin: 0; color: #b9b8b1; font-size: 15px; }
.security a { color: #fff; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--ink); }
.plan { padding: 28px 32px 32px 0; display: flex; flex-direction: column; }
.plan + .plan { padding-left: 32px; border-left: 1px solid var(--line); }
.plan .price { font: 600 40px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.04em; margin: 14px 0 6px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 9px; flex: 1; }
.plan li { padding-left: 20px; position: relative; font-size: 15px; color: var(--ink-2); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 8px; height: 1.5px; background: var(--accent); }
.plan .btn { align-self: flex-start; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px;
  padding: 18px 0; font-size: 17px; font-weight: 500; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 20px/1 var(--mono); color: var(--muted); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 48px 20px 0; color: var(--ink-2); max-width: 720px; }

/* ---------- closing + footer ---------- */
.closing { text-align: left; }
.closing .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
footer { border-top: 1px solid var(--line); padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer nav a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
footer nav a:hover { color: var(--ink); }

/* ---------- policy pages ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 32px; }
.doc h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; margin: 0 0 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.doc h2 { font-size: 20px; letter-spacing: -.015em; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc .box { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; margin: 20px 0; }
.doc .box p { margin: 6px 0; }
.doc .table-wrap { overflow-x: auto; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc code { font-family: var(--mono); font-size: 14px; background: var(--sunken); padding: 1px 5px; border-radius: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav-links, .nav-actions { display: none; }
  .menu { display: block; }
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .value:nth-child(3) { padding-left: 0; border-left: 0; }
  .value:nth-child(n+3) { border-top: 1px solid var(--line); }
  .demo { grid-template-columns: 1fr; }
  .detail { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 10px; margin-bottom: 32px; }
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow::before { left: 13px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1px solid var(--line); }
  .flow li { padding: 0 0 0 40px; }
  .flow .step-no { position: absolute; left: 0; top: 0; padding: 0 0 6px; }
  .flow h3 { margin-top: 0; }
  .stats { grid-template-columns: 1fr; gap: 20px; }
  .bar-row { grid-template-columns: 92px 1fr 80px; gap: 10px; }
  .facts, .sec-list { grid-template-columns: 1fr; }
  .plan, .plan + .plan { padding: 24px 0; border-left: 0; }
  .plan + .plan { border-top: 1px solid var(--line); }
  .demo-table .hide-sm { display: none; }
}
@media (max-width: 480px) {
  .values-grid { grid-template-columns: 1fr; }
  .value, .value + .value { padding: 18px 0; border-left: 0; }
  .value + .value { border-top: 1px solid var(--line); }
  .wrap { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
