@font-face {
  font-family: "Material Icons Outlined";
  font-style: normal;
  font-weight: 400;
  src: url("./assets/fonts/MaterialIconsOutlined-Regular.otf") format("opentype");
  font-display: block;
}

:root {
  color-scheme: light;
  --color-text-0: #ffffff;
  --color-text-5: #f8f8f8;
  --color-text-10: #ebebeb;
  --color-text-15: #dddddd;
  --color-text-20: #d0d0d0;
  --color-text-25: #c3c3c3;
  --color-text-30: #b5b5b5;
  --color-text-35: #a8a8a8;
  --color-text-40: #9a9a9a;
  --color-text-45: #8d8d8d;
  --color-text-50: #808080;
  --color-text-55: #737373;
  --color-text-60: #666666;
  --color-text-65: #595959;
  --color-text-70: #4d4d4d;
  --color-text-75: #404040;
  --color-text-80: #333333;
  --color-text-85: #262626;
  --color-text-90: #191919;
  --color-text-95: #0d0d0d;
  --color-text-100: #000000;
  --color-brand-alpha-50: rgba(255, 125, 74, 0.5);
  --color-brand-50: #fbebe8;
  --color-brand-100: #fed0bf;
  --color-brand-200: #ffb296;
  --color-brand-300: #ff946b;
  --color-brand-400: #ff7d4a;
  --color-brand-500: #ff692a;
  --color-brand-600: #f46226;
  --color-brand-700: #e65b22;
  --color-brand-800: #d8541e;
  --color-brand-900: #bf4716;
  --color-yellow-alpha-50: rgba(255, 202, 72, 0.5);
  --color-yellow-50: #fff8e4;
  --color-yellow-100: #ffecb9;
  --color-yellow-200: #ffe08d;
  --color-yellow-300: #ffd663;
  --color-yellow-400: #ffca48;
  --color-yellow-500: #fec33d;
  --color-yellow-600: #fdb538;
  --color-yellow-700: #fba434;
  --color-yellow-800: #f99432;
  --color-yellow-900: #f7772a;
  --color-red-50: #ffebef;
  --color-red-100: #ffccd3;
  --color-red-200: #f9979a;
  --color-red-300: #f36d73;
  --color-red-400: #ff454d;
  --color-red-500: #ff2a31;
  --color-red-600: #f71c32;
  --color-red-700: #e4062c;
  --color-red-800: #d80024;
  --color-red-900: #c80017;
  --color-green-alpha-50: rgba(0, 204, 136, 0.5);
  --color-green-50: #e4f8ee;
  --color-green-100: #bdedd5;
  --color-green-200: #8fe1ba;
  --color-green-300: #57d69e;
  --color-green-400: #00cc88;
  --color-green-500: #00c272;
  --color-green-600: #00b267;
  --color-green-700: #009f59;
  --color-green-800: #008e4c;
  --color-green-900: #006d36;
  --color-blue-alpha-50: rgba(54, 164, 255, 0.5);
  --color-blue-50: #e3f2ff;
  --color-blue-100: #badefe;
  --color-blue-200: #8dcaff;
  --color-blue-300: #5eb5ff;
  --color-blue-400: #36a4ff;
  --color-blue-500: #0094ff;
  --color-blue-600: #0587f0;
  --color-blue-700: #0875dc;
  --color-blue-800: #0963ca;
  --color-blue-900: #0e45aa;
  --color-purple-alpha-50: rgba(145, 92, 255, 0.5);
  --color-purple-50: #f2e9ff;
  --color-purple-100: #dbc9fe;
  --color-purple-200: #c2a4ff;
  --color-purple-300: #a97cff;
  --color-purple-400: #915cff;
  --color-purple-500: #7b3bfd;
  --color-purple-600: #6f35f6;
  --color-purple-700: #5d2ced;
  --color-purple-800: #4a25e7;
  --color-purple-900: #2a18d9;
  --color-surface-light-0: #ffffff;
  --color-surface-light-10: #f4f8fd;
  --color-surface-light-20: #eaf1fa;
  --color-surface-light-30: #d9e3f4;
  --color-surface-light-40: #becbe7;
  --color-surface-light-50: #9eb0d4;
  --color-surface-light-60: #889cc8;
  --color-surface-light-70: #7388bb;
  --color-surface-light-80: #5a6ea7;
  --color-surface-light-90: #405691;
  --color-surface-light-100: #2a3e7a;
  --color-surface-light-110: #172765;
  --color-surface-dark-0: #070b13;
  --color-surface-dark-10: #0e1322;
  --color-surface-dark-20: #151c33;
  --color-surface-dark-30: #1d2544;
  --color-surface-dark-40: #262f56;
  --color-surface-dark-50: #303a6a;
  --color-surface-dark-60: #3b4680;
  --color-surface-dark-70: #465294;
  --color-surface-dark-80: #5360a8;
  --color-surface-dark-90: #616ebb;
  --color-surface-dark-100: #6f7dcd;
  --color-surface-dark-110: #7e8cde;
  --semantic-color-background-canvas: var(--color-base);
  --semantic-color-background-code: var(--color-brand-50);
  --semantic-color-background-transparent: rgba(0, 0, 0, 0);
  --semantic-color-border-default: var(--color-neutral-alpha-300);
  --semantic-color-border-interactive-default: var(--color-neutral-alpha-300);
  --semantic-color-content-on-brand: var(--color-text-10);
  --semantic-color-content-on-error-strong: #d50000;
  --semantic-color-content-on-subtle-surface: var(--color-base-content);
  --semantic-color-divider-default: var(--color-neutral-alpha-300);
  --semantic-color-interactive-brand-accent: var(--color-brand-500);
  --semantic-color-interactive-brand-surface-disabled: var(--color-brand-alpha-50);
  --semantic-color-interactive-brand-surface-emphasis: color-mix(in srgb, var(--color-brand-500) 15%, transparent);
  --semantic-color-interactive-brand-surface-hover: color-mix(in srgb, var(--color-brand-500) 30%, transparent);
  --semantic-color-interactive-neutral-border-disabled: var(--color-neutral-alpha-300);
  --semantic-color-interactive-neutral-surface-hover: var(--color-neutral-100);
  --semantic-color-interactive-neutral-surface-disabled: var(--color-neutral-100);
  --semantic-color-interactive-neutral-surface-emphasis: var(--color-neutral-200);
  --semantic-color-status-error-accent: var(--color-red-500);
  --semantic-color-status-error-accent-strong: var(--color-red-600);
  --semantic-color-status-error-surface: var(--color-red-50);
  --semantic-color-status-info-accent: var(--color-blue-700);
  --semantic-color-status-info-surface: var(--color-blue-50);
  --semantic-color-status-success-accent: var(--color-green-700);
  --semantic-color-status-system-accent: var(--color-purple-400);
  --semantic-color-status-warning-accent: var(--color-yellow-700);
  --semantic-color-status-warning-surface: var(--color-yellow-50);
  --semantic-color-surface-badge-neutral: var(--color-neutral-500);
  --semantic-color-surface-badge-neutral-strong: var(--color-neutral-900);
  --semantic-color-surface-container-default: var(--color-neutral);
  --semantic-color-surface-container-strong: var(--color-neutral-300);
  --semantic-color-surface-subtle: var(--color-neutral-100);
  --semantic-color-text-code: var(--color-brand-500);
  --semantic-color-text-helper: var(--color-base-content-200);
  --semantic-color-text-primary: var(--color-base-content);
  --semantic-color-text-secondary: var(--color-base-content-100);
  --semantic-color-utility-border-alpha: rgba(255, 255, 255, 0.1);
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-subtle: #f1f3f7;
  --surface-raised: #ffffff;
  --text: #111827;
  --text-muted: #667085;
  --text-soft: #8a94a6;
  --border: #dce2ea;
  --border-strong: #c7d0dd;
  --accent: #ff692a;
  --accent-strong: #e65b22;
  --accent-soft: #fff0e9;
  --danger: #d50000;
  --focus: #2563eb;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.07);
  --code-bg: #101828;
  --code-text: #e5e7eb;
  --sidebar-width: 280px;
  --topbar-height: 64px;
  --spec-surface-default: var(--surface-raised);
  --spec-surface-hover: color-mix(in srgb, var(--accent) 6%, var(--surface-raised));
  --spec-surface-emphasis: color-mix(in srgb, var(--accent) 12%, var(--surface-raised));
  --spec-text-primary: var(--text);
  --spec-text-helper: var(--text-muted);
  --spec-text-secondary: var(--text-soft);
  --spec-border: var(--border);
  --spec-accent: var(--accent);
  --spec-danger: var(--danger);
  --preview-overlay: rgba(17, 23, 32, 0.08);
  --preview-shell-bg: var(--bg);
  --preview-shell-bg-strong: var(--surface);
  --preview-shell-panel: var(--surface-subtle);
  --preview-shell-fg: var(--text);
  --preview-shell-muted: var(--text-muted);
  --preview-shell-border: var(--border);
  --preview-shell-shadow: var(--shadow);
  --preview-shell-band: color-mix(in srgb, var(--accent) 12%, transparent);
  --preview-shell-success: var(--semantic-color-status-success-accent);
  --drawer-shell-bg: color-mix(in srgb, var(--color-surface-light-0) 84%, var(--color-surface-light-20));
  --status-pattern: #3b82f6;
  --status-shell: #0ea5e9;
  --status-primitive: #64748b;
  --status-local: #f59e0b;
  --status-draft: #8b5cf6;
  --status-deprecated: #ef4444;
  --status-example: #94a3b8;
  --content-max: 1480px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080c12;
  --surface: #171c24;
  --surface-subtle: #111720;
  --surface-raised: #1b2029;
  --text: #f2f5f8;
  --text-muted: #aeb8c5;
  --text-soft: #778293;
  --border: #2a3340;
  --border-strong: #3a4554;
  --accent: #ff7a00;
  --accent-strong: #ff8a1c;
  --accent-soft: rgba(255, 122, 0, 0.18);
  --danger: #ff454d;
  --focus: #4c8dff;
  --shadow: 0 14px 28px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 16px 30px rgba(0, 0, 0, 0.28);
  --code-bg: #070a0f;
  --code-text: #f2f5f8;
  --spec-surface-default: #070b13;
  --spec-surface-hover: #0e1322;
  --spec-surface-emphasis: #151c33;
  --spec-text-primary: #ebebeb;
  --spec-text-helper: #808080;
  --spec-text-secondary: #b5b5b5;
  --spec-border: rgba(126, 140, 222, 0.16);
  --spec-accent: #ff7a00;
  --spec-danger: #ff454d;
  --preview-overlay: rgba(7, 11, 19, 0.62);
  --preview-shell-bg: var(--semantic-color-background-canvas);
  --preview-shell-bg-strong: var(--semantic-color-surface-container-default);
  --preview-shell-panel: var(--semantic-color-interactive-neutral-surface-emphasis);
  --preview-shell-fg: var(--semantic-color-text-primary);
  --preview-shell-muted: var(--semantic-color-text-helper);
  --preview-shell-border: var(--semantic-color-border-interactive-default);
  --preview-shell-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  --preview-shell-band: var(--semantic-color-interactive-brand-surface-disabled);
  --preview-shell-success: var(--semantic-color-status-success-accent);
  --drawer-shell-bg: rgba(14, 19, 34, 0.5);
  --status-pattern: #60a5fa;
  --status-shell: #38bdf8;
  --status-primitive: #cbd5e1;
  --status-local: #fbbf24;
  --status-draft: #a78bfa;
  --status-deprecated: #f87171;
  --status-example: #94a3b8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 32%, transparent), transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: Pretendard, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.file-link {
  color: var(--focus);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.file-link:hover {
  text-decoration: underline;
}

.material-icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
  align-items: center;
  justify-content: center;
  direction: ltr;
  font-family: "Material Icons Outlined";
  font-size: 20px;
  font-style: normal;
  font-feature-settings: "liga";
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-rendering: optimizeLegibility;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-80px);
  border-radius: 8px;
  background: var(--focus);
  color: white;
  padding: 8px 12px;
  font-size: 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

