:root {
  /* Default to light theme tokens */
  --bg: #ffffff;
  --text: #1d1d1f;
  --muted: rgba(29, 29, 31, 0.72);
  --subtle: rgba(29, 29, 31, 0.14);
  --subtle2: rgba(29, 29, 31, 0.08);
  --alt: #f5f5f7;

  --link: #0066cc;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  --radius: 20px;
  --max: 1080px;

  --nav-bg: rgba(255, 255, 255, 0.88);
  --menu-bg: rgba(255, 255, 255, 0.96);
  --bar-bg: rgba(255, 255, 255, 0.92);

  --card-bg: #ffffff;
  --chip-bg: rgba(29, 29, 31, 0.07);
  --chip-border: rgba(29, 29, 31, 0.10);

  --panel-bg: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,245,247,0.82));
  --panel-line: rgba(29, 29, 31, 0.10);

  --btn-outline-text: rgba(29, 29, 31, 0.92);
  --btn-outline-border: rgba(29, 29, 31, 0.14);

  /* icon lines */
  --icon: rgba(29, 29, 31, 0.78);

  /* accessibility */
  color-scheme: light;
}

/* Dark theme tokens (system) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.64);
    --subtle: rgba(255, 255, 255, 0.16);
    --subtle2: rgba(255, 255, 255, 0.10);
    --alt: #111114;

    --link: #4ea1ff;
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.55);

    --nav-bg: rgba(11, 11, 13, 0.72);
    --menu-bg: rgba(11, 11, 13, 0.90);
    --bar-bg: rgba(11, 11, 13, 0.78);

    --card-bg: rgba(255, 255, 255, 0.04);
    --chip-bg: rgba(255, 255, 255, 0.06);
    --chip-border: rgba(255, 255, 255, 0.12);

    --panel-bg: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    --panel-line: rgba(255, 255, 255, 0.10);

    --btn-outline-text: rgba(255, 255, 255, 0.90);
    --btn-outline-border: rgba(255, 255, 255, 0.20);

    --icon: rgba(255, 255, 255, 0.78);

    color-scheme: dark;
  }
}

/* Manual override via data-theme on <html> */
html[data-theme="light"] {
  --bg: #ffffff;
  --text: #1d1d1f;
  --muted: rgba(29, 29, 31, 0.72);
  --subtle: rgba(29, 29, 31, 0.14);
  --subtle2: rgba(29, 29, 31, 0.08);
  --alt: #f5f5f7;

  --link: #0066cc;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);

  --nav-bg: rgba(255, 255, 255, 0.88);
  --menu-bg: rgba(255, 255, 255, 0.96);
  --bar-bg: rgba(255, 255, 255, 0.92);

  --card-bg: #ffffff;
  --chip-bg: rgba(29, 29, 31, 0.07);
  --chip-border: rgba(29, 29, 31, 0.10);

  --panel-bg: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,245,247,0.82));
  --panel-line: rgba(29, 29, 31, 0.10);

  --btn-outline-text: rgba(29, 29, 31, 0.92);
  --btn-outline-border: rgba(29, 29, 31, 0.14);

  --icon: rgba(29, 29, 31, 0.78);

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0b0d;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.64);
  --subtle: rgba(255, 255, 255, 0.16);
  --subtle2: rgba(255, 255, 255, 0.10);
  --alt: #111114;

  --link: #4ea1ff;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.55);

  --nav-bg: rgba(11, 11, 13, 0.72);
  --menu-bg: rgba(11, 11, 13, 0.90);
  --bar-bg: rgba(11, 11, 13, 0.78);

  --card-bg: rgba(255, 255, 255, 0.04);
  --chip-bg: rgba(255, 255, 255, 0.06);
  --chip-border: rgba(255, 255, 255, 0.12);

  --panel-bg: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  --panel-line: rgba(255, 255, 255, 0.10);

  --btn-outline-text: rgba(255, 255, 255, 0.90);
  --btn-outline-border: rgba(255, 255, 255, 0.20);

  --icon: rgba(255, 255, 255, 0.78);

  color-scheme: dark;
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.link { color: var(--link); text-decoration: none; }
.link:hover { text-decoration: underline; }

.muted { color: var(--muted); }

.topnav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--subtle2);
}

.topnav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid var(--subtle);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text);
}
.brand-name {
  font-size: 13px;
  letter-spacing: 0.2px;
  color: var(--text);
  opacity: 0.88;
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topnav-links a {
  font-size: 13px;
  color: var(--text);
  opacity: 0.86;
}

/* Theme toggle (desktop) */
.theme-toggle {
  appearance: none;
  border: 1px solid var(--subtle2);
  background: transparent;
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  opacity: 0.92;
}
.theme-toggle:hover { border-color: var(--subtle); }
.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--subtle);
  background: var(--alt);
}

.menu-btn {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
}
.menu-btn:hover { border-color: var(--subtle2); }
.menu-icon {
  width: 18px;
  height: 12px;
  display: inline-block;
  position: relative;
}
.menu-icon::before,
.menu-icon::after,
.menu-icon span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--icon);
}
.menu-icon::before { top: 0; }
.menu-icon::after { bottom: 0; }
.menu-icon span { top: 5px; }

