/* vtour site: one stylesheet for every page. No build step (CLAUDE.md R37).
   Dark first, like the app; light when the system asks for it. */

:root {
  color-scheme: dark;
  --bg: #191a1b;
  --surface: #1f2023;
  --surface-2: #26272b;
  --line: #2a2b2c;
  --line-strong: #3c3c3c;
  --text: #e4e4e4;
  --muted: #9a9ba0;
  --heading: #ffffff;
  --accent: #3794ff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(55, 148, 255, 0.14);
  --code-bg: #121314;
  --radius: 8px;
  --radius-s: 5px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Apple SD Gothic Neo",
          "Malgun Gothic", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Mono", "SF Mono", Menlo, Consolas, "D2Coding", monospace;
  --page: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f6f7f9;
    --surface-2: #eceef2;
    --line: #e3e5e9;
    --line-strong: #cfd3d9;
    --text: #1f2328;
    --muted: #5d6470;
    --heading: #0d1117;
    --accent: #0067c0;
    --accent-soft: rgba(0, 103, 192, 0.10);
    --code-bg: #f3f4f6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--page); margin: 0 auto; padding-inline: var(--gutter); }

/* --- header ---------------------------------------------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 600; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius-s);
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--heading); }

/* Quiet select: text and chevron, a background only on hover (the same
   rule the app uses for toolbar dropdowns). */
.quiet-select {
  appearance: none;
  border: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%239a9ba0' stroke-width='1.6' d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--muted);
  font: inherit;
  padding: 6px 28px 6px 10px;
  border-radius: var(--radius-s);
  cursor: pointer;
}
.quiet-select:hover { background-color: var(--surface-2); color: var(--text); }
.quiet-select option { background: var(--surface); color: var(--text); }

/* --- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  font-weight: 600;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }

/* --- hero --------------------------------------------------------------- */
.hero { padding-block: clamp(56px, 10vw, 112px) clamp(40px, 6vw, 72px); }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.hero h1 {
  margin: 12px 0 0;
  color: var(--heading);
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 14em;
}
.hero h1 .second { color: var(--muted); }
.lede { margin: 20px 0 0; max-width: 40em; font-size: clamp(16px, 2vw, 18px); color: var(--muted); }
.actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* --- sections --------------------------------------------------------- */
section.block { padding-block: 56px; border-top: 1px solid var(--line); }
section.block h2 { margin: 0 0 8px; color: var(--heading); font-size: 26px; letter-spacing: -0.01em; }
section.block > .wrap > p.sub { margin: 0 0 32px; color: var(--muted); max-width: 44em; }

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature h3 { margin: 0 0 6px; font-size: 16px; color: var(--heading); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.kinds { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kind-tile {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}
.kind-tile:hover { background: var(--surface); text-decoration: none; }
.kind-tile b { display: block; font-size: 28px; color: var(--heading); line-height: 1.1; }
.kind-tile span { color: var(--muted); font-size: 14px; }

.split { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.code {
  margin: 0;
  padding: 16px 18px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.55;
}
.code .k { color: #569cd6; }
.code .s { color: #d69d85; }
.code .c { color: #57a64a; }
.code .t { color: #4ec9b0; }
@media (prefers-color-scheme: light) {
  .code .k { color: #0000ff; }
  .code .s { color: #a31515; }
  .code .c { color: #008000; }
  .code .t { color: #2b91af; }
}
.steps { margin: 0; padding-left: 20px; color: var(--muted); }
.steps li { margin-bottom: 8px; }
.steps b { color: var(--text); }

/* --- marketplace ------------------------------------------------------ */
.page-head { padding-block: 48px 24px; }
.page-head h1 { margin: 0; color: var(--heading); font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.01em; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 46em; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.search {
  flex: 1 1 260px;
  max-width: 360px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--text);
  font: inherit;
}
.search::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.chip small { opacity: 0.75; margin-left: 4px; }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); padding-bottom: 64px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.card-head { display: flex; align-items: baseline; gap: 8px; }
.card h3 { margin: 0; font-size: 16px; color: var(--heading); overflow-wrap: anywhere; }
.card .ver { margin-left: auto; color: var(--muted); font-size: 12px; font-family: var(--mono); white-space: nowrap; }
.card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.badge { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.kind { background: var(--accent-soft); color: var(--accent); }
.meta code { color: var(--muted); font-size: 12px; }
.deps { font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); padding: 32px 0 64px; }

/* --- download --------------------------------------------------------- */
.platforms { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding-bottom: 32px; }
.platform { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.platform h3 { margin: 0 0 4px; color: var(--heading); }
.platform p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.platform pre { margin: 0; }
.note { color: var(--muted); font-size: 14px; padding-bottom: 64px; max-width: 46em; }

/* --- footer ----------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 13px; }
.foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 560px) {
  .top .wrap { gap: 8px; }
  .nav a { padding: 6px 8px; }
  .brand span { display: none; }
}
