/* Docs-site chrome — hand-written SHELL (blueprint §2.3): renders generated
   data, never holds an entry of it. Colors are tokens only. Font sizes are
   restated until the text-style extraction stage exists (cf. button.css). */

*,
*::before,
*::after {
  box-sizing: border-box;
}
/* Smooth scrolling is applied by site.js on intercepted same-page anchor
   clicks only — a CSS scroll-behavior would also animate the initial anchor
   positioning after a cross-page load (a visible top-to-anchor sweep). */
body {
  margin: 0;
  background: var(--ll-bg);
  color: var(--ll-fg);
  font-family: var(--ll-font-body);
  font-size: 16px;
  line-height: 1.6;
}
code {
  font-family: var(--ll-font-mono);
  font-size: 13px;
  color: var(--ll-fg-dim);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--ll-z-overlay);
  background: var(--ll-accent);
  color: var(--ll-bg);
  padding: var(--ll-s-1) var(--ll-s-2);
  font-family: var(--ll-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.skip-link:focus {
  left: 0;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ll-s-2);
  padding: var(--ll-s-2) var(--ll-s-4);
  border-bottom: 1px solid var(--ll-rule);
}
.site-title {
  font-family: var(--ll-font-display);
  font-size: 20px;
  color: var(--ll-fg);
  text-decoration: none;
}
.switchers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ll-s-3);
}
.switcher {
  display: flex;
  gap: var(--ll-s-05);
  align-items: center;
  border: 1px solid var(--ll-border-soft);
  padding: var(--ll-s-05) var(--ll-s-1);
  margin: 0;
}
.switcher legend {
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-fg-mute);
  padding: 0 var(--ll-s-05);
}
.switcher button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ll-fg-dim);
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--ll-s-05) var(--ll-s-1);
  cursor: pointer;
}
.switcher button[aria-pressed="true"] {
  border-color: var(--ll-accent);
  color: var(--ll-accent);
}
.switcher button:focus-visible {
  outline: 2px solid var(--ll-accent);
  outline-offset: 2px;
}

.shell {
  display: flex;
}
/* The sidebar stretches with the page so its divider reaches the bottom;
   the sticky behaviour lives on the inner wrapper. */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--ll-rule);
  font-size: 14px;
}
.sidebar-inner {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: var(--ll-s-3) var(--ll-s-2) var(--ll-s-5) var(--ll-s-4);
}
.sidebar a {
  display: block;
  color: var(--ll-fg-dim);
  text-decoration: none;
  padding: var(--ll-s-05) var(--ll-s-1);
}
.sidebar a:hover {
  color: var(--ll-accent);
}
.sidebar a[aria-current="page"] {
  color: var(--ll-accent);
}
.sidebar a:focus-visible {
  outline: 2px solid var(--ll-accent);
  outline-offset: 2px;
}
.registry-link,
.sidebar-label {
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.sidebar-label {
  color: var(--ll-fg-mute);
  margin: var(--ll-s-3) 0 var(--ll-s-05);
  padding: 0 var(--ll-s-1);
}
.nav-list,
.sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Sidebar entry: the name is a plain link; a separate, named <summary>
   chevron toggles the sections (WCAG nested-interactive, fixed 2026-09-10).
   The summary sits on the link's row by absolute positioning; the section
   list still flows below the link. Chevron geometry is fixed ornament
   geometry, like the Button's brackets. */
.nav-item {
  position: relative;
}
.nav-item > a {
  padding-right: var(--ll-s-3);
}
.nav-item > details > summary {
  position: absolute;
  top: 0;
  right: 0;
  /* Matches the link's line box (.sidebar sets font-size: 14px; line-height
     1.6 comes from body) so the chevron centres on the row instead of the
     24px --ll-s-3 default, which is shorter than the row. */
  width: var(--ll-s-3);
  height: calc(var(--ll-s-05) * 2 + 14px * 1.6);
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  color: var(--ll-fg-mute);
}
.nav-item > details > summary::-webkit-details-marker {
  display: none;
}
.nav-item > details > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s;
}
.nav-item > details[open] > summary::before {
  transform: translateY(2px) rotate(225deg);
}
.nav-item > details > summary:hover,
.nav-item > details > summary:focus-visible {
  color: var(--ll-accent);
}
.nav-item > details > summary:focus-visible {
  outline: 2px solid var(--ll-accent);
  outline-offset: 2px;
}
.sub {
  margin-left: var(--ll-s-15);
  border-left: 1px solid var(--ll-border-soft);
}
.sub a {
  font-size: 13px;
  padding-left: var(--ll-s-15);
  border-left: 2px solid transparent;
  margin-left: -1px;
}
/* Scrollspy (site.js): the sub-section currently in view. */
.sub a[aria-current="location"] {
  color: var(--ll-accent);
  border-left-color: var(--ll-accent);
  background: var(--ll-accent-soft);
}

main {
  flex: 1;
  min-width: 0;
  padding: var(--ll-s-5) var(--ll-s-4) var(--ll-s-8);
}
h1,
h2,
h3 {
  scroll-margin-top: var(--ll-s-3);
}
h3 {
  font-family: var(--ll-font-body);
  font-size: 16px;
  margin: var(--ll-s-3) 0 var(--ll-s-05);
}
.facts {
  color: var(--ll-fg-dim);
}

