/* base.css */
/* Global tokens, resets, and page defaults. */

@font-face {
  font-family: "TheoryLand Paper";
  src: url("/vendor/lm/lmroman10-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f8f8f6;
  --ink: #171b24;
  --muted: #5f6675;
  --line: #d7dbe3;
  --accent: #124a8c;
  --shell-bg: #1c1b22;
  --shell-chrome-top: #2b2a33;
  --shell-chrome-bottom: #1c1b22;
  --shell-ink: #f1f4f7;
  --shell-muted: #d4dbe3;
  --shell-line: rgba(255, 255, 255, 0.14);
  --shell-line-soft: rgba(255, 255, 255, 0.09);
  --viewer-bg: #2a2a2eff;
  --paper-bg: #ffffff;
  --font-sans: "IBM Plex Sans", "Liberation Sans", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-figure-label:
    "TheoryLand Paper",
    "Latin Modern Roman",
    "Computer Modern Serif",
    "CMU Serif",
    "STIX Two Text",
    "Iowan Old Style",
    "Palatino Linotype",
    Palatino,
    "Georgia",
    serif;
  --paper-page-width: 1080px;
  --paper-a4-min-height: 1527.35px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  background: var(--shell-bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

html.theoryland-home-route body {
  background: var(--viewer-bg);
  color: var(--shell-ink);
}

[hidden] {
  display: none !important;
}

#main,
.home-header-html {
  display: contents;
}


/* shell.css */
/* Shell layout, sidebar, viewer stage, and chrome controls. */

.site-shell {
  --site-sidebar-width: 229px;
  --site-sidebar-float-gap-left: 10px;
  --site-sidebar-float-gap-right: 11px;
  --site-sidebar-float-gap-top: 10px;
  --site-sidebar-float-gap-bottom: 14px;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: var(--site-sidebar-width) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--shell-bg);
}

.site-shell.sidebar-collapsed {
  --site-sidebar-width: 0px;
}

.site-shell-topbar {
  grid-column: 1 / -1;
  min-width: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.78);
}

.site-shell-footer {
  grid-column: 1 / -1;
  min-width: 0;
}

.site-sidebar {
  position: relative;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding:
    var(--site-sidebar-float-gap-top)
    var(--site-sidebar-float-gap-right)
    var(--site-sidebar-float-gap-bottom)
    var(--site-sidebar-float-gap-left);
  overflow: visible;
  background: var(--viewer-bg);
}

.site-sidebar-inner {
  height: 100%;
  min-height: 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--shell-line-soft);
  border-radius: 11px;
  background: var(--shell-bg);
  box-shadow:
    0 18px 32px rgba(8, 11, 16, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.03);
}

.site-shell.sidebar-collapsed .site-sidebar {
  padding: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-shell.sidebar-collapsed .site-sidebar-inner {
  display: none;
}

.site-tree {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.site-tree-group {
  border-top: 0;
  padding-top: 10px;
}

.site-tree-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.site-tree-group summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 2px;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
  user-select: none;
  color: var(--shell-muted);
}

.site-tree-group summary::-webkit-details-marker {
  display: none;
}

.site-tree-group summary::before {
  content: "▾";
  width: 10px;
  font-size: 11px;
  line-height: 1;
  opacity: 0.7;
  transform: translateY(-1px);
}

.site-tree-group[open] summary {
  color: #c3cfdf;
}

.site-tree-group:not([open]) summary::before {
  content: "▸";
}

.site-tree-list {
  list-style: none;
  margin: 9px 0 0;
  padding: 0 0 0 12px;
  display: grid;
  gap: 3px;
  border-left: 0;
}

.site-tree-button,
.site-tree-empty {
  position: relative;
  display: block;
  width: 100%;
  font: inherit;
  font-family: inherit;
  padding: 4px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c1c8d2;
  text-align: left;
  text-decoration: none;
  line-height: 1.38;
  font-size: 0.86rem;
}

.site-tree-empty {
  color: #9aa4b2;
}

.site-tree-button {
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease;
}

.site-tree-button:focus-visible {
  outline: 2px solid rgba(238, 243, 248, 0.42);
  outline-offset: 2px;
}

.site-tree-button:hover {
  color: #e4eaf1;
  background: rgba(255, 255, 255, 0.015);
}

.site-tree-button.active {
  background: rgba(255, 255, 255, 0.024);
  color: #edf2f8;
  font-weight: 500;
}

.site-viewer {
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--viewer-bg);
}

