/* 20 20 20 — 202020app.com
   Tokens mirror the Figma Colour collection (Light/Dark) and the app's BrandPalette. */

:root {
  --accent: #d01c49;
  --on-accent: #ffffff;
  --canvas: #fef8f9;
  --card: #fdebef;
  --raised: #f9dae1;
  --track: #e8adbd;
  --text: #000000;
  --text-2: #6b4d54;
  --outline: rgba(0, 0, 0, 0.16);
  --control-bordered: rgba(0, 0, 0, 0.06);
  --control-border: rgba(0, 0, 0, 0.16);
  --destructive: #ff3b30;
  --thumb-ring: rgba(255, 255, 255, 0.9);
  --shadow-panel: 0 12px 34px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 8px 24px rgba(51, 5, 20, 0.10);
  --lockup-light: #ffffff;
  --lockup-dark: #1b1114;

  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  --gutter: 160px;
  --section-y: 112px;
  --section-gap: 48px;
  --content: 1120px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #f24f75;
    --canvas: #1b1114;
    --card: #29181c;
    --raised: #341b21;
    --track: #572630;
    --text: #ffffff;
    --text-2: #c4adb3;
    --outline: rgba(255, 255, 255, 0.14);
    --control-bordered: rgba(255, 255, 255, 0.10);
    --control-border: rgba(255, 255, 255, 0.14);
    --destructive: #ff453a;
    --shadow-panel: 0 12px 34px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #f24f75;
  --canvas: #1b1114;
  --card: #29181c;
  --raised: #341b21;
  --track: #572630;
  --text: #ffffff;
  --text-2: #c4adb3;
  --outline: rgba(255, 255, 255, 0.14);
  --control-bordered: rgba(255, 255, 255, 0.10);
  --control-border: rgba(255, 255, 255, 0.14);
  --destructive: #ff453a;
  --shadow-panel: 0 12px 34px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; fill: currentColor; flex: none; }

/* ---------- Type ---------- */
.display { font-family: var(--font-rounded); font-weight: 700; font-size: 64px; line-height: 1.15; letter-spacing: -1.5px; }
.headline { font-family: var(--font-rounded); font-weight: 700; font-size: 40px; line-height: 1.15; letter-spacing: -0.8px; }
.subhead { font-family: var(--font-rounded); font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -0.2px; }
.body-lg { font-size: 18px; line-height: 1.3; }
.body-sm { font-size: 14px; line-height: 1.3; }
.muted { color: var(--text-2); }
.center { text-align: center; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border-radius: 14px;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: var(--raised); color: var(--accent); }
.navlink {
  display: inline-block; padding: 6px 10px; border-radius: 8px;
  font-weight: 500; font-size: 13px; color: var(--text-2);
}
.navlink:hover, .navlink[aria-current="page"] { background: var(--card); color: var(--text); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--raised); color: var(--accent);
  font-weight: 500; font-size: 11px;
}
.pill .icon { width: 14px; height: 14px; }
.privacy-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 10px; color: var(--text-2); }
.privacy-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Layout ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-rounded); font-weight: 600; font-size: 14px; }
.brand img { width: 36px; height: 36px; display: block; }
.nav-links { display: flex; gap: 4px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--raised); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: inline-block; }
}
.nav-links-mobile { display: none; }
.cta-short { display: none; }

.section {
  display: flex; flex-direction: column; align-items: center; gap: var(--section-gap);
  padding: var(--section-y) var(--gutter);
}
.section.tint { background: var(--card); }
.section > .headline { max-width: var(--content); width: 100%; }
.stack-narrow { width: 100%; max-width: 800px; display: flex; flex-direction: column; gap: 12px; }
.stack-center { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 720px; }

.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 32px var(--gutter); background: var(--raised);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px; }
.page-head { padding-top: 96px; padding-bottom: 0; }
.after-head { padding-top: 40px; }

/* ---------- Hero ---------- */
.hero { padding: 80px var(--gutter) 96px; }
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: var(--content); }
.hero-copy .body-lg { max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-screens { display: flex; gap: 40px; align-items: flex-start; padding-top: 24px; flex-wrap: wrap; justify-content: center; }

/* ---------- Cards ---------- */
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; max-width: var(--content); }
.rule-card {
  display: flex; flex-direction: column; gap: 12px; padding: 28px;
  background: var(--canvas); border-radius: 22px; box-shadow: var(--shadow-card);
}
.rule-num { display: flex; align-items: baseline; gap: 8px; }
.rule-num .display { color: var(--accent); }
.rule-num .subhead { color: var(--text-2); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; max-width: var(--content); }
.feature { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--card); border-radius: 18px; }
.section.tint .feature { background: var(--canvas); }
.feature-tile { width: 44px; height: 44px; border-radius: 13px; background: var(--raised); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.feature-tile .icon { width: 20px; height: 20px; }

.qa { display: flex; flex-direction: column; gap: 8px; padding: 22px 26px; border-radius: 16px; background: var(--card); }
.section.tint .qa { background: var(--canvas); }
.qa p { white-space: pre-line; }

.screens-row { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }

.facts { width: 100%; max-width: 800px; }
.fact { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--outline); }
.fact:last-child { border-bottom: 0; }
.fact dt { width: 220px; flex: none; font-weight: 600; }
.fact dd { margin: 0; color: var(--text-2); }

