/* Oeste docs site — Topanga theme. Mobile-first, desktop-optimized. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: var(--type-body); line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-text); color: var(--color-bg); padding: 12px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* Top bar — mobile: wraps, search full-width. Desktop: single row. */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.topbar-inner {
  max-width: var(--container-wide); margin: 0 auto; padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; position: relative;
}
.wordmark { font-weight: 700; font-size: 1.5rem; letter-spacing: -0.04em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.tick-wordmark { width: 13px; height: 26px; }
.theme-pill { font-size: 0.75rem; font-weight: 600; border: 1px solid var(--color-border); border-radius: 999px; padding: 4px 10px; }
.search-wrap { flex: 1 1 100%; order: 5; position: relative; }
.search-wrap input {
  width: 100%; min-height: var(--touch-min); border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-surface); color: var(--color-text); padding: 0 46px 0 12px;
}
/* Visible Cmd+K hint inside the search box (was hover-only via title tooltip). */
.search-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; color: var(--color-muted);
  border: 1px solid var(--color-border); border-radius: 4px; padding: 2px 6px;
  background: var(--color-bg); pointer-events: none;
}
/* The header Menu button IS the library's Ghost Button (.btn.btn-ghost) —
   no one-off menu styles. Hidden on desktop via #menuBtn below.
   Tightened cluster: pulls Menu 6px toward the theme toggle and trims its
   left padding, so the sun/moon glyph-to-"Menu" gap drops from 41px to ~26px
   (box-to-box gap 10px to 4px). The ghost component itself is untouched. */
#menuBtn { margin-left: -6px; padding-left: 10px; }
.theme-toggle {
  margin-left: auto; width: var(--touch-min); height: var(--touch-min); min-height: var(--touch-min);
  border: none; border-radius: 999px; padding: 0;
  background: transparent; color: var(--color-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: var(--color-surface); }
.theme-toggle .icon { display: block; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.search-results {
  position: absolute; top: 100%; left: 16px; right: 16px; z-index: 60;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px;
  box-shadow: var(--shadow-dialog); padding: 8px;
}
.search-results button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--color-text); padding: 12px; border-radius: 6px; min-height: var(--touch-min); }
.search-results button:hover { background: var(--color-bg); }
.search-facets { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 8px 4px; }
.search-facets .search-facet { display: inline-flex; width: auto; min-height: 32px; align-items: center; border: 1px solid var(--color-border); border-radius: 999px; background: transparent; color: var(--color-text); padding: 0 12px; font-size: 0.8125rem; font-weight: 600; }
.search-facet[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.search-group { margin: 12px 8px 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-muted); }
.search-status { margin: 4px 8px; font-size: 0.875rem; color: var(--color-muted); }

/* Layout — mobile stacked, desktop sidebar + workbench. */
.layout { max-width: var(--container-wide); margin: 0 auto; padding: 16px; }
.sidebar {
  display: none; border: 1px solid var(--color-border); border-radius: 12px;
  background: var(--color-surface); padding: 20px; margin-bottom: 16px;
}
.sidebar.open { display: block; }
/* Open menu pops up in the current viewport, not at the top of the document:
   the sidebar lives in page flow, so a scrolled-down tap used to open it
   far above the viewport. Fixed + centered keeps the Menu button reachable
   to close it, and the panel scrolls on its own when it is tall. */
.sidebar.open {
  position: fixed; top: 50%; left: 16px; right: 16px; transform: translateY(-50%);
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow-y: auto; z-index: 60; margin: 0; box-shadow: var(--shadow-dialog);
}
.nav-eyebrow { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-muted); margin: 20px 0 8px; }
.nav-eyebrow:first-child { margin-top: 0; }
.nav-link { display: block; padding: 11px 10px; border-radius: 8px; text-decoration: none; min-height: var(--touch-min); }
.nav-link:hover, .nav-link.active { background: var(--color-bg); font-weight: 700; }
.nav-foot { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--color-border); font-size: 0.875rem; color: var(--color-muted); }

