/* Rankly website — shared styles */

:root {
  --c1: #4F46E5;
  --c2: #9333EA;
  --c3: #EC4899;
  --c4: #F97316;
  --grad: linear-gradient(120deg, var(--c1) 0%, var(--c2) 35%, var(--c3) 68%, var(--c4) 100%);
  --grad-soft: linear-gradient(120deg, rgba(79,70,229,.18), rgba(147,51,234,.18), rgba(236,72,153,.16), rgba(249,115,22,.14));

  --bg: #0B0B14;
  --bg-2: #10101C;
  --surface: rgba(255,255,255,.04);
  --surface-2: rgba(255,255,255,.07);
  --surface-solid: #141423;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);
  --text: #F3F3F8;
  --text-2: #C4C4D4;
  --muted: #9A9AB0;
  --up: #34D399;
  --down: #FB7185;
  --code-bg: rgba(255,255,255,.07);
  --shadow: 0 30px 80px -20px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.06);
  --blob-opacity: .55;
  --nav-bg: rgba(11,11,20,.72);
  --focus: #F0ABFC;

  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Apple SD Gothic Neo", "Noto Sans CJK SC", "Noto Sans JP", "Noto Sans KR", sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, "PingFang SC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Apple SD Gothic Neo", "Noto Sans CJK SC", "Noto Sans JP", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #FAFAFD;
    --bg-2: #F2F1F8;
    --surface: rgba(255,255,255,.75);
    --surface-2: rgba(17,17,34,.04);
    --surface-solid: #FFFFFF;
    --border: rgba(17,17,34,.09);
    --border-strong: rgba(17,17,34,.16);
    --text: #12121F;
    --text-2: #34344A;
    --muted: #5A5A70;
    --up: #059669;
    --down: #E11D48;
    --code-bg: rgba(79,70,229,.08);
    --shadow: 0 30px 70px -25px rgba(40,30,90,.35), 0 0 0 1px rgba(17,17,34,.07);
    --blob-opacity: .28;
    --nav-bg: rgba(250,250,253,.78);
    --focus: #7C3AED;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
code, kbd {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .08em .4em;
  overflow-wrap: anywhere;
}
kbd { border-bottom-width: 2px; }
::selection { background: rgba(236,72,153,.35); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface-solid); color: var(--text); padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: gradShift 10s ease-in-out infinite alternate;
}
@keyframes gradShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-2);
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--text-2); max-width: 640px; }
.muted { color: var(--muted); }