.lockups { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.lockup { display: flex; align-items: center; gap: 20px; padding: 40px 48px; border-radius: 16px; width: 368px; max-width: 100%; }
.lockup img { width: 72px; height: 72px; }
.lockup span { font-family: var(--font-rounded); font-weight: 600; font-size: 44px; letter-spacing: -0.8px; }
.lockup.light { background: var(--lockup-light); color: #000; }
.lockup.dark { background: var(--lockup-dark); color: #fff; }
.press-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.page-404 { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px; text-align: center; }
.page-404 img { width: 96px; height: 96px; }
.page-404 .headline { max-width: 720px; }

/* ---------- App popover (HTML recreation of the macOS panel) ---------- */
.popover {
  width: 336px; flex: none;
  padding: 18px; border-radius: 22px;
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px var(--outline), var(--shadow-panel);
  color: var(--text); text-align: left;
  font-family: var(--font-body);
}
.pop-header { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; }
.pop-tile { width: 40px; height: 40px; border-radius: 13px; background: var(--raised); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.pop-tile .icon { width: 17px; height: 17px; }
.pop-titles { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pop-app { font-family: var(--font-rounded); font-weight: 600; font-size: 14px; }
.pop-tag { font-size: 11px; color: var(--text-2); }
.pop-gear { width: 26px; height: 26px; border-radius: 50%; background: var(--raised); color: var(--text-2); display: flex; align-items: center; justify-content: center; flex: none; }
.pop-gear .icon { width: 11px; height: 11px; }
.pop-gear.active { color: var(--accent); }
.pop-body { display: flex; flex-direction: column; gap: 10px; }
.pop-title { font-family: var(--font-rounded); font-weight: 700; font-size: 22px; letter-spacing: -0.4px; line-height: 1.15; }
.pop-text { font-size: 13px; color: var(--text-2); }
.pop-text.minh { min-height: 36px; }
.stat { display: flex; align-items: center; gap: 15px; padding: 12px; border-radius: 16px; background: var(--card); }
.ring { position: relative; width: 66px; height: 66px; flex: none; display: flex; align-items: center; justify-content: center; }
.ring svg { position: absolute; inset: 0; width: 66px; height: 66px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--track); }
.ring .bar { stroke: var(--accent); stroke-linecap: round; }
.ring .num, .ring .icon { position: relative; }
.ring .num { font-family: var(--font-rounded); font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; }
.ring .icon { width: 19px; height: 19px; color: var(--accent); }
.stat-copy { display: flex; flex-direction: column; gap: 4px; }
.stat-big { font-family: var(--font-rounded); font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-strong { font-weight: 600; font-size: 14px; }
.stat-sub { font-size: 11px; color: var(--text-2); }
.pop-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; border-radius: 10px; font-weight: 600; font-size: 13px; width: 100%;
}
.pop-btn .icon { width: 11px; height: 11px; }
.pop-btn.prominent { background: var(--accent); color: var(--on-accent); }
.pop-btn.bordered { background: var(--control-bordered); box-shadow: inset 0 0 0 1px var(--control-border); color: var(--text); }
.pop-btn.destructive { color: var(--destructive); }
.pop-link { text-align: center; font-size: 11px; font-weight: 500; color: var(--text-2); padding-top: 1px; }
.pop-note { text-align: center; font-size: 11px; color: var(--text-2); padding-top: 2px; }
.setting-row { display: flex; align-items: center; gap: 8px; padding: 11px; border-radius: 13px; background: var(--card); font-weight: 500; font-size: 13px; }
.check { width: 14px; height: 14px; border-radius: 4px; background: var(--control-bordered); box-shadow: inset 0 0 0 1px var(--control-border); flex: none; display: flex; align-items: center; justify-content: center; }
.check.on { background: var(--accent); box-shadow: none; color: #fff; }
.check .icon { width: 9px; height: 9px; }
.interval-row { display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; border-radius: 13px; background: var(--card); }
.interval-head { display: flex; justify-content: space-between; font-weight: 500; font-size: 13px; }
.interval-head b { font-family: var(--font-rounded); font-weight: 600; font-size: 12px; color: var(--accent); }
.slider { position: relative; height: 24px; margin: 0 9px; }
.slider .rail { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--track); }
.slider .fill { position: absolute; left: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--accent); }
.slider .notch { position: absolute; top: 8px; width: 2px; height: 8px; border-radius: 1px; background: var(--canvas); margin-left: -1px; }
.slider .thumb { position: absolute; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px var(--thumb-ring) inset; margin-left: -8px; }
.ticks { display: flex; justify-content: space-between; margin: 0 9px; font-family: var(--font-rounded); font-weight: 500; font-size: 9px; color: var(--text-2); }
.pop-footer { display: flex; align-items: center; gap: 6px; padding-top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  :root { --gutter: 64px; }
  .rule-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  :root { --gutter: 24px; --section-y: 64px; --section-gap: 28px; }
  .display { font-size: 40px; letter-spacing: -0.8px; }
  .headline { font-size: 32px; letter-spacing: -0.6px; }
  .subhead { font-size: 22px; }
  .body-lg { font-size: 16px; }
  .nav-links { display: none; }
  .nav-links-mobile { display: flex; gap: 4px; padding: 0 24px 12px; overflow-x: auto; }
  .cta-long { display: none; }
  .cta-short { display: inline-flex; }
  .hero { padding: 40px var(--gutter) 48px; gap: 28px; }
  .page-head { padding-top: 56px; }
  .after-head { padding-top: 28px; }
  .hero-screens { flex-direction: column; align-items: center; gap: 28px; padding-top: 8px; }
  .rule-grid, .feature-grid { grid-template-columns: 1fr; }
  .rule-num .display { font-size: 56px; }
  .screens-row { flex-direction: column; align-items: center; gap: 28px; }
  .fact { flex-direction: column; gap: 4px; }
  .fact dt { width: auto; }
  .lockup { width: 100%; padding: 32px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .popover { width: min(336px, 100%); }
}
