@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/inter-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;
}
[hidden] { display: none !important; }
:root {
  --bg: #0b0f14;
  --surface: #121821;
  --surface-2: #18202b;
  --line: #233040;
  --text: #e6edf3;
  --muted: #8b98a8;
  --teal: #2dd4bf;
  --teal-dim: rgba(45, 212, 191, 0.14);
  --amber: #fbbf24;
  --red: #f87171;
  --green: #4ade80;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3, p { margin: 0; }
h1, .brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; }
.subhead { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a { color: var(--teal); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: rgba(11, 15, 20, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo svg { width: 34px; height: 34px; display: block; }
.tagline { display: none; color: var(--muted); font-size: 13px; }
.top-actions { position: relative; display: flex; gap: 8px; align-items: center; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; min-width: 190px; box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 10px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.menu button:hover { background: var(--teal-dim); }
.menu .danger { color: var(--red); }

/* Buttons & inputs */
.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 10px 16px; border: 1px solid transparent; cursor: pointer; color: var(--text); background: var(--surface-2); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-primary { background: var(--teal); color: #04221e; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-outline { background: transparent; border-color: var(--teal); color: var(--teal); }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
input, select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; width: 100%; min-height: 42px;
}
input::placeholder { color: #5b6878; }
input[type="date"] { color-scheme: dark; }
.select-sm { width: auto; min-height: 34px; padding: 6px 10px; font-size: 13px; }

.banner {
  margin: 12px 16px 0; padding: 12px 14px; border-radius: 12px; background: var(--teal-dim); border: 1px solid rgba(45,212,191,.35);
  display: flex; gap: 12px; align-items: center; justify-content: space-between; font-size: 14px;
}

/* Layout */
.layout { display: grid; gap: 14px; padding: 14px 16px 24px; max-width: 1180px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

/* KPIs */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); font-size: 12px; }
.kpi:first-child .kpi-value { color: var(--teal); }
.kpi.over .kpi-value { color: var(--red); }

/* Upcoming */
.upcoming { list-style: none; margin: 0; padding: 0; }
.upcoming li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.upcoming li:first-child { border-top: 0; }
.date-badge { width: 44px; flex: none; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 4px 0; line-height: 1.1; }
.date-badge b { display: block; font-size: 16px; }
.date-badge span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.up-main { flex: 1; min-width: 0; }
.up-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-when { font-size: 12px; color: var(--muted); }
.up-when.soon { color: var(--amber); }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Budget */
.budget-input { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.budget-input input { width: 96px; min-height: 34px; padding: 6px 10px; }
.budget-figure { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar-paid { background: var(--teal); transition: width .4s ease; }
.bar-due { background: repeating-linear-gradient(45deg, rgba(45,212,191,.45) 0 6px, rgba(45,212,191,.25) 6px 12px); transition: width .4s ease; }
.bar.over .bar-paid { background: var(--red); }
.bar.over .bar-due { background: repeating-linear-gradient(45deg, rgba(248,113,113,.5) 0 6px, rgba(248,113,113,.25) 6px 12px); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; margin-top: 8px; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dot-paid { background: var(--teal); }
.dot-due { background: rgba(45,212,191,.4); }

.hbars { display: grid; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: var(--teal); }

.vbars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 190px; padding-top: 6px; }
.vbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.vbar-val { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vbar-col { width: 100%; max-width: 42px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 8px 8px 4px 4px; overflow: hidden; background: var(--surface-2); }
.vbar-fill { background: var(--teal); }
.vbar-due { background: rgba(45,212,191,.3); }
.vbar-label { font-size: 12px; color: var(--muted); }
.vbar.current .vbar-label { color: var(--text); font-weight: 600; }

/* Subscriptions */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.chip.active { background: var(--teal-dim); color: var(--teal); border-color: rgba(45,212,191,.4); }
.subs { list-style: none; margin: 0; padding: 0; }
.subs .empty { color: var(--muted); padding: 18px 0; text-align: center; }
.sub { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.sub:first-child { border-top: 0; }
.avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #04221e; }
.sub-main { min-width: 0; }
.sub-name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sub-meta { font-size: 12px; color: var(--muted); }
.sub-note { font-size: 12px; color: #a9b4c2; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-right { text-align: right; }
.sub-per { font-size: 11px; color: var(--muted); }
.tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.tag.paused { color: var(--amber); background: rgba(251,191,36,.12); }
.tag.cancelled { color: var(--red); background: rgba(248,113,113,.12); }
.tag.example { color: var(--teal); background: var(--teal-dim); }
.sub.is-paused .avatar, .sub.is-cancelled .avatar { filter: grayscale(1) brightness(.7); }
.sub.is-cancelled .sub-name > span:first-child { text-decoration: line-through; color: var(--muted); }
.sub-actions { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.icon-btn { font: inherit; font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.icon-btn:hover { border-color: var(--teal); }
.icon-btn.manage { color: var(--teal); }
.icon-btn.danger { color: var(--red); }

/* Insights */
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--teal-dim); color: var(--teal); }
.pill:empty { display: none; }
.insights { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.insight { padding: 12px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--teal); }
.insight.warn { border-left-color: var(--amber); }
.insight.alert { border-left-color: var(--red); }
.insight h3 { margin: 0 0 4px; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.insight h3 .save { color: var(--green); font-weight: 600; white-space: nowrap; font-size: 13px; }
.insight p { font-size: 13px; color: #b6c1cd; }

/* Form */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); min-width: 0; }
.col-2 { grid-column: span 2; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.hint.ok { color: var(--teal); }
.money { position: relative; }
.money-sym { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 14px; }
.money input { padding-left: 34px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.form-error { color: var(--red); font-size: 13px; margin-top: 10px; }
#formCard.editing { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 16px 32px; }
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; z-index: 50; max-width: calc(100% - 32px);
}

@media (min-width: 720px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .kpi-value { font-size: 26px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .sub { grid-template-columns: 40px 1fr auto auto; }
  .sub-actions { grid-column: auto; justify-content: flex-end; }
}
@media (min-width: 960px) {
  .tagline { display: none; } /* hero carries the value proposition now */
  .hero { padding: 32px 24px 8px; }
  .layout { grid-template-columns: 1fr 1fr; padding: 20px 24px 32px; gap: 16px; }
  .kpis, .span-2 { grid-column: span 2; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .banner { max-width: 1132px; margin: 16px auto 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Hero / landing */
.brand-name { margin: 0; }
.hero { max-width: 1180px; margin: 0 auto; padding: 28px 16px 8px; }
.hero h1 { font-size: clamp(24px, 5vw, 36px); line-height: 1.15; letter-spacing: -0.02em; max-width: 22ch; }
.hero-sub { color: var(--muted); margin-top: 10px; max-width: 60ch; }
.hero-points { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.hero-points li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: var(--muted); }
.hero-points strong { color: var(--text); display: block; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.hero-actions .btn { text-decoration: none; display: inline-block; }
#formCard { scroll-margin-top: 80px; }
@media (min-width: 760px) { .hero-points { grid-template-columns: repeat(3, 1fr); } }

/* Language switch */
.lang-switch { text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; letter-spacing: .04em; }
.foot a { display: inline-block; margin-top: 6px; color: var(--teal); }
.foot span { display: block; }

/* ---------- Static pages: landing, pricing, privacy, articles, 404 ---------- */
.brand-name a, a.brand { color: inherit; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a { text-decoration: none; }
.site-nav .nav-link { color: var(--muted); font-size: 14px; padding: 6px 8px; border-radius: 8px; }
.site-nav .nav-link:hover, .site-nav .nav-link[aria-current="page"] { color: var(--text); }
a.btn { text-decoration: none; display: inline-block; }
.page { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; }
.section { margin-top: 40px; }
.section > h2 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 14px; }
.shot { margin: 28px 0 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.shot figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 52px; position: relative; color: var(--muted); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--teal-dim); color: var(--teal); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.steps h3 { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.service-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.service-chips a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; }
.service-chips a:hover { border-color: var(--teal); }
.note { color: var(--muted); font-size: 13px; margin-top: 10px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { padding-left: 26px; position: relative; color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--teal); font-weight: 700; }
.checks li.later::before { content: "○"; color: var(--muted); font-weight: 400; }
.later-tag { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: rgba(251, 191, 36, .14); color: var(--amber); white-space: nowrap; }
.lead { color: var(--muted); font-size: 17px; margin-top: 10px; max-width: 62ch; }
.page-head { padding-top: 28px; }
.page-head h1 { font-size: clamp(26px, 5vw, 36px); letter-spacing: -0.02em; line-height: 1.15; }
.plans { display: grid; gap: 16px; margin-top: 28px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.plan.current { border-color: var(--teal); }
.plan h2 { font-size: 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--teal-dim); color: var(--teal); }
.badge.soon { background: rgba(251, 191, 36, .14); color: var(--amber); }
.price { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .checks { flex: 1; align-content: start; }
.plan .btn[disabled] { opacity: .6; cursor: not-allowed; }
.faq dt { font-weight: 600; margin-top: 16px; }
.faq dd { margin: 4px 0 0; color: var(--muted); }
.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(26px, 5vw, 36px); letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 16px; }
.prose h2 { font-size: 22px; margin: 32px 0 10px; }
.prose h3 { font-size: 17px; margin: 22px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.prose em { color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface); }
.crumbs { font-size: 13px; color: var(--muted); padding-top: 20px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.site-foot { border-top: 1px solid var(--line); margin-top: 24px; padding: 24px 16px 40px; color: var(--muted); font-size: 13px; text-align: center; }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 10px; }
.site-foot p { margin-top: 4px; }
.foot-nav { margin-top: 6px; }
.notfound { max-width: 640px; margin: 0 auto; padding: 56px 16px; }
.notfound h1 { font-size: 28px; margin-bottom: 8px; }
.notfound h2 { font-size: 22px; margin-bottom: 8px; }
.notfound section + section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.notfound ul { padding-left: 20px; margin: 12px 0 0; line-height: 1.9; }
@media (max-width: 520px) { .site-nav .nav-link.hide-sm { display: none; } }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .page { padding: 0 24px 48px; } }

/* Domain move (legacy origin banner + merge/replace dialog) */
.banner-moved { flex-wrap: wrap; }
.banner-moved span { flex: 1 1 260px; }
.banner-moved a.btn { text-decoration: none; white-space: nowrap; }
.move-dialog { max-width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.move-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.move-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.move-dialog p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.move-actions { display: flex; gap: 8px; flex-wrap: wrap; }