.site-viewer-stack {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.site-viewer-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper-bg);
}

.site-viewer-scroll-paper {
  background: var(--viewer-bg);
}

.site-viewer-scroll-demo {
  background: var(--viewer-bg);
}

.site-document-viewport {
  min-height: 100%;
  padding: 10px 36px 44px;
}

.site-document-page-sizer {
  position: relative;
  width: auto;
  height: auto;
  margin: 0 auto;
}

.site-document-page {
  --document-scale: 1;
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--paper-page-width);
  transform: translateX(-50%) scale(var(--document-scale));
  transform-origin: top center;
  will-change: transform;
  background: var(--paper-bg);
  box-shadow:
    0 24px 54px rgba(18, 24, 34, 0.18),
    0 1px 0 rgba(23, 27, 36, 0.08);
}

.site-document-page-demo {
  --demo-page-pad-top: 90px;
  --demo-page-pad-x: 95px;
  --demo-page-pad-bottom: 75px;
  --demo-paper-body-min-height: calc(
    var(--paper-a4-min-height) - var(--demo-page-pad-top) - var(--demo-page-pad-bottom) - 13.5rem
  );
  height: var(--paper-a4-min-height);
  min-height: var(--paper-a4-min-height);
  padding: var(--demo-page-pad-top) var(--demo-page-pad-x) var(--demo-page-pad-bottom);
}

.site-document-page-paper {
  padding: 34px 40px 44px;
  background: transparent;
  box-shadow: none;
}

.site-paper-document-canvas-frame:not([data-paper-render-ready="true"]) [data-tl-role="paper-overlay-layer"] {
  opacity: 0;
  pointer-events: none;
}

.site-persistent-viewer-content {
  width: 100%;
}

.site-viewer-surface {
  min-height: 100%;
}

.site-viewer-surface-demo {
  padding: 0 30px 40px;
}

.site-document-controls {
  overflow: visible;
  background: transparent;
}

.site-document-controls-body {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid var(--shell-line);
  background: #2b2a33;
  box-shadow: 0 16px 28px rgba(10, 14, 18, 0.22);
}

.site-document-controls-rim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 32px;
  padding: 4px 10px 6px 9px;
  background: #38383dff;
  box-shadow: 0 1px 0 rgba(20, 24, 29, 0.18);
}

.site-document-controls-rim-left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  height: 100%;
  min-width: 0;
}

.site-chrome-export-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.site-chrome-home-link {
  flex: 0 0 auto;
  text-decoration: none;
  line-height: 0;
}

.site-chrome-mark-image {
  display: block;
  width: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.site-chrome-compute-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.site-document-controls-rim-main {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.site-document-controls-rim-live {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: max-content;
}

.site-document-controls-rim-main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.site-document-controls-rim-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  height: 100%;
  min-width: 0;
}

.site-chrome-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--shell-muted);
  font: inherit;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 22px;
  padding: 0;
  border-radius: 5px;
  cursor: pointer;
  transition:
    color 120ms ease,
    background 120ms ease;
}

.site-chrome-button:hover:not(:disabled):not(.is-disabled) {
  color: var(--shell-ink);
  background: rgba(255, 255, 255, 0.12);
}

.site-chrome-button.is-disabled,
.site-chrome-button:disabled {
  color: rgba(238, 243, 248, 0.32);
  cursor: default;
  pointer-events: none;
  background: transparent;
}

