:root {
  --bg: #fafaf9;
  --bg-alt: #f3f2ef;
  --surface: #ffffff;
  --surface-subtle: #f6f5f2;
  --text: #141413;
  --text-muted: #5c5b57;
  --border: rgba(20, 20, 19, 0.09);
  --accent: #e44332;
  --accent-hover: #cf3525;
  --accent-soft: rgba(228, 67, 50, 0.11);
  --green: #1f8a4c;
  --orange: #d97706;
  --blue: #2563eb;
  --shadow-lg: 0 24px 60px rgba(20, 20, 19, 0.11), 0 4px 16px rgba(20, 20, 19, 0.05);
  --shadow-sm: 0 2px 10px rgba(20, 20, 19, 0.04);
  --radius: 18px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0d;
    --bg-alt: #131315;
    --surface: #18181b;
    --surface-subtle: #202024;
    --text: #f5f5f4;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.09);
    --accent: #f05342;
    --accent-hover: #ff6959;
    --accent-soft: rgba(240, 83, 66, 0.16);
    --green: #34d399;
    --orange: #fbbf24;
    --blue: #60a5fa;
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.55), 0 4px 18px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  }
}

:root[data-theme="dark"] {
  --bg: #0c0c0d;
  --bg-alt: #131315;
  --surface: #18181b;
  --surface-subtle: #202024;
  --text: #f5f5f4;
  --text-muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.09);
  --accent: #f05342;
  --accent-hover: #ff6959;
  --accent-soft: rgba(240, 83, 66, 0.16);
  --green: #34d399;
  --orange: #fbbf24;
  --blue: #60a5fa;
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.55), 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark { display: inline-flex; }
.brand-name { font-size: 17px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: color-mix(in srgb, var(--text) 25%, transparent); }

/* Hero */
.hero {
  padding: 68px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 5.4vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 750;
}
.accent-text { color: var(--accent); }

.lead {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 500px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.hero-meta strong { color: var(--text); font-weight: 600; }
.sep { opacity: 0.4; }

/* Phone Preview */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phone-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.phone-tab {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.phone-tab.is-active {
  background: var(--text);
  color: var(--bg);
}

.phone-frame {
  width: 320px;
  min-height: 510px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 42px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-island {
  width: 92px;
  height: 24px;
  border-radius: 999px;
  background: #0b0b0c;
  margin: 0 auto 8px;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 6px 12px;
}

.phone-screen {
  display: none;
  flex-direction: column;
  flex: 1;
}
.phone-screen.is-active { display: flex; }

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 4px 4px 14px;
}
.app-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.app-title {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.badge-live {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge-stop {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid var(--border);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
}
.task-item.is-done .task-name {
  text-decoration: line-through;
  opacity: 0.5;
}

.task-check {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}
.task-check.p1 { border-color: var(--accent); }
.task-check.p2 { border-color: var(--orange); }
.task-check.p3 { border-color: var(--blue); }
.task-check:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.task-check:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.task-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.task-sub { font-size: 11.5px; color: var(--text-muted); }
.tag-red { color: var(--accent); font-weight: 600; }
.tag-green { color: var(--green); font-weight: 600; }
.tag-muted { color: var(--text-muted); }

.app-tabbar {
  margin-top: 14px;
  padding: 9px 10px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.app-tabbar .is-on { color: var(--accent); }

/* Focus Screen */
.focus-card {
  background: linear-gradient(145deg, var(--accent), #c62e1f);
  color: #fff;
  border-radius: 18px;
  padding: 15px;
  margin-bottom: 14px;
}
.focus-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.9;
}
.focus-timer { font-family: var(--font-mono); font-size: 15px; font-weight: 700; }
.focus-card-title { font-size: 15px; font-weight: 700; margin: 8px 0 10px; }
.focus-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.focus-chips span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.focus-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 2px 4px 8px;
}
.rule-list { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.rule-name { font-size: 13px; font-weight: 600; }
.rule-sub { font-size: 11px; color: var(--text-muted); }
.rule-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.rule-pill.is-active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

/* Shield Screen */
.screen-shield { justify-content: center; }
.shield-inner {
  text-align: center;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.shield-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.shield-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.shield-title {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.shield-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.shield-btn {
  margin-top: 10px;
  width: 100%;
  padding: 11px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
}

/* Sections */
.section { padding: 84px 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 660px; margin-bottom: 40px; }
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 750;
}
.section-lead {
  margin: 0;
  font-size: 16.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Bento & Cards */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-wide { grid-column: span 2; }
.card-icon {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--accent);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
}

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

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* Quick Add */
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.preset-chip {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.preset-chip:hover { border-color: var(--accent); color: var(--accent); }

.qa-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.qa-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.qa-input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  outline: none;
}
.qa-input:focus { border-color: var(--accent); }

.qa-parsed {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.qa-token {
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.qa-token strong { color: var(--text-muted); font-weight: 600; margin-right: 4px; }
.qa-token.is-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.qa-token.is-accent strong { color: var(--accent); }

/* Check list & Code Window */
.check-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--text-muted);
}
.check-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  margin-right: 10px;
}

.code-window {
  background: #141416;
  color: #f4f4f5;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #1c1c20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.code-title { margin-left: 8px; font-size: 12px; color: #a1a1aa; font-family: var(--font-mono); }
.code-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
}
.chat-user {
  align-self: flex-end;
  background: #27272c;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 90%;
}
.chat-tool {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #f08a7e;
  background: rgba(240, 83, 66, 0.1);
  padding: 7px 11px;
  border-radius: 8px;
  overflow-x: auto;
}
.chat-reply {
  color: #d4d4d8;
  line-height: 1.55;
}
.chat-reply strong { color: #fff; }

/* CTA & Footer */
.cta-card {
  text-align: center;
  padding: 56px 28px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.cta-card .section-lead {
  max-width: 520px;
  margin: 0 auto 28px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-tagline { font-weight: 400; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--text); }

@media (max-width: 880px) {
  .hero-grid, .split, .bento, .three-col { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
  .nav-links { display: none; }
  .hero { padding: 44px 0 64px; }
}