/* Visually hidden but accessible to screen readers (WCAG 2.2 1.3.1) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 24px;
}

.brand-logo {
  display: block;
  width: 139px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-logo-dark {
  display: none;
}

html[data-theme="dark"] .brand-logo-light {
  display: none;
}

html[data-theme="dark"] .brand-logo-dark {
  display: block;
}

.brand-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.brand-label {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border-radius: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-label:hover,
.brand-label.is-active {
  color: var(--text);
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.global-nav a,
.side-link,
.chip,
.status-legend-item,
.segment,
.locale-control select,
.icon-action {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.global-nav a {
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 12px;
}

.global-nav a:hover,
.global-nav a.is-active {
  background: var(--surface-subtle);
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 0 12px;
}

.locale-control {
  display: inline-flex;
  position: relative;
  align-items: center;
  flex: 0 0 auto;
}

.locale-control::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text-soft);
  border-bottom: 1.5px solid var(--text-soft);
  pointer-events: none;
  transform: translateY(-2px) rotate(45deg);
}

.locale-control select {
  appearance: none;
  width: 104px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 40px;
  padding: 0 30px 0 14px;
  text-overflow: ellipsis;
}

.locale-control select:hover,
.locale-control select:focus-visible {
  background: var(--surface);
  border-color: var(--border-strong);
  outline: 0;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 226px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 2px;
}

.segment {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
}

.segment.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.icon-action {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.icon-action:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.icon-action .material-icon {
  font-size: 19px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

body[data-route="overview"] .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body[data-route="overview"] .sidebar {
  display: none;
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  height: calc(100vh - var(--topbar-height));
  overflow: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 16px 28px;
}

.status-legend-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 95%, var(--surface-subtle));
  padding: 10px 12px 12px;
}

.search-wrap + .status-legend-wrap {
  margin-top: 16px;
}

.status-legend-wrap summary {
  color: var(--text-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
  text-transform: uppercase;
}

.status-legend-wrap summary::-webkit-details-marker {
  display: none;
}

.sidebar-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  text-decoration: none;
}

.side-nav-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.side-nav-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.side-nav-count strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.side-nav-count span,
.side-nav-hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.side-nav-hint {
  margin: 0;
}

.side-nav-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-wrap {
  position: relative;
}

.search-wrap .material-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  font-size: 18px;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  outline: 0;
  padding: 0 12px 0 36px;
}

.search-wrap input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.version-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin: 14px 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
}

.intro-version-pill {
  margin: 0 0 18px;
}

.status-legend {
  margin: 0;
}

.status-legend-group + .status-legend-group {
  margin-top: 12px;
}

.status-legend-title {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.status-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-legend-item {
  appearance: none;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
}

.status-legend-item strong {
  min-width: 22px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}

.status-legend-item:hover,
.status-legend-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: var(--surface);
  color: var(--text);
}

.status-legend-item.is-muted {
  color: var(--text-soft);
}

.status-legend-item.is-muted .status-dot {
  filter: grayscale(1);
  opacity: 0.42;
}

.type-filter-item {
  gap: 8px;
  border-style: dashed;
}

.type-filter-item.is-active {
  border-style: solid;
}

.status-clear {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1;
}

.side-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.side-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.side-group-title {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.side-group-count {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
}

.side-link {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.side-link:hover,
.side-link.is-active {
  background: var(--surface-subtle);
  color: var(--text);
}

.side-link.is-active {
  font-weight: 800;
}

.side-link span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-link-pill {
  display: inline-flex;
  min-width: 46px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.side-link.is-active .side-link-pill {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.side-link-icon {
  color: var(--text-soft);
  font-size: 18px;
}

.side-empty {
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-soft);
}

.status-dot.active {
  background: var(--preview-shell-success);
}

.status-dot.pattern {
  background: var(--status-pattern);
}

.status-dot.shell {
  background: var(--status-shell);
}

.status-dot.primitive {
  background: var(--status-primitive);
}

.status-dot.local {
  background: var(--status-local);
}

.status-dot.draft {
  background: var(--status-draft);
}

.status-dot.deprecated {
  background: var(--status-deprecated);
}

.status-dot.example {
  background: var(--status-example);
}

.content {
  display: grid;
  gap: 24px;
  min-width: 0;
  padding: 18px clamp(20px, 3.2vw, 40px) 72px;
}

.content > section {
  width: min(100%, var(--content-max));
  margin-inline: auto;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: start;
  min-height: 0;
  padding: 10px 0 8px;
}

.intro-copy {
  grid-column: 1;
  max-width: 920px;
  padding-top: 10px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 840px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  margin-bottom: 18px;
}

.intro-text {
  max-width: 700px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.intro-panel > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 12px;
  min-height: 102px;
  align-items: start;
  background: var(--surface);
  padding: 16px 18px;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 44px;
}

.principle-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.principle-card,
.console-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.principle-card {
  min-height: 138px;
  padding: 18px;
}

.principle-index {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 7px;
}

.principle-card h2 {
  font-size: 18px;
  line-height: 1.25;
  margin: 18px 0 8px;
}

.principle-card p,
.console-panel p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}

.model-section {
  margin-bottom: 44px;
}

.model-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
}

.console-panel {
  padding: 20px;
}

.console-panel h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.source-steps {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  padding: 8px 10px;
}

.source-steps span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.role-grid {
  display: grid;
  gap: 10px;
}

.role-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 14px;
}

.role-card h4 {
  font-size: 14px;
  margin: 0 0 6px;
}

.role-card p {
  font-size: 13px;
}

.state-console {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  margin-top: 14px;
}

.state-model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.state-card {
  min-height: 74px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 12px;
}

.state-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.state-card p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.metric-value {
  color: var(--text);
  font-size: 32px;
  font-weight: 800;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  text-align: right;
}

.metric-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.intro-panel > div .metric-label:first-child {
  grid-column: 1;
  grid-row: 1;
  text-align: left;
}

.intro-panel > div .metric-label:last-child {
  grid-column: 1;
  grid-row: 2;
  text-align: left;
}

.foundation-teaser {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.foundation-teaser-card {
  display: grid;
  grid-auto-rows: max-content;
  gap: 12px;
  align-content: start;
  align-items: start;
  min-height: 168px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 94%, var(--surface-subtle));
  padding: 16px;
}

.foundation-teaser-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.foundation-teaser-card .foundation-title-row {
  width: 100%;
  margin-bottom: 0;
}

.foundation-teaser-card .token-matrix.compact,
.foundation-teaser-card .foundation-chip-row {
  margin-top: 2px;
}

.foundation-teaser-card .foundation-chip-row {
  gap: 6px;
}

.foundation-teaser-card .foundation-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 10px 0 16px;
}

.ai-agent-section {
  margin-top: 6px;
  margin-bottom: 28px;
}

.ai-agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ai-agent-grid.primary {
  margin-bottom: 12px;
}

.ai-agent-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 156px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-subtle));
  color: var(--text);
  padding: 18px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.ai-agent-card:hover {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
  transform: translateY(-1px);
}

.ai-agent-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ai-agent-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ai-agent-card strong {
  font-size: 18px;
  line-height: 1.25;
}

.ai-agent-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.ai-agent-assets {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-subtle));
}

.ai-agent-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.ai-agent-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.ai-agent-contract {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.contract-card {
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, var(--surface-subtle));
  padding: 16px;
}

.contract-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.contract-list li {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.contract-list code {
  color: var(--text);
  font-size: 12px;
}

.contract-list-mono {
  gap: 10px;
}

.ai-prompt-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, var(--surface-subtle));
  padding: 16px;
}

.ai-prompt-card .prompt-block {
  background: color-mix(in srgb, var(--surface) 94%, var(--surface-subtle));
}

.ai-flow-step {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 128px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, var(--surface-subtle));
  padding: 16px;
}

.ai-flow-step span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.ai-flow-step strong {
  font-size: 15px;
  line-height: 1.3;
}

.ai-flow-step p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.ai-agent-assets summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  padding: 14px 18px;
}

.ai-agent-assets summary span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.ai-agent-assets summary strong {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-agent-asset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.ai-agent-asset {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  min-height: 72px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}

.ai-agent-asset:nth-child(2n) {
  border-right: 0;
}

.ai-agent-asset:nth-last-child(-n + 1) {
  border-bottom: 0;
}

.ai-agent-asset span {
  grid-row: 1 / span 2;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.ai-agent-asset strong {
  font-size: 14px;
  line-height: 1.25;
}

.ai-agent-asset p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ai-agent-guardrails {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.ai-agent-guardrails .eyebrow {
  margin-bottom: 12px;
}

.ai-agent-guardrails .principle-card {
  min-height: 132px;
}

.ai-agent-guardrails .principle-card h2 {
  font-size: 16px;
  margin-top: 14px;
}

.section-heading h2 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chip {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
}

.chip:hover,
.chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.component-card {
  display: grid;
  min-height: 132px;
  align-content: space-between;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 16px;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.component-card:hover,
.component-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--surface-subtle) 46%, var(--surface));
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.component-card h3 {
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.component-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 22px;
  align-items: start;
}

.detail-panel,
.preview-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.detail-panel {
  min-height: 460px;
  padding: 24px;
}

.preview-panel {
  order: 0;
  position: static;
  overflow: hidden;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.detail-title-row h2 {
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.detail-title-row p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.detail-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.detail-tab {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 2px;
}

.detail-tab.is-active {
  border-color: var(--accent);
  color: var(--text);
}

html[data-locale="ko"] .detail-layout {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 24px;
  margin-top: 28px;
}

html[data-locale="ko"] .detail-panel.doc-page-panel {
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

html[data-locale="ko"] .preview-panel.doc-page-aside {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
  display: grid;
  gap: 12px;
  border: 0;
  background: transparent;
}

.component-doc-hero {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-subtle) 48%, transparent);
  padding: 30px 32px 0;
}

.component-doc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 20px;
}

.component-doc-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.component-doc-title-row > div {
  min-width: 0;
}

.component-doc-title-row h2 {
  font-size: clamp(36px, 4.8vw, 56px);
  line-height: 1.08;
  margin: 0 0 12px;
}

.component-doc-title-row p:not(.eyebrow) {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

.component-doc-local-nav {
  display: flex;
  gap: 24px;
  overflow-x: auto;
}

.component-doc-local-nav button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.component-doc-local-nav button:hover,
.component-doc-local-nav button:focus-visible,
.component-doc-local-nav button.is-active {
  border-color: var(--accent);
  color: var(--text);
}

.component-doc-section {
  padding: 32px;
}

.component-doc-section + .component-doc-section {
  border-top: 1px solid var(--border);
}

.component-doc-section-heading {
  margin-bottom: 20px;
}

.component-doc-section-heading h3 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0;
}

.component-doc-section-heading p:not(.eyebrow) {
  max-width: 720px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 8px 0 0;
}

.component-doc-example {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.component-doc-example .preview-header h4 {
  font-size: 15px;
  margin: 0;
}

.component-doc-example .preview-header h5 {
  font-size: 15px;
  margin: 0;
}

.component-doc-example .preview-stage {
  min-height: 320px;
}

.component-doc-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.component-doc-info-card {
  min-height: 144px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 16px;
}

.component-doc-info-card h4 {
  color: var(--text);
  font-size: 14px;
  margin: 0 0 10px;
}

.component-doc-info-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.props-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.props-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 13px;
}

.props-table th,
.props-table td {
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.props-table thead th {
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.props-table tbody th {
  width: 180px;
  font-weight: 800;
}

.props-table td:nth-child(2) {
  width: 160px;
  color: var(--text-muted);
}

.props-table td:last-child {
  color: var(--text-muted);
  line-height: 1.6;
}

.props-table tr:last-child th,
.props-table tr:last-child td {
  border-bottom: 0;
}

.props-table code {
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-subtle) 82%, var(--surface));
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 2px 6px;
}

.doc-page-toc,
.doc-page-side-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.doc-page-toc {
  display: grid;
  gap: 2px;
  padding: 14px;
}

.doc-page-toc p {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.doc-page-toc a,
.doc-page-toc button {
  display: block;
  width: 100%;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
}

.doc-page-toc a:hover,
.doc-page-toc a:focus-visible,
.doc-page-toc button:hover,
.doc-page-toc button:focus-visible,
.doc-page-toc button.is-active {
  background: var(--surface-subtle);
  color: var(--text);
}

.doc-page-side-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.doc-page-side-card strong {
  color: var(--text);
  font-size: 14px;
}

.doc-page-side-card span,
.doc-page-side-card a {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ownership-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.ownership-card {
  min-height: 128px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 14px;
}

.ownership-card h3 {
  color: var(--text);
  font-size: 13px;
  margin-bottom: 10px;
}

.ownership-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.ownership-card li {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.handoff-section {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-subtle));
  overflow: hidden;
}

.handoff-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
}

.handoff-summary::-webkit-details-marker {
  display: none;
}

.handoff-summary span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.handoff-summary strong {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.handoff-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding: 12px;
}

.handoff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.handoff-header p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.copy-button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  color: var(--text);
  background: color-mix(in srgb, var(--surface-subtle) 42%, var(--surface));
}

.copy-icon-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-color: color-mix(in srgb, var(--code-text) 20%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--code-bg) 78%, var(--code-text));
  color: var(--code-text);
  padding: 0;
}

.copy-icon-button .material-icon {
  font-size: 18px;
}

.copy-icon-button:hover,
.copy-icon-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--code-text));
  background: color-mix(in srgb, var(--code-bg) 64%, var(--code-text));
  color: var(--code-text);
}

.handoff-header h3 {
  font-size: 17px;
  margin: 0;
}

.handoff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.handoff-card {
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.handoff-card h4 {
  font-size: 13px;
  margin: 0 0 10px;
}

.handoff-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.handoff-card li {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.prompt-block {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, var(--surface-subtle));
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  padding: 14px;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.spec-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.spec-row dt {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.spec-row dd {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.code-block {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
  padding: 18px 54px 18px 18px;
  white-space: pre;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

.code-block code {
  display: block;
  min-width: max-content;
}

.code-surface {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.code-block-shell {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.code-block-shell .copy-icon-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}

.code-framework-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 320px);
  min-width: 0;
  flex: 0 1 320px;
}

.code-framework-tabs .segment {
  min-height: 34px;
  font-size: 12px;
  font-weight: 800;
}

.code-token-tag {
  color: #7dd3fc;
}

.code-token-attr {
  color: #facc15;
}

.code-token-string {
  color: #86efac;
}

.code-token-keyword {
  color: #c4b5fd;
}

.code-token-punctuation {
  color: #94a3b8;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.preview-header h3 {
  font-size: 14px;
  margin: 0;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 28px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--border) 18%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--border) 18%, transparent) 1px, transparent 1px);
  background-color: color-mix(in srgb, var(--surface-subtle) 52%, var(--bg));
  background-size: 24px 24px;
}

.demo-stack {
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: center;
  width: 100%;
  min-height: 200px;
}

.ds-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  white-space: nowrap;
}

.ds-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.ds-button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: white;
}

.ds-button.text {
  background: transparent;
}

.ds-input {
  display: flex;
  width: min(100%, 300px);
  height: 30px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text-muted);
  font-size: 14px;
  padding: 0 13px;
}

.ds-input.focused {
  border-color: var(--accent);
  background: var(--surface-subtle);
  color: var(--text);
}

.ds-checkbox,
.ds-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.box,
.circle {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.box {
  border-radius: 6px;
}

.circle {
  border-radius: 999px;
}

.box.checked,
.circle.checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.tab-demo {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.tab-demo span {
  display: inline-flex;
  height: 36px;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  padding: 0 16px;
}

.tab-demo .active {
  border-color: var(--accent);
  color: var(--text);
}

.demo-divider {
  width: 2px;
  height: 12px;
  background: var(--border-strong);
}

.indicator-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.demo-actionbar,
.demo-snb,
.demo-doc {
  width: min(100%, 520px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.demo-actionbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.demo-doc-surface {
  display: grid;
  place-items: center;
  gap: 12px;
  border-radius: 8px;
  background: var(--preview-shell-bg-strong);
  padding: 12px;
}

.component-preview-surface {
  display: grid;
  place-items: center;
  gap: 12px;
  border-radius: 8px;
  background: var(--preview-shell-bg-strong);
  padding: 12px;
}

.action-button-preview-surface {
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-subtle));
  padding: 20px;
  width: 100%;
  min-height: 132px;
}

html[data-theme="dark"] .action-button-preview-surface,
html[data-theme="dark"] .action-icon-button-preview-surface {
  background: var(--semantic-color-surface-container-default);
}

.action-icon-button-preview-surface {
  background: var(--surface-subtle);
  gap: 16px;
}

.demo-actionbar {
  justify-content: space-between;
  flex-wrap: nowrap;
}

.demo-actionbar-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.demo-actionbar-cluster.is-discovery {
  flex: 1 1 auto;
}

.demo-actionbar-cluster.is-command {
  flex: 0 0 auto;
}

.demo-divider.spec {
  width: 2px;
  height: 12px;
  background: var(--preview-shell-border);
}

.demo-snb,
.demo-doc {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.demo-snb.doc {
  width: 200px;
  height: 1032px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  border: 0;
  border-right: 1px solid var(--spec-border);
  border-radius: 0;
  background: var(--spec-surface-default);
  padding: 0;
  overflow: hidden;
  --demo-snb-text-secondary: var(--spec-text-secondary);
}

.demo-snb-row {
  appearance: none;
  width: 184px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--demo-snb-text-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-align: left;
}

.demo-snb-row {
  position: relative;
  padding: 6px 32px 6px 8px;
}

.demo-snb-category-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
  opacity: 0.65;
}

.demo-snb-row-chevron {
  position: absolute;
  right: 8px;
  top: 50%;
  color: currentColor;
  font-size: 20px;
  transform: translateY(-50%);
}

.snb-doc-examples {
  display: grid;
  gap: 28px;
}

.snb-doc-example .preview-stage {
  min-height: auto;
}

.demo-snb-item-doc-surface {
  display: grid;
  width: 100%;
  place-items: stretch;
  gap: 16px;
  background: var(--preview-shell-bg-strong);
  padding: 20px;
}

.snb-specimen-group {
  display: grid;
  gap: 14px;
  border: 1px solid var(--spec-border);
  border-radius: 8px;
  background: var(--spec-surface-default);
  padding: 16px;
}

.snb-specimen-group-head {
  display: grid;
  gap: 4px;
}

.snb-specimen-group-head h5,
.snb-specimen-group-head p,
.snb-specimen-column h6 {
  margin: 0;
}

.snb-specimen-group-head h5 {
  color: var(--spec-text-primary);
  font-size: 16px;
  font-weight: 900;
  line-height: 22px;
}

.snb-specimen-group-head p {
  color: var(--spec-text-helper);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}

.snb-specimen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.snb-specimen-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.snb-specimen-column h6 {
  color: var(--spec-text-secondary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 18px;
}

.snb-specimen-rows {
  display: grid;
  gap: 8px;
}

.snb-specimen-row {
  display: grid;
  grid-template-columns: 78px 184px;
  align-items: center;
  gap: 10px;
}

.snb-specimen-state-label {
  color: var(--spec-text-helper);
  font-family: "D2Coding", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
}

.demo-snb-specimen-item {
  position: relative;
  width: 184px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  color: var(--spec-text-secondary);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  padding: 6px 8px;
}

.demo-snb-specimen-item.depth-2nd-level.variant-product-menu {
  padding-left: 36px;
  padding-right: 32px;
}

.demo-snb-specimen-item.depth-3rd-level.variant-product-menu {
  gap: 0;
  padding-left: 56px;
  padding-right: 8px;
}

.demo-snb-specimen-item.depth-2nd-level.variant-app-menu {
  gap: 0;
  padding-left: 12px;
  padding-right: 8px;
}

.demo-snb-specimen-item.is-hover,
.demo-snb-specimen-item.is-pressed,
.demo-snb-specimen-item.is-current {
  background: var(--spec-surface-emphasis);
}

.demo-snb-specimen-item.is-pressed,
.demo-snb-specimen-item.is-expanded,
.demo-snb-specimen-item.is-current {
  color: var(--spec-accent);
}

.demo-snb-specimen-item.is-emphasized {
  color: var(--spec-text-primary);
}

.demo-snb-specimen-item .demo-snb-category-icon {
  opacity: 0.65;
}

.demo-snb-specimen-item:not(.is-default) .demo-snb-category-icon {
  opacity: 1;
}

.demo-snb-specimen-chevron {
  position: absolute;
  right: 8px;
  top: 50%;
  color: currentColor;
  font-size: 20px;
  transform: translateY(-50%);
}

.demo-button,
.demo-icon-button,
.demo-select-trigger,
.demo-option,
.demo-switch {
  appearance: none;
  font: inherit;
}

.demo-button,
.demo-icon-button,
.demo-select-trigger,
.demo-option {
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
}

.demo-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  padding: 4px 10px;
  letter-spacing: 0;
  white-space: nowrap;
}

.button-doc-examples {
  display: grid;
  gap: 32px;
}

.button-doc-page-panel .component-doc-section-heading h3 {
  font-size: 26px;
}

.button-doc-tabs button {
  font-size: 14px;
}

.button-doc-example-group {
  display: grid;
  gap: 16px;
  scroll-margin-top: calc(var(--topbar-height) + 20px);
}

.button-doc-example-group > h4 {
  color: var(--text);
  font-size: 25px;
  font-weight: 900;
  line-height: 32px;
  margin: 0;
}

.button-doc-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}

.button-doc-example-copy {
  display: grid;
  gap: 6px;
  padding: 20px 24px 18px;
}

.button-doc-example-copy h4,
.button-doc-example-copy h5 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 28px;
}

.button-doc-example-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
}

.button-doc-example-preview {
  border-top: 1px solid var(--border);
}

.button-doc-example .preview-stage {
  min-height: 168px;
  border-bottom: 1px solid var(--border);
}

.button-doc-example .blankslate-preview-frame {
  display: grid;
  width: 100%;
  min-height: 1040px;
  place-items: center;
  overflow: auto;
}

.button-example-code {
  --doc-code-surface: #f8fafc;
  --doc-code-toolbar: #f8fafc;
  --doc-code-text: var(--text);
  --doc-code-muted: var(--text-muted);
  --doc-code-button-bg: #ffffff;
  --doc-code-button-hover: #eef4ff;
  --doc-code-token-tag: #0b5cad;
  --doc-code-token-attr: #8a3ffc;
  --doc-code-token-string: #087443;
  --doc-code-token-keyword: #a54800;
  --doc-code-token-punctuation: var(--text-soft);
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--doc-code-surface);
}

html[data-theme="dark"] .button-example-code {
  --doc-code-surface: var(--code-bg);
  --doc-code-toolbar: color-mix(in srgb, var(--code-bg) 92%, var(--surface));
  --doc-code-text: var(--code-text);
  --doc-code-muted: var(--text-muted);
  --doc-code-button-bg: color-mix(in srgb, var(--code-bg) 86%, var(--code-text));
  --doc-code-button-hover: color-mix(in srgb, var(--accent) 18%, var(--code-bg));
  --doc-code-token-tag: #7dd3fc;
  --doc-code-token-attr: #facc15;
  --doc-code-token-string: #86efac;
  --doc-code-token-keyword: #c4b5fd;
  --doc-code-token-punctuation: #94a3b8;
}

.button-example-code-toolbar {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--doc-code-toolbar);
  color: var(--doc-code-muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 14px 0 18px;
}

.button-example-code .code-block {
  border: 0;
  border-radius: 0;
  background: var(--doc-code-surface);
  color: var(--doc-code-text);
  min-width: 0;
  max-height: 240px;
  margin: 0;
}

.button-example-code .copy-icon-button {
  border-color: var(--border);
  background: var(--doc-code-button-bg);
  color: var(--doc-code-muted);
}

.button-example-code .copy-icon-button:hover,
.button-example-code .copy-icon-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: var(--doc-code-button-hover);
  color: var(--doc-code-text);
}

.button-example-code .code-token-tag {
  color: var(--doc-code-token-tag);
}

.button-example-code .code-token-attr {
  color: var(--doc-code-token-attr);
}

.button-example-code .code-token-string {
  color: var(--doc-code-token-string);
}

.button-example-code .code-token-keyword {
  color: var(--doc-code-token-keyword);
}

.button-example-code .code-token-punctuation {
  color: var(--doc-code-token-punctuation);
}

.button-doc-usage-grid {
  display: grid;
  gap: 18px;
}

.button-doc-usage-grid > section {
  display: grid;
  gap: 12px;
}

.button-doc-usage-grid h4,
.button-doc-handoff h4 {
  margin: 0;
}

.button-doc-a11y-grid {
  margin-top: 18px;
}

.button-doc-handoff {
  margin-top: 18px;
}

.button-doc-blocked-card {
  max-width: 640px;
}

.button-doc-toc .doc-page-toc-group {
  margin-top: 8px;
  font-weight: 900;
}

.button-doc-toc .doc-page-toc-child {
  padding-left: 16px;
  font-size: 12px;
  font-weight: 700;
}

.action-example-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.action-example-row-align-end {
  align-items: flex-end;
}

.action-example-stack {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.demo-button.primary {
  border-color: transparent;
  background: var(--button-primary-bg, var(--accent));
  color: var(--button-primary-fg, #fff);
}

.demo-button.text {
  background: transparent;
}

.demo-button.danger,
.demo-icon-button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.action-icon-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.demo-icon-button {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 0;
}

.demo-utility-box {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--spec-border);
  border-radius: 8px;
  background: var(--spec-surface-default);
  color: var(--spec-text-primary);
  padding: 0;
}

.demo-utility-box.is-active {
  border-color: var(--spec-accent);
  background: var(--spec-surface-emphasis);
  color: var(--spec-accent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.demo-utility-box .material-icon {
  font-size: 18px;
}

.demo-icon-button .material-icon {
  font-size: 18px;
}

.demo-icon-button.is-pressed,
.demo-icon-button.is-active {
  border-color: var(--accent);
  background: var(--surface-subtle);
  color: var(--accent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.demo-icon-button.user {
  width: 30px;
  overflow: hidden;
}

.demo-user-console.doc {
  display: inline-flex;
  align-items: center;
}

.demo-ci {
  display: inline-flex;
  align-items: center;
  width: 139px;
  height: 24px;
}

.demo-ci-logo {
  display: block;
  width: 139px;
  height: 24px;
  object-fit: contain;
}

.demo-ci-logo-dark {
  display: none;
}

html[data-theme="dark"] .demo-ci-logo-light {
  display: none;
}

html[data-theme="dark"] .demo-ci-logo-dark {
  display: block;
}

.demo-stepper.doc {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
}

.demo-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--spec-text-helper);
  font-size: 13px;
  font-weight: 800;
  line-height: 20px;
}

.demo-step span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--spec-border);
  border-radius: 999px;
  background: var(--spec-surface-default);
  color: var(--spec-text-helper);
}

.demo-stepper > i {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--spec-border);
}

.demo-step.is-current {
  color: var(--spec-text-primary);
}

.demo-step.is-current span {
  border-color: var(--spec-accent);
  background: var(--spec-surface-emphasis);
  color: var(--spec-accent);
}

.demo-step.is-completed span {
  border-color: var(--spec-accent);
  background: var(--spec-accent);
  color: var(--preview-shell-fg);
}

.demo-field {
  width: min(100%, 300px);
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  padding: 5px 13px;
}

.demo-field.small {
  height: 24px;
  font-size: 12px;
  line-height: 18px;
  padding: 3px 9px;
}

.demo-field.date {
  width: 214px;
}

.demo-field.range {
  width: min(100%, 419px);
}

.demo-select-field .demo-select-trigger {
  display: inline-grid;
  align-items: center;
  gap: 4px;
}

.demo-field.search {
  width: 200px;
  border: 0;
  background: transparent;
  padding-left: 0;
}

.demo-field.textarea {
  width: min(100%, 400px);
  height: 70px;
  resize: vertical;
}

.demo-field.textarea.doc {
  border-color: var(--spec-border);
  background: var(--spec-surface-default);
  color: var(--spec-text-primary);
}

.demo-field:focus,
.demo-select-trigger:focus {
  border-color: var(--accent);
  outline: 0;
}

.is-keyboard-nav .demo-field:focus,
.is-keyboard-nav .demo-select-trigger:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.demo-page-layout.doc {
  display: grid;
  width: min(100%, 720px);
  min-height: 380px;
  overflow: hidden;
  grid-template-columns: 160px minmax(0, 1fr);
  grid-template-rows: 48px minmax(0, 1fr);
  border: 1px solid var(--spec-border);
  border-radius: 14px;
  background: var(--preview-stage-bg);
  box-shadow: var(--shadow-sm);
}

.demo-page-layout-gnb {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--spec-border);
  background: var(--spec-surface-default);
  padding: 0 12px;
}

.demo-page-layout-gnb .demo-ci-logo {
  width: 112px;
  height: auto;
}

.demo-page-layout-gnb > span {
  flex: 1 1 auto;
  color: var(--spec-text-primary);
  font-size: 13px;
  font-weight: 800;
}

.demo-page-layout-snb {
  display: grid;
  align-content: start;
  gap: 6px;
  border-right: 1px solid var(--spec-border);
  background: var(--spec-surface-default);
  padding: 12px;
}

.demo-page-layout-snb strong,
.demo-page-layout-snb span {
  color: var(--spec-text-primary);
  font-size: 13px;
  line-height: 20px;
}

.demo-page-layout-snb span {
  border-radius: 8px;
  padding: 6px 8px;
}

.demo-page-layout-snb span.is-current {
  background: var(--spec-surface-hover);
  color: var(--spec-accent);
  font-weight: 800;
}

.demo-page-layout-main {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.demo-page-layout-title,
.demo-page-layout-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.demo-page-layout-title > div {
  display: grid;
  gap: 2px;
}

.demo-page-layout-title strong {
  color: var(--spec-text-primary);
  font-size: 18px;
  line-height: 28px;
}

.demo-page-layout-title span {
  color: var(--spec-text-helper);
  font-size: 12px;
  line-height: 18px;
}

.demo-page-layout-content {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--spec-border);
  border-radius: 10px;
  background: var(--spec-surface-default);
}

.demo-page-layout-content span {
  display: block;
  height: 34px;
  border-radius: 8px;
  background: var(--spec-surface-hover);
}

.demo-form-layout.doc {
  display: grid;
  width: min(100%, 560px);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--spec-border);
  border-radius: 12px;
  background: var(--spec-surface-default);
  box-shadow: var(--shadow-sm);
}

.demo-form-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.demo-form-row > label {
  color: var(--spec-text-primary);
  font-size: 13px;
  font-weight: 800;
  line-height: 30px;
}

.demo-form-row > label b {
  color: var(--spec-accent);
}

.demo-form-row > div {
  display: grid;
  gap: 4px;
}

.demo-form-row small {
  color: var(--spec-text-helper);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.demo-form-row .demo-field,
.demo-form-row .demo-select-trigger {
  width: min(100%, 320px);
}

.demo-select-trigger.doc-static {
  cursor: pointer;
}

.demo-form-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
  padding-left: 132px;
}

.demo-choice-stack {
  display: grid;
  gap: 8px;
  align-items: start;
  justify-items: start;
}

.demo-choice {
  display: inline-flex;
  min-height: 20px;
  align-items: flex-start;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 0;
  text-align: left;
}

.demo-choice > span:last-child {
  line-height: 20px;
}

.demo-choice:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.demo-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 64px;
  background: var(--surface-subtle);
  padding: 2px;
  cursor: pointer;
}

.demo-switch span {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 64px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  transition: transform 160ms ease;
}

.demo-switch.is-on {
  border-color: var(--accent);
  background: var(--accent);
}

.demo-switch.is-on span {
  transform: translateX(16px);
}

.demo-switch-group {
  display: grid;
  width: min(100%, 280px);
  gap: 8px;
}

.demo-switch-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  font-size: 14px;
}

.demo-dropdown {
  position: relative;
  width: min(100%, 300px);
}

.demo-actionbar .demo-dropdown {
  width: auto;
}

.demo-select-field {
  width: min(100%, 300px);
}

.demo-select-field.doc .demo-select-trigger {
  border-color: var(--spec-border);
  background: var(--spec-surface-default);
  color: var(--spec-text-primary);
}

.demo-select-field.doc .demo-dropdown-surface {
  border-color: var(--spec-border);
  background: var(--spec-surface-default);
}

.demo-select-field.doc .demo-option {
  color: var(--spec-text-primary);
}

.demo-select-field.doc .demo-option.is-selected {
  background: var(--spec-surface-hover);
}

.demo-select-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--spec-border);
  background: var(--spec-surface-default);
  color: var(--spec-text-primary);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  padding: 5px 4px 5px 13px;
  text-align: left;
}

.demo-select-trigger > :first-child,
.demo-select-trigger > [data-demo-trigger-label] {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-select-trigger .material-icon {
  flex: 0 0 auto;
  justify-self: center;
  font-size: 20px;
  line-height: 1;
}

.demo-select-trigger [data-demo-trigger-label].is-placeholder {
  color: var(--spec-text-helper);
}

.demo-select-trigger[aria-expanded="true"],
.demo-select-trigger:focus {
  border-color: var(--spec-accent);
  background: var(--spec-surface-emphasis);
}

.demo-select-trigger[aria-expanded="true"] [data-demo-trigger-label].is-placeholder,
.demo-select-trigger:focus [data-demo-trigger-label].is-placeholder {
  color: var(--spec-text-primary);
}

.demo-actionbar-trigger {
  display: inline-flex;
  min-width: 96px;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 12px;
  line-height: 18px;
  padding: 3px 9px;
  white-space: nowrap;
}

.demo-actionbar-menu {
  width: 300px;
}

.demo-actionbar .demo-button {
  min-height: 24px;
  padding: 3px 9px;
}

.demo-actionbar .demo-icon-button {
  width: 24px;
  height: 24px;
}

.demo-select-trigger strong {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.demo-dropdown-surface {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: 100%;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 4px;
}

.demo-dropdown-surface[hidden] {
  display: none;
}

.demo-menu-doc {
  position: relative;
  display: inline-grid;
  gap: 8px;
  justify-items: start;
}

.demo-menu-surface.doc {
  display: grid;
  width: 220px;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--spec-border);
  border-radius: 8px;
  background: var(--spec-surface-default);
  box-shadow: var(--shadow-md);
}

.demo-menu-surface button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) max-content;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--spec-text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  padding: 5px 8px;
  text-align: left;
}

.demo-menu-surface button.is-hover {
  background: var(--spec-surface-hover);
}

.demo-menu-surface button.danger {
  color: var(--danger);
}

.demo-menu-surface .material-icon {
  font-size: 18px;
}

.demo-menu-surface kbd {
  color: var(--spec-text-helper);
  font: inherit;
  font-size: 11px;
}

.demo-menu-surface > i {
  display: block;
  height: 1px;
  margin: 2px 4px;
  background: var(--spec-border);
}

.demo-avatar {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--spec-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--spec-accent) 12%, var(--spec-surface-default));
  color: var(--spec-text-primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
}

.demo-avatar.lg {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.demo-avatar.md {
  width: 32px;
  height: 32px;
}

.demo-avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.demo-avatar .material-icon {
  font-size: 18px;
}

.demo-list-doc {
  display: grid;
  width: min(100%, 420px);
  overflow: hidden;
  border: 1px solid var(--spec-border);
  border-radius: 10px;
  background: var(--spec-surface-default);
}

.demo-list-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) max-content 18px;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--spec-border);
  background: transparent;
  color: var(--spec-text-primary);
  font: inherit;
  padding: 8px 10px;
  text-align: left;
}

.demo-list-item:last-child {
  border-bottom: 0;
}

.demo-list-item.is-active {
  background: var(--spec-surface-hover);
}

.demo-list-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.demo-list-copy strong,
.demo-list-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-list-copy strong {
  font-size: 13px;
  line-height: 20px;
}

.demo-list-copy small,
.demo-list-meta {
  color: var(--spec-text-helper);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.demo-list-item .material-icon {
  color: var(--spec-text-helper);
  font-size: 18px;
}

.demo-option {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 8px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  line-height: 20px;
  padding: 4px;
  text-align: left;
}

.demo-option:hover,
.demo-option.is-selected:hover {
  background: var(--accent-soft);
}

.demo-choice-indicator,
.demo-marker {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.demo-choice-indicator {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.demo-choice-indicator.checkbox {
  border-radius: 4px;
}

.demo-choice-indicator.radio {
  border-radius: 999px;
}

.demo-choice-indicator.checkbox::after {
  content: "";
  width: 7px;
  height: 4px;
  border-bottom: 2px solid transparent;
  border-left: 2px solid transparent;
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.demo-choice-indicator.radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.demo-choice-indicator.checkbox.is-checked {
  border-color: var(--accent);
  background: var(--accent);
}

.demo-choice-indicator.checkbox.is-checked::after {
  border-color: var(--surface);
  opacity: 1;
}

.demo-choice-indicator.radio.is-checked {
  border-color: var(--accent);
}

.demo-choice-indicator.radio.is-checked::after {
  background: var(--accent);
}

.demo-marker {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.demo-option.is-selected .demo-marker {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.demo-spacer {
  flex: 1 1 auto;
}

.demo-popover-doc {
  position: relative;
  display: inline-grid;
  gap: 8px;
  justify-items: start;
  padding-top: 4px;
}

.demo-popover-surface.doc {
  display: grid;
  width: min(100%, 320px);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--spec-border);
  border-radius: 8px;
  background: var(--spec-surface-default);
  box-shadow: var(--shadow-md);
}

.demo-popover-surface header,
.demo-popover-surface footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.demo-popover-surface strong {
  color: var(--spec-text-primary);
  font-size: 14px;
  line-height: 20px;
}

.demo-popover-surface p {
  margin: 0;
  color: var(--spec-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.demo-disclosure.doc {
  display: grid;
  width: min(100%, 360px);
  overflow: hidden;
  border: 1px solid var(--spec-border);
  border-radius: 10px;
  background: var(--spec-surface-default);
}

.demo-disclosure-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content 20px;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--spec-border);
  background: transparent;
  color: var(--spec-text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
  text-align: left;
}

.demo-disclosure-trigger small {
  color: var(--spec-text-helper);
  font-size: 12px;
  font-weight: 700;
}

.demo-disclosure-trigger .material-icon {
  color: var(--spec-accent);
  font-size: 20px;
}

.demo-disclosure-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}

.calendar-header strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
}

.calendar-presets,
.calendar-selectors,
.calendar-body-row,
.calendar-time-fields,
.calendar-time-labels,
.calendar-footer-row {
  display: flex;
  align-items: center;
}

.calendar-presets {
  gap: 8px;
}

.calendar-presets button,
.calendar-icon,
.calendar-select,
.calendar-action {
  appearance: none;
  min-height: 24px;
  border: 1px solid var(--calendar-border);
  border-radius: 6px;
  background: var(--calendar-control);
  color: var(--calendar-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  padding: 1px 7px;
}

.calendar-icon {
  display: inline-flex;
  width: 24px;
  align-items: center;
  justify-content: center;
  padding: 1px;
}

.calendar-icon .material-icon {
  font-size: 18px;
}

.calendar-presets button.is-active,
.calendar-time-field.is-focused {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-body-row {
  gap: 8px;
}

.calendar-column {
  display: grid;
  width: 232px;
  gap: 8px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 232px;
  height: 24px;
}

.calendar-icon {
  width: 24px;
  padding: 0;
  font-size: 18px;
  line-height: 20px;
}

.calendar-selectors {
  gap: 8px;
}

.calendar-select {
  display: inline-flex;
  min-width: 72px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.calendar-select span {
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.calendar-grid {
  display: grid;
  width: 232px;
  height: 240px;
  gap: 8px;
  padding: 8px;
}

.calendar-weekdays,
.calendar-dates {
  display: grid;
  grid-template-columns: repeat(7, 24px);
  gap: 8px;
}

.calendar-weekdays span,
.calendar-day {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--calendar-text);
  font-size: 12px;
  line-height: 18px;
}

.calendar-day {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 0;
  z-index: 0;
}

.calendar-day.is-empty {
  visibility: hidden;
}

.calendar-day.is-muted {
  color: var(--calendar-muted);
}

.calendar-day.is-in-range::before,
.calendar-day.is-range-start::before,
.calendar-day.is-range-end::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -4px;
  background: var(--calendar-range);
}

.calendar-day.is-range-start::before {
  left: 0;
  border-radius: 999px 0 0 999px;
}

.calendar-day.is-range-end::before {
  right: 0;
  border-radius: 0 999px 999px 0;
}

.calendar-day.is-selected {
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.calendar-time-group {
  display: grid;
  justify-self: center;
  width: 160px;
  min-height: 90px;
  gap: 6px;
  justify-items: center;
}

.calendar-time-fields {
  gap: 8px;
}

.calendar-time-field {
  display: grid;
  width: 40px;
  min-height: 30px;
  place-items: center;
  border: 1px solid var(--calendar-border);
  border-radius: 8px;
  background: var(--calendar-control);
  color: var(--calendar-muted);
  font-size: 14px;
  line-height: 20px;
}

.calendar-time-colon {
  color: var(--calendar-text);
  font-weight: 700;
}

.calendar-time-labels {
  width: 160px;
  justify-content: space-between;
  color: var(--calendar-text);
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
  padding: 0 18px;
}

.calendar-now-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  line-height: 18px;
  padding: 0;
  text-decoration: underline;
}

.calendar-footer-row {
  justify-content: flex-end;
  gap: 8px;
}

.calendar-action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.demo-doc {
  max-width: 320px;
}

.demo-doc small {
  color: var(--text-muted);
}

.demo-doc span {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 6px 8px;
}

.has-tooltip {
  position: relative;
}

.foundation-section {
  margin-top: 44px;
}

.component-status-block {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.focus-ring-rule-card {
  display: grid;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.focus-ring-rule-copy {
  display: grid;
  gap: 12px;
}

.focus-ring-rule-copy h3 {
  max-width: 860px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.25;
  margin: 0;
}

.focus-ring-rule-copy p {
  max-width: 980px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

.focus-ring-rule-list {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  padding-left: 20px;
}

.focus-ring-rule-list strong {
  color: var(--text);
}

.focus-ring-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.focus-ring-example-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, var(--surface-subtle));
  padding: 18px;
}

.focus-ring-example-card h4,
.focus-ring-example-card p {
  margin: 0;
}

.focus-ring-example-card h4 {
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.focus-ring-example-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.focus-ring-demo-surface {
  display: flex;
  min-height: 64px;
  align-items: center;
  padding: 8px 0;
}

.focus-ring-demo-button {
  position: relative;
  outline: 0 !important;
  overflow: visible;
}

.focus-ring-demo-button::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--focus);
  border-radius: 12px;
  pointer-events: none;
}

.focus-ring-demo-button.pill {
  min-height: 34px;
  border: 1px solid var(--focus);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 6px 22px;
}

.focus-ring-demo-button.pill::after {
  border-radius: 999px;
}

.foundation-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#patternGrid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.foundation-block,
.status-block {
  min-height: 148px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-subtle));
  padding: 18px;
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 26%, transparent);
}

.foundation-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.foundation-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 8px;
  text-decoration: none;
  text-transform: uppercase;
}

.foundation-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button-doc-source-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: max-content;
  min-width: 64px;
  max-width: max-content;
  min-height: 28px;
  padding: 7px 10px;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.status-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.foundation-block h3,
.status-block h3 {
  font-size: 17px;
  margin-bottom: 0;
}

.foundation-block p,
.status-block p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.pattern-card {
  overflow: hidden;
}

.pattern-section {
  display: grid;
  gap: 12px;
}

.pattern-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 72%, var(--surface-subtle));
  padding: 18px;
}

.pattern-section-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
}

.pattern-section-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.pattern-section-count {
  display: inline-flex;
  min-width: 42px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.pattern-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.foundation-registry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pattern-meta-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.pattern-meta-block {
  display: grid;
  gap: 8px;
}

.pattern-meta-block strong {
  font-size: 12px;
  line-height: 1.3;
}

.pattern-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pattern-card .prompt-block {
  margin-top: 16px;
}

.foundation-chip.subtle {
  background: color-mix(in srgb, var(--surface-subtle) 82%, var(--surface));
  color: var(--text-muted);
}

.foundation-chip.danger {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.pattern-visual {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: 18px minmax(86px, 1fr);
  gap: 8px;
  min-height: 132px;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-subtle));
  padding: 10px;
}

.pattern-shell-top,
.pattern-shell-side {
  border-radius: 6px;
  background: color-mix(in srgb, var(--text-soft) 18%, var(--surface));
}

.pattern-shell-top {
  grid-column: 1 / -1;
}

.pattern-shell-side {
  grid-row: 2;
}

.pattern-canvas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.pattern-unit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  padding: 4px 6px;
  text-align: center;
  word-break: break-word;
}

.pattern-unit.span-2 {
  grid-column: span 2;
}

.pattern-unit.span-3 {
  grid-column: span 3;
}

.pattern-unit.wide,
.pattern-unit.toolbar,
.pattern-unit.stepper,
.pattern-unit.pager,
.pattern-unit.alert,
.pattern-unit.breadcrumb,
.pattern-unit.search,
.pattern-unit.message {
  grid-column: 1 / -1;
  min-height: 22px;
}

.pattern-unit.span-2 {
  grid-column: span 2;
}

.pattern-unit.span-3 {
  grid-column: span 3;
}

.pattern-unit.table,
.pattern-unit.list,
.pattern-unit.timeline {
  grid-column: span 3;
  min-height: 72px;
}

.pattern-unit.drawer,
.pattern-unit.detail {
  min-height: 72px;
}

.pattern-unit.form,
.pattern-unit.blank,
.pattern-unit.skeleton {
  grid-column: 1 / -1;
}

.pattern-unit.form.short,
.pattern-unit.actions,
.pattern-unit.skeleton,
.pattern-unit.blank,
.pattern-unit.auth-logo {
  grid-column: span 2;
}

.pattern-unit.blank,
.pattern-unit.auth-logo {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface-subtle) 72%, var(--surface));
}

.pattern-unit.span-2 {
  grid-column: span 2;
}

.pattern-unit.span-3 {
  grid-column: span 3;
}

.pattern-unit.metric {
  min-height: 38px;
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface));
}

.pattern-unit.chart {
  min-height: 62px;
  background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface));
}

.pattern-unit.form-flow {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-height: 92px;
  padding: 6px;
  text-align: center;
}

.pattern-flow-title,
.pattern-flow-fieldset-label,
.pattern-flow-field,
.pattern-flow-error,
.pattern-flow-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 18px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  padding: 3px 5px;
  word-break: break-word;
}

.pattern-flow-fieldset {
  display: grid;
  grid-column: 1 / -1;
  gap: 4px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--text-soft) 24%, var(--border));
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-subtle) 42%, var(--surface));
  padding: 4px;
}

.pattern-flow-fieldset-label {
  justify-content: flex-start;
  min-height: 14px;
  padding: 0 2px;
  color: var(--text-soft);
}

.pattern-flow-title {
  grid-column: 1 / -1;
  justify-content: center;
  background: color-mix(in srgb, var(--surface-subtle) 74%, var(--surface));
  color: var(--text-soft);
}

.pattern-flow-field {
  grid-column: 1 / -1;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  background: color-mix(in srgb, var(--surface) 84%, var(--accent-soft));
  color: var(--text-muted);
}

.pattern-flow-error {
  grid-column: 1 / -1;
  justify-content: flex-start;
  border: 1px solid color-mix(in srgb, var(--danger) 34%, var(--border));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: color-mix(in srgb, var(--danger) 88%, var(--text-muted));
  text-align: left;
}

.pattern-flow-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  background: color-mix(in srgb, var(--surface-subtle) 66%, var(--surface));
  color: var(--text-muted);
  text-align: right;
}

.pattern-unit.builder-flow {
  align-items: stretch;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto minmax(34px, 1fr) minmax(34px, 1fr) auto;
  gap: 6px;
  justify-items: stretch;
  min-height: 100px;
  padding: 6px;
}

.pattern-builder-toolbar,
.pattern-builder-panel,
.pattern-builder-selector,
.pattern-builder-workspace,
.pattern-builder-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  padding: 3px 5px;
  text-align: center;
  word-break: break-word;
}

.pattern-builder-toolbar {
  grid-column: 1 / -1;
  justify-content: space-between;
  min-height: 18px;
  background: color-mix(in srgb, var(--surface-subtle) 74%, var(--surface));
  color: var(--text-soft);
}

.pattern-builder-panel {
  grid-column: span 1;
  grid-row: 2 / 4;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  background: color-mix(in srgb, var(--surface) 84%, var(--accent-soft));
  color: var(--text-muted);
}

.pattern-builder-selector {
  grid-column: span 1;
  grid-row: 2 / 4;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--text-soft) 30%, var(--border));
  background: color-mix(in srgb, var(--surface-subtle) 70%, var(--surface));
  color: var(--text-muted);
}

.pattern-builder-workspace {
  grid-column: span 2;
  grid-row: 2 / 4;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  background: color-mix(in srgb, var(--accent-soft) 26%, var(--surface));
  color: var(--text-muted);
}

.pattern-builder-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  min-height: 18px;
  background: color-mix(in srgb, var(--surface-subtle) 66%, var(--surface));
  color: var(--text-muted);
  text-align: right;
}

.pattern-unit.table,
.pattern-unit.list,
.pattern-unit.timeline,
.pattern-unit.nav-stack {
  background: color-mix(in srgb, var(--accent-soft) 30%, var(--surface));
}

.pattern-unit.timeline {
  background: color-mix(in srgb, var(--accent-soft) 26%, var(--surface));
}

.pattern-visual.data-table-workflow .pattern-unit.table {
  grid-column: 1 / -1;
}

.pattern-visual.ux-bulk-action .pattern-unit.table {
  grid-column: 1 / -1;
}

.pattern-unit.drawer,
.pattern-unit.detail,
.pattern-unit.modal {
  border-color: color-mix(in srgb, var(--text-soft) 34%, var(--border));
  background: color-mix(in srgb, var(--surface-subtle) 78%, var(--surface));
}

.pattern-unit.toolbar,
.pattern-unit.actions,
.pattern-unit.stepper,
.pattern-unit.pager,
.pattern-unit.breadcrumb,
.pattern-unit.search,
.pattern-unit.progress,
.pattern-unit.selection,
.pattern-unit.toggle,
.pattern-unit.status,
.pattern-unit.disabled,
.pattern-unit.field,
.pattern-unit.message {
  background: color-mix(in srgb, var(--surface-subtle) 66%, var(--surface));
}

.pattern-unit.stepper {
  background: color-mix(in srgb, var(--surface-subtle) 64%, var(--surface));
}

.pattern-unit.skeleton {
  background: color-mix(in srgb, var(--surface-subtle) 72%, var(--surface));
}

.pattern-unit.blank {
  min-height: 58px;
}

.pattern-unit.alert,
.pattern-unit.message {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: color-mix(in srgb, var(--danger) 88%, var(--text-muted));
}

.pattern-unit.disabled,
.pattern-unit.permission {
  border-style: dashed;
  color: var(--text-soft);
  opacity: 0.78;
}

.foundation-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foundation-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-subtle) 76%, var(--surface));
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
}

.swatch-row,
.type-scale,
.state-line,
.spacing-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.swatch {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.swatch-surface {
  background: var(--surface);
}

.swatch-subtle {
  background: var(--surface-subtle);
}

.swatch-accent {
  background: var(--accent);
}

.swatch-error {
  background: var(--danger);
}

.type-scale span,
.state-line span {
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.spacing-bars span {
  display: inline-flex;
  width: var(--bar);
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
}

.token-matrix {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-subtle));
}

.token-summary {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-subtle));
}

.token-summary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  padding: 12px 14px;
}

.token-summary summary span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.token-summary summary small {
  color: var(--text-muted);
  font-size: 12px;
}

.token-summary .token-matrix {
  border-width: 1px 0 0;
  border-radius: 0;
}

.token-matrix div {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) repeat(2, minmax(88px, auto));
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
}

.token-matrix div:last-child {
  border-bottom: 0;
}

.token-matrix b {
  color: var(--text);
  font-size: 13px;
}

.token-matrix span {
  color: var(--text-muted);
  font-family: "D2Coding", monospace;
  font-size: 12px;
}

.token-matrix.compact {
  gap: 8px;
}

.token-matrix.compact div {
  grid-template-columns: 68px repeat(2, minmax(0, 1fr));
  padding: 8px 10px;
}

.token-matrix.compact b,
.token-matrix.compact span {
  font-size: 12px;
}

.foundation-doc-page {
  display: grid;
  gap: 18px;
}

.foundation-doc-page .section-heading p {
  max-width: 680px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 0;
}

.foundation-doc-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.foundation-summary-card,
.foundation-doc-section,
.state-doc-group,
.type-step,
.foundation-rule-card,
.color-token-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--surface-subtle));
}

.foundation-summary-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  align-content: start;
  padding: 16px;
}

.foundation-summary-card span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.foundation-summary-card strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.foundation-summary-card p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.foundation-doc-section,
.state-doc-group {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.foundation-doc-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.foundation-doc-title-row h3 {
  font-size: 20px;
  margin: 0;
}

.color-token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.color-token-grid.semantic {
  grid-template-columns: 1fr;
}

.color-token-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.color-token-card h4 {
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: "D2Coding", monospace;
  font-size: 13px;
  margin: 0;
}

.color-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.color-swatch-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.color-swatch {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #ffffff 22%, transparent);
}

.color-swatch-row b,
.color-swatch-row code,
.color-swatch-row small {
  display: block;
  overflow-wrap: anywhere;
}

.color-swatch-row b {
  color: var(--text-soft);
  font-size: 11px;
  margin-bottom: 2px;
}

.color-swatch-row code {
  color: var(--text);
  font-family: "D2Coding", monospace;
  font-size: 12px;
}

.color-swatch-row small {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}

.typography-ramp {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.type-step {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.type-step h3 {
  font-size: 16px;
  margin: 10px 0 0;
}

.type-sample {
  color: var(--text);
  font-weight: 800;
}

.type-step dl,
.type-step dl div {
  display: grid;
  gap: 8px;
}

.type-step dl {
  margin: 0;
}

.type-step dl div {
  grid-template-columns: 92px minmax(0, 1fr);
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.type-step dt {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.type-step dd {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
}

.foundation-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.foundation-rule-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
}

.foundation-rule-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.foundation-rule-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.state-doc-grid {
  display: grid;
  gap: 12px;
}

.state-token-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.state-token-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 14px;
}

.state-token-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.state-token-card p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.foundation-baseline-doc {
  display: grid;
  gap: 18px;
}

.baseline-sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.baseline-sample-grid.textual,
.baseline-sample-grid.accessibility,
.baseline-sample-grid.content {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.baseline-sample-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 14px;
}

.baseline-sample-body {
  display: grid;
  gap: 7px;
}

.baseline-sample-body h4 {
  color: var(--text);
  font-size: 15px;
  margin: 0;
}

.baseline-sample-body code {
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-family: "D2Coding", monospace;
  font-size: 12px;
  padding: 4px 8px;
}

.baseline-sample-body p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.icon-baseline-preview,
.spacing-baseline-preview,
.radius-baseline-preview,
.border-baseline-preview,
.shadow-baseline-preview,
.motion-baseline-preview,
.layer-baseline-preview {
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 72%, var(--surface-subtle));
}

.icon-baseline-preview,
.radius-baseline-preview,
.shadow-baseline-preview,
.motion-baseline-preview {
  display: grid;
  place-items: center;
}

.icon-baseline-preview .material-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 20px;
}

.ci-asset-preview {
  display: grid;
  gap: 8px;
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 72%, var(--surface-subtle));
  padding: 10px;
}

.ci-asset-swatch {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.ci-asset-swatch.dark {
  background: #070b13;
}

.ci-asset-swatch img {
  display: block;
  width: 139px;
  height: 24px;
  object-fit: contain;
}

.spacing-baseline-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sample-gap);
  padding: 16px;
}

.spacing-baseline-preview span {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.radius-baseline-preview {
  width: 72px;
  height: 54px;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  justify-self: center;
}

.border-baseline-preview {
  position: relative;
  display: grid;
  place-items: center;
}

.border-baseline-preview::before {
  content: "";
  display: block;
  width: 72%;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

.border-baseline-preview.divider::before {
  height: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}

.border-baseline-preview.focus::before {
  border-width: 2px;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.border-baseline-preview.subtle::before {
  border-color: color-mix(in srgb, var(--border) 46%, transparent);
}

.shadow-baseline-preview {
  width: 72px;
  height: 54px;
  background: var(--surface);
  justify-self: center;
}

.shadow-baseline-preview.base {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 2px 3px rgba(15, 23, 42, 0.12);
}

.shadow-baseline-preview.pressed {
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.18);
}

.shadow-baseline-preview.blur {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 72%, transparent);
}

.motion-baseline-preview::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  transition: transform var(--motion-duration) ease, opacity var(--motion-duration) ease;
}

.baseline-sample-card:hover .motion-baseline-preview::before {
  opacity: 0.72;
  transform: translateX(14px);
}

.layer-baseline-preview {
  position: relative;
  min-height: 112px;
}

.layer-baseline-preview span {
  position: absolute;
  width: 78px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-subtle));
}

.layer-baseline-preview span:nth-child(1) {
  left: calc(50% - 55px);
  top: 24px;
}

.layer-baseline-preview span:nth-child(2) {
  left: calc(50% - 39px + var(--layer-offset));
  top: 36px;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}

.layer-baseline-preview span:nth-child(3) {
  left: calc(50% - 23px + var(--layer-offset));
  top: 48px;
  border-color: color-mix(in srgb, var(--focus) 28%, var(--border));
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 160px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

:is(
  .ai-agent-card,
  .ai-flow-step,
  .ai-prompt-card,
  .contract-card,
  .foundation-teaser-card,
  .component-card,
  .pattern-card,
  .principle-card,
  .role-card,
  .state-card,
  .foundation-summary-card,
  .foundation-doc-section,
  .state-doc-group,
  .type-step,
  .foundation-rule-card,
  .color-token-card,
  .state-token-card,
  .component-doc-info-card,
  .doc-page-side-card,
  .ownership-card,
  .handoff-card,
  .pattern-section-head
) {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-subtle));
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

:is(
  a.ai-agent-card,
  a.component-card,
  .foundation-teaser-card,
  .pattern-card,
  .principle-card,
  .component-doc-info-card,
  .doc-page-side-card
):hover {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
  transform: translateY(-1px);
}

:where(button, [role="button"], a[href], summary, [tabindex]:not(input):not(textarea):not(select)):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 248px;
  }

  .intro-section,
  .detail-layout,
  .model-grid,
  .state-console {
    grid-template-columns: 1fr;
  }

  html[data-locale="ko"] .detail-layout {
    grid-template-columns: 1fr;
  }

  .principle-grid {
    grid-template-columns: 1fr;
  }

  .principle-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-panel {
    grid-template-columns: 1fr;
  }

  .state-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-panel {
    position: static;
  }

  html[data-locale="ko"] .preview-panel.doc-page-aside {
    position: static;
    order: -1;
  }

  .ai-agent-grid,
  .ai-agent-flow,
  .ai-agent-prompts,
  .ai-agent-contract,
  .foundation-teaser,
  .foundation-doc-summary,
  .foundation-grid,
  .typography-ramp,
  .pattern-section-grid,
  .status-grid,
  .status-grid.compact {
    grid-template-columns: 1fr;
  }

  .color-token-grid,
  .color-token-grid.semantic,
  .foundation-rule-grid,
  .state-token-list {
    grid-template-columns: 1fr;
  }

  .ai-agent-asset-list {
    grid-template-columns: 1fr;
  }

  .ai-agent-asset,
  .ai-agent-asset:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }

  .brand,
  .topbar-actions {
    padding: 0;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .global-nav {
    overflow-x: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }

  .side-nav {
    display: block;
    max-height: 46vh;
    overflow: auto;
    margin-top: 12px;
    overscroll-behavior: contain;
  }

  .content {
    padding: 26px 18px 54px;
  }

  .intro-section {
    min-height: 0;
    padding-top: 18px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-row {
    justify-content: flex-start;
  }

  .pattern-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .code-toolbar {
    justify-content: stretch;
  }

  .code-framework-tabs {
    width: 100%;
    min-width: 0;
  }

  .code-block {
    max-width: calc(100vw - 76px);
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.7;
    padding: 48px 14px 14px;
  }

  .code-block-shell .copy-icon-button {
    top: 8px;
    right: 8px;
  }

  .principle-grid,
  .state-model-grid,
  .ownership-grid,
  .handoff-grid,
  .color-mode-row,
  .component-doc-card-grid {
    grid-template-columns: 1fr;
  }

  .component-doc-hero,
  .component-doc-section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .component-doc-title-row {
    display: grid;
  }

  .principle-grid.compact {
    grid-template-columns: 1fr;
  }

  .focus-ring-example-grid {
    grid-template-columns: 1fr;
  }

  .focus-ring-rule-card {
    padding: 18px;
  }

  .focus-ring-rule-copy h3 {
    font-size: 24px;
  }

  .status-legend-list {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
