:root {
  --paper: #f6f5f2;
  --surface: #ffffff;
  --ink: #12181f;
  --muted: #55606e;
  --line: rgba(18, 24, 31, .11);
  --accent: #0f766e;
  --accent-strong: #0b5f58;
  --night: #10181f;
  --night-line: rgba(255, 255, 255, .13);
  --night-muted: #a6b1bd;
  --radius: 14px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(246, 245, 242, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; font-size: 15px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px 18px; font-size: 14px; }
.topbar nav a { padding: 4px 0; color: var(--muted); text-decoration: none; }
.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--ink); }
.topbar nav a[aria-current] { font-weight: 600; }
.topbar .lang { padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { border-color: rgba(18, 24, 31, .3); }
.btn-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.btn-on-dark { border-color: var(--night-line); background: transparent; color: #fff; }
.btn-on-dark:hover { border-color: rgba(255, 255, 255, .4); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* Hero */
.hero { padding: 72px 0 0; overflow: hidden; }
.kicker { display: block; color: var(--accent); font-size: 14px; font-weight: 650; }
.hero h1 { margin-top: 14px; font-size: clamp(40px, 6.4vw, 76px); font-weight: 750; letter-spacing: -.035em; line-height: 1.08; }
.lead { max-width: 640px; margin-top: 20px; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; }
.hero .cta { margin-top: 28px; }
.meta { margin-top: 14px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Frames and tour */
.frame { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 2px rgba(18, 24, 31, .05), 0 18px 48px rgba(18, 24, 31, .1); }
.tour { margin-top: 52px; }
.tour-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.tour-tabs button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; }
.tour-tabs button:hover { color: var(--ink); }
.tour-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.hero + .feature { padding-top: 136px; }

/* Features */
.feature { padding: 80px 0; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center; gap: 48px; }
.feature.is-flipped .feature-grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.feature.is-flipped .feature-copy { order: 2; }
.feature h2 { margin-top: 10px; font-size: clamp(26px, 3vw, 36px); font-weight: 720; }
.feature p { margin-top: 14px; color: var(--muted); }
.feature ul, .doc-block ul { margin-top: 16px; padding: 0; list-style: none; }
.feature li, .doc-block li { position: relative; margin-top: 8px; padding-left: 18px; font-size: 15px; line-height: 1.55; }
.feature li::before, .doc-block li::before { content: ""; position: absolute; top: .62em; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Showcase */
.showcase { padding: 84px 0; background: var(--night); color: #fff; }
.showcase .kicker { color: #5eead4; }
.showcase h2 { margin-top: 10px; font-size: clamp(28px, 3.6vw, 44px); font-weight: 720; }
.showcase-lead { max-width: 620px; margin-top: 14px; color: var(--night-muted); }
.drawings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.drawings figure { overflow: hidden; border: 1px solid var(--night-line); border-radius: 12px; background: #1a242d; }
.drawings img { width: 100%; background: #fff; }
.drawings figcaption { padding: 8px 12px; font-size: 13px; color: #dbe2e9; }
.showcase-note { margin-top: 14px; color: var(--night-muted); font-size: 13px; }

/* Sections */
.section { padding: 76px 0; }
.section-tight { padding: 28px 0 44px; }
.section-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 720; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.cards article { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cards h3 { font-size: 16px; font-weight: 650; }
.cards p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.section-privacy { border-block: 1px solid var(--line); background: var(--surface); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; }
.privacy-grid p { margin-top: 12px; color: var(--muted); }
.privacy { width: 100%; border-collapse: collapse; font-size: 15px; }
.privacy th, .privacy td { padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.privacy tr:first-child th, .privacy tr:first-child td { padding-top: 0; }
.privacy tr:last-child th, .privacy tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.privacy th { width: 150px; padding-right: 20px; font-weight: 600; }
.privacy td { color: var(--muted); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { padding: 15px 0; font-weight: 600; cursor: pointer; }
.faq details p { padding-bottom: 16px; color: var(--muted); font-size: 15px; }
.band { padding: 56px 0; background: var(--night); color: #fff; }
.band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.band h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 720; }
.band p { margin-top: 4px; color: var(--night-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.author-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.author p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.qr { margin-top: 16px; width: 180px; border-radius: 10px; border: 1px solid var(--line); }

/* Footer */
.footer { padding: 32px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.footer strong { color: var(--ink); font-size: 14px; }
.footer p { margin-top: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); }

/* Features page */
.page-head { padding: 56px 0 28px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 750; letter-spacing: -.03em; }
.page-head .lead { margin-top: 10px; font-variant-numeric: tabular-nums; }
.doc { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 44px; padding-bottom: 72px; }
.doc-toc { position: sticky; top: 84px; display: flex; flex-direction: column; align-self: start; gap: 2px; font-size: 14px; }
.doc-toc a { padding: 5px 0; color: var(--muted); text-decoration: none; }
.doc-toc a:hover { color: var(--ink); }
.doc-block { padding-bottom: 64px; }
.doc-block h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 720; }
.doc-block > p { margin-top: 10px; color: var(--muted); }
.doc-block .frame { margin-top: 24px; }

/* Download page */
.dl-table { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dl-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 13px 18px; }
.dl-row + .dl-row { border-top: 1px solid var(--line); }
.dl-row strong { display: block; font-size: 15px; font-weight: 600; }
.dl-row span { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.dl-row .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.fine { margin-top: 12px; color: var(--muted); font-size: 13px; }
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.notes article { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.notes h3 { font-size: 15px; font-weight: 650; }
.notes p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Rendered by platform-recommendation.js */
#platform-recommendation { margin-top: 24px; color: var(--muted); font-size: 14px; }
.platform-recommendation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.platform-recommendation-copy .eyebrow { display: block; color: var(--accent); font-size: 13px; font-weight: 650; }
.platform-recommendation-copy strong { display: block; color: var(--ink); font-size: 17px; font-weight: 650; }
.platform-recommendation-copy small { display: block; font-size: 13px; }
.platform-detected-badge { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; white-space: nowrap; }
.platform-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.platform-card { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.platform-card.is-recommended { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.platform-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.platform-card-head > div { display: flex; align-items: center; gap: 8px; }
.platform-card-head strong { color: var(--ink); font-size: 17px; font-weight: 650; }
.platform-icon { display: none; }
.platform-match { padding: 1px 8px; border-radius: 999px; background: rgba(15, 118, 110, .1); color: var(--accent); font-size: 12px; font-weight: 600; }
.platform-version, .platform-system { font-size: 13px; }
.platform-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.platform-card-actions .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }

/* Rendered by releases.js */
#release-list { display: grid; gap: 8px; margin-top: 14px; }
#release-list .status { color: var(--muted); font-size: 14px; }
.release-card { padding: 13px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.release-card header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.release-card h3 { font-size: 15px; font-weight: 650; letter-spacing: 0; }
.release-card .meta { margin: 0; font-size: 12px; }
.asset-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13px; }
.asset-links .primary { font-weight: 600; }
.release-card .note { margin-top: 6px; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .feature-grid, .privacy-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature.is-flipped .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature.is-flipped .feature-copy { order: 0; }
  .feature { padding: 56px 0; }
  .cards, .drawings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; flex-flow: row wrap; gap: 2px 14px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding-top: 44px; }
  .brand span, .nav-extra { display: none; }
  .topbar nav { gap: 2px 12px; font-size: 13px; }
  .notes, .platform-options, .author-grid { grid-template-columns: minmax(0, 1fr); }
  .privacy th { width: 92px; padding-right: 12px; }
  .section { padding: 52px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }