/* ==========================================================================
   vibed.css — the Vibed design system for vibed.website
   Tokens mirror the Design System artifact's tokens.json (same names, same
   values); the component layer below is that system's components/bundle.css.
   Change a value there and here together. Plain CSS, no build step.
   ========================================================================== */

:root, [data-theme="light"] {
  --bg: #f3f3f1;
  --surface: #ffffff;
  --surface-raised: #e9e9e6;
  --line: #dededa;
  --line-strong: #80807a;
  --ink: #121212;
  --ink-2: #4a4a47;
  --ink-3: #646461;
  --accent: #b33500;
  --accent-fill: #ff4f00;
  --on-accent: #140600;
  --accent-soft: #ffe1d1;
  --focus: var(--accent);
  --live: #1a6f3f;
  --device: #2c58c9;
  --wip: #8a5a00;
  --shadow-overlay: 0 24px 64px rgba(23, 23, 21, 0.16);
}
[data-theme="dark"] {
  --bg: #0f1010;
  --surface: #161717;
  --surface-raised: #1e1f1f;
  --line: #2b2c2c;
  --line-strong: #6e6f6f;
  --ink: #efefed;
  --ink-2: #a7a8a6;
  --ink-3: #8a8b89;
  --accent: #ff6a26;
  --accent-fill: #ff4f00;
  --on-accent: #140600;
  --accent-soft: #3a1504;
  --focus: var(--accent);
  --live: #5fd38d;
  --device: #86aaff;
  --wip: #e9b44c;
  --shadow-overlay: 0 24px 64px rgba(0, 0, 0, 0.6);
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;
  --container: 1240px;
  --measure: 68ch;
  --header-h: 56px;
  --font-display: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.t-display-xl { font-family: var(--font-display); font-size: 96px; line-height: 0.92; font-weight: 600; letter-spacing: -0.04em; }
.t-display-l { font-family: var(--font-display); font-size: 56px; line-height: 0.96; font-weight: 600; letter-spacing: -0.035em; }
.t-display-m { font-family: var(--font-display); font-size: 36px; line-height: 1.0; font-weight: 600; letter-spacing: -0.025em; }
.t-heading { font-family: var(--font-sans); font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.t-title { font-family: var(--font-sans); font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.t-lede { font-family: var(--font-sans); font-size: 20px; line-height: 1.5; font-weight: 400; letter-spacing: -0.005em; }
.t-body { font-family: var(--font-sans); font-size: 16px; line-height: 1.55; font-weight: 400; }
.t-body-sm { font-family: var(--font-sans); font-size: 14px; line-height: 1.45; font-weight: 400; }
.t-stat { font-family: var(--font-mono); font-size: 32px; line-height: 1.0; font-weight: 500; letter-spacing: -0.03em; }
.t-data { font-family: var(--font-mono); font-size: 13px; line-height: 1.5; font-weight: 400; }
.t-label { font-family: var(--font-mono); font-size: 11px; line-height: 1.4; font-weight: 500; letter-spacing: 0.08em; }
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-var-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- component layer (= components/bundle.css) ---------- */
/* Vibed components — classes prefixed vb-, type styles t-*. Values come from
   tokens (var(--…)); motion lives here because tokens have no motion family. */
:root {
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 240ms;
  --dur-3: 360ms;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* type helpers the token grammar can't carry */
.t-display-xl, .t-display-l, .t-display-m { font-variation-settings: "wdth" 85; margin: 0; }
.t-heading, .t-title, .t-lede { margin: 0; }
.t-label { text-transform: uppercase; color: var(--ink-3); }
.t-stat, .t-data { font-variant-numeric: tabular-nums; }
.vb-ink-2 { color: var(--ink-2); }
.vb-ink-3 { color: var(--ink-3); }
.vb-accent { color: var(--accent); }
.vb-mono { font-family: var(--font-mono); }

/* ---------- layout ---------- */
.vb-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 720px) { .vb-container { padding-inline: var(--space-6); } }

/* ---------- link ---------- */
.vb-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transition: text-decoration-color var(--dur-1) var(--ease-out);
}
.vb-link:hover { text-decoration-color: currentColor; }

/* ---------- brand ---------- */
/* Lockup: the gauge glyph (ink arc, orange redline and needle) + "vibed." in display type with an orange full stop. */
.vb-brand { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); text-decoration: none; }
.vb-brand-glyph { width: 32px; height: 32px; flex: none; margin-left: -5px; }
.vb-brand-glyph path { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.vb-brand-glyph .arc { stroke: currentColor; }
.vb-brand-glyph .red, .vb-brand-glyph .needle { stroke: var(--accent-fill); }
.vb-brand-glyph .pivot { fill: var(--accent-fill); }
.vb-brand-name { font: 600 25px/1 var(--font-display); font-variation-settings: "wdth" 85; letter-spacing: -0.03em; }
.vb-brand-dot { color: var(--accent-fill); }
.vb-brand--sm .vb-brand-glyph { width: 24px; height: 24px; margin-left: -4px; }
.vb-brand--sm .vb-brand-name { font-size: 19px; }

/* ---------- icon ---------- */
/* Lucide subset (/icons.svg sprite): 24px grid, 1.75px stroke, round caps; takes currentColor. */
.vb-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- button ---------- */
.vb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 40px; padding: 0 var(--space-4);
  border: 1px solid transparent; border-radius: var(--radius-md);
  font: 500 14px/1 var(--font-sans); letter-spacing: 0;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  background: transparent; color: var(--ink);
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.vb-btn--primary { background: var(--accent-fill); color: var(--on-accent); }
.vb-btn--primary:hover { background: color-mix(in srgb, var(--accent-fill) 86%, var(--ink)); }
.vb-btn--secondary { border-color: var(--line-strong); }
.vb-btn--secondary:hover { background: var(--surface-raised); }
.vb-btn--ghost { color: var(--ink-2); padding: 0 var(--space-3); }
.vb-btn--ghost:hover { color: var(--ink); background: var(--surface-raised); }
.vb-btn--sm { height: 32px; padding: 0 var(--space-3); font-size: 13px; }
.vb-btn[disabled], .vb-btn[aria-disabled="true"] { opacity: 0.5; cursor: default; pointer-events: none; }

.vb-iconbtn {
  width: 36px; height: 36px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.vb-iconbtn:hover { background: var(--surface-raised); color: var(--ink); }
.vb-iconbtn svg, .vb-iconbtn .vb-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- status ---------- */
.vb-status {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--vb-status, var(--ink-3)); white-space: nowrap;
}
.vb-status::before { content: ""; width: 7px; height: 7px; border-radius: var(--radius-full); background: currentColor; flex: none; }
.vb-status--live { --vb-status: var(--live); }
.vb-status--device { --vb-status: var(--device); }
.vb-status--wip { --vb-status: var(--wip); }
/* shape carries status too: live = disc, device = square, wip = ring */
.vb-status--device::before { border-radius: 1px; }
.vb-status--wip::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.vb-status--dot { font-size: 0; gap: 0; letter-spacing: 0; }
.vb-status--pulse::before { animation: vb-pulse 2.4s var(--ease-out) infinite; }
@keyframes vb-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 0%, transparent); }
}

/* ---------- chip ---------- */
.vb-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.vb-chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-raised); color: var(--ink-2);
  font: 400 12px/1 var(--font-mono); white-space: nowrap;
}

/* ---------- eyebrow ---------- */
.vb-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.vb-eyebrow > * + *::before { content: "·"; margin-right: 10px; color: var(--ink-3); }

/* ---------- stat strip ---------- */
.vb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--line); }
.vb-stat { margin: 0; padding: var(--space-4) var(--space-4) var(--space-4) var(--space-4); border-left: 1px solid var(--line); min-width: 0; }
.vb-stat:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.vb-stat:nth-child(n+4) { border-top: 1px solid var(--line); }
.vb-stat dt { margin: 0 0 10px; font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.vb-stat dd { margin: 0; font: 500 32px/1 var(--font-mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
@media (min-width: 720px) {
  .vb-stats { grid-template-columns: repeat(var(--vb-stats-cols, 6), minmax(0, 1fr)); }
  .vb-stat { padding: var(--space-5) var(--space-5) 0; }
  .vb-stat:nth-child(3n+1) { border-left: 1px solid var(--line); padding-left: var(--space-5); }
  .vb-stat:first-child { border-left: 0; padding-left: 0; }
  .vb-stat:nth-child(n+4) { border-top: 0; }
}

/* ---------- section head ---------- */
.vb-section-head {
  display: flex; align-items: baseline; gap: var(--space-3);
  padding-bottom: var(--space-4); margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--line);
}
.vb-section-head .t-heading { margin: 0; }
.vb-section-count { font: 400 13px/1 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vb-section-aside { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); font: 400 13px/1.4 var(--font-mono); color: var(--ink-3); white-space: nowrap; }

/* ---------- writeup card ---------- */
.vb-cards { display: grid; gap: var(--space-7) var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 720px) { .vb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .vb-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vb-card { display: flex; flex-direction: column; gap: var(--space-4); color: inherit; text-decoration: none; min-width: 0; }
.vb-card-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface-raised);
}
.vb-card-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.vb-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease-out); }
.vb-card:hover .vb-card-media img { transform: scale(1.03); }
.vb-card-body { display: flex; flex-direction: column; gap: var(--space-2); }
.vb-card-title { margin: 0; transition: color var(--dur-1) var(--ease-out); }
.vb-card:hover .vb-card-title { color: var(--accent); }
.vb-card-dek { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- spec list ---------- */
.vb-spec { display: grid; grid-template-columns: minmax(88px, max-content) minmax(0, 1fr); margin: 0; }
.vb-spec dt, .vb-spec dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.vb-spec dt { padding-right: var(--space-5); font: 500 11px/20px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.vb-spec dd { font: 400 13px/20px var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.vb-spec dd a { color: var(--accent); text-decoration: none; }
.vb-spec dd a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- segmented control ---------- */
.vb-segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.vb-segmented button {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border: 0; border-radius: 5px; background: transparent; color: var(--ink-2); cursor: pointer;
  font: 500 13px/1 var(--font-sans);
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.vb-segmented button span { font: 400 12px/1 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vb-segmented button:hover { color: var(--ink); }
.vb-segmented button[aria-pressed="true"] { background: var(--surface-raised); color: var(--ink); }
.vb-segmented button[aria-pressed="true"] span { color: var(--accent); }

/* ---------- project index ---------- */
.vb-index { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.vb-index-list { list-style: none; margin: 0; padding: 0; }
.vb-index-head, .vb-index-row {
  display: grid; align-items: center; column-gap: var(--space-4);
  grid-template-columns: 16px minmax(0, 1fr) auto;
  padding: 0 var(--space-4);
}
.vb-index-head { display: none; height: 40px; background: var(--surface-raised); border-bottom: 1px solid var(--line); font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.vb-index-row {
  width: 100%; min-height: 64px; padding-block: 12px;
  border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer;
  grid-template-areas: "dot name pushed" "dot tag tag";
  row-gap: 2px;
  transition: background-color var(--dur-1) var(--ease-out);
}
.vb-index-list > li:first-child .vb-index-row { border-top: 0; }
.vb-index-row:hover { background: var(--surface-raised); }
.vb-index-row:focus-visible { outline-offset: -2px; }
.vb-index-status { grid-area: dot; align-self: start; padding-top: 5px; }
.vb-index-name { grid-area: name; font: 500 16px/1.3 var(--font-sans); letter-spacing: -0.01em; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-index-tag { grid-area: tag; font-size: 14px; line-height: 1.45; color: var(--ink-2); min-width: 0; }
.vb-index-stack, .vb-index-commits { display: none; }
.vb-index-pushed { grid-area: pushed; font: 400 13px/1.3 var(--font-mono); color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vb-index-commits { font: 400 13px/1.3 var(--font-mono); color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.vb-index-stack { font: 400 12px/1.4 var(--font-mono); color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-index-arrow { display: none; color: var(--ink-3); line-height: 0; transition: transform var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.vb-index-row:hover .vb-index-arrow { color: var(--accent); transform: translateX(2px); }
.vb-index-head .num { text-align: right; }
@media (min-width: 900px) {
  .vb-index-head, .vb-index-row {
    grid-template-columns: 96px minmax(140px, 1fr) minmax(0, 2fr) 72px 64px 16px;
    grid-template-areas: none;
    padding: 0 var(--space-5);
  }
  .vb-index-head { display: grid; }
  .vb-index-row { min-height: 56px; padding-block: 0; }
  .vb-index-status, .vb-index-name, .vb-index-tag, .vb-index-pushed { grid-area: auto; }
  .vb-index-status { align-self: center; padding-top: 0; }
  .vb-index-status .vb-status--dot { font-size: 11px; gap: 7px; letter-spacing: 0.08em; }
  .vb-index-tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vb-index-commits, .vb-index-arrow { display: block; }
  .vb-index-head .col-stack { display: none; }
}
@media (min-width: 1120px) {
  .vb-index-head, .vb-index-row { grid-template-columns: 96px minmax(150px, 1.1fr) minmax(0, 2.1fr) minmax(0, 1.3fr) 72px 64px 16px; }
  .vb-index-stack, .vb-index-head .col-stack { display: block; }
}

/* ---------- activity list ---------- */
.vb-activity { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.vb-activity-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); height: 44px; padding: 0 var(--space-4); border-bottom: 1px solid var(--line); }
.vb-activity-head .t-label { margin: 0; }
.vb-activity-src { font: 400 12px/1 var(--font-mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-activity-list { list-style: none; margin: 0; padding: 6px; }
.vb-activity-row {
  width: 100%; height: 40px; padding: 0 10px;
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
  border: 0; border-radius: 6px; background: transparent; color: inherit; text-align: left; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out);
}
.vb-activity-row:hover { background: var(--surface-raised); }
.vb-activity-name { font: 500 15px/1.2 var(--font-sans); letter-spacing: -0.01em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-activity-ago { font: 400 12px/1 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- gauge (meter) ---------- */
/* The brand gauge as a data meter: a 240° track in accent-soft, the value in accent-fill,
   quarter ticks in line-strong, an ink needle. JS sets the fill's dashoffset and the needle's rotation. */
.vb-gauge { display: block; width: 100%; height: auto; overflow: visible; }
.vb-gauge .track, .vb-gauge .fill { fill: none; stroke-width: 9; stroke-linecap: round; }
.vb-gauge .track { stroke: var(--accent-soft); }
.vb-gauge .zone { fill: none; stroke-width: 9; stroke-linecap: round; stroke: color-mix(in srgb, var(--accent-fill) 34%, var(--accent-soft)); }
.vb-gauge .scale { font: 500 9px/1 var(--font-mono); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.vb-gauge .fill { stroke: var(--accent-fill); transition: stroke-dashoffset 1100ms var(--ease-out); }
.vb-gauge .tick { stroke: var(--line-strong); stroke-width: 1.5; stroke-linecap: round; }
.vb-gauge .needle { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; transform-box: view-box; transform-origin: 60px 54px; transition: transform 1100ms var(--ease-out); }
.vb-gauge .pivot { fill: var(--ink); }
.vb-pace { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: var(--space-4); padding: var(--space-4); }
.vb-pace-value { margin: 0; font: 500 34px/1 var(--font-mono); letter-spacing: -0.03em; color: var(--ink); }
.vb-pace-value small { font-size: 14px; letter-spacing: 0; color: var(--ink-3); }
.vb-pace .t-label { margin: 8px 0 0; }
.vb-pace .vb-segmented { margin-top: 10px; }
.vb-pace.is-loading .vb-pace-value { color: var(--ink-3); }
.vb-segmented--xs { padding: 2px; }
.vb-segmented--xs button { height: 24px; padding: 0 9px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.02em; }

/* ---------- field ---------- */
.vb-field { display: grid; gap: var(--space-2); }
.vb-field-label { font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.vb-input, .vb-textarea {
  width: 100%; padding: 0 var(--space-4);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  font: 400 15px/1.4 var(--font-sans);
  transition: border-color var(--dur-1) var(--ease-out);
}
.vb-input { height: 44px; }
.vb-textarea { padding-block: 12px; min-height: 120px; resize: vertical; }
.vb-input::placeholder, .vb-textarea::placeholder { color: var(--ink-3); }
.vb-input:hover, .vb-textarea:hover { border-color: var(--ink-3); }
.vb-input:focus-visible, .vb-textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }

/* ---------- spotlight ---------- */
.vb-spotlight { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.vb-spotlight-main { display: grid; grid-template-columns: 1fr; }
.vb-spotlight-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-raised); border-bottom: 1px solid var(--line); cursor: pointer; }
.vb-spotlight-media > img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.vb-spotlight-body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); min-width: 0; }
.vb-spotlight-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.vb-spotlight-count { font: 400 13px/1 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vb-spotlight-tagline { margin: 0; color: var(--ink-2); }
.vb-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }
@media (min-width: 960px) {
  .vb-spotlight-main { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); min-height: 460px; }
  .vb-spotlight-media { aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .vb-spotlight-body { padding: var(--space-6); }
}
.vb-rotator { display: flex; gap: 0; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.vb-rotator::-webkit-scrollbar { display: none; }
.vb-rotator-tab {
  position: relative; flex: 1 0 auto; min-width: 112px; height: 48px; padding: 0 var(--space-4);
  border: 0; border-left: 1px solid var(--line); background: transparent; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  font: 400 12px/1 var(--font-mono); color: var(--ink-3); text-align: left; white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.vb-rotator-tab:first-child { border-left: 0; }
.vb-rotator-tab b { font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vb-rotator-tab:hover { color: var(--ink); background: var(--surface-raised); }
.vb-rotator-tab[aria-selected="true"] { color: var(--ink); }
.vb-rotator-tab[aria-selected="true"] b { color: var(--accent); }
.vb-rotator-tab::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.vb-rotator-tab[aria-selected="true"]::after { transform: scaleX(1); }
.vb-rotator.is-timed .vb-rotator-tab[aria-selected="true"]::after { animation: vb-progress var(--vb-rotate, 8s) linear forwards; }
.vb-rotator.is-paused .vb-rotator-tab[aria-selected="true"]::after { animation-play-state: paused; }
@keyframes vb-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- drawer ---------- */
.vb-scrim { position: fixed; inset: 0; z-index: 200; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity var(--dur-2) var(--ease-out); }
.vb-scrim.is-open { opacity: 1; pointer-events: auto; }
.vb-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: min(600px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-overlay);
  transform: translateX(100%); visibility: hidden;
  transition: transform var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3);
}
.vb-drawer.is-open { transform: none; visibility: visible; transition: transform var(--dur-3) var(--ease-out), visibility 0s; }
.vb-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); height: var(--header-h); padding: 0 var(--space-3) 0 var(--space-5); border-bottom: 1px solid var(--line); flex: none; }
.vb-drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

/* ---------- header ---------- */
.vb-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.vb-header-inner { display: flex; align-items: center; gap: var(--space-5); height: var(--header-h); }
.vb-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.vb-nav a { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: var(--radius-md); color: var(--ink-2); text-decoration: none; font: 500 14px/1 var(--font-sans); transition: color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.vb-nav a:hover { color: var(--ink); background: var(--surface-raised); }
.vb-nav a[aria-current="page"] { color: var(--ink); }
.vb-header-meta { display: flex; align-items: center; gap: var(--space-4); }
@media (min-width: 720px) { .vb-header-meta { margin-left: auto; } }
.vb-header-live { display: none; font: 400 12px/1 var(--font-mono); color: var(--ink-3); white-space: nowrap; }
.vb-header-live .vb-status { margin-right: 6px; vertical-align: -1px; }
.vb-nav .is-wide { display: none; }
@media (min-width: 720px) { .vb-nav { margin-left: var(--space-3); } .vb-nav .is-wide { display: inline-flex; } }
@media (min-width: 1000px) { .vb-header-live { display: inline-flex; align-items: center; } }
@media (max-width: 479px) { .vb-header-inner { gap: var(--space-3); } .vb-nav a { padding: 0 8px; } }


/* ---------- footer ---------- */
.vb-footer { border-top: 1px solid var(--line); padding-block: var(--space-6); }
.vb-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.vb-footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.vb-footer-copy { margin: 0; font: 400 12px/1.5 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
