/* starkryu.com — shared by every page (site/pages/*, rendered by site/build.mjs). */
:root {
  color-scheme: light dark;
  --bg: #fbfbfd;
  --bg2: #f2f2f5;
  --card: #fff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --code: rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  --term: #111214;
  --term-text: #e6e6e6;
  --radius: 18px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #000;
  --bg2: #0b0b0d;
  --card: #141416;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #8a8a8f;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #2997ff;
  --accent-hover: #47a6ff;
  --accent-soft: rgba(41, 151, 255, 0.14);
  --code: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #000;
    --bg2: #0b0b0d;
    --card: #141416;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #8a8a8f;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --accent-soft: rgba(41, 151, 255, 0.14);
    --code: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme='light'] {
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    17px/1.55 -apple-system,
    BlinkMacSystemFont,
    'SF Pro Text',
    'Apple SD Gothic Neo',
    'Pretendard',
    'Segoe UI',
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  word-break: keep-all;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
code,
kbd {
  font:
    0.86em 'SF Mono',
    ui-monospace,
    Menlo,
    Consolas,
    monospace;
  background: var(--code);
  padding: 2px 6px;
  border-radius: 6px;
  word-break: break-all;
}
kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--card);
}
img {
  max-width: 100%;
}
.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}
.narrow {
  width: min(820px, 92vw);
  margin: 0 auto;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 16px;
  color: var(--text);
  margin-right: auto;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 26px;
  height: 26px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 8px;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--code);
  text-decoration: none;
}
.nav-links a[aria-current='page'] {
  color: var(--text);
  font-weight: 600;
}
.nav .btn.small {
  margin-left: 10px;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}
@media (max-width: 860px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }
  .nav .btn.small {
    display: none;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 4vw 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links {
    display: flex;
  }
  .nav-links a {
    padding: 12px;
    font-size: 16px;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 26px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  border: 0;
  cursor: pointer;
}
.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.btn.ghost:hover {
  background: var(--accent-soft);
}
.btn.small {
  height: 34px;
  padding: 0 16px;
  font-size: 14px;
}
.link-arrow::after {
  content: ' ›';
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 84px 0 0;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -60px 0 auto;
  height: 620px;
  z-index: -1;
  background: radial-gradient(60% 50% at 50% 0%, var(--accent-soft), transparent 70%);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 980px;
  margin-bottom: 18px;
}
.eyebrow:hover {
  text-decoration: none;
}
.hero img.icon {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.28));
}
.hero h1,
.page-head h1 {
  font-size: clamp(40px, 6.2vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin: 22px 0 16px;
  font-weight: 750;
}
.grad {
  background: linear-gradient(100deg, #0a84ff, #bf5af2 55%, #ff375f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: clamp(18px, 2.1vw, 22px);
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 720px;
  line-height: 1.45;
}
.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}
.sub {
  margin-top: 14px;
  font-size: 14px;
  color: var(--faint);
}
.page-head {
  text-align: center;
  padding: 76px 0 8px;
}
.page-head h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin-top: 0;
}

/* ---------- window frame ---------- */
.shot {
  margin: 56px auto 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--line),
    0 40px 100px rgba(0, 0, 0, 0.28);
  background: #1e1e1e;
}
.shot .chrome {
  height: 30px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  background: #2a2a2c;
}
.shot .chrome i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}
.shot img {
  display: block;
  width: 100%;
}

/* ---------- sections ---------- */
section {
  padding: 104px 0 0;
}
.sec-head {
  text-align: center;
  margin-bottom: 44px;
}
.sec-head .kicker {
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
  letter-spacing: 0;
}
.sec-head h2,
h2.sec {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 6px 0 12px;
}
.sec-head p {
  color: var(--muted);
  font-size: 19px;
  margin: 0 auto;
  max-width: 680px;
}
.band {
  background: var(--bg2);
  padding: 96px 0;
  margin-top: 104px;
}
.band + section {
  padding-top: 96px;
}