.site-chrome-button.is-active.is-disabled,
.site-chrome-button.is-active:disabled {
  color: rgba(238, 243, 248, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.site-chrome-button.is-active,
.site-chrome-button:active,
.site-chrome-button[aria-pressed="true"] {
  color: var(--shell-ink);
  background: rgba(255, 255, 255, 0.28);
}

.site-chrome-button:focus-visible {
  outline: 2px solid rgba(238, 243, 248, 0.45);
  outline-offset: 2px;
}

.site-chrome-icon-button {
  width: 24px;
  min-width: 24px;
}

.site-chrome-icon {
  width: 16px;
  height: 16px;
  display: block;
  overflow: visible;
}

.site-chrome-sidebar-toggle-frame,
.site-chrome-sidebar-toggle-pane {
  stroke: currentColor;
  vector-effect: non-scaling-stroke;
}

.site-chrome-sidebar-toggle-frame {
  fill: none;
  stroke-width: 1.25;
  opacity: 0.9;
}

.site-chrome-sidebar-toggle-pane {
  fill: currentColor;
  stroke: none;
  opacity: 1;
}

.site-chrome-compute-toggle-ring,
.site-chrome-compute-toggle-stem {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.site-chrome-compute-toggle-ring {
  stroke-width: 1.6;
}

.site-chrome-compute-toggle-stem {
  stroke-width: 1.8;
}

.site-document-controls-toggle {
  gap: 10px;
  padding: 0 7px 0 6px;
}

.site-document-save-button-shell,
.site-document-save-button-label,
.site-document-save-button-notch {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.site-document-save-button-shell,
.site-document-save-button-label {
  stroke-width: 1.35;
}

.site-document-save-button-notch {
  stroke-width: 1.2;
}

.site-document-save-button-window {
  fill: currentColor;
  opacity: 0.34;
}

.site-document-controls-grip {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
  opacity: 0.72;
}

.site-document-controls-toggle-text {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
  color: inherit;
}

.site-document-controls .demo-control-strip-label {
  color: var(--shell-muted);
}

.site-document-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  margin-left: auto;
  min-width: max-content;
}

.site-document-zoom-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 65px;
  padding: 4px 20px 4px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--shell-ink);
}

.site-document-zoom-select-wrap::after {
  content: "▴";
  position: absolute;
  right: 8px;
  top: 50%;
  font-size: 0.72rem;
  line-height: 1;
  transform: translateY(-56%);
  color: var(--shell-muted);
  pointer-events: none;
}

.site-document-zoom-select-value {
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--shell-ink);
  font-variant-numeric: tabular-nums;
}

.site-document-zoom-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.site-document-zoom-select-wrap:focus-within {
  outline: 2px solid rgba(238, 243, 248, 0.45);
  outline-offset: 4px;
}


/* docs.css */
/* Paper and home surfaces. */

.site-document-page-paper .site-paper-document {
  position: relative;
  width: calc(100% + 80px);
  margin: -34px -40px -44px;
  background: transparent;
}

.site-paper-document-pages {
  display: grid;
  gap: 28px;
  background: transparent;
}

.site-paper-document-canvas-frame {
  position: relative;
  width: 100%;
  background: #fff;
  overflow: hidden;
}

.site-paper-figure-overlay {
  position: absolute;
  overflow: hidden;
  z-index: 1;
  background: transparent;
}

.site-paper-figure-overlay-surface {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  align-items: stretch;
  background: transparent;
}

.site-paper-figure-overlay-static-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.site-paper-document-canvas-frame[data-paper-render-ready="true"] .site-paper-figure-overlay-static-layer {
  opacity: 1;
}

.site-paper-document-canvas-frame:not([data-paper-render-ready="true"]) [data-tl-role="paper-overlay-layer"] {
  opacity: 0;
  pointer-events: none;
}

.site-paper-figure-overlay-static-layer > .site-paper-figure-overlay-surface {
  position: absolute;
  inset: 0;
}

.site-paper-figure-overlay-static-layer svg {
  display: block;
  width: 100%;
  height: 100%;
}

.site-paper-figure-overlay-surface-ready {
  background: #fff;
}

.site-paper-figure-overlay-surface-pending {
  background: transparent;
  pointer-events: none;
}

