:root {
  --bg: #0A0A0F;
  --band: #0F0F15;
  --surface: #15151C;
  --icon-bg: #12121A;
  --line: rgba(255, 255, 255, 0.06);
  --text: #F5F5F7;
  --soft: rgba(235, 235, 245, 0.78);
  --muted: rgba(235, 235, 245, 0.72);
  --dim: rgba(235, 235, 245, 0.62);
  --brand: #FFC94D;
  --on-brand: #1A1305;
  --relapse: #FF9F5A;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
a:hover { color: #FFDD8A; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 5vw, 40px); }
.band { background: var(--band); border-block: 1px solid var(--line); }
.section { padding-block: clamp(56px, 8vw, 112px); display: flex; flex-direction: column; gap: 48px; }
.mono { font-family: var(--mono); }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.logo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--icon-bg); border: 1px solid var(--line); }
.logo i { border-radius: 28%; background: var(--brand); }
.logo.sm { width: 36px; height: 36px; padding: 6px; gap: 2px; border-radius: 9px; }
.logo.lg { width: 88px; height: 88px; padding: 16px; gap: 4px; border-radius: 22px; }
.langs { display: flex; align-items: center; gap: 4px; font-size: 0.875rem; }
.langs a, .langs span { min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; text-decoration: none; }
.langs a { color: var(--dim); }
.langs a:hover { color: var(--text); }
.langs span { color: var(--text); font-weight: 600; }
.langs a.btn, .langs a.btn:hover { margin-left: 8px; padding: 0 18px; color: var(--on-brand); }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 14px; background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none; }
.btn:hover { background: #FFD877; color: var(--on-brand); }
.btn.big { min-height: 56px; padding: 0 28px; border-radius: 18px; font-size: 1.0625rem; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 64px); padding-block: clamp(32px, 6vw, 72px) clamp(48px, 7vw, 96px); }
.hero-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.eyebrow { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); }
h1 { font-size: clamp(3.5rem, 9vw, 6.5rem); line-height: 0.95; font-weight: 700; letter-spacing: -0.035em; }
.lead { max-width: 520px; font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.45; color: var(--soft); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.note { font-size: 0.9375rem; color: var(--dim); }
.hero-cards { flex: 1 1 400px; min-width: 0; max-width: 540px; display: flex; flex-direction: column; gap: 12px; }

/* Habit cards and grids */
.habit { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.habit-head { display: flex; align-items: center; gap: 12px; }
.habit-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.habit-name b { font-size: 1.0625rem; font-weight: 600; }
.habit-name span { font-size: 0.8125rem; color: var(--dim); }
.habit-stat { font-family: var(--mono); font-size: 0.8125rem; color: rgb(var(--c)); }
.tile { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(var(--c), 0.16); color: rgb(var(--c)); }
.tile.lg { width: 56px; height: 56px; border-radius: 16px; }
.tile svg { width: 22px; height: 22px; }
.tile.lg svg { width: 28px; height: 28px; }
.grid { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
.grid.year { gap: clamp(2px, 0.35vw, 5px); }
.grid i { aspect-ratio: 1 / 1; border-radius: 28%; background: rgba(255, 255, 255, 0.07); }
.grid .l1 { background: rgba(var(--c), 0.30); }
.grid .l2 { background: rgba(var(--c), 0.50); }
.grid .l3 { background: rgba(var(--c), 0.75); }
.grid .l4 { background: rgb(var(--c)); }
.grid .rl { background: var(--relapse); }

/* Section headings */
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; }
.h2-narrow { max-width: 760px; }
.sub { max-width: 560px; font-size: 1.125rem; color: var(--muted); }
.head { display: flex; flex-direction: column; gap: 16px; }
.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.split .head { flex: 1 1 420px; min-width: 0; }
.legend { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.8125rem; color: var(--dim); --c: 245, 245, 247; }
.legend i { width: 14px; height: 14px; border-radius: 28%; background: rgba(255, 255, 255, 0.07); }
.legend .l1 { background: rgba(var(--c), 0.30); }
.legend .l2 { background: rgba(var(--c), 0.50); }
.legend .l3 { background: rgba(var(--c), 0.75); }
.legend .l4 { background: rgb(var(--c)); }

/* Cards */
.cards { display: flex; flex-wrap: wrap; gap: 12px; }
.card { flex: 1 1 300px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card.big { flex-basis: 280px; padding: 28px; gap: 16px; }
.card h3 { font-size: 1.125rem; font-weight: 600; }
.card.big h3 { font-size: 1.375rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); }
.card .restart { color: var(--relapse); font-weight: 600; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { padding: 4px 10px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }

/* Privacy */
.two { flex-direction: row; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); }
.two > * { flex: 1 1 380px; min-width: 0; }
.points { display: flex; flex-direction: column; gap: 24px; }
.point { display: flex; align-items: flex-start; gap: 16px; }
.point h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 4px; }
.point p { color: var(--muted); }

/* Pricing */
.plan { flex: 1 1 320px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.plan.pro { border-color: rgba(255, 201, 77, 0.45); }
.plan-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.plan h3 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.01em; }
.plan .note { font-size: 1rem; margin-top: 6px; }
.plan ul { display: flex; flex-direction: column; gap: 14px; line-height: 1.4; }
.plan li { display: flex; align-items: baseline; gap: 12px; }
.plan li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 28%; background: rgba(245, 245, 247, 0.5); }
.plan.pro li::before { background: var(--brand); }

/* Final call and footer */
.final { padding-block: clamp(72px, 10vw, 136px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.final h2 { max-width: 720px; font-size: clamp(2.25rem, 6vw, 4.25rem); line-height: 1; letter-spacing: -0.03em; }
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px; font-size: 0.875rem; color: var(--dim); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px; }
.foot a { min-height: 44px; padding: 0 8px; display: inline-flex; align-items: center; color: var(--soft); }
.foot a:hover { color: var(--text); }

/* Text pages (privacy, support) */
.doc { max-width: 720px; padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 112px); display: flex; flex-direction: column; gap: 20px; }
.doc h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.03em; }
.doc h2 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; margin-top: 20px; }
.doc p, .doc li { font-size: 1.0625rem; color: var(--soft); }
.doc ul { list-style: disc; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 8px; }
.doc .updated { font-family: var(--mono); font-size: 0.8125rem; color: var(--dim); }
