:root {
  --bg: #f5f7f7; --surface: #ffffff; --surface-2: #eef2f2; --text: #0f1b1f; --muted: #5a6a6e;
  --line: #dde5e5; --accent: #0b7a7c; --accent-ink: #ffffff; --accent-soft: #dcf2f1;
  --gold: #c98a0c; --gold-soft: #fbf1da; --lapis: #173f78;
  --grad: linear-gradient(135deg, #12a3a0 0%, #173f78 100%);
  --ok: #1f7a4d; --ok-soft: #e3f4ea; --warn: #9a5b00; --warn-soft: #fbf0dc; --bad: #b42318; --bad-soft: #fde7e5;
  --radius: 12px; --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 16px rgb(0 0 0 / .04);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1315; --surface: #121c1f; --surface-2: #1a272b; --text: #e6eeee; --muted: #93a5a8;
    --line: #26363a; --accent: #3cc8c0; --accent-ink: #04201f; --accent-soft: #12302f;
    --gold: #f2b53a; --gold-soft: #33280f; --lapis: #7aa5ea;
    --grad: linear-gradient(135deg, #1fb5b0 0%, #3d6fc4 100%);
    --ok: #5fd39a; --ok-soft: #173326; --warn: #f0b45a; --warn-soft: #3a2a10; --bad: #ff8a80; --bad-soft: #3d1a17;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .9em; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
      overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* header */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent);
       backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem;
         letter-spacing: -0.02em; color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand:hover { text-decoration: none; }
.brand em, .wordmark em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text;
                          color: transparent; }
@media (max-width: 520px) { .brand { font-size: 1.1rem; } .brand img { width: 30px; height: 30px; } }
.top nav { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.top nav a { color: var(--text); font-size: .95rem; }
.langs { display: flex; gap: 4px; }
.langs a { font-size: .8rem; padding: 2px 6px; border-radius: 6px; color: var(--muted); }
.langs a.on { background: var(--surface-2); color: var(--text); }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent;
       background: var(--accent); color: var(--accent-ink); padding: 10px 18px; border-radius: 10px;
       font: 600 .95rem var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field { margin-bottom: 14px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: .95rem; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

/* cards & grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
        box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat .label { font-size: .82rem; color: var(--muted); }
.stat .value { font-size: 1.5rem; font-weight: 700; margin-top: 2px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
        background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* bars */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.bars .b { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars .b:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px);
  background: var(--text); color: var(--bg); font-size: .75rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.bars-x { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 4px; }

/* app shell */
.shell { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 28px 16px; max-width: 1180px; margin: 0 auto; }
.side a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); font-size: .95rem; }
.side a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side a:hover { text-decoration: none; background: var(--surface-2); }
.main > h1 { font-size: 1.6rem; }
.stack > * + * { margin-top: 16px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; gap: 12px; padding-top: 12px; }
  .side { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
  .side a { white-space: nowrap; }
}

/* landing */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 320px at 85% 10%, color-mix(in srgb, #12a3a0 22%, transparent), transparent 70%),
    radial-gradient(520px 300px at 5% 90%, color-mix(in srgb, #e8a317 16%, transparent), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%2312a3a0' stroke-opacity='.10'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E"); }
.lockup { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.lockup img { width: clamp(56px, 8vw, 76px); height: auto; filter: drop-shadow(0 8px 18px rgb(18 163 160 / .25)); }
.wordmark { font-weight: 800; font-size: clamp(2.1rem, 6vw, 3.6rem); letter-spacing: -0.035em; line-height: 1; }
.hero h1 { font-size: clamp(1.45rem, 3.2vw, 2.15rem); font-weight: 700; max-width: 620px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 600px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 16px; }
.hero .btn { padding: 13px 22px; font-size: 1rem; }
.btn.glow { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgb(18 120 140 / .28); }
.works { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 600;
        background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .85rem; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.window { padding: 0; overflow: hidden; border-radius: 18px; box-shadow: 0 24px 60px rgb(15 40 60 / .16); }
.window .bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line);
               background: var(--surface-2); font-weight: 700; font-size: .92rem; }
.window .bar img { width: 22px; height: 22px; }
.window .bar .live { margin-left: auto; font-weight: 600; font-size: .78rem; color: var(--ok); }
.chat { display: grid; gap: 12px; padding: 18px; }
.chat .q, .chat .a { padding: 12px 16px; border-radius: 16px; max-width: 88%; font-size: .95rem; }
.chat .q { background: var(--grad); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.chat .a { background: var(--surface-2); border-bottom-left-radius: 4px; }
.chat .a b { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .chat > * { animation: pop .5s ease both; }
  .chat > *:nth-child(2) { animation-delay: .25s; } .chat > *:nth-child(3) { animation-delay: .5s; }
  .chat > *:nth-child(4) { animation-delay: .75s; }
  @keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
section.block { padding: 64px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
           color: var(--gold); margin-bottom: 8px; }
.feature { transition: transform .15s ease, box-shadow .15s ease; }
.feature:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgb(15 40 60 / .10); }
.icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
        background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.icon svg { width: 22px; height: 22px; }
.step-n { display: inline-flex; width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
          color: #fff; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 12px; }
.shield { display: flex; gap: 12px; align-items: flex-start; }
.shield .icon { flex: none; margin: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); }
.shield .icon svg { width: 18px; height: 18px; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; }
.plan li { padding: 6px 0 6px 26px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.plan.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box,
                 var(--grad) border-box; box-shadow: 0 20px 50px rgb(15 40 60 / .12); }
.plan .trial { display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 999px; font-size: .8rem;
               font-weight: 700; background: var(--gold-soft); color: var(--gold); }
.cta-band { background: var(--grad); color: #fff; border-radius: 22px; padding: 40px 28px; display: flex; gap: 24px;
            align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .9; }
.cta-band .btn { background: #fff; color: #0f3b5a; padding: 13px 24px; font-size: 1rem; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .88rem; color: var(--muted); }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.auth-box { max-width: 420px; margin: 48px auto; }
.copyrow { display: flex; gap: 8px; align-items: stretch; }
.copyrow pre { flex: 1; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0 12px 6px 0; }

/* fixed column counts for landing grids (no orphan cards) */
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .top { position: static; }
  .top .wrap { min-height: 0; padding-top: 10px; padding-bottom: 10px; gap: 8px 12px; }
  .top nav { gap: 10px; margin-left: 0; width: 100%; }
  .top nav .hide-sm { display: none; }
  .top nav .langs { margin-left: auto; }
  .hero { padding-top: 40px; }
}
.top nav a.btn { color: #fff; background: var(--grad); }