.site-paper-figure-overlay-surface .demo-figure {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
}

.site-paper-figure-overlay-surface .demo-figure-trace-frame,
.site-paper-figure-overlay-surface .demo-figure-heatmap {
  height: 100%;
  aspect-ratio: auto;
}

.site-paper-document-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  transition: opacity 180ms ease;
}

.site-paper-document-canvas-pending {
  opacity: 0;
}

.site-paper-document-canvas-ready {
  opacity: 1;
}

.site-paper-document-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
  text-align: center;
  background: rgba(255, 255, 255, 0.84);
  pointer-events: none;
}

.home-window {
  --home-rim-bg: #38383d;
  --home-panel-bg: #201f26;
  --home-panel-bg-hover: #2c2b33;
  --home-panel-line: rgba(255, 255, 255, 0.08);
  --home-shell-muted: #c1c8d2;
  --home-shell-dim: #838b98;
  --home-shell-ink: #f1f4f7;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  background: var(--viewer-bg);
}

.home-rim {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 4px 10px 6px 9px;
  background: var(--home-rim-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.home-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 52px 28px 64px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 210px),
    var(--viewer-bg);
}

.welcome-card {
  width: min(760px, 100%);
  border: 1px solid var(--home-panel-line);
  border-radius: 14px;
  background: var(--shell-bg);
  overflow: hidden;
}

.welcome-head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  padding: 46px 42px 34px;
  border-bottom: 1px solid var(--home-panel-line);
  background: var(--shell-bg);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.home-mark-large {
  display: inline-flex;
  width: 34px;
  height: 34px;
  line-height: 0;
}

.home-mark-large .site-chrome-mark-image {
  width: 34px !important;
  height: 34px !important;
  opacity: 0.84 !important;
}

.brand-name {
  margin: 0;
  color: var(--home-shell-ink);
  font-size: clamp(2.15rem, 4vw, 3.35rem);
  font-weight: 520;
  letter-spacing: 0;
  line-height: 0.95;
}