@media (max-width: 900px) {
  .shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--ll-rule);
  }
  .sidebar-inner {
    position: static;
    max-height: none;
  }
}
h1 {
  font-family: var(--ll-font-display);
  font-size: 34px;
  font-weight: 500;
  margin: 0 0 var(--ll-s-2);
}
h2 {
  font-family: var(--ll-font-display);
  font-size: 24px;
  font-weight: 500;
  margin: var(--ll-s-6) 0 var(--ll-s-2);
  padding-top: var(--ll-s-3);
  border-top: 1px solid var(--ll-rule);
}
.notes,
.meta-links {
  color: var(--ll-fg-dim);
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: var(--ll-s-1) var(--ll-s-2);
  border-bottom: 1px solid var(--ll-border-soft);
  vertical-align: top;
}
thead th {
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-fg-mute);
  border-bottom: 1px solid var(--ll-border);
}
tbody th {
  font-weight: 600;
}
a {
  color: var(--ll-accent);
}

.badge {
  display: inline-block;
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 var(--ll-s-1);
  border: 1px solid var(--ll-border);
  color: var(--ll-fg-dim);
  vertical-align: middle;
}
.badge--pass {
  border-color: var(--ll-success);
  color: var(--ll-success);
}
.badge--fail {
  border-color: var(--ll-danger);
  color: var(--ll-danger);
}

.stage,
.accent-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ll-s-4);
  background: var(--ll-surface);
}
.stage {
  flex-wrap: wrap;
  gap: var(--ll-s-3);
  border: 1px solid var(--ll-border-soft);
}
.stage + .code {
  margin-top: 0;
  border-top: 0;
}
.code {
  margin: 0 0 var(--ll-s-3);
  padding: var(--ll-s-2) var(--ll-s-3);
  background: var(--ll-surface-2);
  border: 1px solid var(--ll-border-soft);
  overflow-x: auto;
}
.code code {
  color: var(--ll-fg-dim);
}
.accent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--ll-s-3);
}
.accent-tile {
  position: relative;
  border: 1px solid var(--ll-border-soft);
  padding-top: var(--ll-s-6);
}
/* The Sigil fills the width it is given (its contract): the demo stage and
   the accent tiles give it a fixed slot. Docs shell, not library CSS. */
.stage > .ll-sigil,
.accent-tile > .ll-sigil {
  width: 160px;
}
.accent-name {
  position: absolute;
  top: var(--ll-s-1);
  left: var(--ll-s-2);
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-fg-mute);
}

/* Tokens page: horizontal tab navigation (one tab per section). */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ll-s-05);
  border-bottom: 1px solid var(--ll-rule);
  margin: var(--ll-s-3) 0 var(--ll-s-2);
}
.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ll-fg-dim);
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: var(--ll-s-1) var(--ll-s-2);
  cursor: pointer;
}
.tab:hover {
  color: var(--ll-accent);
}
.tab[aria-selected="true"] {
  color: var(--ll-accent);
  border-bottom-color: var(--ll-accent);
}
.tab:focus-visible {
  outline: 2px solid var(--ll-accent);
  outline-offset: 2px;
}
.tok-panel > h2 {
  border-top: 0;
  padding-top: 0;
  margin-top: var(--ll-s-2);
}

/* Tokens page: swatches, spacing bars, type specimens. The per-token classes
   (.ll-docs-swatch--*, .ll-docs-bar--*, .ll-docs-font--*) are generated into
   lib.css by pnpm docs:build; only the shared shapes live here. */
.swatch {
  display: inline-block;
  width: var(--ll-s-3);
  height: var(--ll-s-2);
  border: 1px solid var(--ll-rule);
  vertical-align: middle;
}
.bar {
  display: inline-block;
  height: var(--ll-s-1);
  background: var(--ll-accent);
  vertical-align: middle;
}
.bar-cell {
  min-width: var(--ll-s-8);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ll-s-2) var(--ll-s-3);
  margin: var(--ll-s-2) 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--ll-s-1);
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-fg-dim);
}
.specimen {
  font-size: 18px;
}

/* Guidelines: golden-rules card + do/don't columns (contract content). */
.golden {
  position: relative;
  border: 1px solid var(--ll-accent);
  background: var(--ll-accent-soft);
  padding: var(--ll-s-3) var(--ll-s-4);
  margin-bottom: var(--ll-s-3);
}
.golden-title,
.dos-title,
.donts-title {
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 var(--ll-s-1);
}
.golden-title {
  color: var(--ll-accent);
}
.golden ol {
  margin: 0;
  padding-left: var(--ll-s-3);
}
.golden li {
  margin-bottom: var(--ll-s-1);
}
.golden li::marker {
  color: var(--ll-accent);
  font-family: var(--ll-font-mono);
}
.dos-donts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--ll-s-3);
}
.dos,
.donts {
  border: 1px solid var(--ll-border-soft);
  border-top: 2px solid var(--ll-success);
  padding: var(--ll-s-2) var(--ll-s-3);
}
.donts {
  border-top-color: var(--ll-danger);
}
.dos-title {
  color: var(--ll-success);
}
.donts-title {
  color: var(--ll-danger);
}
.dos ul,
.donts ul {
  margin: 0;
  padding-left: var(--ll-s-3);
}
.dos li,
.donts li {
  margin-bottom: var(--ll-s-05);
  font-size: 14px;
}

.a11y div {
  margin-bottom: var(--ll-s-2);
}
.a11y dt {
  font-family: var(--ll-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ll-fg-mute);
}
.a11y dd {
  margin: var(--ll-s-05) 0 0;
}

.site-footer {
  border-top: 1px solid var(--ll-rule);
  padding: var(--ll-s-2) var(--ll-s-4);
  color: var(--ll-fg-mute);
  font-size: 13px;
}