/* ---------- Background blobs ---------- */
.blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: var(--blob-opacity);
  will-change: transform;
}
.blob.b1 { width: 520px; height: 520px; background: var(--c1); left: -140px; top: -120px; animation: drift1 26s ease-in-out infinite alternate; }
.blob.b2 { width: 460px; height: 460px; background: var(--c2); right: -120px; top: -60px; animation: drift2 30s ease-in-out infinite alternate; }
.blob.b3 { width: 420px; height: 420px; background: var(--c3); left: 30%; top: 220px; animation: drift3 34s ease-in-out infinite alternate; }
.blob.b4 { width: 360px; height: 360px; background: var(--c4); right: 10%; top: 420px; opacity: calc(var(--blob-opacity) * .7); animation: drift1 38s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-140px, 120px) scale(.9); } }
@keyframes drift3 { to { transform: translate(-90px, -70px) scale(1.15); } }
@media (max-width: 700px) {
  .blob { filter: blur(60px); }
  .blob.b1 { width: 320px; height: 320px; }
  .blob.b2 { width: 300px; height: 300px; }
  .blob.b3 { width: 280px; height: 280px; }
  .blob.b4 { width: 240px; height: 240px; }
}
.grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 3px 3px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; flex-shrink: 0; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a {
  text-decoration: none; color: var(--text-2); font-size: .93rem; font-weight: 500;
  padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  font: 600 .8rem var(--font); color: var(--text);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a1a1b5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 28px 8px 12px; cursor: pointer; max-width: 170px;
}
.lang-select:hover { border-color: var(--border-strong, var(--border)); }
.lang-select option { color: #111; background: #fff; }
.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; align-items: center; justify-content: center;
}
.menu-btn svg { width: 20px; height: 20px; }
.nav-gh { display: inline-flex; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav-actions { margin-left: auto; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 16px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 1rem; }
  .nav-actions .nav-gh { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem var(--font); text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 14px; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .25s ease, background .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  color: #fff; background: var(--grad); background-size: 160% 100%;
  box-shadow: 0 10px 30px -8px rgba(147,51,234,.6), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 16px 40px -10px rgba(236,72,153,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { transform: translateY(-2px); background: var(--surface-2); }
.btn-sm { padding: 9px 14px; font-size: .88rem; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero > .container { position: relative; z-index: 1; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-icon {
  width: 112px; height: 112px; margin-bottom: 26px;
  filter: drop-shadow(0 20px 40px rgba(147,51,234,.55));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 { max-width: 900px; }
.hero .lead { margin: 0 auto 30px; text-align: center; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-meta { margin-top: 18px; font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 15px; height: 15px; }
@media (max-width: 480px) {
  .hero { padding-top: 48px; }
  .hero-icon { width: 88px; height: 88px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { width: 100%; }
}

/* ---------- Mac window ---------- */
.window {
  position: relative; border-radius: 14px; overflow: hidden;
  background: var(--surface-solid); box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.window-bar {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.dots { display: inline-flex; gap: 7px; flex-shrink: 0; }
.dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: #FF5F57; }
.dots i:nth-child(2) { background: #FEBC2E; }
.dots i:nth-child(3) { background: #28C840; }
.window-title { flex: 1; text-align: center; font-size: .8rem; color: var(--muted); font-weight: 500; margin-right: 50px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hero-demo { position: relative; margin: 56px auto 0; max-width: 1000px; }
.hero-demo::before {
  content: ""; position: absolute; inset: -2px; border-radius: 16px; background: var(--grad); opacity: .6; filter: blur(30px); z-index: -1;
}

/* ---------- Animated keyword table ---------- */
.app-toolbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.app-chip { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.app-chip .mini-icon { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg,#22D3EE,#6366F1); flex-shrink: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; }
.app-chip b { display: block; font-size: .95rem; }
.app-chip small { display: block; color: var(--muted); font-size: .76rem; }
.seg { margin-left: auto; display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: .78rem; }
.seg span { padding: 4px 12px; border-radius: 6px; color: var(--muted); }
.seg span.on { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--muted); }
.live-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

.kw-table { width: 100%; font-size: .9rem; }
.kw-head, .kw-row {
  display: grid; grid-template-columns: minmax(120px, 1.6fr) 70px 80px minmax(80px, 1fr) minmax(80px, 1fr) 96px;
  align-items: center; gap: 12px; padding: 0 18px;
}
.kw-head { height: 36px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border); }
.kw-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-body { position: relative; }
.kw-row { height: 48px; border-bottom: 1px solid var(--border); background: var(--surface-solid); transition: background .6s; position: relative; }
.kw-row:last-child { border-bottom: 0; }
.kw-row.flash-up { background: color-mix(in srgb, var(--up) 10%, var(--surface-solid)); }
.kw-row.flash-down { background: color-mix(in srgb, var(--down) 9%, var(--surface-solid)); }
.kw-term { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kw-rank { font-variant-numeric: tabular-nums; font-weight: 700; }
.kw-rank.out { color: var(--muted); font-weight: 500; }
.badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: .78rem; font-weight: 650; font-variant-numeric: tabular-nums;
  padding: 2px 8px; border-radius: 999px; min-width: 44px; justify-content: center;
}
.badge.up { color: var(--up); background: color-mix(in srgb, var(--up) 14%, transparent); }
.badge.down { color: var(--down); background: color-mix(in srgb, var(--down) 14%, transparent); }
.badge.flat { color: var(--muted); background: var(--surface-2); }
.meter { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--text-2); }
.meter .track { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 30px; }
.meter .fill { height: 100%; border-radius: 99px; background: var(--grad); transition: width 1s ease; }
.meter.diff .fill { background: linear-gradient(90deg, #34D399, #FBBF24, #F43F5E); background-size: 300px 100%; }
.meter span { width: 22px; text-align: right; }
.spark { width: 96px; height: 28px; overflow: visible; }
.spark path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: d .8s ease; }
.demo-note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 14px; }

@media (max-width: 760px) {
  .kw-head, .kw-row { grid-template-columns: minmax(90px, 1.4fr) 50px 64px minmax(60px, 1fr); gap: 8px; padding: 0 12px; }
  .kw-col-diff, .kw-col-trend { display: none !important; }
  .seg { display: none; }
}
@media (max-width: 420px) {
  .kw-head, .kw-row { grid-template-columns: minmax(80px, 1.3fr) 44px 58px minmax(50px, .9fr); font-size: .82rem; }
  .kw-head { font-size: .64rem; letter-spacing: .03em; }
  .meter span { display: none; }
}

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
@media (max-width: 600px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 36px 0 0; }
.stat { text-align: center; padding: 22px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1; }
.stat > span { color: var(--muted); font-size: .9rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Feature cards */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  --mx: 50%; --my: 50%;
  position: relative; padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s ease, border-color .25s ease, box-shadow .3s ease;
  transform-style: preserve-3d; overflow: hidden; isolation: isolate;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(236,72,153,.16), rgba(147,51,234,.08) 40%, transparent 70%);
}
.card:hover { border-color: var(--border-strong); box-shadow: 0 20px 50px -25px rgba(147,51,234,.5); }
.card:hover::before { opacity: 1; }
.card h3 { margin-top: 16px; }
.card p { color: var(--text-2); margin: 0; font-size: .97rem; }
.card ul { color: var(--text-2); margin: 10px 0 0; padding-left: 18px; font-size: .95rem; }
.ficon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 8px 22px -8px rgba(147,51,234,.7);
}
.ficon svg { width: 23px; height: 23px; }
.card.wide { grid-column: span 2; }
@media (max-width: 640px) { .card.wide { grid-column: auto; } }
.tag { display: inline-block; font-size: .72rem; font-weight: 650; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; background: var(--grad-soft); border: 1px solid var(--border); color: var(--text-2); margin-left: 6px; vertical-align: middle; }

/* Split section */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.reverse { grid-template-columns: 1fr; gap: 36px; } .split.reverse > :first-child { order: 0; } }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; color: var(--text-2); }
.checklist li::before {
  content: ""; flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='7'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E"), var(--grad);
  background-size: 15px, cover; background-position: center; background-repeat: no-repeat;
}

/* Chart card */
.chart-card { padding: 22px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-head b { font-size: 1.05rem; }
.chart-head small { color: var(--muted); display: block; }
.chart-rank { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg .grid-line { stroke: var(--border); stroke-width: 1; }
.chart-svg .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-svg .line { fill: none; stroke: url(#lineGrad); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .area { fill: url(#areaGrad); opacity: 0; transition: opacity 1.2s ease .9s; }
.chart-svg .dot { fill: #fff; stroke: var(--c4); stroke-width: 3; opacity: 0; transition: opacity .4s ease 2s; }
.chart-svg .dot-glow { fill: var(--c4); opacity: 0; transition: opacity .4s ease 2s; }
.chart-svg.drawn .area { opacity: 1; }
.chart-svg.drawn .dot { opacity: 1; }
.chart-svg.drawn .dot-glow { opacity: .3; animation: glow 2s ease-in-out 2.4s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glow { 50% { transform: scale(1.6); opacity: .1; } }

/* Competitors mini list */
.mini-list { display: grid; gap: 8px; margin-top: 18px; }
.mini-item { display: grid; grid-template-columns: 26px 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; }
.mini-item .n { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.mini-item .ai { width: 34px; height: 34px; border-radius: 9px; }
.mini-item small { color: var(--muted); display: block; font-size: .76rem; }
.mini-item .track-btn { font-size: .76rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--surface-solid); border: 1px solid var(--border); white-space: nowrap; }
.mini-item .track-btn.on { color: var(--muted); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step-num {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff; background: var(--grad);
  box-shadow: 0 10px 26px -10px rgba(236,72,153,.7);
}
.step h3 { margin: 4px 0 6px; }
.step p { margin: 0; color: var(--text-2); }
@media (max-width: 480px) { .step { grid-template-columns: 1fr; gap: 12px; } }

.kwfield { margin-top: 26px; padding: 20px; }
.kwfield-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.kwfield-top b { font-size: .95rem; }
.kwfield-box {
  font-family: var(--mono); font-size: .9rem; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong);
  overflow-wrap: anywhere; color: var(--text);
}
.kwfield-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.copy-btn { font: 600 .82rem var(--font); color: var(--text); background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 9px; padding: 7px 12px; cursor: pointer; }
.copy-btn:hover { border-color: var(--c3); }

.callout {
  display: flex; gap: 14px; padding: 18px 20px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--border);
  color: var(--text-2); font-size: .95rem; margin-top: 22px;
}
.callout svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--c3); margin-top: 2px; }
.callout p { margin: 0; }

/* Countries */
.lang-rows { display: grid; gap: 12px; }
.lang-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.lang-row b { font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .78rem; font-weight: 600; padding: 4px 9px; border-radius: 8px; background: var(--surface-solid); border: 1px solid var(--border); color: var(--text-2); }
.chip.sel { border-color: transparent; background: var(--grad); color: #fff; }
@media (max-width: 420px) { .lang-row { grid-template-columns: 1fr; gap: 8px; } }

/* Screenshot gallery */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.shot { margin: 0; }
.shot.full { grid-column: 1 / -1; }
.shot figcaption { margin-top: 14px; color: var(--text-2); font-size: .95rem; }
.shot figcaption b { color: var(--text); display: block; font-size: 1.02rem; margin-bottom: 2px; }
.shot-media { position: relative; aspect-ratio: 1320 / 800; background: var(--surface-2); }
.shot-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.shot-media .ph { display: none; }
.shot-media.missing .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 20px;
  background: radial-gradient(circle at 20% 20%, rgba(79,70,229,.55), transparent 55%), radial-gradient(circle at 80% 30%, rgba(236,72,153,.45), transparent 55%), radial-gradient(circle at 60% 90%, rgba(249,115,22,.4), transparent 55%), var(--surface-solid);
  color: #fff;
}
.shot-media.missing .ph img { position: static; width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,.3)); }
.shot-media.missing .ph span { font-weight: 600; font-size: .95rem; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.shot-menubar { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 36px; align-items: center; }
.shot-menubar .shot-media { aspect-ratio: 400 / 520; }
/* Real screenshots already include macOS window chrome: drop our frame and let the PNG's alpha cast the shadow */
.window.loaded { background: transparent; border: 0; box-shadow: none; overflow: visible; border-radius: 0; }
.window.loaded .window-bar { display: none; }
.window.loaded .shot-media { background: transparent; }
.window.loaded .shot-media img { object-fit: contain; filter: drop-shadow(0 24px 40px rgba(0,0,0,.5)) drop-shadow(0 0 1px rgba(255,255,255,.12)); }
@media (prefers-color-scheme: light) {
  .window.loaded .shot-media img { filter: drop-shadow(0 22px 36px rgba(40,30,90,.28)) drop-shadow(0 0 1px rgba(17,17,34,.25)); }
}
@media (max-width: 760px) {
  .shots { grid-template-columns: 1fr; }
  .shot-menubar { grid-template-columns: 1fr; justify-items: center; }
  .shot-menubar .window { width: 100%; max-width: 340px; }
}

/* Privacy band */
.privacy-band { position: relative; overflow: hidden; border-radius: 28px; padding: 56px; background: var(--surface); border: 1px solid var(--border); }
.privacy-band::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); z-index: 0; }
.privacy-band > * { position: relative; z-index: 1; }
.privacy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 34px; }
.pv { padding: 20px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--border); }
.pv b { display: block; margin: 12px 0 4px; }
.pv p { margin: 0; color: var(--text-2); font-size: .92rem; }
.pv svg { width: 26px; height: 26px; color: var(--c3); }
.endpoints { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; align-items: center; color: var(--muted); font-size: .9rem; }
@media (max-width: 960px) { .privacy-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .privacy-band { padding: 30px 20px; border-radius: 22px; } .privacy-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 600; font-size: 1.04rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 22px 20px; color: var(--text-2); }
.faq .answer p:last-child { margin: 0; }

/* CTA */
.cta { text-align: center; position: relative; overflow: hidden; border-radius: 28px; padding: 72px 24px; border: 1px solid var(--border); background: var(--surface); }
.cta .blobs .blob { opacity: calc(var(--blob-opacity) * .8); }
.cta > :not(.blobs) { position: relative; z-index: 1; }
.cta img { width: 84px; height: 84px; margin-bottom: 16px; }
.cta .hero-ctas { margin-top: 26px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 48px 0 36px; margin-top: 96px; color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer .brand { color: var(--text); }
.footer p { margin: 10px 0 0; max-width: 380px; }
.footer-links { display: flex; gap: 8px 22px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; align-items: center; }
.footer-links a { text-decoration: none; color: var(--text-2); }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .84rem; }

/* ---------- Docs (guide / privacy) ---------- */
.page-hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero .blob { opacity: calc(var(--blob-opacity) * .7); }
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.toc b { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a { display: block; text-decoration: none; color: var(--text-2); font-size: .9rem; padding: 6px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc a.active { color: var(--text); background: var(--surface-2); border-left-color: var(--c3); }
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; max-height: none; }
  .toc ol { display: block; columns: 2; column-gap: 8px; }
  .toc li { break-inside: avoid; }
  .toc a { padding: 5px 8px; font-size: .86rem; }
}
.prose { max-width: 760px; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 56px 0 14px; padding-top: 4px; }
.prose > section:first-child h2 { margin-top: 0; }
.prose h3 { color: var(--text); margin: 28px 0 10px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose a { color: var(--text); text-decoration-color: var(--c3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose .callout { margin: 18px 0; }
.h-anchor { display: inline-flex; align-items: center; gap: 12px; }
.h-anchor .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 1rem; flex-shrink: 0; }
.col-table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: .95rem; }
.col-table th, .col-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.col-table th { color: var(--text); white-space: nowrap; font-weight: 600; }
.col-table tr:last-child th, .col-table tr:last-child td { border-bottom: 0; }
.table-wrap { border-radius: 14px; border: 1px solid var(--border); background: var(--surface); overflow-x: auto; }
@media (max-width: 520px) {
  .col-table, .col-table tbody, .col-table tr, .col-table th, .col-table td { display: block; }
  .col-table th { border-bottom: 0; padding-bottom: 2px; }
  .col-table td { padding-top: 0; }
}
.path { display: block; padding: 12px 14px; margin: 12px 0; border-radius: 12px; font-family: var(--mono); font-size: .86rem; background: var(--code-bg); border: 1px solid var(--border); overflow-wrap: anywhere; color: var(--text); }
.updated { color: var(--muted); font-size: .92rem; }

/* 404 */
.nf { min-height: calc(100vh - 64px); display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; padding: 60px 0; }
.nf .container { position: relative; z-index: 1; }
.nf-code { font-family: var(--font-display); font-size: clamp(6rem, 22vw, 12rem); font-weight: 800; line-height: 1; letter-spacing: -.05em; margin-bottom: 10px; }
.nf .lead { margin: 0 auto 28px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .card { transform: none !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