.welcome-copy {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.welcome-kicker {
  margin: 0;
  color: var(--home-shell-dim);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.file-panel {
  padding: 12px;
  background: var(--home-panel-bg);
}

.file-panel-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 8px 13px;
}

.file-panel-title {
  margin: 0;
  color: var(--home-shell-muted);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.file-panel-count {
  color: var(--home-shell-dim);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.file-list {
  list-style: none;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.file-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.file-row:hover,
.file-row.is-selected {
  border-color: var(--home-panel-line);
  background: var(--home-panel-bg-hover);
}

.file-row.is-selected {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.file-icon {
  width: 22px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 0 74%, rgba(255, 255, 255, 0.13) 75% 100%),
    rgba(255, 255, 255, 0.035);
  position: relative;
}

.file-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 9px;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 5px 0 rgba(255, 255, 255, 0.16);
}

.file-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.file-name {
  color: #e9eef5;
  font-size: 0.92rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  color: var(--home-shell-dim);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-action {
  justify-self: end;
  color: var(--home-shell-muted);
  border-left: 1px solid var(--home-panel-line);
  padding-left: 13px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}


/* demo.css */
/* Demo controls, demo paper layout, and figure styling. */

.site-demo-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: max-content;
}

.site-demo-controls .demo-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 270px;
}

.site-demo-controls .demo-control-strip {
  margin-left: 0;
  min-height: 0;
  justify-content: flex-start;
  align-self: center;
  flex: 0 0 auto;
}

.site-demo-controls-rim {
  gap: 12px;
}

.site-demo-controls-rim .demo-control {
  min-width: 0;
  gap: 6px;
}

.site-demo-controls-rim .demo-control-compact-slider {
  gap: 0;
}

.site-demo-controls-rim .demo-control-compact-slider.is-expanded {
  gap: 2px;
}

.site-demo-controls-rim .demo-control-transport {
  gap: 4px;
}

.site-demo-controls-rim .demo-control-strip-label {
  white-space: nowrap;
}

.site-demo-controls-rim .demo-slider {
  width: 124px;
  height: 16px;
}

.site-demo-controls-rim .demo-slider-rim-inline {
  width: 118px;
  flex: 0 0 118px;
}

.site-demo-controls-rim .demo-control-item {
  padding: 0 8px;
  font-size: 0.72rem;
}

.site-demo-controls-rim .demo-control-strip {
  gap: 6px;
}

.site-document-controls .demo-control-item {
  color: var(--shell-muted);
}

.site-document-controls .demo-control-item:hover:not(:disabled) {
  color: var(--shell-ink);
}

.site-document-controls .demo-control-strip-items {
  gap: 4px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.site-document-controls .demo-control-bead {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.site-document-controls .demo-control-bead-group,
.site-document-controls .demo-control-bead-cap {
  padding: 0;
  overflow: hidden;
  color: #e1e6ee;
  background: rgba(255, 255, 255, 0.08);
}

.site-document-controls .demo-control-bead-group:hover:not(:disabled):not(.is-disabled),
.site-document-controls .demo-control-bead-cap:hover:not(:disabled):not(.is-disabled) {
  color: var(--shell-ink);
  background: rgba(255, 255, 255, 0.16);
}

.site-document-controls .demo-control-bead-group.is-disabled,
.site-document-controls .demo-control-bead-cap.is-disabled {
  color: rgba(238, 243, 248, 0.38);
  background: rgba(255, 255, 255, 0.045);
}

.site-document-controls .demo-control-bead-cap.is-active {
  color: var(--shell-ink);
  background: rgba(255, 255, 255, 0.2);
}

.site-document-controls .demo-control-bead-section {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  white-space: nowrap;
}

.site-document-controls .demo-control-bead-section-symbol {
  min-width: 2rem;
  padding-inline: 7px;
}

.site-document-controls .demo-control-bead-section-value {
  min-width: 4.6ch;
  justify-content: flex-end;
  padding-inline: 8px;
  font-variant-numeric: tabular-nums;
}

.site-document-controls .demo-control-bead-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.16);
}

.site-document-controls .demo-control-bead-cap-symbol,
.site-document-controls .demo-control-bead-cap-value {
  flex: 0 0 auto;
}

.site-document-controls .demo-control-bead-symbol-asset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.site-document-controls .demo-control-bead-section-symbol .demo-math-svg-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.site-document-controls .demo-control-bead-section-symbol .demo-math-svg-asset {
  display: block;
  width: auto;
  height: 0.82rem;
  fill: currentColor;
  overflow: visible;
}

.site-document-controls .demo-control-bead-symbol-fallback {
  line-height: 1;
  font-style: italic;
}

.site-document-controls .demo-control-transport-button {
  flex: 0 0 auto;
}

.demo-control-transport-icon {
  overflow: visible;
}

.demo-control-transport-play-shape,
.demo-control-transport-pause-bar {
  fill: currentColor;
}

.demo-control-transport-reset-arc,
.demo-control-transport-reset-head {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.demo-control-transport-reset-arc {
  stroke-width: 1.55;
}

.demo-control-transport-reset-head {
  stroke-width: 1.45;
}

.site-document-controls .demo-control-item:disabled {
  opacity: 0.82;
}

.site-document-controls .demo-slider {
  width: 176px;
}

.about-demo-deck {
  display: grid;
  gap: 0;
  width: 100%;
}

.about-demo-main {
  min-width: 0;
}

.about-demo-slot {
  min-width: 0;
  width: 100%;
  min-height: 520px;
}

.about-demo-main .demo-figure {
  max-width: none;
}

.about-demo-title {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 1.18rem;
  text-align: center;
}

.about-demo {
  display: block;
}

.demo-layout {
  width: min(100%, 1080px);
  margin: 0 auto;
  position: relative;
}

.demo-paper-masthead {
  display: grid;
  justify-items: center;
  gap: 0.58rem;
  margin: 0 0 1.3rem;
  padding: 0 1rem;
  text-align: center;
}

.demo-paper-abstract {
  width: min(100%, 74ch);
  margin: 0 auto 1.3rem;
}

.demo-paper-body {
  display: grid;
  gap: 1.15rem;
}

.demo-paper-top {
  --demo-paper-gap: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 44%);
  gap: var(--demo-paper-gap);
  align-items: start;
}

.demo-figure-panel {
  margin: 0;
  min-width: 0;
}

.demo-figure-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.demo-copy-panel {
  display: block;
  min-width: 0;
}

.demo-paper-columns {
  column-count: 2;
  column-gap: 34px;
  column-fill: balance;
}

.demo-paper-title {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: clamp(2rem, 3vw, 2.9rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  text-wrap: balance;
}

.demo-paper-author {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo-paper-abstract .demo-copy-body {
  font-size: 0.92rem;
}

.demo-paper-abstract .demo-copy-body h4 {
  text-align: center;
}

.demo-method-panel {
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(143, 151, 168, 0.22);
}

.demo-method-panel {
  min-width: 0;
}

.demo-control {
  display: grid;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
}

.demo-control-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 0;
  flex: 0 0 auto;
  min-height: 2.65rem;
  align-self: end;
  margin-left: auto;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.demo-control-strip-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
}

.demo-control-strip-items {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.demo-control-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  border-radius: 5px;
  min-height: 22px;
}

.demo-control-item:hover:not(:disabled) {
  color: var(--ink);
}

.demo-control-item:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(238, 243, 248, 0.34);
}

.demo-control-item:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.demo-slider {
  width: 100%;
  appearance: none;
  background: transparent;
  height: 18px;
  margin: 0;
}

.demo-slider:focus {
  outline: none;
}

.demo-slider:focus-visible {
  outline: 2px solid rgba(238, 243, 248, 0.32);
  outline-offset: 3px;
}

.demo-slider::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(143, 154, 168, 0.44);
}

.demo-slider::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 1px solid rgba(24, 27, 34, 0.28);
  border-radius: 3px;
  background: #edf0f4;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.demo-slider::-moz-range-track {
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: rgba(143, 154, 168, 0.44);
}

