/* ==========================================================================
   opencode-pilot landing — base styles
   ========================================================================== */

/* --- tokens --------------------------------------------------------------- */
:root {
  --bg:        #07090a;
  --bg-1:      #0b0e10;
  --bg-2:      #11161a;
  --bg-3:      #161c21;
  --line:      #1d262c;
  --line-2:    #27343c;
  --fg:        #d7e4dc;
  --fg-muted:  #8a9a93;
  --fg-dim:    #566762;
  --accent:    oklch(0.86 0.19 155);
  --accent-2:  oklch(0.70 0.15 155);
  --accent-soft: oklch(0.86 0.19 155 / 0.12);
  --warn:      oklch(0.82 0.17 75);
  --danger:    oklch(0.72 0.19 25);
  --blue:      oklch(0.78 0.12 230);
  --radius:    2px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;

  /* spacing scale (used by responsive overrides) */
  --pad-x:        32px;
  --section-pad:  90px;
  --hero-pad-top: 80px;
  --hero-pad-bot: 60px;
}

[data-theme="mono-light"] {
  --bg:#f6f5f0; --bg-1:#efede6; --bg-2:#e6e3d9; --bg-3:#dcd8cc;
  --line:#d0cbbc; --line-2:#b9b3a1;
  --fg:#17191a; --fg-muted:#5c5e5a; --fg-dim:#8b8d86;
  --accent: oklch(0.35 0.04 155);
  --accent-2: oklch(0.45 0.04 155);
  --accent-soft: oklch(0.35 0.04 155 / 0.08);
}
[data-theme="amber"] {
  --accent: oklch(0.82 0.17 70);
  --accent-2: oklch(0.70 0.15 70);
  --accent-soft: oklch(0.82 0.17 70 / 0.12);
}
[data-theme="violet"] {
  --accent: oklch(0.78 0.18 290);
  --accent-2: oklch(0.66 0.18 290);
  --accent-soft: oklch(0.78 0.18 290 / 0.14);
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

body[data-grid="true"]::before {
  content:"";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, color-mix(in oklch, var(--fg-dim) 40%, transparent) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}
body[data-scanlines="true"]::after {
  content:"";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px);
  pointer-events: none;
  z-index: 1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 2;
}
@supports (padding: max(0px)) {
  .wrap {
    padding-left: max(var(--pad-x), env(safe-area-inset-left));
    padding-right: max(var(--pad-x), env(safe-area-inset-right));
  }
}

/* --- nav ------------------------------------------------------------------ */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
nav.top .row {
  display:flex; align-items:center; gap: 24px;
  padding: 14px 0;
  min-width: 0;
}
.logo {
  display:flex; align-items:center; gap: 10px;
  font-weight: 700; letter-spacing: -0.02em;
  font-size: 14px;
  min-width: 0;
}
.logo .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo .ver   { color:var(--fg-dim); font-size:11px; margin-left:8px; white-space: nowrap; }
.logo .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 25%, transparent),
              0 0 14px color-mix(in oklch, var(--accent) 60%, transparent);
}
nav.top .links {
  display:flex; gap: 20px; margin-left: auto;
  font-size: 13px; color: var(--fg-muted);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  min-width: 0;
}
nav.top .links::-webkit-scrollbar { display: none; }
nav.top .links a { color: var(--fg-muted); white-space: nowrap; }
nav.top .links a:hover { color: var(--fg); text-decoration: none; }

.theme-toggle {
  background: transparent; border: 1px solid var(--line-2); color: var(--fg-muted);
  padding: 6px 10px; border-radius: var(--radius); cursor: pointer;
  font-family: var(--mono); font-size: 11px;
  display:inline-flex; gap:6px; align-items:center;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--accent); }

/* mobile menu button (hidden on desktop, shown via responsive.css) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--fg);
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1;
  margin-left: auto;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* --- hero ----------------------------------------------------------------- */
.hero { padding: var(--hero-pad-top) 0 var(--hero-pad-bot); position: relative; }

.tag {
  display:inline-flex; align-items:center; gap:8px;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); padding: 4px 10px;
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  background: var(--accent-soft);
  border-radius: 999px;
  max-width: 100%;
}
.tag .blink { width:6px; height:6px; border-radius:50%; background: var(--accent); animation: blink 1.2s steps(2) infinite; flex-shrink: 0; }
@keyframes blink { 50% { opacity: 0; } }

