:root {
  --bg: #0b0e11; --panel: #12161b; --panel2: #171c22; --line: #232a32;
  --text: #e8edf2; --muted: #8b98a5; --accent: #3ddc84; --accent2: #2bb673;
  --danger: #ff6b6b; --radius: 14px; --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.6 -apple-system, 'Inter', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.ico { width: 18px; height: 18px; vertical-align: -3px; }
.logo-ico { width: 26px; height: 26px; vertical-align: -6px; margin-right: 2px; }
.btn .ico { margin-right: 6px; }
.btn-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lang-wrap { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.demochip { font-size: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 20px; padding: 2px 10px; }
.adlogo { width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; background: #fff; }

/* full-bleed band for the install section */
.band { background: linear-gradient(180deg, #0e1319 0%, #0b0e11 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band section.noline { border-top: none; }
.install-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 860px) { .install-grid { grid-template-columns: 1fr; } }

/* terminal preview */
.term { background: #05070a; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #0d1117; border-bottom: 1px solid var(--line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c333b; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.term-body { padding: 16px 18px 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.9; color: #b9c6d1; overflow-x: auto; }
.term-body .tp { color: var(--accent); }
.term-body .ok { color: var(--accent); }
.term-body .dim { color: #5f6c78; }
a { color: var(--accent); text-decoration: none; }

header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
nav { display: flex; gap: 18px; align-items: center; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch button {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 3px 9px; cursor: pointer; font-size: 13px;
}
.lang-switch button.on { color: var(--text); border-color: var(--accent); }

.hero { text-align: center; padding: 72px 0 40px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero h1 .thinks { color: var(--accent); }
.hero-wordmark { height: .72em; width: auto; vertical-align: -0.02em; }
.btnword { height: 20px; width: auto; vertical-align: -5px; margin-right: 4px; }
.brandmark { height: 22px; width: auto; vertical-align: -6px; }
#heroAI { display: inline-block; min-width: 2.4em; }
#heroAI.pop { animation: heroPop .45s ease; }
@keyframes heroPop { 0% { opacity: 0; transform: translateY(8px) scale(.96); } 100% { opacity: 1; transform: none; } }
.hero p.sub { color: var(--muted); font-size: 19px; max-width: 640px; margin: 18px auto 0; }
.hero p.sub2 {
  color: var(--text); font-weight: 600; margin-top: 12px; display: inline-block;
  background: linear-gradient(0deg, rgba(61,220,132,.22), rgba(61,220,132,.22)) no-repeat left bottom / 100% 10px;
  padding: 0 4px 2px;
}
.counters { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.counter {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 22px; min-width: 150px;
}
.counter b { display: block; font-size: 26px; color: var(--accent); font-variant-numeric: tabular-nums; }
.counter span { color: var(--muted); font-size: 13px; }

.demo-line {
  margin: 34px auto 0; max-width: 720px; background: #05070a; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 18px; font-family: var(--mono); font-size: 14px;
  color: #9fb0bd; text-align: left; overflow-x: auto; white-space: nowrap;
}
.demo-line .ad { color: var(--accent); }

/* Claude Code-style spinner */
.spin-star { display: inline-block; color: #d97757; animation: starPulse 1.6s ease-in-out infinite; }
@keyframes starPulse {
  0%, 100% { opacity: .55; transform: scale(.92) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.12) rotate(180deg); }
}
.dots i { font-style: normal; animation: dotBlink 1.4s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dotBlink { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.adchip {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: #06220f; background: var(--accent); border-radius: 4px; padding: 0 5px; vertical-align: 1px;
}
.works { text-align: center; margin-top: 12px; }
.works b { color: var(--accent); }
.brands { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.brand { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; }
.bchip { font-style: normal; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px; }
.bchip.live { color: #06220f; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.bchip.ready { color: var(--accent); border-color: var(--accent); }

/* compact single language selector */
.lang-sel {
  width: auto; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 14px; cursor: pointer;
}
.btn.big { font-size: 18px; padding: 14px 28px; }
.btn.google { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: #1a1a1a; border-color: #fff; font-weight: 600; }
.btn.google:hover { background: #ececec; }
.signed-in { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 14px; }
.g-logo {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 50%; font-weight: 800; font-size: 13px; color: #fff;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75% 100%);
}

/* translate progress toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--accent); border-radius: 12px;
  padding: 12px 18px; display: none; align-items: center; gap: 12px; z-index: 99;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 14px;
}
.toast.open { display: flex; }
.toast .spinner {
  width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cta-row { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.btn {
  display: inline-block; border-radius: 10px; padding: 12px 22px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text); background: var(--panel); cursor: pointer; font-size: 16px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06220f; }
.btn.primary:hover { background: var(--accent2); }
.btn:hover { border-color: var(--accent); }

section { padding: 56px 0; border-top: 1px solid var(--line); }
h2 { font-size: 30px; letter-spacing: -.02em; margin-bottom: 26px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }
.card .step { color: var(--accent); font-family: var(--mono); font-size: 13px; }

.install-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.cmd {
  display: flex; align-items: center; gap: 10px; background: #05070a; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px; font-family: var(--mono); font-size: 14px; margin: 14px 0;
  overflow-x: auto;
}
.cmd code { flex: 1; white-space: nowrap; }
.cmd button { flex-shrink: 0; }
.mini-cmd { font-size: 12.5px; opacity: .85; max-width: 560px; padding: 8px 12px; }
.msgbox { align-items: flex-start; max-width: 720px; font-family: inherit; white-space: normal; line-height: 1.5; }
.msgbox code { white-space: normal; color: var(--text); }
.btn.iconbtn { padding: 7px 9px; line-height: 1; }
.btn.iconbtn .ico { margin: 0; }
.mini { font-size: 13px; color: var(--muted); }

.calc { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.calc input[type=range] { flex: 1; min-width: 200px; accent-color: var(--accent); }
.calc .out b { color: var(--accent); font-size: 22px; }

/* modal / forms */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 50; }
.modal-bg.open { display: flex; }
.modal { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; width: min(420px, 92vw); }
.modal h3 { margin-bottom: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  width: 100%; background: #0d1116; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 10px 12px; font-size: 15px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { flex: 1; }
.tabs button.on { background: var(--accent); color: #06220f; border-color: var(--accent); }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin-top: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); }
.tag.on { color: var(--accent); border-color: var(--accent); }

.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
footer { padding: 40px 0 60px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 40px; }
.safety li { margin: 8px 0 8px 18px; color: var(--muted); }
.safety b { color: var(--text); }
/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; }
  .wrap { padding: 0 16px; }

  header { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 0; }
  .logo { font-size: 20px; }
  nav { display: flex; gap: 8px; width: 100%; align-items: center; }
  .lang-wrap { flex: 0 0 auto; }
  nav .lang-sel { padding: 8px 10px; font-size: 13px; }
  nav .btn { flex: 1 1 0; text-align: center; padding: 9px 8px; font-size: 13px; white-space: normal; line-height: 1.15; }

  .hero { padding-top: 20px; overflow: hidden; }
  .hero h1 { font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
  .hero-wordmark { height: 20px; vertical-align: -4px; }
  #heroAI { min-width: 0; }
  .hero p.sub { font-size: 15px; }
  .hero p.sub2 { font-size: 15px; }

  .counters { gap: 8px; }
  .counter { min-width: 0; flex: 1 1 45%; padding: 12px 6px; }
  .counter b { font-size: 19px; }
  .counter span { font-size: 11px; }

  .demo-line { font-size: 12px; max-width: 100%; padding: 12px 14px; overflow: hidden; }
  .term-body { overflow: hidden; }
  .cmd { overflow: hidden; }
  .brands { gap: 10px 14px; }
  .brandmark { height: 20px; }

  section { padding: 40px 0; }
  h2 { font-size: 24px; }

  .install-grid { grid-template-columns: 1fr; gap: 22px; }
  .term, .msgbox, .cmd, .install-box { max-width: 100%; }
  .term-body { font-size: 11.5px; padding: 14px 14px 16px; }
  .btn.big { font-size: 16px; padding: 12px 20px; }
  .btn-row { gap: 10px; }
  .btn-row .btn { flex: 1 1 auto; justify-content: center; }

  .grid3 { grid-template-columns: 1fr; }
  .calc { flex-direction: column; align-items: flex-start; }
  .calc input[type=range] { width: 100%; }
  .modal { padding: 22px; }
}