.demo-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(24, 27, 34, 0.28);
  border-radius: 3px;
  background: #edf0f4;
}

.site-document-controls .demo-slider::-webkit-slider-runnable-track {
  background: rgba(226, 232, 240, 0.42);
}

.site-document-controls .demo-slider::-moz-range-track {
  background: rgba(226, 232, 240, 0.42);
}

.site-document-controls .demo-slider::-webkit-slider-thumb,
.site-document-controls .demo-slider::-moz-range-thumb {
  border-color: rgba(20, 24, 31, 0.38);
  background: #f0f2f5;
}

.demo-slider:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.demo-copy-panel {
  min-width: 0;
}

.demo-copy-body h4 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #566074;
  break-after: avoid-column;
  page-break-after: avoid;
}

.demo-copy-body > * + h4 {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(143, 151, 168, 0.22);
}

.demo-copy-body {
  color: var(--ink);
  line-height: 1.64;
  font-size: 1rem;
  overflow-wrap: break-word;
}

.demo-copy-body > * {
  margin: 0;
}

.demo-copy-body > * + * {
  margin-top: 0.72rem;
}

.demo-copy-body > h4 + * {
  margin-top: 0.42rem;
}

.demo-copy-body ul {
  padding-left: 1.05rem;
}

.demo-copy-body .demo-citation {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.demo-copy-body .demo-citation-link {
  color: var(--ink);
  text-decoration: none;
}

.demo-copy-body .demo-citation-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.demo-copy-body .demo-reference-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: block;
  break-inside: auto;
}

