:root {
  color-scheme: dark;
  --bg: #050505;
  --surface-1: #0c0c0c;
  --surface-2: #121212;
  --surface-3: #1e1e1e;
  --border: #2a2a2a;
  --border-strong: #373737;
  --text: #e6e6e6;
  --text-sub: #9b9b9b;
  --text-dim: #696969;
  --accent: #c59fff;
  --accent-strong: #9c58f0;
  --success: #45bb00;
  --danger: #ff8272;
  --radius: 4px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 68% -20%, rgba(156,88,240,.12), transparent 34rem), var(--bg); }
button, input { font: inherit; }
a { color: inherit; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 10; padding: 10px 14px; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 16px; }
.masthead { position: sticky; top: 0; z-index: 5; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--border); background: rgba(5,5,5,.88); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--text); color: var(--bg); font-weight: 800; }
.freshness { color: var(--text-dim); font-size: 12px; }
.layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar { position: sticky; top: 64px; height: calc(100vh - 64px); display: flex; flex-direction: column; padding: 28px 16px 20px; border-right: 1px solid var(--border); background: rgba(5,5,5,.64); }
.eyebrow { margin: 0 0 12px; color: var(--text-dim); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
#tabs { display: grid; gap: 3px; }
.nav-item { display: flex; justify-content: space-between; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius); color: var(--text-sub); background: transparent; cursor: pointer; text-align: left; }
.nav-item:hover, .nav-item:focus-visible { color: var(--text); background: var(--surface-2); outline: none; }
.nav-item.is-active { color: var(--text); background: var(--surface-3); }
.nav-item span { color: var(--text-dim); font-size: 12px; }
.sidebar-note { margin-top: auto; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-sub); font-size: 12px; line-height: 1.5; }
.sidebar-note strong { color: var(--text); }
.sidebar-note p { margin: 5px 0 0; }
main { min-width: 0; padding: 72px clamp(28px, 6vw, 96px); }
.hero { max-width: 820px; }
h1 { max-width: 760px; margin: 0; font-size: clamp(40px, 6vw, 76px); line-height: .98; letter-spacing: -.065em; font-weight: 550; }
.lede { max-width: 650px; margin: 24px 0 0; color: var(--text-sub); font-size: 18px; line-height: 1.55; }
.search { display: flex; align-items: center; gap: 10px; max-width: 720px; margin-top: 38px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: rgba(18,18,18,.85); box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(197,159,255,.12); }
.search input { min-width: 0; flex: 1; padding: 14px 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search input::placeholder { color: var(--text-dim); }
kbd { padding: 2px 6px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text-dim); background: var(--surface-1); font-size: 11px; }
#results { margin-top: 56px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat, .panel { border: 1px solid var(--border); border-radius: 8px; background: linear-gradient(145deg, rgba(30,30,30,.72), rgba(12,12,12,.72)); }
.stat { padding: 22px; }
.stat strong { display: block; font-size: 36px; letter-spacing: -.04em; }
.stat span { color: var(--text-sub); font-size: 13px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 48px 0 16px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--text-dim); font-size: 13px; }
.source-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--border); }
.source-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 16px; background: var(--surface-1); text-decoration: none; }
.source-row:hover { background: var(--surface-2); }
.source-row span { color: var(--text-sub); }
.source-row small { color: var(--text-dim); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.component-card { overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-1); }
.preview { position: relative; display: grid; place-items: center; min-height: 190px; padding: 24px; overflow: hidden; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #0b0b0b, #17121c); }
.preview::before { content: ""; position: absolute; inset: 0; opacity: .45; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(to bottom, black, transparent); }
.preview img { position: relative; max-width: 100%; max-height: 160px; object-fit: contain; }
.mock-component { position: relative; width: min(100%, 230px); padding: 16px; border: 1px solid var(--border-strong); border-radius: 4px; background: #0c0c0c; transition: .16s ease; }
.mock-component[data-state*="hover"] { transform: translateY(-2px); background: #191919; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.mock-component[data-state*="selected"], .mock-component[data-state*="active"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mock-component[data-state*="error"] { border-color: var(--danger); }
.mock-component[data-state*="disabled"] { opacity: .4; }
.mock-component strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-component span { display: block; margin-top: 5px; color: var(--text-sub); font-size: 12px; }
.card-body { padding: 16px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-heading h3 { margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.figma-link { color: var(--text-dim); font-size: 12px; text-decoration: none; }
.figma-link:hover { color: var(--accent); }
.description { min-height: 38px; margin: 9px 0 14px; color: var(--text-sub); font-size: 12px; line-height: 1.55; }
.states { display: flex; flex-wrap: wrap; gap: 6px; }
.state-button { padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-sub); background: transparent; font-size: 11px; cursor: pointer; }
.state-button:hover, .state-button:focus-visible, .state-button.is-active { border-color: var(--accent-strong); color: var(--text); background: rgba(156,88,240,.12); outline: 0; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); gap: 8px; }
.icon-card { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-1); cursor: pointer; }
.icon-card:hover, .icon-card:focus-visible { border-color: var(--border-strong); background: var(--surface-2); outline: 0; }
.icon-glyph { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 28px; border: 1px solid var(--border); border-radius: 5px; color: var(--accent); background: var(--surface-3); }
.icon-glyph img { width: 24px; height: 24px; }
.icon-card span { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.color-card { overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-1); }
.swatch { height: 118px; border-bottom: 1px solid var(--border); }
.color-meta { display: flex; justify-content: space-between; gap: 12px; padding: 12px; font-size: 12px; }
.color-meta code { color: var(--text-sub); }
.rules-list { display: grid; gap: 12px; }
.rule-card { padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-1); }
.rule-card h3 { margin: 0 0 12px; }
.rule-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.rule-columns h4 { margin: 0 0 7px; color: var(--text-dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rule-columns ul { margin: 0; padding-left: 18px; color: var(--text-sub); font-size: 13px; line-height: 1.55; }
.empty { padding: 70px 20px; border: 1px dashed var(--border-strong); border-radius: 8px; text-align: center; }
.empty h2 { margin: 0; }
.empty p { color: var(--text-sub); }
.status-banner { margin-bottom: 20px; padding: 12px 14px; border: 1px solid rgba(255,189,23,.25); border-radius: 6px; color: #fff8a2; background: rgba(255,189,23,.06); font-size: 12px; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .masthead { padding: 0 16px; }
  .freshness { display: none; }
  .layout { display: block; }
  .sidebar { position: sticky; top: 64px; z-index: 4; width: 100%; height: auto; padding: 8px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); background: rgba(5,5,5,.94); }
  .sidebar > .eyebrow, .sidebar-note { display: none; }
  #tabs { display: flex; width: max-content; }
  .nav-item { gap: 8px; }
  main { padding: 48px 18px; }
  .stats { grid-template-columns: 1fr; }
  .rule-columns { grid-template-columns: 1fr; }
}

/* Carbon-style documentation shell, using Warp tokens and content. */
:root { color-scheme: light; --bg:#fff; --surface-1:#fff; --surface-2:#f4f4f4; --surface-3:#e8e8e8; --border:#e0e0e0; --border-strong:#8d8d8d; --text:#161616; --text-sub:#525252; --text-dim:#6f6f6f; --accent:#8b3dff; --accent-strong:#6929c4; }
body { background:var(--bg); }
.masthead { height:48px; padding:0 16px; background:#161616; border:0; color:#fff; }
.brand { text-decoration:none; }
.brand-mark { width:24px; height:24px; border-radius:2px; background:#8b3dff; color:#fff; }
.freshness { color:#a8a8a8; }
.search-trigger { display:flex; align-items:center; gap:20px; margin-left:auto; margin-right:24px; padding:7px 12px; border:1px solid #525252; color:#fff; background:#262626; cursor:pointer; }
.search-trigger kbd { color:#c6c6c6; background:#161616; border-color:#525252; }
.layout { grid-template-columns:256px minmax(0,1fr); min-height:calc(100vh - 48px); }
.sidebar { top:48px; height:calc(100vh - 48px); padding:24px 0 20px; background:#f4f4f4; border-color:#e0e0e0; overflow-y:auto; }
.sidebar .eyebrow { padding:0 16px; }
.component-label { display:flex; justify-content:space-between; margin-top:28px; }
#tabs { gap:0; }
.nav-item,.component-link { min-height:40px; padding:10px 16px; border:0; border-radius:0; color:#525252; background:transparent; text-align:left; text-decoration:none; cursor:pointer; }
.component-nav { display:grid; }
.nav-item:hover,.component-link:hover { color:#161616; background:#e8e8e8; }
.nav-item.is-active,.component-link.is-active { padding-left:12px; border-left:4px solid var(--accent); color:#161616; background:#fff; }
.sidebar-note { margin:28px 16px 0; border-radius:0; background:#fff; }
main { padding:64px clamp(32px,7vw,112px); }
.hero { max-width:960px; }
h1 { font-size:clamp(42px,6vw,72px); font-weight:400; line-height:1.08; letter-spacing:-.045em; }
.lede { max-width:720px; color:#525252; font-size:20px; }
.search { max-width:760px; border-radius:0; background:#f4f4f4; box-shadow:none; }
.search:focus-within { border-color:#161616; box-shadow:inset 0 -2px 0 var(--accent); }
.search input { color:#161616; }
.stat,.panel,.source-list,.component-card,.color-card,.rule-card { border-radius:0; background:#fff; }
.stat { border-top:3px solid #161616; }
.component-directory { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid var(--border); border-left:1px solid var(--border); }
.component-directory a { min-height:112px; display:flex; flex-direction:column; justify-content:space-between; padding:18px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); color:#161616; text-decoration:none; }
.component-directory a:hover { background:#f4f4f4; box-shadow:inset 0 -3px 0 var(--accent); }
.component-directory span { font-size:18px; }
.component-directory small { color:#6f6f6f; }
.component-directory.large { grid-template-columns:repeat(2,minmax(0,1fr)); }
.component-header { max-width:960px; padding:24px 0 48px; }
.component-header h1 { font-size:56px; }
.component-header>p:not(.eyebrow) { max-width:720px; color:#525252; font-size:18px; line-height:1.5; }
.title-row { display:flex; align-items:center; gap:16px; }
.status-pill { padding:4px 8px; color:#198038; background:#defbe6; font-size:12px; }
.resource-links { display:flex; gap:20px; margin-top:24px; color:#525252; font-size:14px; }
.resource-links a { color:#6929c4; text-decoration:none; }
.doc-tabs { display:flex; border-bottom:1px solid #8d8d8d; }
.doc-tabs a { padding:14px 18px; color:#525252; text-decoration:none; }
.doc-tabs a.is-active { box-shadow:inset 0 -3px 0 var(--accent); color:#161616; font-weight:600; }
.component-results { margin-top:0!important; }
.doc-layout { display:grid; grid-template-columns:minmax(0,880px) 180px; gap:64px; align-items:start; }
.doc-section { padding:48px 0; border-bottom:1px solid var(--border); }
.doc-heading { display:flex; align-items:center; gap:8px; margin-bottom:20px; }
.doc-heading h2 { margin:0; font-size:30px; font-weight:400; }
.doc-heading a { color:#8d8d8d; text-decoration:none; }
.body-copy,.doc-section>p { max-width:720px; color:#525252; line-height:1.65; }
.on-this-page { position:sticky; top:72px; display:grid; gap:12px; padding-top:48px; font-size:13px; }
.on-this-page a { color:#525252; text-decoration:none; }
.on-this-page a:hover { color:#6929c4; }
.demo-controls { display:flex; gap:1px; background:#e0e0e0; border:1px solid #e0e0e0; }
.demo-controls label { flex:1; display:grid; gap:6px; padding:10px 12px; color:#6f6f6f; background:#f4f4f4; font-size:12px; }
.demo-controls select { border:0; color:#161616; background:transparent; font:inherit; font-size:14px; }
.demo-stage { min-height:340px; display:grid; place-items:center; padding:48px; border:1px solid #e0e0e0; border-top:0; background:#fff; }
.demo-note { margin:10px 0 0; color:#6f6f6f!important; font-size:12px; }
.live-demo { width:min(100%,680px); }
.live-demo.theme-dark { padding:32px; color:#f4f4f4; background:#161616; }
.figma-preview { display:grid; gap:16px; margin:0; text-align:center; }
.figma-preview img { max-width:100%; max-height:420px; margin:auto; object-fit:contain; }
.figma-preview figcaption { color:#6f6f6f; font-size:12px; }
.preview-pending { max-width:480px; padding:24px; border-left:4px solid #8a3ffc; color:#161616; background:#f4f4f4; }
.preview-pending p { color:#525252; line-height:1.5; }
.preview-pending a { color:#6929c4; text-decoration:none; }
.mock-component,.demo-row,.demo-card,.demo-selectable,.demo-input,.demo-chart { color:#161616; background:#fff; }
.demo-selectable { width:100%; display:flex; gap:10px; padding:12px; border:0; text-align:left; }
.demo-selectable:hover { background:#f4f4f4; }
.demo-row { min-width:420px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; padding:14px; border:1px solid #e0e0e0; }
.demo-row span:nth-child(2) { display:grid; }
.demo-row small { color:#6f6f6f; }
.demo-row>b { color:#6929c4; font-size:12px; }
.demo-avatar { width:32px; height:32px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#8b3dff; }
.demo-card { width:320px; padding:20px; border:1px solid #e0e0e0; box-shadow:0 4px 12px #0001; }
.demo-card p { color:#6f6f6f; }
.demo-card button,.demo-input button { padding:9px 14px; border:0; color:#fff; background:#161616; }
.demo-badge { padding:5px 10px; border-radius:999px; color:#6929c4; background:#f6f2ff; }
.demo-input { width:min(100%,560px); display:grid; gap:8px; padding:16px; border:1px solid #e0e0e0; }
.demo-input textarea { min-height:90px; padding:12px; border:1px solid #8d8d8d; resize:vertical; }
.demo-chart { width:100%; padding:16px; border-radius:8px; box-shadow:0 8px 28px #0002; }
.demo-chart>div:first-child { display:flex; align-items:center; justify-content:space-between; }
.demo-chart>div>span { color:#6f6f6f; font-size:12px; }
.score-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:3px; margin-top:16px; padding:3px; background:#f4f4f4; }
.score-grid span { display:grid; gap:4px; padding:12px; background:#fff; }
.score-grid i { height:10px; margin-top:8px; background:linear-gradient(90deg,#8b3dff 75%,#e8daff 75%); }
.guidance-grid,.do-dont { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:28px; }
.guidance-grid>div,.do-dont>div { padding:20px; background:#f4f4f4; }
.guidance-grid h3 { margin-top:0; }
.missing-guidance { color:#6f6f6f!important; font-style:italic; }
.do-dont>div>span { display:block; margin:-20px -20px 16px; padding:8px 20px; color:#fff; font-weight:600; }
.do>span { background:#198038; }.dont>span { background:#da1e28; }
.evidence-list { display:grid; gap:1px; margin-top:20px; background:#e0e0e0; }
.evidence-list a { display:grid; gap:6px; padding:16px; color:#161616; background:#f4f4f4; text-decoration:none; }
.evidence-list span { color:#525252; font-size:13px; }
.source-callout { margin-top:24px; padding:18px; border-left:4px solid var(--accent); background:#f4f4f4; }
.guidance-source { margin:24px 0; padding:16px 18px; border-left:4px solid #4589ff; background:#edf5ff; }
.guidance-source p { margin:6px 0; color:#525252; }
.guidance-source a { color:#0f62fe; text-decoration:none; }
.rule-section { margin-top:28px; padding-top:4px; }
.rule-section h3 { margin-bottom:10px; }
.rule-section li { margin-bottom:8px; line-height:1.5; }
table { width:100%; border-collapse:collapse; }
th,td { padding:14px; border-bottom:1px solid #e0e0e0; text-align:left; vertical-align:top; }
th { background:#f4f4f4; font-size:13px; }
.icon-card { border-radius:0; background:#fff; }
.icon-glyph { border-radius:0; background:#f4f4f4; }
@media(max-width:980px){.doc-layout{grid-template-columns:1fr}.on-this-page{display:none}.component-directory{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.masthead{top:0}.search-trigger,.freshness{display:none}.sidebar{top:48px;padding:8px 12px}.component-label,.component-nav{display:none}.layout{display:block}.component-directory,.component-directory.large,.guidance-grid,.do-dont{grid-template-columns:1fr}.doc-tabs{overflow-x:auto}.demo-controls{display:grid}.demo-stage{padding:24px}.score-grid{grid-template-columns:1fr}.demo-row{min-width:0;width:100%}}
