.site-header [aria-current="page"] { color: var(--accent-text); }
.workspace-page { background: #f3efea; }
.workspace-page [hidden], .docs-page [hidden] { display: none !important; }
.dash-layout { min-height: calc(100svh - 73px); display: grid; grid-template-columns: 232px minmax(0, 1fr); background: #1c1918; color: #f9f3ee; }
.dash-sidebar { display: flex; flex-direction: column; gap: 25px; min-width: 0; padding: 25px 15px 15px; background: #231f1d; border-right: 1px solid #3c3531; }
.dash-space { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 700; }
.dash-space img { width: 32px; height: 32px; }
.dash-space small { display: block; margin-top: 2px; font-size: .78rem; color: #bcafa7; font-weight: 400; }
.dash-nav { display: flex; flex-direction: column; gap: 5px; }
.dash-nav a { display: flex; align-items: center; gap: 12px; padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; color: #d8cdc5; min-height: 39px; }
.dash-nav a span { width: 18px; text-align: center; font: 1.18rem/1 var(--mono); }
.dash-nav [aria-current], .dash-nav a:hover { background: #3a2823; color: #ffad9a; border-color: #57362d; }
.dash-source { margin-top: auto; padding: 14px 11px 4px; border-top: 1px solid #3c3531; overflow-wrap: anywhere; }
.source-name { display: flex; gap: 8px; align-items: center; font-size: .89rem; }
.source-name span { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #f6775d; }
.dash-source p { color: #c3b6ae; font-size: .83rem; line-height: 1.45; margin: 7px 0 11px; }
.dash-source #import-status { margin-bottom: 0; }
.dash-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 5px 10px; border: 1px solid #594a43; border-radius: 6px; background: #2c2522; color: #f4e6de; font-size: .86rem; }
.dash-button:hover { background: #412d26; border-color: #a66e60; }
#reset-source { margin-top: 6px; }
.dash-main { width: min(100%, 1470px); min-width: 0; padding: clamp(20px, 3.4vw, 49px); }
.dash-heading .eyebrow { color: #ffac99; }
.dash-heading h1 { margin: 8px 0 0; font-size: clamp(2.35rem, 4vw, 3.75rem); letter-spacing: -.065em; }
.dash-heading p { margin-top: 9px; color: #cbbeb6; line-height: 1.5; }
.dash-controls { margin: 23px 0 19px; display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.dash-controls label { display: grid; gap: 5px; min-width: 0; color: #d6c8bf; font-size: .87rem; font-weight: 600; }
.dash-controls input, .dash-controls select { width: 100%; min-height: 39px; min-width: 0; border: 1px solid #4a403a; border-radius: 6px; padding: 0 10px; background-color: #272220; color: #f8eee8; font: inherit; }
.dash-controls select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23d9cdc4' stroke-width='1.3'/%3E%3C/svg%3E"); background-position: right 8px center; background-repeat: no-repeat; }
.dash-controls input::placeholder { color: #b0a29a; }
.dash-search { flex: 1 1 180px; max-width: 290px; }
.dash-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.dash-card { min-width: 0; background: #241f1d; border: 1px solid #403630; border-radius: 9px; padding: clamp(12px, 1.6vw, 20px); }
.dash-stat small, .dash-meta { display: block; color: #c7b9b0; font-size: .85rem; }
.dash-stat strong { display: block; margin-top: 6px; font-size: clamp(1.25rem, 3.1vw, 2.25rem); letter-spacing: -.04em; }
.dash-stat .has-error { color: #ff9b87; }
.dash-card h2 { font-size: 1.07rem; letter-spacing: -.02em; }
.dash-card .dash-meta { margin-top: 5px; }
.dash-chart { display: block; width: 100%; height: clamp(130px, 21vw, 245px); margin-top: 9px; }
.dash-times { display: flex; justify-content: space-between; gap: 4px; margin-top: 4px; color: #c7b9b0; font: .75rem var(--mono); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; align-items: start; }
.dash-table-wrap { overflow-x: auto; margin-top: 12px; }
.dash-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
.dash-table th, .dash-table td { padding: 9px 8px; border-bottom: 1px solid #403630; }
.dash-table th { color: #c7b9b0; font-size: .78rem; white-space: nowrap; }
.dash-table td:first-child { padding-left: 0; }
.dash-table th:first-child { padding-left: 0; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table time, .signal-id { font-family: var(--mono); color: #cabcb3; font-size: .8rem; }
.short-field { white-space: nowrap; }
.signal-status { font: .78rem var(--mono); color: #a9d6aa; }
.signal-status.error { color: #ffa08d; }
.signal-status.warn { color: #f7ca87; }
.signal-status.debug { color: #bdb9d8; }
.dash-message { min-width: 9rem; overflow-wrap: anywhere; }
.dash-empty { margin-top: 13px; color: #c7b9b0; line-height: 1.5; }
.dash-action { border: 0; background: transparent; color: #ffaf9d; padding: 4px 0; font-size: .87rem; font-weight: 650; text-align: left; }
.dash-action:hover { text-decoration: underline; }
.dash-metric { margin-top: 12px; }
.dash-metric select { max-width: 100%; }
.signal-pages { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.signal-pages div { display: flex; gap: 6px; }
.signal-pages button:disabled { opacity: .45; cursor: default; }
.trace-dialog { position: fixed; width: min(700px, calc(100% - 26px)); max-height: calc(100% - 26px); overflow: auto; padding: 19px; background: #241f1d; color: #faf0ea; border: 1px solid #59483f; border-radius: 11px; }
.trace-dialog::backdrop { background: #120e0bd0; }
.trace-dialog form { display: flex; justify-content: end; }
.trace-dialog h2 { margin-top: 8px; overflow-wrap: anywhere; }
.trace-dialog h3 { margin: 17px 0 6px; font-size: .98rem; }
.trace-summary { margin-top: 8px; color: #cbbeb6; }
.trace-attributes { display: block; color: #c7b9b0; margin-top: 4px; line-height: 1.45; overflow-wrap: anywhere; }
.waterfall { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(50px, 1fr) auto; align-items: center; gap: 8px; margin-top: 9px; padding: 6px 0; border-bottom: 1px solid #403630; font-size: .83rem; }
.waterfall > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.docs-layout { display: grid; grid-template-columns: 210px minmax(0, 820px); gap: clamp(24px, 7vw, 95px); align-items: start; padding-block: 42px 74px; }
.docs-sidebar { position: sticky; top: 26px; border-right: 1px solid var(--line); padding: 9px 14px 9px 0; }
.docs-sidebar nav { display: grid; gap: 3px; }
.docs-sidebar strong { color: var(--ink); margin-bottom: 5px; }
.docs-sidebar a { padding: 6px 6px 6px 0; }
.docs-main { min-width: 0; }
.docs-main h1 { font-size: clamp(2.85rem, 7vw, 5.35rem); margin: 10px 0 0; }
.docs-main .docs-intro { font-size: clamp(1.07rem, 2.5vw, 1.26rem); margin-top: 15px; max-width: 640px; }
.docs-main p, .api-list dd { color: var(--muted); line-height: 1.58; }
.doc-section { margin-top: 39px; padding-top: 20px; border-top: 1px solid var(--line); }
.doc-section h2 { font-size: clamp(1.55rem, 4vw, 2.18rem); letter-spacing: -.05em; margin-bottom: 8px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 9px 13px; align-items: center; margin-top: 14px; }
.doc-actions .button { min-height: 42px; padding-inline: 14px; }
.doc-actions button:disabled { opacity: .53; cursor: default; transform: none; }
.doc-code { min-width: 0; margin-top: 13px; background: #211e1c; color: #f4e7df; border: 1px solid #3b342f; border-radius: 8px; }
.doc-code-bar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; padding: 6px 10px; border-bottom: 1px solid #3b342f; font-size: .86rem; }
.doc-code-bar > button { margin-left: auto; color: #ffb2a1; background: #382821; border: 1px solid #664337; padding: 4px 8px; border-radius: 5px; font-size: .8rem; }
.doc-code-bar > button:hover { background: #59372c; }
.doc-code pre { overflow-x: auto; margin: 0; padding: 13px; font: .86rem/1.65 var(--mono); scrollbar-color: #6c5045 #211e1c; }
.doc-code pre code { color: #ffd0ba; }
.doc-link { color: var(--accent-text); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
#example-result:not(:empty) { margin-top: 9px; }
.api-list { margin: 12px 0; }
.api-list > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.api-list dt { color: var(--accent-text); font-weight: 650; overflow-wrap: anywhere; }
.api-list dd { margin: 5px 0 0; }
.api-list code, .doc-section p code { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 825px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid #3c3531; }
  .dash-space { display: none; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .dash-nav a { gap: 5px; padding-inline: 6px; }
  .dash-source { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0 0; }
  .dash-source p { display: none; }
  .dash-source #import-status:not(:empty) { display: block; width: 100%; margin: 0; }
  #reset-source { margin-top: 0; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 21px; }
  .docs-sidebar { position: static; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 11px; }
  .docs-sidebar nav { display: flex; flex-wrap: wrap; gap: 3px 11px; }
  .docs-sidebar strong { width: 100%; margin: 0; }
}
@media (max-width: 600px) {
  .dash-main { padding: 17px 12px 30px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-stats { gap: 5px; }
  .dash-stat { padding: 9px; }
  .dash-stat small { font-size: .76rem; }
  .dash-controls label { flex: 1 1 120px; }
  .dash-controls .dash-search { max-width: 100%; }
}