.demo-copy-body .demo-reference-item {
  position: relative;
  padding-left: 2.6rem;
  color: var(--ink);
  line-height: 1.56;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.demo-copy-body .demo-reference-item + .demo-reference-item {
  margin-top: 0.7rem;
}

.demo-copy-body .demo-reference-index {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.demo-copy-body .demo-reference-link {
  color: var(--accent);
  text-decoration: none;
}

.demo-copy-body .demo-reference-link:hover {
  text-decoration: underline;
}

.demo-copy-body-technical {
  color: var(--ink);
  font-size: 0.99rem;
}

.demo-copy-body .demo-math-svg-inline {
  display: inline-block;
  line-height: 0;
  max-width: 100%;
}

.demo-copy-body .demo-math-svg-block {
  display: flex;
  justify-content: center;
  margin: 0.45rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.demo-copy-body .demo-math-svg-asset {
  display: block;
  fill: currentColor;
  overflow: visible;
}

.demo-figure {
  width: 100%;
  max-width: 760px;
  height: auto;
  display: block;
  margin-bottom: 6px;
}

.demo-figure-slot {
  display: grid;
  overflow: visible;
}

.compute-probe-figure-stack {
  display: grid;
  gap: 10px;
}

.compute-probe-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.compute-probe-stat {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid rgba(19, 75, 132, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(247, 250, 252, 0.95), rgba(239, 245, 249, 0.92)),
    rgba(255, 255, 255, 0.92);
}

.compute-probe-stat-error {
  grid-column: 1 / -1;
  border-color: rgba(168, 52, 39, 0.24);
  background:
    linear-gradient(180deg, rgba(252, 244, 241, 0.96), rgba(249, 236, 231, 0.94)),
    rgba(255, 255, 255, 0.92);
}

.compute-probe-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b6673;
}

.compute-probe-stat-value {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #142433;
  font-variant-numeric: tabular-nums;
}

.demo-figure-placeholder {
  display: grid;
  min-height: 16rem;
  place-items: center;
}

.demo-figure-placeholder-card {
  width: min(100%, 42rem);
  padding: 1.35rem 1.45rem;
  border: 1px solid rgba(19, 75, 132, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(243, 248, 252, 0.96), rgba(234, 241, 247, 0.92)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(19, 75, 132, 0.08);
}

.demo-figure-placeholder-heading,
.demo-figure-placeholder-detail {
  margin: 0;
  text-align: center;
}

.demo-figure-placeholder-heading {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #134b84;
}

.demo-figure-placeholder-detail {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #425466;
}

.demo-figure-trace-frame {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: visible;
}

.demo-figure-trace-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.demo-figure-trace-svg {
  display: block;
}

.demo-figure-trace-svg {
  background: transparent;
}

.demo-figure-heatmap {
  position: relative;
  background: #fff;
  height: auto;
  aspect-ratio: 2 / 1;
}

.demo-heatmap-canvas,
.demo-heatmap-raster {
  position: absolute;
  left: 7.631579%;
  top: 4.210526%;
  display: block;
  width: 90%;
  height: 85.789474%;
}

.demo-heatmap-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.demo-heatmap-raster,
.demo-heatmap-canvas {
  image-rendering: pixelated;
}

.demo-heatmap-density-shadow,
.demo-heatmap-density-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.demo-heatmap-density-shadow {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3.2;
}

.demo-heatmap-density-line {
  stroke: #134b84;
  stroke-width: 1.5;
}

.demo-trace-grid {
  stroke: rgba(143, 151, 168, 0.24);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.demo-trace-axis,
.demo-trace-tick {
  stroke: var(--ink);
  vector-effect: non-scaling-stroke;
}

.demo-trace-axis {
  stroke-width: 1.15;
}

.demo-trace-tick {
  stroke-width: 1;
}

.demo-figure-trace-svg text,
.demo-heatmap-overlay text {
  font-family: var(--font-figure-label);
  fill: var(--ink);
}

.demo-figure-trace-svg .tick-label,
.demo-heatmap-overlay .tick-label {
  font-size: 20.0px;
  font-variant-numeric: tabular-nums;
}

.demo-figure-trace-svg .axis-label,
.demo-heatmap-overlay .axis-label {
  font-size: 21.0px;
}

.demo-svg-label-layer {
  overflow: visible;
  pointer-events: none;
}

.demo-trace-line {
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-caption {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.58;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.site-document-page-demo .about-demo {
  display: block;
}

.site-document-page-demo .demo-layout {
  width: 100%;
  margin: 0;
  position: relative;
}

.site-document-page-demo .demo-paper-masthead {
  margin: 0 0 0.95rem;
  padding: 0;
  gap: 0.34rem;
}

.site-document-page-demo .demo-paper-title {
  font-size: 18pt;
  font-weight: 700;
  line-height: 1.1;
}

.site-document-page-demo .demo-paper-author {
  font-size: 11pt;
  line-height: 1.25;
  letter-spacing: 0.015em;
  text-transform: none;
  color: var(--ink);
}

.site-document-page-demo .demo-paper-abstract {
  width: min(100%, 68ch);
  margin: 0 auto 1.3rem;
}

.site-document-page-demo .demo-paper-abstract .demo-copy-body {
  font-size: 10pt;
  line-height: 1.46;
}

.site-document-page-demo .demo-paper-body {
  --demo-paper-gap: 36px;
  --demo-paper-figure-width: calc((100% - var(--demo-paper-gap)) / 2);
  --demo-paper-figure-reserve: 20.5rem;
  display: block;
  column-count: 2;
  column-gap: var(--demo-paper-gap);
  column-fill: auto;
  height: var(--demo-paper-body-min-height);
  min-height: var(--demo-paper-body-min-height);
  overflow: hidden;
  padding-top: var(--demo-paper-figure-reserve);
  position: relative;
}

.site-document-page-demo .demo-paper-body::after {
  content: "";
  display: block;
  clear: both;
}

.site-document-page-demo .demo-figure-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--demo-paper-figure-width);
  margin: 0;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.site-document-page-demo .demo-figure-column {
  gap: 12px;
}

.site-document-page-demo .demo-paper-content {
  min-width: 0;
  margin-top: calc(-1 * var(--demo-paper-figure-reserve));
}

.site-document-page-demo .demo-method-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.site-document-page-demo .demo-copy-body {
  font-size: 11pt;
  line-height: 1.46;
}

.site-document-page-demo .demo-copy-body-technical {
  font-size: 11pt;
}

.site-document-page-demo .demo-copy-body h4 {
  font-size: 11.5pt;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.site-document-page-demo .demo-caption {
  font-size: 9pt;
  line-height: 1.4;
}

.site-document-page-demo .demo-figure {
  margin-bottom: 0;
}


/* responsive.css */
/* Narrow-screen overrides across the shell, home, and demos. */

@media (max-width: 720px) {
  .site-shell {
    --site-sidebar-float-gap-left: 8px;
    --site-sidebar-float-gap-right: 8px;
    --site-sidebar-float-gap-top: 8px;
    --site-sidebar-float-gap-bottom: 10px;
  }

  .site-sidebar-inner {
    border-radius: 9px;
  }

  .site-document-viewport {
    padding: 24px 14px 28px;
  }

  .site-viewer-surface-demo {
    padding: 0 12px 24px;
  }

  .site-document-controls-body {
    padding: 10px 12px 8px;
  }

  .site-document-controls-rim {
    padding: 4px 7px 5px;
  }

  .home-stage {
    place-items: start center;
    padding: 24px 12px 36px;
  }

  .welcome-head {
    padding: 36px 22px 28px;
  }

  .brand-lockup {
    display: grid;
    justify-items: center;
    gap: 12px;
  }

  .file-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .file-action {
    display: none;
  }

  .demo-layout {
    width: 100%;
  }

  .demo-control {
    flex: initial;
  }

  .demo-control-strip {
    margin-left: 0;
    min-height: 0;
    justify-content: flex-start;
  }

  .demo-paper-body {
    gap: 1rem;
  }

  .demo-paper-top {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .demo-paper-masthead {
    margin-bottom: 1rem;
    padding: 0;
  }

  .demo-paper-abstract {
    width: 100%;
    margin-bottom: 1rem;
  }

  .demo-figure {
    height: 194px;
  }

  .demo-method-panel {
    margin-top: 0.1rem;
  }
}