.mobile-menu {
  border-top: 1px solid var(--subtle2);
  background: var(--menu-bg);
  backdrop-filter: saturate(180%) blur(14px);
}
.mobile-menu-inner {
  padding: 10px 0 14px;
  display: grid;
  gap: 10px;
}
.mobile-menu-inner a {
  display: block;
  padding: 12px 10px;
  border-radius: 14px;
  color: var(--text);
  opacity: 0.90;
  background: transparent;
}
.mobile-menu-inner a:hover {
  text-decoration: none;
  background: rgba(127, 127, 127, 0.12);
}
.mobile-cta {
  border: 1px solid var(--subtle2);
  background: rgba(127, 127, 127, 0.10);
}

/* Theme toggle (mobile row) */
.mobile-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  border: 1px solid var(--subtle2);
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.08);
}
.mobile-theme-row span {
  color: var(--text);
  opacity: 0.86;
  font-size: 13px;
  font-weight: 600;
}
.mobile-theme-row button {
  width: auto;
  padding: 8px 12px;
}

/* Sticky bar */
.productbar {
  position: sticky;
  top: 52px;
  z-index: 50;
  background: var(--bar-bg);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--subtle2);
}
.productbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.productbar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.product-name {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.product-subtitle {
  font-size: 12.5px;
  color: var(--muted);
}
.productbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--link);
  color: #fff;
  border-color: rgba(0, 102, 204, 0.25);
}
.btn-outline {
  background: transparent;
  color: var(--btn-outline-text);
  border-color: var(--btn-outline-border);
}

/* Hero */
.hero {
  padding: 56px 0 34px;
  border-bottom: 1px solid var(--subtle2);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-title {
  margin: 0 0 12px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.hero-lede {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--text);
  opacity: 0.86;
  max-width: 52ch;
}
.hero-list {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--text);
  opacity: 0.82;
}
.hero-list li { margin: 8px 0; }
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.fineprint {
  font-size: 12.5px;
  color: var(--text);
  opacity: 0.62;
  margin: 0;
}

/* Visual panel */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.panel {
  width: min(420px, 100%);
  border-radius: var(--radius);
  border: 1px solid var(--subtle);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.panel-top {
  height: 14px;
  border-radius: 10px;
  background: var(--panel-line);
  margin-bottom: 14px;
}
.panel-line {
  height: 10px;
  border-radius: 10px;
  background: var(--panel-line);
  margin: 10px 0;
}
.w80 { width: 80%; }
.w62 { width: 62%; }
.w92 { width: 92%; }
.panel-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-size: 12px;
  color: var(--text);
  opacity: 0.84;
}

/* Sections */
.section { padding: 52px 0; }
.section-alt {
  background: var(--alt);
  border-top: 1px solid var(--subtle2);
  border-bottom: 1px solid var(--subtle2);
}
.section-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 42px);
  letter-spacing: -0.02em;
}
.section-lede {
  margin: 0 0 26px;
  max-width: 74ch;
  font-size: 17px;
  color: var(--text);
  opacity: 0.82;
}

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card-bg);
  border: 1px solid var(--subtle);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.card p { margin: 0 0 10px; color: var(--text); opacity: 0.78; }
.card-compact p { margin-bottom: 0; }
.card-link { margin-top: 10px; }

.bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  opacity: 0.78;
}
.bullets li { margin: 7px 0; }

/* Footer */
.footer {
  background: var(--alt);
  border-top: 1px solid var(--subtle2);
  padding: 28px 0 36px;
}
.footer-tight { padding: 22px 0 26px; }
.footer-cols {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 16px;
}
.footer-cols h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
  opacity: 0.86;
}
.footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-cols li { margin: 6px 0; }
.footer-cols a {
  font-size: 13px;
  color: var(--text);
  opacity: 0.72;
}
.footer-bottom { margin-top: 18px; }

/* Policy */
.policy .policy-hero {
  padding: 46px 0 18px;
  border-bottom: 1px solid var(--subtle2);
}
.policy-title {
  margin: 0 0 8px;
  font-size: clamp(32px, 4.2vw, 52px);
  letter-spacing: -0.03em;
}
.policy-meta {
  margin: 0 0 16px;
  color: var(--text);
  opacity: 0.72;
}
.policy-callout {
  border: 1px solid var(--subtle);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(127, 127, 127, 0.10);
}
.policy-body { padding: 30px 0 54px; }
.policy-body h2 {
  margin: 26px 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.policy-body p, .policy-body li { color: var(--text); opacity: 0.78; }
.policy-body ul { padding-left: 18px; }
.policy-sep {
  border: none;
  border-top: 1px solid var(--subtle2);
  margin: 28px 0 18px;
}

/* Responsive */
@media (max-width: 980px) {
  .topnav-links { display: none; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .productbar-actions .link { display: none; }
}

@media (max-width: 420px) {
  .container { padding: 0 14px; }
  .btn { width: 100%; }
  .productbar-actions { width: 100%; justify-content: flex-end; }
}

@media print {
  .topnav, .productbar, .footer { display: none; }
  body { background: white; color: #000; }
  .policy .policy-hero { border-bottom: 1px solid #ddd; }
}
