/* Documentation chrome only. Live specimens use Artist components and tokens. */
:root {
  --docs-sidebar: 272px;
  --docs-sidebar-surface: #101c2c;
  --docs-sidebar-hover: #203750;
  --docs-canvas: #f1f4f7;
  --docs-rule: #dce3eb;
}

/* Example-specific artwork assignments through Artist's public hooks. */
.example-art { --art-scrim: linear-gradient(90deg, #071c32ed, #071c3280); }
.example-scene { --art-base: #163652; --art-overlap: 64px; --art-fade: 180px; }
.example-positioned-exhibit { --exhibit-content-width: 100%; --exhibit-height: 760px; --art-scrim: #071c3280; }
.example-video { margin-top: var(--layout-gap); }
.example-portrait img { aspect-ratio: 4 / 5; object-fit: cover; }

body { background: var(--docs-canvas); }
.docs-shell { display: grid; grid-template-columns: var(--docs-sidebar) minmax(0, 1fr); align-items: start; }
.docs-main { min-width: 0; max-width: 1500px; width: 100%; background: var(--surface); box-shadow: 0 0 0 1px #dce3eb80; }
.docs-skip { position: fixed; top: -100px; left: 12px; z-index: 100; padding: 12px 16px; border-radius: var(--control-radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.docs-skip:focus { top: 12px; }

/* Navigation */
.docs-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; scroll-padding-top: 88px; background: var(--docs-sidebar-surface); color: #fff; padding: 22px 14px 40px; font: 400 14px/1.4 var(--font-body); }
.docs-menu > summary { position: sticky; top: 0; z-index: 2; margin: -6px -2px 8px; padding: 12px 10px 16px; background: var(--docs-sidebar-surface); cursor: pointer; list-style: none; }
.docs-menu > summary::-webkit-details-marker { display: none; }
.docs-menu > summary::after { content: none; }
.docs-menu > summary > span:last-child { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: #9fb1c4; }
.docs-wordmark { display: block; font-size: 28px; font-weight: 780; line-height: 1; letter-spacing: -.045em; color: #fff; }
.docs-sidebar a { display: block; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: #c8d8e8; }
.docs-sidebar a:hover, .docs-sidebar a[aria-current] { background: var(--docs-sidebar-hover); color: #fff; }
.docs-home { margin-top: 6px; font-weight: 650; }
.docs-nav-group { margin-top: 20px; }
.docs-nav-group > p { margin: 0 10px 6px; color: #849bb3; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }

/* Page framing */
.docs-header { padding: clamp(42px, 7vw, 88px) clamp(24px, 6vw, 80px); border-bottom: 1px solid var(--docs-rule); background: var(--surface); color: var(--ink); }
.docs-header > * { max-width: 900px; }
.docs-header h1 { margin: 8px 0 0; font-size: clamp(38px, 6vw, 68px); line-height: 1.03; letter-spacing: -.05em; }
.docs-header p:not(.eyebrow) { margin: 18px 0 0; max-width: 760px; font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: var(--muted); }
.docs-header .eyebrow { margin: 0; }
.docs-header .eyebrow a { color: inherit; }
.docs-header .buttons { margin-top: 28px; }
.docs-reading { padding: clamp(36px, 6vw, 72px) clamp(24px, 6vw, 80px); background: var(--surface); }
.docs-reading.docs-compact { padding-block: 28px; }
.docs-reading > * + * { margin-top: 22px; }
.docs-reading > h2 { font-size: clamp(28px, 3vw, 38px); }
.docs-reading > p { max-width: 78ch; }
.docs-reading pre { max-width: 100%; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--docs-rule); border-radius: 12px; background: #f7f9fb; white-space: pre; font-size: var(--size-small); line-height: 1.6; }
.docs-reading code { font-size: .88em; overflow-wrap: anywhere; }
.docs-rule { border-top: 1px solid var(--docs-rule); }
/* Documentation-specific summaries */
.docs-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.docs-swatches > div { display: grid; gap: 3px; min-height: 112px; align-content: end; padding: 18px; border-radius: 12px; }
.docs-swatches code { color: inherit; opacity: .8; }
.docs-type-sample { max-width: var(--measure-lg); padding: clamp(24px, 5vw, 48px); border: 1px solid var(--docs-rule); border-radius: var(--radius); background: #f7f9fb; }
.docs-layout-map { max-width: 820px; }
.docs-layout-map div { padding: 18px; border: 1px solid color-mix(in srgb, var(--primary) 38%, white); border-radius: 12px; background: color-mix(in srgb, var(--primary) 5%, white); }
.docs-layout-map div div { margin-top: 14px; background: color-mix(in srgb, var(--primary) 8%, white); }
.docs-layout-map strong, .docs-layout-map span { display: block; }
.docs-layout-map span { margin-top: 3px; color: var(--muted); font-size: 14px; }
.docs-search { display: grid; gap: 8px; max-width: 620px; font-weight: 650; }
.docs-search .input { background: var(--surface); }

/* Tables and previews */
.docs-preview-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; }
.docs-preview-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border-color); border-radius: 12px; background: var(--docs-canvas); }
.docs-preview { display: block; width: 100%; height: 80vh; min-height: 480px; border: 0; max-width: none; }
.docs-small { font-size: 14px; color: var(--muted); }
.docs-table-scroll { overflow-x: auto; }
.docs-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
.docs-table th, .docs-table td { padding: 14px; border-bottom: 1px solid var(--docs-rule); vertical-align: top; min-width: 140px; }
.docs-table thead { background: var(--surface-secondary); }
.docs-reading > details > * + * { margin-top: 12px; }
.docs-note:target { outline: 3px solid var(--primary-300); outline-offset: -3px; }

.component-anatomy h2 { margin-bottom: 12px; }

/* Existing specimen and diagnostic chrome */
.docs-options { width: 100%; border-collapse: collapse; margin-top: 20px; font: 400 14px/1.5 var(--font-body); text-align: left; }
.docs-options td, .docs-options th { border-bottom: 1px solid #40536a; padding: 10px; overflow-wrap: anywhere; }
.docs-options td:first-child { width: 30%; color: #b9d9ff; }
.docs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; }
.docs-toolbar label { cursor: pointer; }
.docs-toolbar input { margin-right: 8px; accent-color: var(--primary); }
.docs-note { padding: 24px; background: var(--dark-background); color: var(--dark-ink); }
.docs-note h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: 0; }
.docs-note p, .docs-note summary { font-size: 15px; line-height: 1.6; }
.docs-note summary { cursor: pointer; margin-top: 12px; }
.docs-note code { color: #b9d9ff; }
.docs-note pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0 0; font-size: 14px; }
.docs-note label { display: inline-block; margin: 10px 8px 0 0; font-size: 14px; }
.docs-approved, .docs-proposed { display: inline-block; padding: 2px 8px; border-radius: 4px; font: 600 12px/1.6 var(--font-body); vertical-align: middle; }
.docs-approved { background: #c7f2df; color: #164c35; }
.docs-proposed { background: #ffedc5; color: #684813; }
.specimen { background: var(--surface); }
.specimen-alt { background: var(--primary-100); }
.show-guides .specimen.group { outline: 2px solid #ca6500; outline-offset: -2px; background-image: linear-gradient(#ffab4026, #ffab4026), linear-gradient(#ffab4026, #ffab4026); background-size: 100% var(--group-space); background-position: top, bottom; background-repeat: no-repeat; }
.show-guides .specimen .container { outline: 2px dashed #2866d1; outline-offset: -2px; background-image: linear-gradient(#2866d126, #2866d126), linear-gradient(#2866d126, #2866d126); background-size: var(--gutter) 100%; background-position: left, right; background-repeat: no-repeat; }
.show-guides .specimen .content { outline: 1px dotted #13795b; }
.show-guides .specimen .figure { outline: 1px dotted #9649b7; }
.docs-footer { padding: 24px; background: var(--dark-background); color: var(--dark-ink); font-size: 14px; }
.column-guide { padding: 24px 16px; border-radius: 10px; background: var(--primary-100); border: 1px dashed var(--primary); color: var(--primary-700); font: 600 14px/1.5 var(--font-body); overflow-wrap: anywhere; }
.docs-note .select { width: auto; max-width: 100%; min-width: 100px; vertical-align: middle; margin: 6px 8px 6px 0; }
.docs-note .checkbox, .docs-toolbar .checkbox { display: inline-flex; align-items: center; min-height: 44px; margin: 6px 16px 6px 0; padding-block: 0; font-size: var(--control-size); }
.docs-note .checkbox input, .docs-toolbar .checkbox input { margin: 0; }

@media (max-width: 1000px) {
  .docs-shell { display: block; }
  .docs-sidebar { position: relative; z-index: 20; height: auto; max-height: none; padding-block: 10px; }
  .docs-menu > summary { position: relative; margin: 0; padding: 10px; }
  .docs-menu:not([open]) > summary { padding-bottom: 10px; }
  .docs-menu > summary::before { content: 'Menu'; float: right; margin-top: 6px; color: #c8d8e8; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .docs-menu nav { max-height: 68vh; overflow-y: auto; padding-bottom: 18px; }
  .docs-main { max-width: none; }
}

@media (max-width: 700px) {
  .docs-swatches { grid-template-columns: 1fr; }
  .docs-reading pre { white-space: pre; }
}