/* ---------- stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 64px;
}
.stats div {
  background: var(--card);
  padding: 22px 20px;
  text-align: center;
}
.stats b {
  display: block;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.stats span {
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 720px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}
.grid.three {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
  color: var(--text);
}
a.card {
  display: block;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
a.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card .ic {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: #fff;
}
.card .ic svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.card ul,
.card ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}
.card li {
  margin: 6px 0;
}
.card .more {
  display: inline-block;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- split feature rows ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.split:first-of-type {
  border-top: 0;
}
.split.flip > :first-child {
  order: 2;
}
.split h3 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 6px 0 12px;
}
.split p {
  color: var(--muted);
  margin: 0 0 14px;
}
.split .kicker {
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
}
.checks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.checks li {
  position: relative;
  padding-left: 28px;
  margin: 10px 0;
  font-size: 16px;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5' fill='none' stroke='%230a84ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/14px no-repeat;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .split.flip > :first-child {
    order: 0;
  }
}

/* ---------- illustrations (CSS only) ---------- */
.mock {
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
  font-size: 14px;
}
.term {
  background: var(--term);
  color: var(--term-text);
  border-radius: 14px;
  padding: 16px 18px;
  font:
    13px/1.65 'SF Mono',
    ui-monospace,
    Menlo,
    Consolas,
    monospace;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-all;
}
.term .dim {
  color: #7d8590;
}
.term .g {
  color: #3fb950;
}
.term .b {
  color: #58a6ff;
}
.term .o {
  color: #f0883e;
}
.term .p {
  color: #d2a8ff;
}
.term-tabs {
  display: flex;
  gap: 6px;
  margin: -4px 0 12px;
}
.term-tabs span {
  font:
    600 11px -apple-system,
    system-ui,
    sans-serif;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #c9d1d9;
}
.term-tabs span.on {
  background: #2f81f7;
  color: #fff;
}
.meter {
  margin: 12px 0;
}
.meter .row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 5px;
}
.meter .row b {
  color: var(--text);
  font-weight: 600;
}
.bar {
  height: 8px;
  border-radius: 8px;
  background: var(--code);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 980px;
  background: var(--code);
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.list-row:first-child {
  border-top: 0;
}
.list-row .grow {
  flex: 1;
  min-width: 0;
}
.list-row small {
  display: block;
  color: var(--faint);
  font-size: 12px;
}

/* phone frame */
.phone {
  width: 280px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 44px;
  padding: 12px;
  background: #1c1c1e;
  box-shadow:
    0 0 0 2px #3a3a3c,
    0 40px 80px rgba(0, 0, 0, 0.35);
}
.phone .screen {
  border-radius: 34px;
  background: var(--bg);
  overflow: hidden;
  min-height: 520px;
  padding: 44px 16px 18px;
  position: relative;
  font-size: 13px;
}
.phone .screen::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  translate: -50% 0;
  width: 92px;
  height: 26px;
  border-radius: 20px;
  background: #000;
}
.phone h4 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.phone .tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}
.phone .tile b {
  font-size: 13px;
}
.phone .tile p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.phone .actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.phone .actions span {
  flex: 1;
  text-align: center;
  border-radius: 10px;
  padding: 7px 0;
  font-weight: 600;
  font-size: 12px;
  background: var(--code);
}
.phone .actions span.ok {
  background: var(--accent);
  color: #fff;
}