h1.hero-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(34px, 6.5vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 18px 0 20px;
  color: var(--fg);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
h1.hero-title .accent { color: var(--accent); }
h1.hero-title .cursor {
  display:inline-block; width: 0.55ch; height: 0.85em;
  background: var(--accent); vertical-align: baseline;
  margin-left: 4px; animation: blink 1s steps(2) infinite;
  transform: translateY(0.08em);
}

.hero-sub {
  font-family: var(--sans);
  font-size: clamp(15px, 1.6vw, 19px); line-height: 1.55;
  color: var(--fg-muted);
  max-width: 640px;
  margin-bottom: 36px;
}
.hero-sub em {
  color: var(--fg); font-style: normal;
  background: linear-gradient(transparent 60%, var(--accent-soft) 60%);
  padding: 0 2px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: start;
}

/* terminal --------------------------------------------------------------- */
.terminal {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6),
              0 0 0 1px color-mix(in oklch, var(--accent) 10%, transparent);
  font-family: var(--mono); font-size: 13px;
  min-width: 0;
}
.term-head {
  display:flex; align-items:center; gap:8px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim); font-size: 11px;
}
.term-head .dots { display:flex; gap:6px; flex-shrink: 0; }
.term-head .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.term-head .dots span:nth-child(1) { background: #ff5f57; }
.term-head .dots span:nth-child(2) { background: #febc2e; }
.term-head .dots span:nth-child(3) { background: #28c840; }
.term-head .title {
  margin-left: 8px; letter-spacing: 0.05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.term-head .status { margin-left:auto; color: var(--accent); flex-shrink: 0; }

.term-body {
  padding: 20px 20px 24px;
  min-height: 360px;
  background:
    radial-gradient(ellipse at top, color-mix(in oklch, var(--accent) 6%, transparent), transparent 60%),
    var(--bg-1);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.term-body .ps { color: var(--accent); }
.term-body .muted { color: var(--fg-dim); }
.term-body .ok { color: var(--accent); }
.term-body .warn { color: var(--warn); }
.term-body .hi { color: var(--fg); }
.term-body .line { display:block; min-height: 1.5em; }

.hero-ctas {
  display:flex; gap: 12px; margin-top: 28px; flex-wrap: wrap;
}
.btn {
  display:inline-flex; align-items:center; gap: 8px;
  padding: 12px 18px;
  font-family: var(--mono); font-size: 13px;
  border-radius: var(--radius); cursor: pointer;
  border: 1px solid transparent;
  transition: transform 80ms ease, background 120ms;
  min-height: 44px; /* tap target */
}
.btn-primary {
  background: var(--accent); color: #06100a;
  font-weight: 600;
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--accent) 50%, transparent),
              0 0 30px -5px color-mix(in oklch, var(--accent) 70%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent; border-color: var(--line-2); color: var(--fg);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.stat-row {
  display:flex; gap: 32px; margin-top: 48px;
  padding-top: 24px; border-top: 1px dashed var(--line-2);
  color: var(--fg-dim); font-size: 11px;
  flex-wrap: wrap;
}
.stat-row b { color: var(--fg); font-weight: 600; }

/* --- section headings --------------------------------------------------- */
section.block { padding: var(--section-pad) 0; border-top: 1px solid var(--line); position: relative; }
.eyebrow {
  display:flex; align-items:center; gap: 12px;
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before {
  content:""; width: 28px; height: 1px; background: var(--accent);
}
h2.section-title {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 14px; color: var(--fg);
  max-width: 740px;
  word-wrap: break-word;
}
.section-sub {
  font-family: var(--sans); font-size: clamp(15px, 1.5vw, 17px);
  color: var(--fg-muted); max-width: 640px; margin-bottom: 42px;
}

/* --- features tabs ------------------------------------------------------ */
.tabs {
  display:flex; gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
  overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 14px 18px; cursor: pointer;
  font-family: var(--mono); font-size: 12px;
  color: var(--fg-muted);
  background: transparent; border: none;
  border-right: 1px solid var(--line);
  position: relative;
  display:flex; align-items:center; gap:10px;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
}
.tab:last-child { border-right: none; }
.tab .n { color: var(--fg-dim); font-size: 10px; }
.tab[aria-selected="true"] {
  color: var(--accent);
  background: linear-gradient(to bottom, var(--accent-soft), transparent);
}
.tab[aria-selected="true"]::after {
  content:""; position: absolute; left:0; right:0; bottom: -1px;
  height: 2px; background: var(--accent);
}
.tab:hover { color: var(--fg); }

.tab-panel {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.tab-panel.active { display: grid; }

.feat {
  background: var(--bg-1);
  padding: 28px 24px;
  min-height: 190px;
  display:flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: background 120ms;
}
.feat:hover { background: var(--bg-2); }
.feat::before {
  content: attr(data-n);
  position: absolute; top: 16px; right: 18px;
  font-size: 10px; color: var(--fg-dim); letter-spacing: 0.1em;
}
.feat .glyph {
  width: 36px; height: 36px;
  display:grid; place-items: center;
  border: 1px solid var(--line-2);
  color: var(--accent);
  font-family: var(--mono); font-weight: 700; font-size: 16px;
}
.feat h3 {
  margin: 0; font-size: 15px; font-weight: 600;
  color: var(--fg); letter-spacing: -0.01em;
}
.feat p {
  margin: 0; font-family: var(--sans); font-size: 14px;
  color: var(--fg-muted); line-height: 1.5;
}

/* --- dashboard mockup --------------------------------------------------- */
.dash-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-1);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.7);
}
.dash-head {
  display:flex; align-items:center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--fg-dim);
  min-width: 0;
}
.dash-head .dots { display:flex; gap:6px; flex-shrink: 0; }
.dash-head .dots span { width:10px; height:10px; border-radius:50%; background: var(--line-2); }
.dash-head .dots span:nth-child(1) { background: #ff5f57; }
.dash-head .dots span:nth-child(2) { background: #febc2e; }
.dash-head .dots span:nth-child(3) { background: #28c840; }
.dash-head .url {
  background: var(--bg-1); border: 1px solid var(--line);
  padding: 4px 12px; border-radius: 3px;
  margin-left: 10px; color: var(--fg-muted);
  font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex: 1;
}
.dash-head .url b { color: var(--accent); font-weight: 500; }
.dash-head .badge {
  margin-left:auto; display:inline-flex; align-items:center; gap:6px;
  color: var(--accent); flex-shrink: 0;
}
.dash-head .badge::before {
  content:""; width: 6px; height: 6px; border-radius:50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}

.dash {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  min-height: 520px;
  font-size: 12px;
}

.dash .sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  padding: 14px 0;
  display:flex; flex-direction: column;
}
.dash .sidebar .sh {
  font-size: 10px; color: var(--fg-dim); letter-spacing: 0.12em;
  padding: 10px 16px 6px; text-transform: uppercase;
  display:flex; justify-content: space-between;
}
.dash .sidebar .sh span { color: var(--fg-dim); }
.dash .sidebar .item {
  padding: 8px 16px; cursor: pointer; color: var(--fg-muted);
  display:flex; gap: 10px; align-items:center;
  border-left: 2px solid transparent;
  min-height: 36px;
}
.dash .sidebar .item:hover { background: var(--bg-2); color: var(--fg); }
.dash .sidebar .item.active {
  background: var(--accent-soft); color: var(--accent);
  border-left-color: var(--accent);
}
.dash .sidebar .item .ag { color: var(--fg-dim); font-size: 10px; margin-left:auto; flex-shrink: 0; }
.dash .sidebar .item.active .ag { color: var(--accent-2); }

.dash .main {
  background: var(--bg);
  display:flex; flex-direction: column;
  min-width: 0;
}
.dash .main-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  display:flex; gap: 14px; align-items:center;
  font-size: 11px; color: var(--fg-muted);
  flex-wrap: wrap;
}
.dash .main-head .pill {
  border:1px solid var(--line-2); padding: 2px 8px; border-radius: 3px;
  color: var(--fg); font-size: 10px;
  flex-shrink: 0;
}
.dash .transcript {
  padding: 18px; flex: 1; display:flex; flex-direction: column; gap: 14px;
  font-size: 13px;
  overflow-x: auto;
}
.msg { display:flex; gap:12px; align-items: flex-start; }
.msg .who {
  width: 22px; height: 22px; flex-shrink: 0;
  display:grid; place-items: center;
  font-size: 10px; font-weight: 600;
  border: 1px solid var(--line-2);
}
.msg.user .who { color: var(--blue); border-color: color-mix(in oklch, var(--blue) 50%, transparent); }
.msg.bot .who { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 50%, transparent); }
.msg .body { color: var(--fg-muted); line-height: 1.6; flex:1; min-width: 0; }
.msg.user .body { color: var(--fg); }

.tool-call {
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: 4px;
  margin-top: 10px;
  font-size: 11px;
}
.tool-call .tc-head {
  display:flex; gap:10px; align-items:center;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  color: var(--fg-muted);
  flex-wrap: wrap;
}
.tool-call .tc-head .name { color: var(--fg); font-weight: 500; }
.tool-call .tc-head .st {
  margin-left:auto; color: var(--accent); font-size: 10px;
  display:inline-flex; gap:6px; align-items:center;
}
.tool-call .tc-head .st::before {
  content:""; width: 6px; height: 6px; border-radius:50%; background: var(--accent);
}
.tool-call pre {
  margin: 0; padding: 10px 12px; color: var(--fg-muted);
  font-family: var(--mono); font-size: 11px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  overflow-x: auto;
}

.dash .prompt-bar {
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  display:flex; gap: 10px; align-items:center;
  background: var(--bg-1);
}
.dash .prompt-bar .inp {
  flex:1; background: var(--bg); border: 1px solid var(--line-2);
  color: var(--fg); padding: 10px 12px;
  font-family: var(--mono); font-size: 12px; border-radius: 3px;
  outline: none;
  min-width: 0;
}
.dash .prompt-bar .inp:focus { border-color: var(--accent); }
.dash .prompt-bar .kbd { font-size: 10px; color: var(--fg-dim); flex-shrink: 0; }

.dash .info {
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  padding: 14px 16px;
  display:flex; flex-direction: column; gap: 18px;
  font-size: 11px;
}
.info .sh { color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; }
.info .row { display:flex; justify-content: space-between; color: var(--fg-muted); padding: 4px 0; gap: 8px; }
.info .row b { color: var(--fg); font-weight: 500; }
.info .bar {
  height: 4px; background: var(--bg-2); border-radius: 2px; overflow: hidden; margin-top: 6px;
}
.info .bar span { display:block; height: 100%; background: var(--accent); }
.info .todo {
  display:flex; gap: 8px; align-items: flex-start; padding: 3px 0;
  color: var(--fg-muted);
}
.info .todo .mk { color: var(--accent); flex-shrink: 0; }
.info .todo.done { color: var(--fg-dim); text-decoration: line-through; }

/* --- how it works ------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 26px;
  position: relative;
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  font-family: var(--mono); font-weight: 700; font-size: 32px;
  color: var(--accent);
  display:block; margin-bottom: 14px;
  letter-spacing: -0.04em;
}
.step h4 { margin: 0 0 8px; font-size: 15px; color: var(--fg); font-weight: 600; }
.step p { margin: 0 0 12px; color: var(--fg-muted); font-family: var(--sans); font-size: 14px; line-height: 1.55; }
.step .cmd {
  background: var(--bg); border: 1px solid var(--line-2);
  padding: 8px 38px 8px 12px;
  font-size: 11px; color: var(--accent);
  border-radius: 3px; position: relative;
  word-break: break-all;
}
.step .cmd .ps { color: var(--fg-dim); margin-right: 6px; }
.step .cmd .cp {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 1px solid var(--line-2);
  color: var(--fg-muted); font-size: 10px; padding: 2px 6px; cursor: pointer;
  border-radius: 2px;
}
.step .cmd .cp:hover { color: var(--accent); border-color: var(--accent); }
.step .cmd .cp.ok { color: var(--accent); border-color: var(--accent); }

/* --- phone / QR --------------------------------------------------------- */
.phone-section { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }

.phone {
  width: 280px; height: 560px;
  margin: 0 auto;
  background: #000;
  border: 2px solid var(--line-2);
  border-radius: 38px;
  padding: 12px;
  position: relative;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.8),
              0 0 0 1px color-mix(in oklch, var(--accent) 12%, transparent);
  max-width: 100%;
}
.phone::before {
  content:""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 24px; background: #000; border-radius: 14px; z-index: 2;
}
.phone .screen {
  width: 100%; height: 100%;
  background: var(--bg-1);
  border-radius: 28px;
  overflow: hidden;
  padding: 46px 18px 18px;
  display:flex; flex-direction: column; gap: 14px;
}
.phone .screen h5 {
  margin: 0; font-size: 13px; color: var(--fg); font-weight: 600;
  text-align: center;
}
.phone .screen .mini {
  font-size: 10px; color: var(--fg-dim); text-align: center;
  margin-top: -8px;
}
.qr {
  width: 200px; height: 200px; margin: 10px auto;
  background: var(--bg); border: 1px solid var(--line-2);
  padding: 10px; border-radius: 4px;
  display: grid; grid-template-columns: repeat(21, 1fr); gap: 0;
  position: relative;
  max-width: 100%;
}
.qr:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.qr > i {
  background: var(--fg); aspect-ratio: 1; display:block;
}
.qr > i.off { background: transparent; }
.qr .finder {
  position: absolute; width: 42px; height: 42px;
  border: 6px solid var(--fg); background: var(--bg);
}
.qr .finder::after {
  content:""; position: absolute; inset: 8px; background: var(--fg);
}
.qr .finder.tl { top: 10px; left: 10px; }
.qr .finder.tr { top: 10px; right: 10px; }
.qr .finder.bl { bottom: 10px; left: 10px; }

.qr-tabs {
  display:flex; gap:4px; background: var(--bg); padding: 3px;
  border-radius: 3px; font-size: 10px;
}
.qr-tabs button {
  flex:1; background: transparent; border: none; color: var(--fg-muted);
  padding: 6px; cursor: pointer; font-family: var(--mono);
  border-radius: 2px;
  min-height: 32px;
}
.qr-tabs button.on { background: var(--accent); color: #06100a; }

.phone-url {
  background: var(--bg); border: 1px solid var(--line);
  padding: 7px 10px; border-radius: 3px;
  font-size: 10px; color: var(--accent); text-align: center;
  letter-spacing: 0.02em;
  word-break: break-all;
}

/* --- shortcuts + commands ----------------------------------------------- */
.two-col { display:grid; grid-template-columns: 1fr 1fr; gap: 40px; }

.kcard {
  background: var(--bg-1); border: 1px solid var(--line);
  padding: 24px;
}
.kcard h4 {
  margin: 0 0 18px; font-size: 12px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--fg-muted); font-weight: 500;
  display:flex; justify-content: space-between; align-items:center;
  gap: 12px; flex-wrap: wrap;
}
.kcard h4 span { color: var(--fg-dim); font-size: 10px; }

.krow {
  display:flex; justify-content: space-between; align-items:center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  gap: 12px;
}
.krow:last-child { border-bottom: none; }
.krow .desc { color: var(--fg-muted); font-family: var(--sans); font-size: 13px; min-width: 0; }
.krow .desc b { color: var(--fg); font-weight: 500; }
.kbd {
  font-family: var(--mono); font-size: 11px;
  background: var(--bg); border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  padding: 3px 8px; border-radius: 3px; color: var(--fg);
  min-width: 26px; text-align: center; display:inline-block;
  white-space: nowrap;
}
.kbd.accent { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 50%, transparent); }

/* --- env vars table ----------------------------------------------------- */
.env-table {
  border: 1px solid var(--line);
  font-size: 12px;
  background: var(--bg-1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.env-table table { border-collapse: collapse; width: 100%; min-width: 600px; }
.env-table th, .env-table td {
  text-align: left; padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.env-table th {
  background: var(--bg-2); font-weight: 500;
  color: var(--fg-muted); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.env-table td.var { color: var(--accent); font-weight: 500; white-space: nowrap; }
.env-table td.def { color: var(--fg-dim); white-space: nowrap; }
.env-table td.desc { color: var(--fg-muted); font-family: var(--sans); }
.env-table tr:last-child td { border-bottom: none; }
.env-table tr:hover td { background: var(--bg-2); }

/* --- docs --------------------------------------------------------------- */
.doc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.doc-card {
  background: var(--bg-1); padding: 26px;
  display:flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit;
  transition: background 120ms;
}
.doc-card:hover { background: var(--bg-2); text-decoration: none; }
.doc-card .fp {
  font-size: 10px; color: var(--fg-dim); letter-spacing: 0.05em;
  display:flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.doc-card .fp b { color: var(--accent); font-weight: 400; }
.doc-card h4 { margin: 6px 0 2px; font-size: 15px; color: var(--fg); font-weight: 600; letter-spacing: -0.01em; }
.doc-card p { margin: 0; color: var(--fg-muted); font-family: var(--sans); font-size: 13px; line-height: 1.5; }
.doc-card .arrow { margin-top: auto; color: var(--accent); font-size: 11px; }

/* --- footer ------------------------------------------------------------- */
footer {
  padding: 90px 0 40px;
  border-top: 1px solid var(--line);
  position: relative;
}
@supports (padding: max(0px)) {
  footer { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
}
footer .big {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(36px, 7vw, 96px);
  line-height: 0.95; letter-spacing: -0.03em;
  margin: 0 0 32px; color: var(--fg);
  word-wrap: break-word;
}
footer .big .g { color: var(--accent); }
footer .install-row {
  display:flex; gap:12px; flex-wrap:wrap; align-items:center;
}
footer .install-cmd {
  flex:1; min-width: 280px;
  background: var(--bg-1); border: 1px solid var(--line);
  padding: 14px 16px;
  display:flex; align-items:center; gap: 14px;
  overflow-x: auto;
}
footer .install-cmd .ps { color:var(--fg-dim); flex-shrink: 0; }
footer .install-cmd .text { color:var(--fg); font-size: 14px; white-space: nowrap; }
footer .install-cmd .cp {
  margin-left:auto; background: transparent; border: 1px solid var(--line-2);
  color: var(--fg-muted); font-size: 11px; padding: 6px 10px;
  cursor: pointer; border-radius: 2px; font-family: var(--mono);
  flex-shrink: 0;
}
footer .ff {
  display:flex; gap: 40px; margin-top: 60px; flex-wrap: wrap;
  color: var(--fg-dim); font-size: 11px;
  padding-top: 24px; border-top: 1px dashed var(--line);
}
footer .ff a { color: var(--fg-muted); }
footer .ff .links-right { margin-left:auto; display:flex; gap: 20px; flex-wrap: wrap; }

/* --- Tweaks panel ------------------------------------------------------- */
.tweaks {
  position: fixed; right: 20px; bottom: 20px;
  width: 280px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 14px;
  font-size: 12px;
  z-index: 100;
  display: none;
  box-shadow: 0 30px 60px -10px rgba(0,0,0,0.6);
}
.tweaks.open { display: block; }
.tweaks .th {
  display:flex; justify-content: space-between; align-items:center;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.tweaks .tk { margin-bottom: 10px; }
.tweaks label { display:block; font-size: 10px; color: var(--fg-dim);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.tweaks .swatches { display:flex; gap: 6px; }
.tweaks .sw {
  flex:1; height: 28px; border: 1px solid var(--line-2);
  cursor: pointer; border-radius: 3px; display:grid; place-items: center;
  font-size: 9px; color: var(--fg-dim);
}
.tweaks .sw.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--fg); }
.tweaks .sw.green  { background: #00ff9c22; }
.tweaks .sw.amber  { background: #ffb80022; }
.tweaks .sw.violet { background: #9b7cff22; }
.tweaks .sw.light  { background: #f6f5f0; color: #333; }
.tweaks .tog { display:flex; align-items:center; gap:8px; }
.tweaks .tog input { accent-color: var(--accent); }

/* --- animations --------------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeInUp 0.5s ease both; }

/* Pain cards */
.pain-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s ease;
}
.pain-card:hover {
  border-color: var(--accent);
  background: var(--bg-3);
}
.pain-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--fg);
  font-weight: 600;
  font-family: var(--sans);
}
.pain-card p {
  margin: 0;
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--sans);
  line-height: 1.55;
}

/* Architecture steps */
.arch-step {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.arch-step h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--sans);
}
.arch-step p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-muted);
  font-family: var(--sans);
  line-height: 1.6;
}

/* Use case cards */
.usecase {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s ease;
}
.usecase:hover {
  border-color: var(--accent);
}
.usecase h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--fg);
  font-weight: 600;
  font-family: var(--sans);
}
.usecase p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-muted);
  font-family: var(--sans);
  line-height: 1.6;
}
.usecase code {
  background: var(--bg-3);
  padding: 2px 4px;
  border-radius: 2px;
  color: var(--accent);
  font-size: 12px;
}

@keyframes glitch {
  0%, 92%, 100% { transform: translate(0); }
  93% { transform: translate(-1px, 1px); }
  95% { transform: translate(1px, -1px); }
  97% { transform: translate(-1px, -1px); }
}
h1.hero-title[data-glitch="true"] { animation: glitch 6s infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection { background: var(--accent); color: var(--bg); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