/* Content */
#view:focus { outline: none; }
.eyebrow { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--color-muted); }
h1 { font-size: var(--type-display); line-height: var(--leading-display); letter-spacing: var(--tracking-display); font-weight: var(--font-weight-display); margin: 12px 0 16px; }
h2 { font-size: var(--type-title); line-height: var(--leading-title); letter-spacing: var(--tracking-heading); font-weight: var(--font-weight-heading); margin: 32px 0 12px; }
h3 { font-size: var(--type-heading); font-weight: var(--font-weight-heading); letter-spacing: var(--tracking-heading); margin: 24px 0 8px; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.65; max-width: 62ch; color: var(--color-text); }
.muted { color: var(--color-muted); }
.install-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); padding: 16px; margin: 24px 0;
}
.install-bar code { font-family: var(--font-mono); font-size: 0.875rem; word-break: break-all; }
.btn, .copy-btn {
  min-height: var(--touch-min); border-radius: 8px; padding: 0 18px; font-weight: 700;
  border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-secondary { background: transparent; color: var(--color-text); border-color: var(--color-border); }
/* Ghost = the library's ghost variant: transparent, no border, ink/paper 5% on hover. */
.btn-ghost { background: transparent; color: var(--color-text); border-color: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-text) 5%, transparent); }
/* Danger = the library's danger variant. */
.btn-danger { background: var(--color-danger); color: #F6F4F1; border-color: transparent; }
.btn-danger:hover { opacity: 0.9; }
html[data-theme='dark'] .btn-danger { color: #121110; }
.copy-btn { background: var(--color-text); color: var(--color-bg); font-size: 0.875rem; padding: 0 14px; }
.copy-btn.secondary { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.lens-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.lens-btn { min-height: var(--touch-min); border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); padding: 0 18px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; line-height: 1; }
.lens-btn.active { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.demo {
  border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface);
  padding: 24px; margin: 16px 0; box-shadow: var(--shadow-card);
}
.demo-caption { font-size: 0.875rem; color: var(--color-muted); margin: 0 0 16px; }
/* Blocks stage: a large framed preview. The stage carries its own
   data-theme, so the block renders in the stage's theme regardless of
   the page theme (tokens scope to any [data-theme] element). */
.block-tools { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; margin: 24px 0 12px; }
.block-tools-group { display: inline-flex; gap: 6px; }
.stage-btn { min-height: 36px; border: 1px solid var(--color-border); border-radius: 999px; background: transparent; color: var(--color-text); padding: 0 14px; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.stage-btn[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.block-stage { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); padding: 24px; margin: 0 0 24px; }
.block-frame { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); border-radius: 8px; margin: 0 auto; overflow: hidden; transition: max-width 180ms cubic-bezier(.16,1,.3,1); container-type: inline-size; }
.block-frame[data-view="desktop"] { max-width: 100%; }
.block-frame[data-view="mobile"] { max-width: 390px; }
@media (prefers-reduced-motion: reduce) { .block-frame { transition: none; } }
.demo-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.field label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: var(--touch-min); border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-bg); color: var(--color-text); padding: 0 12px;
}
.field textarea { padding: 12px; min-height: 96px; }
.field .error { color: var(--color-danger); font-size: 0.875rem; margin-top: 8px; }
.field .hint { color: var(--color-muted); font-size: 0.875rem; margin-top: 8px; }
dialog.site-dialog {
  border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-bg); color: var(--color-text);
  padding: 28px; width: calc(100% - 2rem); max-width: 28rem; box-shadow: var(--shadow-dialog);
}
dialog.site-dialog::backdrop { background: rgba(0,0,0,0.3); }
.tablist { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--color-border); padding-bottom: 8px; }
.tab-btn { min-height: var(--touch-min); border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--color-text); padding: 0 16px; font-weight: 600; }
.tab-btn.active { border-color: var(--color-border); background: var(--color-bg); }
.tab-panel { padding: 16px 0; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
th { font-size: 0.875rem; }
/* Demo tables are styled here, explicitly: the bare table / th / td rules
   above are docs-content styling and must not decide a demo table's look. */
.demo table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; }
.demo th, .demo td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.demo th { font-size: 0.875rem; }
code { font-family: var(--font-mono); font-size: 0.875em; overflow-wrap: anywhere; }
pre {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px;
  padding: 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6;
  color: var(--color-text);
}
/* Syntax highlighting — colors from --code-* vars in tokens.css (both themes). */
.tok-kw { color: var(--code-keyword); font-weight: 600; }
.tok-str { color: var(--code-string); }
.tok-num { color: var(--code-number); }
.tok-com { color: var(--code-comment); font-style: italic; }
.tok-key { color: var(--code-key); font-weight: 600; }
.tok-tag { color: var(--code-keyword); font-weight: 600; }
.tok-prop { color: var(--code-key); }
.tok-punct { color: var(--code-punct); }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0 8px; }
.code-head h3 { margin: 0; }
.swatches { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
.swatch { border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; background: var(--color-surface); }
.swatch-color { height: 72px; }
.swatch-body { padding: 12px 14px; }
.swatch-body strong { display: block; }
.swatch-body span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-muted); }
.index-list { border-top: 1px solid var(--color-border); margin: 24px 0; }
.index-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 16px 4px; border-bottom: 1px solid var(--color-border); text-decoration: none; }
.index-row:hover { background: var(--color-surface); }
.index-row strong { font-size: 1.1rem; }
.pill { font-size: 0.75rem; font-weight: 700; border: 1px solid var(--color-border); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.callout { border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent); border-radius: 8px; background: var(--color-surface); padding: 16px; margin: 20px 0; }
.site-footer { max-width: var(--container-wide); margin: 0 auto; padding: 24px 16px 48px; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.site-footer a { color: inherit; }
#toastRegion .site-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 90; max-width: calc(100% - 3rem);
  display: flex; gap: 12px; align-items: flex-start; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-dialog);
}
.badge { display: inline-flex; align-items: center; min-height: 32px; border: 1px solid var(--color-border); border-radius: 999px; padding: 0 12px; font-size: 0.75rem; font-weight: 700; }
.site-alert { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; }
.alert-info { border-color: var(--color-border); background: var(--color-surface); }
.alert-success { border-color: var(--color-success); background: color-mix(in srgb, var(--color-success) 8%, transparent); }
.alert-warning { border-color: var(--color-warning); background: color-mix(in srgb, var(--color-warning) 8%, transparent); }
.alert-danger { border-color: var(--color-danger); background: color-mix(in srgb, var(--color-danger) 8%, transparent); }
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-trigger { width: 100%; min-height: var(--touch-min); display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; background: transparent; border: 0; color: var(--color-text); font-weight: 600; padding: 12px 4px; }
.radio-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-height: var(--touch-min); cursor: pointer; }
.radio-row input { width: 20px; height: 20px; accent-color: var(--color-accent); }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--color-text) 10%, transparent); }
.progress-fill { height: 100%; border-radius: 999px; background: var(--color-accent); }
.badge-accent { border-color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.badge-success { border-color: var(--color-success); color: var(--color-success); }
.badge-danger { border-color: var(--color-danger); color: var(--color-danger); }

/* New in v0.3.0 — Avatar, Separator, Slider, Tooltip, Popover, Dropdown, Toggle, Collapsible, Skeleton, Label, Breadcrumb, Pagination, Table, Empty State, Form. */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; overflow: hidden; background: var(--color-accent); color: var(--color-on-accent); font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.125rem; }
.separator-h { height: 1px; background: var(--color-border); border: 0; margin: 16px 0; }
.separator-v { width: 1px; align-self: stretch; background: var(--color-border); }
input[type="range"].slider { width: 100%; min-height: var(--touch-min); accent-color: var(--color-accent); }
.tooltip-wrap { position: relative; display: inline-block; }
.tooltip-bubble { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--color-text); color: var(--color-bg); font-size: 0.8125rem; padding: 8px 12px; border-radius: 8px; white-space: normal; max-width: calc(100vw - 16px); text-align: center; z-index: 10; }
.popover-wrap { position: relative; display: inline-block; }
.popover-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 10; min-width: 240px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-dialog); }
.dropdown-wrap { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 10; min-width: 200px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 8px; box-shadow: var(--shadow-dialog); list-style: none; margin: 0; }
.dropdown-menu [role="menuitem"] { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--color-text); padding: 12px; border-radius: 6px; min-height: var(--touch-min); font-weight: 600; }
.dropdown-menu [role="menuitem"]:hover, .dropdown-menu [role="menuitem"][data-active="true"] { background: var(--color-bg); }
.toggle-btn { min-height: var(--touch-min); border-radius: 8px; padding: 0 18px; font-weight: 700; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.toggle-btn[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.collapsible-trigger { min-height: var(--touch-min); display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; color: var(--color-text); font-weight: 600; padding: 0 16px; }
.skeleton { border-radius: 8px; background: color-mix(in srgb, var(--color-text) 10%, transparent); }
@keyframes oeste-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: oeste-skeleton-pulse 1.6s ease-in-out infinite; } }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; align-items: center; }
.breadcrumb li + li::before { content: "/"; color: var(--color-muted); margin-right: 8px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-btn { min-height: var(--touch-min); min-width: var(--touch-min); border-radius: 8px; padding: 0 12px; font-weight: 600; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); display: inline-flex; align-items: center; justify-content: center; }
.page-btn[aria-current="page"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.data-table th { position: sticky; top: 0; background: var(--color-surface); }
.empty-state { border: 1px dashed var(--color-border); border-radius: 12px; padding: 32px 24px; text-align: center; }
.empty-state-icon { font-size: 2rem; line-height: 1; }
.form-error-summary { border: 1px solid var(--color-danger); border-radius: 12px; padding: 16px; background: color-mix(in srgb, var(--color-danger) 6%, transparent); }

/* Tablet */
@media (min-width: 641px) {
  .topbar-inner { flex-wrap: nowrap; padding: 12px 24px; }
  .search-wrap { flex: 1 1 auto; order: initial; max-width: 420px; margin: 0 auto; }
  .layout { padding: 24px; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .demo { padding: 32px; }
}

/* Desktop — real workbench, not stretched mobile. */
@media (min-width: 1025px) {
  #menuBtn { display: none; }
  .layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; padding: 32px 24px; }
  .sidebar { display: block; position: sticky; top: 76px; margin: 0; }
  .sidebar.open { position: sticky; top: 76px; transform: none; max-height: none; overflow-y: visible; box-shadow: none; }
  #view { min-width: 0; max-width: 860px; }
  .swatches { grid-template-columns: 1fr 1fr 1fr; }
  .home-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
}

/* Show-more pass (v0.4.3): Button sizes mirror the library's BUTTON_SIZES.
   .btn base already holds min-height 44px, so all sizes keep 44px min touch. */
.btn-sm { padding: 0 12px; font-size: 0.875rem; }
.btn-lg { padding: 0 24px; font-size: 1.125rem; }

/* Live contrast pairs (Accessibility). Each card is a real themed container:
   data-theme on the card scopes the tokens, so light + dark render side by side. */
.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.pair-card { border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; }
.pair-sample { padding: 20px; }
.pair-aa { font-size: 2rem; font-weight: 700; line-height: 1.1; display: block; }
.pair-sample p { margin: 8px 0 0; }
.pair-caption { padding: 12px 16px; margin: 0; font-size: 0.875rem; color: var(--color-muted); border-top: 1px solid var(--color-border); }

/* Variant matrices (component pages, Human lens). */
.variant-matrix { margin-top: 16px; display: grid; gap: 20px; }
.variant-row { display: grid; gap: 8px; }
.variant-label { font-weight: 600; }
.variant-demos { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; overflow-x: auto; padding-bottom: 2px; }

/* Part 1 phone defects: calendar grid reset plus demo-control safety net. */
.cal-grid { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cal-grid th { padding: 8px 0; border-bottom: none; }
.cal-grid td { padding: 2px; border-bottom: none; }
/* Zero-specificity safety net (:where): every control rendered inside #view
   (demo, variants, playground) gets an explicit color, background, and
   appearance from existing tokens, so no browser default chrome ever shows
   through. Any component class or inline style still wins. */
:where(#view button) { color: var(--color-text); background: transparent; -webkit-appearance: none; appearance: none; }
:where(#view input, #view select, #view textarea) { color: var(--color-text); background: var(--color-bg); -webkit-appearance: none; appearance: none; }
:where(#view select) { -webkit-appearance: auto; appearance: auto; }
:where(#view input[type="checkbox"], #view input[type="radio"]) { -webkit-appearance: auto; appearance: auto; background: transparent; accent-color: var(--color-accent); }
:where(#view input[type="range"]) { -webkit-appearance: auto; appearance: auto; background: transparent; accent-color: var(--color-accent); }

/* Block demos: layout inside the stage. The frame is a container, so
   block internals respond to the frame width (the stage's desktop and
   mobile views), not the docs page viewport. Colors come from the
   stage's theme tokens. */
.blk-section { padding: 64px 24px; }
.blk-inner { max-width: 1200px; margin: 0 auto; }
.blk-display { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.06em; line-height: 1.05; margin: 24px 0 0; }
.blk-h2 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin: 16px 0 0; }
.blk-lede { color: var(--color-muted); line-height: 1.55; margin: 16px 0 0; max-width: 640px; }
.blk-head { max-width: 640px; }
.blk-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.blk-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 24px; box-shadow: var(--shadow-card); }
.blk-card > h3 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 500; }
.blk-rule { border: 0; border-top: 1px solid var(--color-border); margin: 0; }
.blk-muted { color: var(--color-muted); }
.blk-desktop-only { display: none !important; }
.blk-hero-grid, .blk-price-grid, .blk-quote-grid, .blk-bento { display: grid; gap: 24px; margin-top: 40px; }
.blk-proof { display: flex; align-items: center; gap: 12px; margin-top: 32px; }
.blk-avatars { display: inline-flex; }
.blk-avatars .avatar { margin-left: -8px; border: 2px solid var(--color-bg); }
.blk-avatars .avatar:first-child { margin-left: 0; }
.blk-navwrap { background: var(--color-bg); }
.blk-nav { display: flex; align-items: center; gap: 24px; min-height: 64px; max-width: 1200px; margin: 0 auto; padding: 8px 24px; }
.blk-wordmark { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.025em; color: var(--color-text); text-decoration: none; }
.blk-navlinks { display: none; align-items: center; gap: 24px; }
.blk-navlink { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-text); text-decoration: none; }
.blk-navlink-current { font-weight: 600; }
.blk-navright { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.blk-marks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; list-style: none; margin: 0; padding: 32px 0; }
.blk-marks li { font-weight: 600; color: var(--color-muted); }
.blk-stats { display: grid; gap: 40px; padding: 48px 0 32px; }
.blk-figure { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.06em; line-height: 1; margin: 0; }
.blk-stat-label { color: var(--color-muted); line-height: 1.55; margin: 12px 0 0; }
.blk-cover { display: flex; align-items: center; gap: 12px; background: var(--color-bg); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.blk-post { margin-top: 24px; }
.blk-empty { border: 1px dashed var(--color-border); border-radius: 12px; padding: 32px 24px; text-align: center; }
.blk-announce { background: var(--color-surface); }
.blk-announce-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: 1200px; margin: 0 auto; padding: 8px 24px; }
.blk-announce-in p { margin: 0; line-height: 1.55; }
.blk-announce-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.blk-login-wrap { max-width: 440px; margin: 0 auto; }
.blk-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; }
.blk-divider .blk-rule { flex: 1; }
.blk-full-btn { width: 100%; margin-top: 12px; }
.blk-footer-grid { display: grid; gap: 40px; padding: 48px 0; }
.blk-footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.blk-footer-cols h3 { font-size: 0.875rem; font-weight: 600; margin: 0 0 8px; }
.blk-footer-cols ul { list-style: none; margin: 0; padding: 0; }
.blk-footer-cols a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-muted); text-decoration: none; }
.blk-footer-cols a:hover { color: var(--color-text); }
.blk-legal { display: flex; flex-direction: column; gap: 8px; padding-top: 24px; font-size: 0.875rem; color: var(--color-muted); }
.blk-legal-links { display: flex; gap: 24px; }
.blk-legal-links a { color: var(--color-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.blk-acc-trigger, .pg-acc-trigger { width: 100%; min-height: var(--touch-min); display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; background: transparent; border: 0; color: var(--color-text); font-weight: 600; padding: 12px 4px; cursor: pointer; font: inherit; }
.show-frame { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); border-radius: 8px; padding: 24px; }
.show-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ritual { color: var(--color-muted); font-weight: 600; letter-spacing: 0.01em; margin: 16px 0 0; }
.plate { font-variant-numeric: tabular-nums; color: var(--color-muted); font-weight: 600; min-width: 2ch; }
.index-main { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.index-obs { font-size: 0.9375rem; }
.index-row .tick-row { width: 8px; height: 16px; align-self: center; }
.pg-stage { border: 1px solid var(--color-border); border-radius: 12px; padding: 24px; background: var(--color-bg); margin-bottom: 16px; }
.tick-mark { width: 10px; height: 20px; color: var(--color-rust); flex: none; }
.field-note { border-top: 1px solid var(--color-border); margin-top: 32px; padding-top: 8px; }
.field-note-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-note-head h2 { margin: 16px 0 8px; }
.stamp { display: inline-flex; align-items: center; gap: 8px; color: var(--color-muted); font-size: 0.875rem; }
.field-note-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 8px 0 0; }
.field-note-grid dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 6px; }
.field-note-grid dd { margin: 0; line-height: 1.55; }
@media (max-width: 760px) { .field-note-grid { grid-template-columns: 1fr; } }
.blk-day { display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 44px; height: 44px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--color-text); font-size: 0.9375rem; cursor: pointer; }
.blk-day[aria-current="date"] { border: 2px solid var(--color-accent); font-weight: 600; }
.blk-day-selected { background: var(--color-accent); color: var(--color-on-accent); font-weight: 600; }
@container (min-width: 480px) {
  .blk-stats { grid-template-columns: 1fr 1fr; }
}
@container (min-width: 700px) {
  .blk-actions { flex-direction: row; align-items: center; }
  .blk-display { font-size: 3rem; }
  .blk-h2 { font-size: 2.5rem; }
  .blk-bento, .blk-price-grid, .blk-quote-grid { grid-template-columns: 1fr 1fr; }
  .blk-navlinks { display: inline-flex; }
  .blk-mobile-only { display: none !important; }
  .blk-desktop-only { display: inline-flex !important; }
  .blk-marks { grid-template-columns: 1fr 1fr 1fr; }
  .blk-footer-cols { grid-template-columns: 1fr 1fr 1fr; }
}
@container (min-width: 1024px) {
  .blk-section { padding: 96px 32px; }
  .blk-display { font-size: 4.5rem; }
  .blk-hero-grid { grid-template-columns: 55fr 45fr; align-items: center; gap: 64px; }
  .blk-bento { grid-template-columns: repeat(4, 1fr); }
  .blk-bento .blk-span2 { grid-column: span 2; }
  .blk-price-grid, .blk-quote-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .blk-stats { grid-template-columns: repeat(4, 1fr); }
  .blk-marks { display: flex; align-items: center; justify-content: space-between; }
  .blk-footer-grid { grid-template-columns: 1fr 2fr; }
  .blk-legal { flex-direction: row; align-items: center; }
  .blk-legal-links { margin-left: auto; }
}