/* ---------- downloads ---------- */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.dl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.dl:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.dl.rec {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.dl .os {
  font-weight: 650;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl .os svg {
  width: 20px;
  height: 20px;
}
.dl .meta {
  color: var(--faint);
  font-size: 14px;
}
.dl .go {
  margin-top: 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}
.dl .badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  padding: 2px 7px;
}
.sums {
  margin-top: 18px;
  font-size: 13px;
  color: var(--faint);
}
.sums summary {
  cursor: pointer;
  color: var(--muted);
}
.sums table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.sums td {
  padding: 6px 8px 6px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.sums td code {
  font-size: 12px;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- docs ---------- */
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  padding-top: 48px;
}
.toc {
  position: sticky;
  top: 80px;
  font-size: 14px;
}
.toc b {
  display: block;
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.toc a {
  display: block;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
}
.toc a:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--code);
}
.toc a.on {
  color: var(--accent);
  border-left-color: var(--accent);
  border-radius: 0 8px 8px 0;
}
.doc h2 {
  font-size: 30px;
  letter-spacing: -0.03em;
  margin: 56px 0 12px;
  padding-top: 8px;
}
.doc h2:first-child {
  margin-top: 0;
}
.doc h3 {
  font-size: 20px;
  margin: 28px 0 8px;
}
.doc p,
.doc li {
  color: var(--muted);
}
.doc p b,
.doc li b {
  color: var(--text);
}
.doc ol,
.doc ul {
  padding-left: 22px;
}
.doc li {
  margin: 8px 0;
}
.doc pre {
  background: var(--term);
  color: var(--term-text);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  font:
    13px/1.6 'SF Mono',
    ui-monospace,
    Menlo,
    Consolas,
    monospace;
}
.doc pre code {
  background: none;
  padding: 0;
  word-break: normal;
}
.note {
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 15px;
  margin: 16px 0;
}
.note.warn {
  background: rgba(255, 159, 10, 0.14);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  color: var(--faint);
  font-weight: 600;
  font-size: 13px;
  border-top: 0;
}
.table td:first-child {
  white-space: nowrap;
  font-weight: 600;
}
.table td {
  color: var(--muted);
}
.table td:first-child {
  color: var(--text);
}
@media (max-width: 860px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .toc b {
    width: 100%;
  }
  .toc a {
    border: 1px solid var(--line);
    border-radius: 980px;
  }
}

/* ---------- steps ---------- */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}
.step {
  counter-increment: step;
  position: relative;
  padding-top: 58px;
}
.step::before {
  content: counter(step);
  position: absolute;
  top: 20px;
  left: 24px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
}

/* ---------- changelog ---------- */
.release {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.release:first-child {
  border-top: 0;
}
.release .when b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.release .when span {
  color: var(--faint);
  font-size: 14px;
}
.release h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.release ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.release li {
  margin: 7px 0;
}
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  margin-right: 6px;
  vertical-align: 2px;
  color: #fff;
}
.tag.new {
  background: #30d158;
}
.tag.better {
  background: #0a84ff;
}
.tag.fix {
  background: #ff9f0a;
}
.tag.mobile {
  background: #bf5af2;
}
.log {
  margin-top: 48px;
}
.log summary {
  cursor: pointer;
  font-weight: 600;
}
.log ol {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  font-size: 14px;
}
.log li {
  display: grid;
  grid-template-columns: 96px 80px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.log li span:first-child,
.log li span:nth-child(2) {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .release {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .log li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------- FAQ ---------- */
.faq details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--faint);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
}
.faq details[open] summary::after {
  content: '−';
}
.faq details p {
  color: var(--muted);
  margin: 10px 0 0;
}

/* ---------- closing CTA ---------- */
.closer {
  text-align: center;
  margin-top: 112px;
  padding: 72px 24px;
  border-radius: 28px;
  background: radial-gradient(80% 120% at 50% 0%, var(--accent-soft), transparent 70%), var(--bg2);
  border: 1px solid var(--line);
}
.closer h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.035em;
  margin: 0 0 12px;
}
.closer p {
  color: var(--muted);
  margin: 0 0 28px;
}

/* ---------- footer ---------- */
footer {
  margin-top: 112px;
  padding: 44px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
  background: var(--bg2);
}
.foot {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.foot b {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 10px;
}
.foot a {
  display: block;
  color: var(--muted);
  margin: 6px 0;
}
.foot .brand {
  margin-bottom: 10px;
}
.foot-bottom {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 720px) {
  .foot {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.in) {
    opacity: 0;
    transform: translateY(16px);
  }
  .reveal {
    transition:
      opacity 0.6s ease,
      transform 0.6s ease;
  }
}

/* ---------- narrow screens ---------- */
.doc {
  min-width: 0;
}
@media (max-width: 860px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .stats b {
    font-size: 19px;
  }
  .table td:first-child {
    white-space: normal;
  }
  section {
    padding-top: 80px;
  }
}

/* ---------- nav tools: search, theme ---------- */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.icon-btn:hover {
  color: var(--text);
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}
.icon-btn kbd {
  font-size: 11px;
  padding: 0 5px;
  border-bottom-width: 1px;
}
@media (max-width: 860px) {
  .icon-btn .label,
  .icon-btn kbd {
    display: none;
  }
}
.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--accent);
}

