@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #0f172a;
  --bg-alt: #111c34;
  --surface: #16213d;
  --surface-hover: #1b2a4d;
  --border: #263354;
  --border-hover: #3b82f6;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, .14);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, .15);
  --shadow: 0 16px 42px rgba(0, 0, 0, .22);
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(circle at 78% 4%, rgba(59, 130, 246, .1), transparent 30rem), var(--bg); font-family: "Manrope", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }

.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; border-bottom: 1px solid var(--border); background: rgba(15, 23, 42, .82); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid rgba(59, 130, 246, .75); border-radius: 7px; color: #8cbaff; font-family: var(--mono); font-size: 10px; }
.topbar-label { color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; }
.app-shell { width: min(1320px, 92vw); margin: 0 auto; padding: 72px 0 100px; }
.intro { max-width: 700px; margin-bottom: 58px; }
.eyebrow, .section-kicker { margin: 0 0 14px; color: #69a4ff; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 20px; font-size: clamp(2.8rem, 6vw, 5.7rem); line-height: .98; letter-spacing: -.075em; }
h1 span { color: #6ca7ff; }
.intro-copy { max-width: 480px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: rgba(17, 28, 52, .72); box-shadow: var(--shadow); }
.sidebar { padding: 28px 18px 22px; border-right: 1px solid var(--border); background: rgba(15, 23, 42, .48); }
.sidebar-heading, .content-header, .variant-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.04em; }
.component-count, .result-count { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.component-list { display: grid; gap: 7px; margin-top: 32px; }
.component-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); text-align: left; background: transparent; transition: 180ms ease; }
.component-item:hover, .component-item.active { border-color: var(--border); background: var(--surface); color: var(--text); }
.component-item.active { box-shadow: inset 3px 0 var(--accent); }
.component-index { align-self: flex-start; color: var(--faint); font-family: var(--mono); font-size: 10px; }
.component-copy { display: grid; flex: 1; gap: 4px; min-width: 0; }
.component-copy strong { font-size: 12px; font-weight: 700; }
.component-copy small { overflow: hidden; color: var(--faint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.component-arrow { color: var(--faint); transition: transform 180ms ease, color 180ms ease; }
.component-item:hover .component-arrow, .component-item.active .component-arrow { color: var(--accent); transform: translateX(2px); }
.sidebar-note { display: flex; gap: 10px; margin-top: 72px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--faint); font-size: 10px; line-height: 1.6; }
.sidebar-note p { margin: 0; }.sidebar-note strong { color: var(--muted); font-family: var(--mono); font-weight: 400; }.note-icon { display: grid; flex: 0 0 17px; place-items: center; height: 17px; border: 1px solid var(--faint); border-radius: 50%; font-family: Georgia, serif; font-size: 11px; }
.content-panel { min-width: 0; padding: 32px 34px 40px; }.content-header { align-items: flex-end; padding-bottom: 28px; border-bottom: 1px solid var(--border); }.content-header .section-kicker { margin-bottom: 10px; }.toolbar { padding: 22px 0; }.search-field { position: relative; display: flex; align-items: center; }.search-field input { width: 100%; padding: 13px 42px; border: 1px solid var(--border); border-radius: 6px; outline: 0; background: var(--bg-alt); color: var(--text); font-size: 12px; transition: border-color 180ms ease, box-shadow 180ms ease; }.search-field input::placeholder { color: var(--faint); }.search-field input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px var(--accent-soft); }.search-icon { position: absolute; left: 16px; width: 13px; height: 13px; border: 1.5px solid var(--faint); border-radius: 50%; }.search-icon::after { position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1.5px; background: var(--faint); content: ""; transform: rotate(45deg); }.clear-search { position: absolute; right: 9px; width: 28px; height: 28px; border: 0; color: var(--muted); background: transparent; font-size: 20px; }.variant-list { display: grid; gap: 16px; }.variant-card { padding: 22px; border: 1px solid var(--border); border-radius: 9px; background: linear-gradient(155deg, var(--surface), var(--bg-alt)); animation: reveal 420ms both cubic-bezier(.22, 1, .36, 1); animation-delay: var(--card-delay); transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }.variant-card:hover { border-color: rgba(59, 130, 246, .72); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .18); }.variant-title-wrap { display: flex; gap: 12px; min-width: 0; }.variant-number { color: var(--accent); font-family: var(--mono); font-size: 10px; padding-top: 3px; }.variant-header h3 { margin: 0 0 10px; color: var(--text); font-size: 13px; line-height: 1.45; }.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }.tag-list span { padding: 4px 7px; border: 1px solid var(--border); border-radius: 4px; color: var(--faint); font-family: var(--mono); font-size: 9px; }.copy-button { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); background: var(--bg-alt); font-size: 10px; font-weight: 700; transition: 180ms ease; }.copy-button:hover { border-color: var(--border-hover); color: var(--text); background: var(--surface-hover); }.copy-button.copied { border-color: rgba(52, 211, 153, .45); color: var(--success); background: var(--success-soft); }.copy-icon { font-family: var(--mono); font-size: 12px; }.json-viewer { overflow: auto; max-height: 360px; margin: 22px 0 0; padding: 18px; border: 1px solid rgba(38, 51, 84, .75); border-radius: 6px; color: #b9c7dc; background: rgba(15, 23, 42, .8); font-family: var(--mono); font-size: 10px; line-height: 1.75; white-space: pre; }.json-key { color: #8cbaff; }.json-string { color: #a7d8be; }.json-number { color: #e7bd85; }.json-boolean { color: #d6a5e8; }.empty-state { padding: 70px 20px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); text-align: center; }.empty-state span { display: block; margin-bottom: 16px; color: var(--accent); font-size: 30px; }.empty-state strong { display: block; margin-bottom: 7px; font-size: 14px; }.empty-state p { margin: 0; color: var(--faint); font-size: 11px; }.toast { position: fixed; right: 26px; bottom: 26px; z-index: 10; display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid rgba(52, 211, 153, .4); border-radius: 6px; color: #a7f3d0; background: #102b2b; box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: 220ms ease; }.toast.visible { opacity: 1; transform: translateY(0); }.toast-check { color: var(--success); font-size: 14px; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) { .topbar { padding: 0 5vw; }.topbar-label { display: none; }.app-shell { width: 90vw; padding-top: 48px; }.intro { margin-bottom: 38px; } h1 { font-size: clamp(2.8rem, 14vw, 4.5rem); }.workspace { grid-template-columns: 1fr; }.sidebar { border-right: 0; border-bottom: 1px solid var(--border); }.component-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }.sidebar-note { display: none; }.content-panel { padding: 26px 18px 28px; }.variant-card { padding: 17px; }.variant-header { display: grid; gap: 16px; }.copy-button { justify-content: center; width: 100%; }.json-viewer { font-size: 9px; } }
@media (max-width: 430px) { .component-list { grid-template-columns: 1fr; }.content-header { align-items: flex-start; flex-direction: column; gap: 10px; } }

/* Compact browsing layout overrides. */
.app-shell { padding-top: 30px; }
.workspace { min-height: 540px; }
.sidebar-heading { align-items: center; }
.component-search { position: relative; display: flex; align-items: center; margin-top: 22px; }
.component-search input { width: 100%; padding: 10px 36px; border: 1px solid var(--border); border-radius: 6px; outline: 0; background: var(--bg-alt); color: var(--text); font-size: 12px; transition: border-color 180ms ease, box-shadow 180ms ease; }
.component-search input::placeholder { color: var(--faint); }
.component-search input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px var(--accent-soft); }
.component-search .search-icon { left: 13px; }
.component-search .clear-search { right: 4px; }
.select-label { display: block; margin: 18px 0 7px; color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.component-select { width: 100%; padding: 11px 32px 11px 12px; border: 1px solid var(--border-hover); border-radius: 6px; outline: 0; color: var(--text); background-color: var(--surface); font-size: 12px; font-weight: 700; cursor: pointer; }
.component-select:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.component-select option { color: var(--text); background: var(--surface); }
.sidebar-note { margin-top: 42px; }
.intro { display: none; }
.content-panel { padding-top: 28px; }
.variant-card { overflow: hidden; }
.variant-header h3 { margin-bottom: 0; }
.copy-button { border-color: var(--accent); color: #fff; background: var(--accent); box-shadow: 0 5px 16px rgba(59, 130, 246, .2); }
.copy-button:hover { border-color: #6ca7ff; color: #fff; background: #2563eb; }
.copy-button.copied { border-color: rgba(52, 211, 153, .7); color: #a7f3d0; background: #16604d; box-shadow: none; }
.json-viewer { max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 760px) {
  .app-shell { padding-top: 20px; }
  .sidebar-note { display: none; }
  .component-search input, .component-select, .search-field input { font-size: 16px; }
  .component-select { padding-top: 10px; padding-bottom: 10px; }
  .content-panel { padding-top: 24px; }
}

.copy-button {
  width: 118px;
  height: 38px;
  justify-content: center;
  padding: 0;
}

@media (max-width: 760px) {
  .copy-button { width: 118px; }
}