/* ---------- search palette ---------- */
.palette {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}
.palette.open {
  display: flex;
}
.palette-box {
  width: min(620px, 92vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.palette input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  padding: 18px 20px;
  outline: none;
}
.palette ul {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 52vh;
  overflow-y: auto;
}
.palette li a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text);
}
.palette li a:hover,
.palette li a.sel {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.palette li a small {
  display: block;
  color: var(--faint);
  font-size: 12px;
}
.palette li a.sel small,
.palette li a:hover small {
  color: rgba(255, 255, 255, 0.8);
}
.palette mark {
  background: none;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}
.palette .hint {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
  display: flex;
  gap: 14px;
}
.palette .none {
  padding: 24px;
  text-align: center;
  color: var(--faint);
}

/* ---------- copy buttons ---------- */
.copyable {
  position: relative;
}
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e6e6e6;
  font:
    12px -apple-system,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.copy:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- product tour ---------- */
.tour-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}
.tour-tabs button {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 980px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
}
.tour-tabs button[aria-selected='true'] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.tour-panel {
  display: none;
}
.tour-panel.on {
  display: grid;
  animation: fade 0.35s ease;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.tour-bar {
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
  width: 160px;
  margin: 0 auto 36px;
}
.tour-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

/* ---------- typing terminal ---------- */
.term .caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  vertical-align: -2px;
  background: #e6e6e6;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.term.live {
  min-height: 330px;
}

/* ---------- how it works ---------- */
.arch {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}
.arch .node {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.arch .node b {
  display: block;
  font-size: 17px;
  margin: 8px 0 4px;
}
.arch .node span {
  color: var(--muted);
  font-size: 14px;
}
.arch .node .emoji {
  font-size: 30px;
}
.arch .link {
  text-align: center;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
}
.arch .link i {
  display: block;
  width: 64px;
  height: 2px;
  margin: 6px auto;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px);
  background-size: 28px 2px;
  animation: flow 1s linear infinite;
}
@keyframes flow {
  to {
    background-position: 28px 0;
  }
}
.arch-sub {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 860px) {
  .arch {
    grid-template-columns: 1fr;
  }
  .arch .link i {
    width: 2px;
    height: 36px;
    background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 14px);
    background-size: 2px 28px;
    animation: flowv 1s linear infinite;
  }
  .arch-sub {
    grid-template-columns: 1fr;
  }
}
@keyframes flowv {
  to {
    background-position: 0 28px;
  }
}

/* ---------- changelog filter ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}
.filters button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 980px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
}
.filters button[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.release li.hide,
.release.hide {
  display: none;
}

/* ---------- misc ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 15;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
}
.lost {
  text-align: center;
  padding: 120px 0 40px;
}
.lost .code {
  font-size: clamp(80px, 16vw, 160px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}
.tour-panel.split {
  border-top: 0;
  padding-top: 8px;
}

/* ---------- interactive demo (home) ---------- */
.view-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  margin: 48px auto 0;
  border-radius: 980px;
  background: var(--code);
}
.view-switch button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border: 0;
  border-radius: 980px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.view-switch button[aria-pressed='true'] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.hero .shot {
  margin-top: 18px;
}
.demo {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 560px;
  text-align: left;
  font:
    13px/1.45 -apple-system,
    BlinkMacSystemFont,
    'Apple SD Gothic Neo',
    'Segoe UI',
    system-ui,
    sans-serif;
  color: #e6e6e6;
  background: #1b1b1d;
}
.demo-side {
  background: #232326;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 8px;
  overflow: hidden;
}
.demo-side .grp {
  font-size: 11px;
  font-weight: 700;
  color: #8a8a8f;
  margin: 10px 8px 4px;
}
.demo-side button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: none;
  color: #e6e6e6;
  font: inherit;
  text-align: left;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.demo-side button:hover {
  background: rgba(255, 255, 255, 0.06);
}
.demo-side button.on {
  background: rgba(10, 132, 255, 0.28);
}
.demo-side .pi {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex: none;
}
.demo-side .nm {
  flex: 1;
  min-width: 0;
}
.demo-side .nm small {
  display: block;
  color: #8a8a8f;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-side .acct {
  margin: 18px 8px 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #a1a1a6;
}
.demo-side .acct .bar {
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  margin: 5px 0 10px;
}
.demo-main {
  display: grid;
  grid-template-rows: 40px 1fr 46px;
  min-width: 0;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
}
.demo-bar .seg {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 2px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
}
.demo-bar .seg span {
  padding: 3px 9px;
  border-radius: 5px;
  color: #a1a1a6;
}
.demo-bar .seg span.on {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.demo-body {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  min-height: 0;
}
.demo-preview {
  padding: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  background: #141416;
}
.demo-phone {
  width: 150px;
  height: 300px;
  border-radius: 24px;
  border: 5px solid #000;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 10px 10px;
  transition: background 0.3s;
}
.demo-phone i {
  display: block;
  border-radius: 5px;
  background: #e5e5ea;
  height: 7px;
}
.demo-phone .hero-blk {
  height: 96px;
  border-radius: 10px;
  transition: background 0.4s;
}
.demo-phone .btn-blk {
  height: 24px;
  border-radius: 12px;
  margin-top: auto;
  transition: background 0.4s;
}
.demo-terms {
  display: grid;
  grid-template-rows: 1fr 1fr;
  min-height: 0;
}
.demo-term {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.demo-term header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 11px;
  color: #a1a1a6;
  background: rgba(255, 255, 255, 0.03);
}
.demo-term header b {
  color: #e6e6e6;
}
.demo-term header .st {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.demo-term pre {
  flex: 1;
  margin: 0;
  padding: 8px 12px;
  overflow: hidden;
  font:
    12px/1.6 'SF Mono',
    ui-monospace,
    Menlo,
    Consolas,
    monospace;
  white-space: pre-wrap;
  word-break: break-all;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.demo-term pre .dim {
  color: #7d8590;
}
.demo-term pre .g {
  color: #3fb950;
}
.demo-term pre .b {
  color: #58a6ff;
}
.demo-term pre .p {
  color: #d2a8ff;
}
.demo-term pre .o {
  color: #f0883e;
}
.demo-ask {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.demo-ask button {
  font:
    600 11px -apple-system,
    system-ui,
    sans-serif;
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: #e6e6e6;
}
.demo-ask button.ok {
  background: #0a84ff;
  color: #fff;
}
.demo-cast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #202023;
}
.demo-cast span {
  font-size: 11px;
  font-weight: 700;
  color: #ff9f0a;
  white-space: nowrap;
}
.demo-cast input {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font: inherit;
  padding: 0 10px;
  outline: none;
}
.demo-cast input:focus {
  border-color: #0a84ff;
}
.demo-hint {
  margin-top: 12px;
  font-size: 14px;
  color: var(--faint);
}
@media (max-width: 860px) {
  .view-switch,
  .demo-hint,
  [data-view='demo'] {
    display: none !important;
  }
  [data-view='shot'] {
    display: block !important;
  }
}

/* ---------- QR ---------- */
.qr-card {
  display: flex;
  align-items: center;
  gap: 24px;
}
.qr {
  flex: none;
  width: 132px;
  height: 132px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
}
.qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
@media (max-width: 600px) {
  .qr-card {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- accessibility ---------- */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.skip:focus {
  top: 10px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
@media print {
  .nav,
  footer,
  .to-top,
  .palette,
  .closer,
  .toc {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
