:root {
  --ink: #eef2e9;
  --ink-soft: #aebbb1;
  --ink-muted: #84948a;
  --bg: #111817;
  --bg-deep: #0c1110;
  --panel: #18211f;
  --panel-bright: #202c29;
  --line: rgba(213, 229, 214, 0.14);
  --line-strong: rgba(213, 229, 214, 0.28);
  --header-bg: rgba(17, 24, 23, 0.94);
  --surface-overlay: rgba(24, 33, 31, 0.58);
  --surface-deep-overlay: rgba(7, 12, 11, 0.34);
  --surface-segmented: rgba(7, 12, 11, 0.32);
  --surface-glow: rgba(136, 198, 186, 0.045);
  --selection-soft: rgba(136, 198, 186, 0.06);
  --grid-line: rgba(213, 229, 214, 0.08);
  --faint-line: rgba(213, 229, 214, 0.27);
  --track: rgba(213, 229, 214, 0.1);
  --track-border: rgba(213, 229, 214, 0.12);
  --warning-surface: rgba(24, 33, 31, 0.76);
  --amber: #e9b36c;
  --amber-soft: rgba(233, 179, 108, 0.14);
  --teal: #88c6ba;
  --teal-soft: rgba(136, 198, 186, 0.12);
  --coral: #e77f62;
  --coral-soft: rgba(231, 127, 98, 0.12);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
  --radius: 2px;
}

:root[data-theme="light"] {
  --ink: #18211f;
  --ink-soft: #48554f;
  --ink-muted: #64736a;
  --bg: #f4f6f1;
  --bg-deep: #e9eee8;
  --panel: #ffffff;
  --panel-bright: #f9fbf7;
  --line: rgba(24, 33, 31, 0.15);
  --line-strong: rgba(24, 33, 31, 0.32);
  --header-bg: rgba(244, 246, 241, 0.94);
  --surface-overlay: rgba(255, 255, 255, 0.78);
  --surface-deep-overlay: rgba(233, 238, 232, 0.82);
  --surface-segmented: rgba(233, 238, 232, 0.9);
  --surface-glow: rgba(35, 102, 93, 0.08);
  --selection-soft: rgba(35, 102, 93, 0.08);
  --grid-line: rgba(24, 33, 31, 0.12);
  --faint-line: rgba(24, 33, 31, 0.32);
  --track: rgba(24, 33, 31, 0.12);
  --track-border: rgba(24, 33, 31, 0.16);
  --warning-surface: rgba(255, 255, 255, 0.82);
  --amber: #965b18;
  --amber-soft: rgba(150, 91, 24, 0.12);
  --teal: #23665d;
  --teal-soft: rgba(35, 102, 93, 0.1);
  --coral: #93412d;
  --coral-soft: rgba(147, 65, 45, 0.1);
}

* { box-sizing: border-box; }

.no-js .site-header,
.no-js main,
.no-js .site-footer { display: none; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

html[data-theme="light"] { color-scheme: light; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --ink: #18211f;
    --ink-soft: #48554f;
    --ink-muted: #64736a;
    --bg: #f4f6f1;
    --bg-deep: #e9eee8;
    --panel: #ffffff;
    --panel-bright: #f9fbf7;
    --line: rgba(24, 33, 31, 0.15);
    --line-strong: rgba(24, 33, 31, 0.32);
    --header-bg: rgba(244, 246, 241, 0.94);
    --surface-overlay: rgba(255, 255, 255, 0.78);
    --surface-deep-overlay: rgba(233, 238, 232, 0.82);
    --surface-segmented: rgba(233, 238, 232, 0.9);
    --surface-glow: rgba(35, 102, 93, 0.08);
    --selection-soft: rgba(35, 102, 93, 0.08);
    --grid-line: rgba(24, 33, 31, 0.12);
    --faint-line: rgba(24, 33, 31, 0.32);
    --track: rgba(24, 33, 31, 0.12);
    --track-border: rgba(24, 33, 31, 0.16);
    --warning-surface: rgba(255, 255, 255, 0.82);
    --amber: #965b18;
    --amber-soft: rgba(150, 91, 24, 0.12);
    --teal: #23665d;
    --teal-soft: rgba(35, 102, 93, 0.1);
    --coral: #93412d;
    --coral-soft: rgba(147, 65, 45, 0.1);
  }

  html:not([data-theme]) { color-scheme: light; }
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 7%, rgba(136, 198, 186, 0.08), transparent 26rem),
    radial-gradient(circle at 7% 30%, rgba(233, 179, 108, 0.045), transparent 24rem),
    var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}

button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }

a { color: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

#atlas-heading:focus-visible,
.page-view h2:focus-visible,
#visualEmptyHeading:focus-visible,
#activeName:focus-visible,
#main-content:focus-visible,
#noscript-heading:focus-visible,
#noscript-method-heading:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 6px;
}

#activeName { scroll-margin-top: 7rem; }

#dataErrorHeading:focus {
  outline: 2px solid var(--teal);
  outline-offset: 6px;
}

.noscript-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.8rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--coral);
  color: var(--ink);
  background: rgba(231, 127, 98, 0.12);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-align: center;
}
.noscript-message strong { color: var(--coral); }
.noscript-link { color: var(--amber); text-decoration: none; }
.noscript-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.noscript-index { width: min(1440px, calc(100% - 96px)); margin: 2rem auto 0; padding: 2rem; border: 1px solid var(--line); background: var(--panel); }
.noscript-index .eyebrow { margin-bottom: 0.85rem; }
.noscript-index h1 { margin: 0 0 0.8rem; font-size: clamp(1.7rem, 3vw, 2.9rem); letter-spacing: -0.06em; line-height: 1.05; }
.noscript-intro { max-width: 42rem; color: var(--ink-soft); }
.noscript-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; margin: 2rem 0 1.2rem; padding: 0; list-style: none; }
.noscript-empty { margin: 2rem 0 1.2rem; padding: 1rem 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-family: var(--mono); font-size: 0.68rem; line-height: 1.55; }
.noscript-list li { display: grid; grid-template-columns: 32px 1fr; gap: 0.7rem; padding: 1rem 0; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.noscript-list li:target,
.noscript-list li:focus { outline: 2px solid var(--teal); outline-offset: 0.35rem; background: var(--selection-soft); }
.noscript-number { color: var(--amber); font-family: var(--serif); font-size: 1.35rem; line-height: 1; }
.noscript-list strong { display: block; color: var(--ink); font-size: 0.82rem; }
.noscript-study-link { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; transition: 180ms ease; }
.noscript-study-link:hover { color: var(--amber); text-decoration-color: currentColor; }
.noscript-record-actions { display: block; margin-top: 0.45rem; }
.noscript-interactive-link { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--teal); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.04em; text-decoration: none; text-transform: uppercase; }
.noscript-interactive-link:hover,
.noscript-interactive-link:focus-visible { color: var(--amber); text-decoration: underline; text-underline-offset: 0.2em; }
.noscript-interactive-link span { font-size: 0.9rem; line-height: 0; }
.noscript-list small { display: block; margin-top: 0.22rem; color: var(--ink-muted); font-family: var(--mono); font-size: 0.57rem; line-height: 1.45; }
.noscript-derived { display: block; margin-top: 0.22rem; color: var(--amber); font-family: var(--mono); font-size: 0.55rem; line-height: 1.45; }
.noscript-provenance { display: block; margin-top: 0.22rem; color: var(--teal); font-family: var(--mono); font-size: 0.55rem; line-height: 1.45; }
.noscript-source-link { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.18em; }
.noscript-source-link:hover,
.noscript-source-link:focus-visible { color: var(--amber); text-decoration-color: currentColor; }
.noscript-reading { display: block; margin-top: 0.5rem; color: var(--ink-soft); font-size: 0.69rem; line-height: 1.55; }
.noscript-status-key { margin-top: 1.4rem; padding: 1rem; border: 1px solid var(--line); background: var(--surface-glow); }
.noscript-status-key-kicker { margin: 0 0 0.35rem; color: var(--amber); font-family: var(--mono); font-size: 0.57rem; letter-spacing: 0.08em; text-transform: uppercase; }
.noscript-status-key h2 { margin: 0 0 0.55rem; color: var(--ink); font-size: 1.2rem; letter-spacing: -0.04em; }
.noscript-status-key-intro { max-width: 48rem; margin: 0; color: var(--ink-soft); font-size: 0.68rem; line-height: 1.6; }
.noscript-status-key-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; margin: 1rem 0 0; border: 1px solid var(--line); background: var(--line); }
.noscript-status-key-grid > div { min-width: 0; padding: 0.8rem; background: var(--bg-deep); }
.noscript-status-key-grid dt { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; color: var(--teal); font-family: var(--mono); font-size: 0.58rem; }
.noscript-status-key-label { display: inline-flex; padding: 0.14rem 0.26rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-size: 0.51rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.noscript-status-key-label[data-status="measured"] { border-color: rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); }
.noscript-status-key-label:not([data-status="schematic"]):not([data-status="measured"]) { border-color: rgba(231, 127, 98, 0.42); color: var(--coral); background: var(--coral-soft); }
.noscript-status-key-grid dd { margin: 0.45rem 0 0; color: var(--ink-muted); font-size: 0.64rem; line-height: 1.55; }
.noscript-status-key-count { display: block; margin-top: 0.35rem; color: var(--teal); font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.03em; text-transform: uppercase; }
.noscript-status-key-empty { margin: 1.4rem 0 0; padding: 1rem 0; border-top: 1px solid var(--line); color: var(--ink-muted); font-family: var(--mono); font-size: 0.59rem; }
.noscript-note { margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-muted); font-family: var(--mono); font-size: 0.59rem; }
.noscript-method { width: min(1440px, calc(100% - 96px)); margin: 2rem auto 0; padding: 1.2rem; border: 1px solid var(--line); background: var(--surface-glow); }
.noscript-method .eyebrow { margin-bottom: 0.8rem; }
.noscript-method h2 { margin: 0 0 0.65rem; color: var(--ink); font-size: clamp(1.25rem, 2.4vw, 2rem); letter-spacing: -0.05em; line-height: 1.08; }
.noscript-method-intro { max-width: 52rem; margin: 0; color: var(--ink-soft); font-size: 0.72rem; line-height: 1.65; }
.noscript-method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0 0; }
.noscript-method-grid > div { padding-top: 0.75rem; border-top: 1px solid var(--line); }
.noscript-method-grid dt { color: var(--amber); font-family: var(--mono); font-size: 0.59rem; letter-spacing: 0.05em; text-transform: uppercase; }
.noscript-method-grid dd { margin: 0.3rem 0 0; color: var(--ink-muted); font-size: 0.66rem; line-height: 1.6; }
.noscript-artifact-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; }
.noscript-artifact-actions a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.6rem 0.75rem; border: 1px solid var(--teal); color: var(--teal); background: var(--teal-soft); font-family: var(--mono); font-size: 0.59rem; letter-spacing: 0.03em; text-decoration: none; text-transform: uppercase; }
.noscript-artifact-actions a:hover,
.noscript-artifact-actions a:focus-visible { color: var(--bg); background: var(--teal); }
.noscript-artifact-actions a span { font-size: 0.9rem; line-height: 0; }

.data-error-state .site-header,
.data-error-state main,
.data-error-state .site-footer { display: none; }
.data-error-state .skip-link { display: none; }
.runtime-fallback { display: none; width: min(820px, calc(100% - 96px)); margin: 4rem auto; padding: clamp(1.4rem, 4vw, 2.4rem); border: 1px solid rgba(233, 179, 108, 0.42); background: linear-gradient(135deg, rgba(233, 179, 108, 0.09), var(--warning-surface)); }
.no-js .runtime-fallback { display: none; }
.js-runtime.no-js .runtime-fallback { display: block; }
.data-error-state .runtime-fallback { display: none; }
.runtime-fallback .eyebrow { margin-bottom: 0.9rem; color: var(--amber); }
.runtime-fallback > p:not(.eyebrow) { max-width: 42rem; margin-bottom: 1rem; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.7; }
.runtime-fallback > p strong { color: var(--ink); font-weight: 700; }
.runtime-fallback-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.runtime-fallback .hero-action { display: inline-flex; }
.connection-status { display: flex; align-items: center; gap: 0.55rem; width: min(1440px, calc(100% - 96px)); margin: 0.65rem auto 0; padding: 0.55rem 0.75rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.04em; line-height: 1.35; text-transform: uppercase; }
.connection-status[data-connection-state="online"] { border-color: rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); }
.connection-status[hidden] { display: none; }
.connection-status-mark { color: var(--coral); font-size: 0.9rem; line-height: 1; }
.connection-status[data-connection-state="online"] .connection-status-mark { color: var(--teal); }
.update-status { display: flex; align-items: center; gap: 0.65rem; width: min(1440px, calc(100% - 96px)); margin: 0.65rem auto 0; padding: 0.55rem 0.75rem; border: 1px solid rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.04em; line-height: 1.35; text-transform: uppercase; }
.update-status[hidden] { display: none; }
.update-status-mark { flex: 0 0 auto; color: var(--amber); font-size: 0.9rem; line-height: 1; }
.update-status-text { flex: 1 1 15rem; min-width: 0; }
.update-status-action { flex: 0 0 auto; min-height: 30px; padding: 0.35rem 0.55rem; border: 1px solid var(--teal); color: var(--teal); background: transparent; font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.04em; text-transform: uppercase; transition: 180ms ease; }
.update-status-action:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.data-error { width: min(820px, calc(100% - 96px)); min-height: min(560px, 70vh); margin: 4rem auto; padding: clamp(2rem, 6vw, 5rem); border: 1px solid rgba(231, 127, 98, 0.42); background: linear-gradient(135deg, rgba(231, 127, 98, 0.09), var(--warning-surface)); }
.data-error .eyebrow { margin-bottom: 1.5rem; color: var(--coral); }
.data-error h1 { max-width: 17ch; margin-bottom: 1.1rem; font-size: clamp(2.8rem, 7vw, 5.8rem); }
.data-error > p:not(.eyebrow) { max-width: 36rem; margin-bottom: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.8; }
.data-error-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.action-recovery { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; width: min(1440px, calc(100% - 96px)); margin: 1rem auto 0; padding: 0.75rem 0.9rem; border: 1px solid rgba(231, 127, 98, 0.42); background: rgba(231, 127, 98, 0.08); }
.action-recovery-message { margin: 0; color: var(--ink-soft); font-size: 0.68rem; line-height: 1.55; }
.action-recovery-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 0.5rem; }
.action-recovery .hero-action { padding: 0.5rem 0.65rem; font-size: 0.56rem; }
.action-recovery-dismiss { padding: 0.5rem 0.65rem; border: 1px solid var(--line-strong); color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.04em; text-transform: uppercase; transition: 180ms ease; }
.action-recovery-dismiss:hover { border-color: var(--coral); color: var(--coral); background: rgba(231, 127, 98, 0.1); }
#downloadRecovery:focus { outline: 2px solid var(--teal); outline-offset: 4px; }

.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;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  color: var(--bg);
  background: var(--amber);
  transform: translateY(-150%);
}

.skip-link-noscript,
.skip-link-runtime { display: none; }
.no-js .skip-link-app { display: none; }
.no-js .skip-link-noscript { display: block; }
.static-fallback-page .skip-link-noscript { display: block; }
.js-runtime.no-js .skip-link-runtime { display: block; }
.skip-link:focus { transform: translateY(0); }
#runtimeFallback:focus { outline: 2px solid var(--teal); outline-offset: 6px; }

.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: 1.2rem;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--teal);
  color: var(--teal);
  background: var(--panel);
  box-shadow: 0 0.4rem 1.2rem rgba(7, 12, 11, 0.16);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: 180ms ease;
}
.back-to-top:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); transform: translateY(-2px); }
.back-to-top span:first-child { color: var(--amber); font-size: 0.9rem; line-height: 1; }

.site-header,
.connection-status,
main,
.site-footer {
  width: min(1440px, calc(100% - 96px));
  margin-inline: auto;
}

.route-anchor { display: block; height: 0; scroll-margin-top: 7rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.static-fallback-header .main-nav { margin-left: auto; gap: 1.15rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--amber);
  color: var(--amber);
}

.brand-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.brand-mark circle { stroke-opacity: 0.5; }

.brand-name,
.brand-subtitle { display: block; }
.brand-name { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.brand-subtitle { margin-top: 0.12rem; color: var(--ink-muted); font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.02em; }

.main-nav { display: flex; align-items: center; gap: 2.1rem; margin-left: 9rem; }

.nav-button,
.download-button,
.segment-button,
.mode-button,
.catalog-card,
.clear-search {
  border: 0;
  background: transparent;
}

.nav-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  padding: 0.8rem 0;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--amber);
  content: '';
  opacity: 0;
  transform: scaleX(0.2);
  transition: 180ms ease;
}

.nav-button:hover,
.nav-button.is-active { color: var(--ink); }
.nav-button.is-active::after { opacity: 1; transform: scaleX(1); }
.nav-count { display: inline-grid; min-width: 1.15rem; height: 1.15rem; padding: 0 0.22rem; place-items: center; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-size: 0.5rem; letter-spacing: 0; line-height: 1; }

.header-actions { display: flex; align-items: center; gap: 0.55rem; }
.header-data-disclosure { position: relative; }
.header-data-disclosure > summary { display: none; }
.header-data-disclosure > summary::-webkit-details-marker { display: none; }
.header-data-actions { display: flex; align-items: center; gap: 0.55rem; }
.dataset-link { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.62rem 0.72rem; border: 1px solid var(--line); color: var(--ink-muted); font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.03em; text-decoration: none; transition: 180ms ease; }
.dataset-link:hover { border-color: var(--teal); color: var(--ink); background: var(--teal-soft); }
.dataset-icon { color: var(--teal); font-size: 0.7rem; letter-spacing: -0.12em; }
.dataset-link-csv .dataset-icon { color: var(--amber); font-size: 0.56rem; letter-spacing: 0.02em; }
.dataset-link-schema .dataset-icon { color: var(--coral); font-size: 0.56rem; letter-spacing: 0.02em; }

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.8rem;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  transition: 180ms ease;
}

.download-button:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.download-icon { color: var(--amber); font-size: 1rem; line-height: 0; }
.install-button .download-icon { color: var(--teal); }
.theme-toggle { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.62rem 0.72rem; border: 1px solid var(--line); color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.03em; text-transform: uppercase; transition: 180ms ease; }
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.theme-toggle[data-theme-mode="light"] { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.theme-toggle[data-theme-mode="dark"] { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.theme-toggle-icon { color: var(--amber); font-size: 0.9rem; line-height: 0; }
.theme-toggle[data-theme-mode="light"] .theme-toggle-icon { color: var(--teal); }
.theme-toggle[data-theme-mode="dark"] .theme-toggle-icon { color: var(--amber); }

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 370px;
  padding: 76px 0 66px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.study-kicker,
.card-kicker,
.method-number,
.metric-label,
.section-note,
.drawing-scale,
.drawing-legend,
.catalog-footnote,
.caption-mark {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 0.65rem; margin: 0 0 1.35rem; color: var(--amber); }
.eyebrow-line { width: 28px; height: 1px; background: currentColor; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
h1 { margin-bottom: 1.6rem; font-size: clamp(3.4rem, 7.1vw, 7.1rem); font-weight: 600; letter-spacing: -0.075em; line-height: 0.91; }
h1 em { color: var(--amber); font-family: var(--serif); font-weight: 500; letter-spacing: -0.065em; }
h2 { margin-bottom: 0; font-size: clamp(1.7rem, 3vw, 2.9rem); font-weight: 600; letter-spacing: -0.06em; line-height: 1.05; }
h3 { letter-spacing: -0.04em; }

.hero-intro { max-width: 31rem; margin-bottom: 0; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.75; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }
.hero-action { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.72rem 0.9rem; border: 1px solid var(--line-strong); color: var(--ink-soft); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.03em; text-decoration: none; transition: 180ms ease; }
.hero-action span { color: var(--teal); font-size: 0.95rem; line-height: 0; }
.hero-action:hover { border-color: var(--teal); color: var(--ink); background: var(--teal-soft); }
.hero-action-primary { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.hero-action-primary span { color: var(--amber); }
.hero-action-primary:hover { border-color: var(--amber); color: var(--bg); background: var(--amber); }

.hero-stats { display: flex; gap: clamp(1.6rem, 4vw, 4.5rem); padding-bottom: 0.15rem; }
.hero-aside { display: grid; align-self: end; justify-items: end; gap: 1.15rem; max-width: 31rem; }
.hero-data-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; max-width: 28rem; margin: 0; padding-top: 0.7rem; border-top: 1px solid var(--line); color: var(--ink-muted); font-family: var(--mono); font-size: 0.55rem; line-height: 1.5; text-align: right; }
.hero-data-note-mark { display: grid; width: 1.05rem; height: 1.05rem; place-items: center; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal); font-family: var(--serif); font-size: 0.68rem; line-height: 1; }
.hero-data-note strong { display: block; margin-bottom: 0.12rem; color: var(--amber); font-size: 0.52rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.hero-data-note-definition { display: block; color: var(--ink-soft); font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0; }
.hero-data-note[data-status="schematic"] { border-top-color: rgba(233, 179, 108, 0.56); }
.hero-data-note[data-status="schematic"] .hero-data-note-mark,
.hero-data-note[data-status="schematic"] strong { border-color: var(--amber); color: var(--amber); }
.hero-data-note[data-status="measured"] { border-top-color: rgba(136, 198, 186, 0.56); }
.hero-data-note[data-status="measured"] .hero-data-note-mark,
.hero-data-note[data-status="measured"] strong { border-color: var(--teal); color: var(--teal); }
.hero-data-note[data-status="mixed"] { border-top-color: rgba(231, 127, 98, 0.56); }
.hero-data-note[data-status="mixed"] .hero-data-note-mark,
.hero-data-note[data-status="mixed"] strong { border-color: var(--coral); color: var(--coral); }
.hero-stat { display: grid; gap: 0.28rem; }
.stat-number { color: var(--amber); font-family: var(--serif); font-size: 2.1rem; line-height: 1; }
.stat-label { color: var(--ink-muted); font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.03em; text-transform: uppercase; }

.workspace,
.page-view {
  scroll-margin-top: 7rem;
  padding: 88px 0 110px;
}

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.section-heading .eyebrow { margin-bottom: 0.85rem; }
.section-note { margin-bottom: 0.25rem; color: var(--ink-muted); }
.section-heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.7rem; }
.section-heading-actions .section-note { margin-bottom: 0; }
.method-return-button { white-space: nowrap; }
.method-citation-button { white-space: nowrap; }
.method-print-button { white-space: nowrap; }

.atlas-layout { display: grid; grid-template-columns: minmax(220px, 288px) 1fr; gap: clamp(2.1rem, 5vw, 5.5rem); }

.catalog-panel { position: sticky; top: 7rem; align-self: start; min-width: 0; }
.catalog-tools { padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.catalog-filter-disclosure { margin-top: 0.65rem; }
.catalog-filter-disclosure > summary { display: none; }
.catalog-filter-disclosure > summary::-webkit-details-marker { display: none; }
.catalog-filter-disclosure-body { display: block; }
.search-field { position: relative; display: block; }
.search-field input {
  width: 100%;
  padding: 0.78rem 2.1rem 0.78rem 2.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  color: var(--ink);
  background: var(--surface-deep-overlay);
  font-family: var(--mono);
  font-size: 0.68rem;
  transition: 180ms ease;
}
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-field input::-ms-clear { display: none; }
.search-field input::placeholder { color: var(--ink-muted); }
.search-field input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.search-icon { position: absolute; top: 0.87rem; left: 0.8rem; width: 0.78rem; height: 0.78rem; border: 1px solid var(--ink-muted); border-radius: 50%; }
.search-icon::after { position: absolute; right: -0.25rem; bottom: -0.16rem; width: 0.32rem; height: 1px; background: var(--ink-muted); content: ''; transform: rotate(45deg); }
.search-clear { position: absolute; top: 50%; right: 0.55rem; display: grid; width: 1.3rem; height: 1.3rem; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 50%; color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.9rem; line-height: 1; transform: translateY(-50%); transition: 180ms ease; }
.search-clear:hover { border-color: var(--line-strong); color: var(--amber); background: var(--amber-soft); }

.tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.65rem; }
.tool-row-secondary { margin-top: 0.45rem; }
.tool-row-single { grid-template-columns: 1fr; }
.sort-control { display: grid; gap: 0.3rem; min-width: 0; }
.select-wrap { position: relative; display: grid; gap: 0.28rem; }
.select-label { color: var(--ink-muted); font-family: var(--mono); font-size: 0.47rem; letter-spacing: 0.08em; line-height: 1.2; text-transform: uppercase; }
.select-wrap::after { position: absolute; top: 1.62rem; right: 0.65rem; color: var(--amber); content: '⌄'; pointer-events: none; }
.select-wrap select { width: 100%; padding: 0.6rem 1.35rem 0.6rem 0.65rem; border: 1px solid var(--line); border-radius: var(--radius); outline: none; color: var(--ink-soft); background: var(--panel); font-family: var(--mono); font-size: 0.57rem; appearance: none; }
.select-wrap select:focus { border-color: var(--amber); }
.sort-direction-toggle { display: inline-flex; align-items: center; justify-content: space-between; width: 100%; gap: 0.45rem; padding: 0.34rem 0.55rem; border: 1px solid var(--line); color: var(--ink-muted); background: var(--panel); font-family: var(--mono); font-size: 0.5rem; line-height: 1.2; text-align: left; transition: 180ms ease; }
.sort-direction-toggle:not(:disabled):hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.sort-direction-toggle:focus-visible { border-color: var(--teal); }
.sort-direction-toggle:disabled { cursor: not-allowed; opacity: 0.58; }
.sort-direction-icon { flex: 0 0 auto; color: var(--teal); font-size: 0.78rem; line-height: 1; }
.sort-direction-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-search-note { margin: 0.5rem 0 0; color: var(--ink-muted); font-family: var(--mono); font-size: 0.5rem; line-height: 1.55; }
.catalog-search-note kbd { padding: 0.08rem 0.22rem; border: 1px solid var(--line-strong); color: var(--amber); background: var(--amber-soft); font-family: inherit; font-size: 0.9em; }
.catalog-filter-note { margin: 0.6rem 0 0; color: var(--ink-muted); font-family: var(--mono); font-size: 0.5rem; line-height: 1.5; }
.catalog-data-note { margin: 0.6rem 0 0; color: var(--ink-muted); font-family: var(--mono); font-size: 0.5rem; line-height: 1.5; }
.catalog-export-note { margin: 0.6rem 0 0; color: var(--teal); font-family: var(--mono); font-size: 0.5rem; line-height: 1.5; }

.catalog-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.78rem 0; color: var(--ink-muted); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.04em; text-transform: uppercase; }
.catalog-summary-readout { display: flex; min-width: 0; align-items: center; gap: 0.4rem; }
.catalog-summary-label { color: var(--ink-muted); }
.catalog-summary #catalogResultCount { color: var(--teal); }
.catalog-summary-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 0.35rem; }
.catalog-summary .catalog-action { flex: 0 0 auto; padding: 0.32rem 0.42rem; font-size: 0.5rem; }
.catalog-summary .catalog-action:disabled { cursor: not-allowed; border-color: var(--line); color: var(--ink-muted); opacity: 0.45; }
.catalog-print-button span:last-child { display: none; }
.catalog-batch-actions { padding: 0 0 0.75rem; border-bottom: 1px solid var(--line); }
.catalog-batch-action { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 0.6rem; padding: 0.48rem 0.58rem; border: 1px dashed rgba(136, 198, 186, 0.34); color: var(--teal); background: transparent; font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; transition: 180ms ease; }
.catalog-batch-action span:first-child { color: var(--amber); font-size: 0.9rem; line-height: 0.8; }
.catalog-batch-action:hover:not(:disabled) { border-color: var(--teal); color: var(--ink); background: var(--teal-soft); }
.catalog-batch-action:disabled { cursor: not-allowed; border-color: var(--line); color: var(--ink-muted); opacity: 0.62; }
.active-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-bottom: 0.85rem; }
.filter-chip { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 100%; padding: 0.38rem 0.5rem; border: 1px solid rgba(136, 198, 186, 0.34); color: var(--teal); background: var(--teal-soft); font-family: var(--mono); font-size: 0.52rem; line-height: 1.2; text-align: left; transition: 180ms ease; }
.filter-chip span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-chip span:last-child { color: var(--ink-soft); font-size: 0.8rem; line-height: 0.7; }
.filter-chip:hover { border-color: var(--teal); color: var(--ink); background: rgba(136, 198, 186, 0.2); }
.filter-clear-all { padding: 0.38rem 0.5rem; border: 1px dashed var(--line-strong); color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.52rem; line-height: 1.2; text-transform: uppercase; transition: 180ms ease; }
.filter-clear-all:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }

.catalog-list { display: grid; margin: 0; padding: 0; list-style: none; }
.catalog-entry { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.catalog-card { display: grid; grid-template-columns: 37px 1fr 42px; gap: 0.7rem; align-items: center; width: 100%; padding: 1.15rem 0; border-bottom: 1px solid var(--line); color: inherit; text-align: left; text-decoration: none; transition: 180ms ease; }
.catalog-entry .catalog-card { flex: 1; border-bottom: 0; }
.catalog-card:hover { padding-left: 0.35rem; background: linear-gradient(90deg, var(--amber-soft), transparent 78%); }
.catalog-card.is-active { background: linear-gradient(90deg, var(--amber-soft), transparent 80%); }
.catalog-card.is-active .catalog-number { color: var(--amber); }
.catalog-number { color: var(--ink-muted); font-family: var(--mono); font-size: 0.62rem; }
.catalog-card-title { display: block; margin-bottom: 0.23rem; color: var(--ink); font-size: 0.82rem; font-weight: 700; line-height: 1.25; }
.catalog-card-meta { display: block; color: var(--ink-muted); font-family: var(--mono); font-size: 0.57rem; line-height: 1.4; }
.catalog-card-status { display: inline-flex; margin-top: 0.32rem; padding: 0.18rem 0.3rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.05em; line-height: 1.2; text-transform: uppercase; }
.catalog-card-status[data-status="measured"] { border-color: rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); }
.catalog-card-status:not([data-status="schematic"]):not([data-status="measured"]),
.study-status:not([data-status="schematic"]):not([data-status="measured"]),
.compare-selection-chip-status:not([data-status="schematic"]):not([data-status="measured"]),
.compare-study-status:not([data-status="schematic"]):not([data-status="measured"]),
.chart-status:not([data-status="schematic"]):not([data-status="measured"]) { border-color: rgba(231, 127, 98, 0.42); color: var(--coral); background: var(--coral-soft); }
.catalog-card-detail { display: block; margin-top: 0.16rem; color: var(--ink-soft); font-family: var(--mono); font-size: 0.52rem; line-height: 1.35; }
.catalog-card-measure { display: block; margin-top: 0.18rem; color: var(--coral); font-family: var(--mono); font-size: 0.51rem; line-height: 1.35; }
.catalog-card-match { display: block; margin-top: 0.26rem; color: var(--teal); font-family: var(--mono); font-size: 0.48rem; letter-spacing: 0.04em; line-height: 1.35; text-transform: uppercase; }
.catalog-source-link { display: inline-flex; align-items: center; justify-content: center; align-self: center; flex: 0 0 auto; min-height: 28px; gap: 0.25rem; padding: 0.3rem 0.38rem; border: 1px solid var(--line); color: var(--teal); background: transparent; font-family: var(--mono); font-size: 0.49rem; letter-spacing: 0.04em; text-decoration: none; text-transform: uppercase; transition: 180ms ease; }
.catalog-source-link:hover,
.catalog-source-link:focus-visible { border-color: var(--teal); color: var(--ink); background: var(--teal-soft); }
.catalog-source-link span:first-child { color: var(--amber); font-size: 0.82rem; line-height: 0; }
.search-hit { padding: 0 0.08em; color: var(--bg); background: var(--amber); font-weight: 700; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.catalog-glyph { width: 38px; height: 38px; color: var(--amber); }
.catalog-glyph path, .catalog-glyph circle, .catalog-glyph rect, .catalog-glyph ellipse, .catalog-glyph line, .catalog-glyph polygon { fill: none; stroke: currentColor; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.catalog-glyph .soft { stroke: var(--teal); stroke-dasharray: 2 2; }
.catalog-footnote { display: flex; align-items: center; gap: 0.5rem; margin: 1.15rem 0 0; color: var(--ink-muted); font-size: 0.54rem; letter-spacing: 0.03em; }
.compare-toggle { align-self: center; display: grid; flex: 0 0 25px; width: 25px; height: 25px; margin-right: 0.15rem; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.76rem; line-height: 1; transition: 180ms ease; }
.compare-toggle:hover { border-color: var(--teal); color: var(--teal); }
.compare-toggle.is-selected { border-color: var(--amber); color: var(--bg); background: var(--amber); }
.filter-clear-all:focus-visible, .compare-toggle:focus-visible, .catalog-source-link:focus-visible, .layer-button:focus-visible, .zoom-control button:focus-visible, .nav-button:focus-visible, .segment-button:focus-visible, .mode-button:focus-visible, .catalog-card:focus-visible, .compare-tray button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.compare-tray { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.8rem; padding: 0.7rem 0.75rem; border: 1px solid rgba(233, 179, 108, 0.42); background: var(--amber-soft); }
.compare-tray-readout { min-width: 0; }
.compare-tray-label { display: block; color: var(--amber); font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.06em; text-transform: uppercase; }
.compare-tray strong { display: block; margin-top: 0.2rem; color: var(--ink); font-family: var(--serif); font-size: 0.9rem; font-weight: 500; }
.compare-tray-summary { display: block; overflow: hidden; max-width: 22ch; margin-top: 0.18rem; color: var(--ink-soft); font-family: var(--mono); font-size: 0.49rem; text-overflow: ellipsis; white-space: nowrap; }
.compare-tray-provenance { display: block; margin-top: 0.22rem; color: var(--amber); font-family: var(--mono); font-size: 0.48rem; letter-spacing: 0.03em; line-height: 1.35; }
.compare-tray-actions { display: flex; align-items: center; gap: 0.7rem; }
.compare-tray button { border: 0; background: transparent; color: var(--ink-muted); font-family: var(--mono); font-size: 0.55rem; text-transform: uppercase; }
.compare-tray button:hover { color: var(--ink); }
.compare-tray button:last-child { padding: 0.48rem 0.55rem; border: 1px solid var(--amber); color: var(--amber); }
.compare-tray button:last-child:disabled { cursor: not-allowed; border-color: var(--line); color: var(--ink-muted); opacity: 0.55; }
.dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.dot-amber { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.empty-state { padding: 3rem 0; color: var(--ink-muted); text-align: center; }
.empty-state p { margin-bottom: 0.8rem; font-size: 0.78rem; }
.empty-mark { display: block; margin-bottom: 0.8rem; color: var(--amber); font-family: var(--serif); font-size: 2rem; }
.clear-search { padding: 0; border: 1px solid transparent; color: var(--amber); background: transparent; font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; }
.clear-search:hover { color: var(--ink); }

.visual-column { min-width: 0; }
.visual-empty-state { display: grid; min-height: 470px; align-content: center; justify-items: center; gap: 0.65rem; padding: clamp(2rem, 5vw, 4rem); border: 1px solid var(--line); background: var(--panel); text-align: center; }
.visual-column.is-empty > .study-header,
.visual-column.is-empty > .drawing-controls,
.visual-column.is-empty > .drawing-card,
.visual-column.is-empty > .metric-strip,
.visual-column.is-empty > .detail-grid,
.visual-column.is-empty > .analysis-panel { display: none; }
.visual-empty-state .empty-mark { margin-bottom: 0; }
.visual-empty-kicker { margin: 0; color: var(--amber); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.08em; text-transform: uppercase; }
.visual-empty-state h3 { max-width: 18ch; margin: 0; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.visual-empty-state p:not(.visual-empty-kicker) { max-width: 30rem; margin: 0; color: var(--ink-soft); font-size: 0.78rem; }
.visual-empty-context { color: var(--amber) !important; font-family: var(--mono); font-size: 0.58rem !important; letter-spacing: 0.04em; line-height: 1.5; text-transform: uppercase; }
.visual-empty-action { margin-top: 0.45rem; padding: 0.55rem 0.75rem; border: 1px solid var(--amber); color: var(--amber); background: var(--amber-soft); font-family: var(--mono); font-size: 0.57rem; letter-spacing: 0.04em; text-transform: uppercase; transition: 180ms ease; }
.visual-empty-action:hover,
.visual-empty-action:focus-visible { color: var(--ink); background: rgba(233, 179, 108, 0.22); }
.study-header { display: flex; align-items: start; justify-content: space-between; gap: 2rem; margin-bottom: 1.7rem; }
.study-header > div:first-child { min-width: 0; }
.study-kicker { margin-bottom: 0.55rem; color: var(--amber); }
.study-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.65rem; }
.study-header h3 { margin-bottom: 0.35rem; font-size: clamp(1.45rem, 3vw, 2.6rem); line-height: 1.06; }
.study-status { display: inline-flex; align-items: center; align-self: center; padding: 0.32rem 0.42rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.study-status[data-status="measured"] { border-color: rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); }
.study-meta { margin: 0; color: var(--ink-muted); font-family: var(--mono); font-size: 0.63rem; }
.study-measure-summary { margin: 0.28rem 0 0; color: var(--coral); font-family: var(--mono); font-size: 0.57rem; letter-spacing: 0.03em; line-height: 1.4; }
.study-context-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.7rem; max-width: 42rem; margin: 0.55rem 0 0; padding: 0.45rem 0.6rem; border-left: 2px solid var(--amber); color: var(--ink-muted); background: var(--amber-soft); font-family: var(--mono); font-size: 0.52rem; line-height: 1.45; }
.study-context-note button { padding: 0.32rem 0.45rem; border: 1px solid var(--amber); color: var(--amber); background: transparent; font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.04em; text-transform: uppercase; transition: 180ms ease; }
.study-context-note button:hover { color: var(--ink); background: rgba(233, 179, 108, 0.18); }
.study-reference { margin: 0.35rem 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: 0.72rem; font-style: italic; }
.study-source { margin: 0.18rem 0 0; color: var(--ink-muted); font-size: 0.62rem; }
.study-source a,
.comparison-source a { color: var(--teal); text-decoration-color: var(--line-strong); text-underline-offset: 0.18em; }
.study-source a:hover,
.study-source a:focus-visible,
.comparison-source a:hover,
.comparison-source a:focus-visible { color: var(--amber); text-decoration-color: currentColor; }
.study-provenance { width: fit-content; max-width: 100%; margin-top: 0.55rem; }
.study-provenance summary { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 28px; padding: 0.32rem 0.48rem; border: 1px solid var(--line-strong); color: var(--teal); background: rgba(136, 198, 186, 0.06); cursor: pointer; font-family: var(--mono); font-size: 0.51rem; letter-spacing: 0.04em; list-style: none; text-transform: uppercase; }
.study-provenance summary::-webkit-details-marker { display: none; }
.study-provenance summary::after { color: var(--amber); content: '+'; font-size: 0.9rem; line-height: 1; }
.study-provenance[open] summary { border-color: var(--teal); }
.study-provenance[open] summary::after { content: '−'; }
.study-provenance-body { max-width: 38rem; margin-top: 0.45rem; padding: 0.55rem 0.7rem; border-left: 2px solid var(--teal); background: var(--teal-soft); }
.study-provenance-body p { margin: 0; color: var(--ink-soft); font-family: var(--mono); font-size: 0.56rem; line-height: 1.5; }
.study-provenance-body p + p { margin-top: 0.25rem; color: var(--ink-muted); }
.study-print-route { display: none; }
.catalog-route,
.study-route,
.comparison-route,
.method-route { display: block; color: var(--ink-muted); font-family: var(--mono); font-size: 0.52rem; line-height: 1.45; overflow-wrap: anywhere; }
.catalog-route { margin: 0.45rem 0 0; }
.study-route { margin: 0.55rem 0 0; }
.method-route { margin: -1.45rem 0 1.15rem; }
.route-copy-button { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 28px; margin-left: 0.35rem; padding: 0.28rem 0.45rem; border: 1px solid var(--line-strong); color: var(--teal); background: transparent; font-family: var(--mono); font-size: 0.49rem; letter-spacing: 0.03em; line-height: 1.2; text-transform: uppercase; transition: 180ms ease; vertical-align: middle; }
.route-copy-button span:first-child { color: var(--amber); font-size: 0.78rem; line-height: 0; }
.route-copy-button:hover,
.route-copy-button:focus-visible { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.route-copy-button.is-complete { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.route-copy-button.is-unavailable { border-color: var(--coral); color: var(--coral); background: var(--coral-soft); }
.catalog-route a,
.study-print-route a,
.comparison-print-route a,
.method-route a { color: var(--teal); text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
.catalog-route a:hover,
.catalog-route a:focus-visible,
.study-print-route a:hover,
.study-print-route a:focus-visible,
.comparison-print-route a:hover,
.comparison-print-route a:focus-visible,
.method-route a:hover,
.method-route a:focus-visible { color: var(--amber); text-decoration-color: currentColor; }
.study-header-actions { display: flex; flex-direction: column; align-items: end; gap: 1.25rem; }
.study-nav { display: inline-flex; align-items: center; gap: 0.35rem; }
.study-nav-position { color: var(--ink-muted); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.study-nav button { display: grid; width: 29px; height: 25px; place-items: center; padding: 0; border: 1px solid var(--line-strong); color: var(--ink-soft); background: transparent; font-family: var(--mono); font-size: 0.85rem; line-height: 1; transition: 180ms ease; }
.study-nav button:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.study-nav button:disabled { cursor: not-allowed; border-color: var(--line); color: var(--ink-muted); opacity: 0.42; }
.study-share-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 0.5rem; }
.share-button { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.62rem; border: 1px solid var(--line-strong); color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.03em; text-decoration: none; text-transform: uppercase; transition: 180ms ease; }
.share-button span:first-child { color: var(--teal); font-size: 0.85rem; line-height: 0; }
.share-button:hover { border-color: var(--teal); color: var(--ink); background: var(--teal-soft); }
.share-button[aria-expanded="true"] { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.share-button[aria-expanded="true"] span:first-child { color: var(--amber); }
button[aria-busy="true"] { cursor: progress; opacity: 0.72; }
.share-button.is-copied { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.download-button.is-complete, .drawing-export.is-complete, .share-button.is-complete { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.download-button.is-unavailable, .drawing-export.is-unavailable, .share-button.is-unavailable { border-color: var(--coral); color: var(--coral); background: var(--coral-soft); }
.manual-copy-fallback { display: grid; gap: 0.55rem; margin: 0 0 1rem; padding: 0.8rem 0.9rem; border: 1px solid rgba(233, 179, 108, 0.42); background: var(--amber-soft); }
.manual-copy-fallback-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.manual-copy-fallback-heading { margin: 0; color: var(--amber); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.04em; text-transform: uppercase; }
.manual-copy-fallback-dismiss { flex: 0 0 auto; padding: 0.3rem 0.45rem; border: 1px solid var(--line-strong); color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.04em; text-transform: uppercase; transition: 180ms ease; }
.manual-copy-fallback-dismiss:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.manual-copy-fallback textarea { width: 100%; min-height: 4.6rem; padding: 0.6rem; border: 1px solid var(--line-strong); color: var(--ink); background: var(--bg-deep); font-family: var(--mono); font-size: 0.63rem; line-height: 1.5; resize: vertical; }
.manual-copy-fallback textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); outline: none; }
.search-field input:focus-visible,
.select-wrap select:focus-visible,
.manual-copy-fallback textarea:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.manual-copy-fallback-hint { margin: 0; color: var(--ink-muted); font-size: 0.62rem; line-height: 1.45; }
.study-index { color: var(--amber); font-family: var(--serif); font-size: 3.5rem; line-height: 0.85; opacity: 0.85; }

.drawing-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.segmented-control, .mode-control { display: flex; align-items: center; }
.segmented-control { padding: 0.18rem; border: 1px solid var(--line); background: var(--surface-segmented); }
.segment-button { min-width: 70px; padding: 0.52rem 0.7rem; color: var(--ink-muted); font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase; transition: 180ms ease; }
.segment-button:hover, .segment-button.is-active { color: var(--bg); background: var(--amber); }
.mode-control { gap: 1rem; }
.mode-button { position: relative; padding: 0.55rem 0; color: var(--ink-muted); font-family: var(--mono); font-size: 0.59rem; text-transform: uppercase; }
.mode-button::after { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: var(--teal); content: ''; opacity: 0; }
.mode-button:hover, .mode-button.is-active { color: var(--teal); }
.mode-button.is-active::after { opacity: 1; }
.layer-control { display: flex; align-items: center; gap: 0.42rem; margin-left: auto; }
.layer-label { margin-right: 0.15rem; color: var(--ink-muted); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.08em; text-transform: uppercase; }
.layer-button { padding: 0.43rem 0.5rem; border: 1px solid transparent; background: transparent; color: var(--ink-muted); font-family: var(--mono); font-size: 0.55rem; text-transform: uppercase; transition: 180ms ease; }
.layer-button:hover { color: var(--ink); border-color: var(--line-strong); }
.layer-button.is-active { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }

.drawing-card { overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.drawing-toolbar { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); }
.drawing-legend { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--ink-muted); font-size: 0.52rem; letter-spacing: 0.025em; }
.drawing-legend span { display: inline-flex; align-items: center; gap: 0.38rem; }
.shortcut-guide { color: var(--ink-soft); }
.shortcut-guide summary { display: inline-flex; align-items: center; gap: 0.38rem; padding: 0.08rem 0; color: var(--ink-soft); cursor: pointer; font-family: var(--mono); font-size: 0.52rem; list-style: none; text-transform: uppercase; }
.shortcut-guide summary::-webkit-details-marker { display: none; }
.shortcut-guide summary::after { color: var(--amber); content: '+'; font-size: 0.85rem; line-height: 1; }
.shortcut-guide[open] { flex-basis: 100%; }
.shortcut-guide[open] summary::after { content: '−'; }
.shortcut-guide-panel { max-width: 380px; margin-top: 0.6rem; padding: 0.7rem 0.8rem; border: 1px solid var(--line); background: var(--panel-bright); }
.shortcut-guide-panel p { margin: 0 0 0.55rem; color: var(--amber); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.05em; text-transform: uppercase; }
.shortcut-guide-panel dl { display: grid; gap: 0.38rem; margin: 0; }
.shortcut-guide-panel dl div { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 0.6rem; }
.shortcut-guide-panel dt { display: flex; align-items: center; gap: 0.25rem; }
.shortcut-guide-panel dd { margin: 0; color: var(--ink-soft); font-size: 0.58rem; }
.shortcut-guide-panel kbd { display: inline-grid; min-width: 1.2rem; height: 1.2rem; padding: 0 0.25rem; place-items: center; border: 1px solid var(--line-strong); color: var(--teal); background: var(--bg-deep); font-family: var(--mono); font-size: 0.52rem; line-height: 1; }
.legend-swatch { display: inline-block; width: 12px; height: 2px; }
.swatch-primary { background: var(--amber); }
.swatch-secondary { background: var(--teal); }
.swatch-tertiary { background: var(--coral); }
.drawing-scale { color: var(--ink-muted); font-size: 0.52rem; white-space: nowrap; }
.drawing-tools { display: flex; align-items: center; gap: 0.7rem; }
.drawing-export { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.42rem 0.5rem; border: 1px solid var(--line-strong); color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.04em; text-transform: uppercase; transition: 180ms ease; }
.drawing-export span:first-child { color: var(--teal); font-size: 0.86rem; line-height: 0; }
.drawing-export:hover { border-color: var(--teal); color: var(--ink); background: var(--teal-soft); }
.drawing-reset { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.42rem 0.5rem; border: 1px solid var(--line-strong); color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.04em; text-transform: uppercase; transition: 180ms ease; }
.drawing-reset span:first-child { color: var(--amber); font-size: 0.86rem; line-height: 0; }
.drawing-reset:hover { border-color: var(--amber); color: var(--ink); background: var(--amber-soft); }
.zoom-control { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.zoom-control button { width: 25px; height: 24px; padding: 0; border: 0; border-right: 1px solid var(--line); color: var(--ink-soft); background: transparent; font-family: var(--mono); font-size: 0.75rem; line-height: 1; }
.zoom-control button:last-child { border-right: 0; }
.zoom-control button:hover { color: var(--amber); background: var(--amber-soft); }
.zoom-control button:disabled { cursor: not-allowed; color: var(--ink-muted); opacity: 0.42; }
.zoom-control button:disabled:hover { color: var(--ink-muted); background: transparent; }
.zoom-readout { min-width: 34px; color: var(--ink-muted); font-family: var(--mono); font-size: 0.5rem; text-align: right; }
.svg-wrap { min-height: 470px; background: radial-gradient(circle at 45% 46%, rgba(136, 198, 186, 0.07), transparent 36%), var(--bg-deep); }
.geometry-svg { display: block; width: 100%; height: auto; min-height: 470px; color: var(--ink); }
.geometry-svg text { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.geometry-svg .grid-line { stroke: var(--grid-line); stroke-width: 1; }
.geometry-svg .axis-line { stroke: var(--teal); stroke-dasharray: 5 6; stroke-width: 1; opacity: 0.75; }
.geometry-svg .primary-line { stroke: var(--amber); stroke-width: 2; }
.geometry-svg .primary-fill { fill: rgba(233, 179, 108, 0.1); stroke: var(--amber); stroke-width: 2; }
.geometry-svg .interior-fill { fill: rgba(136, 198, 186, 0.11); stroke: var(--teal); stroke-width: 2; }
.geometry-svg .secondary-line { stroke: var(--teal); stroke-width: 1.2; }
.geometry-svg .tertiary-line { stroke: var(--coral); stroke-width: 1; }
.geometry-svg .faint-line { stroke: var(--faint-line); stroke-width: 1; fill: none; }
.geometry-svg .dim-text { fill: var(--coral); font-size: 9px; }
.geometry-svg .label-text { fill: var(--ink-soft); font-size: 9px; }
.geometry-svg .small-label { fill: var(--ink-muted); font-size: 8px; }
.geometry-svg .watermark { fill: rgba(233, 179, 108, 0.12); font-family: var(--serif); font-size: 42px; letter-spacing: -0.04em; }
.geometry-svg .stone-dot { fill: var(--amber); }
.geometry-svg .column { fill: var(--bg-deep); stroke: var(--amber); stroke-width: 1.5; }
.geometry-svg .crosshair { stroke: var(--coral); stroke-width: 1; }
.geometry-svg .dimension-bracket { stroke: var(--coral); stroke-width: 1; marker-start: url(#arrow); marker-end: url(#arrow); }
.geometry-svg .dimension-arrow { stroke: var(--coral); }
.drawing-caption { display: flex; align-items: start; gap: 0.7rem; min-height: 70px; padding: 0.95rem 1rem; border-top: 1px solid var(--line); }
.caption-mark { color: var(--amber); font-size: 0.9rem; line-height: 1.3; }
.drawing-caption-copy { min-width: 0; }
.drawing-caption p { max-width: 58rem; margin-bottom: 0; color: var(--ink-soft); font-size: 0.77rem; line-height: 1.6; }
.drawing-caption .drawing-state { max-width: none; margin-bottom: 0.4rem; color: var(--amber); font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.06em; line-height: 1.35; text-transform: uppercase; }

.geometry-svg.focus-envelope .axis-line,
.geometry-svg.focus-envelope .secondary-line,
.geometry-svg.focus-envelope .column,
.geometry-svg.focus-envelope .stone-dot { opacity: 0.13; }
.geometry-svg.focus-envelope .tertiary-line { opacity: 0.75; }
.geometry-svg.focus-rhythm .primary-line,
.geometry-svg.focus-rhythm .primary-fill,
.geometry-svg.focus-rhythm .interior-fill,
.geometry-svg.focus-rhythm .dimension-bracket { opacity: 0.15; }
.geometry-svg.focus-axis .primary-line,
.geometry-svg.focus-axis .primary-fill,
.geometry-svg.focus-axis .interior-fill,
.geometry-svg.focus-axis .secondary-line,
.geometry-svg.focus-axis .column { opacity: 0.12; }
.geometry-svg.focus-axis .axis-line,
.geometry-svg.focus-axis .stone-dot,
.geometry-svg.focus-axis .tertiary-line { opacity: 1; }
.geometry-svg.focus-measure .primary-line,
.geometry-svg.focus-measure .primary-fill,
.geometry-svg.focus-measure .interior-fill,
.geometry-svg.focus-measure .axis-line,
.geometry-svg.focus-measure .secondary-line,
.geometry-svg.focus-measure .column,
.geometry-svg.focus-measure .stone-dot { opacity: 0.1; }
.geometry-svg.focus-measure .dimension-bracket,
.geometry-svg.focus-measure .dim-text,
.geometry-svg.focus-measure .tertiary-line,
.geometry-svg.focus-measure .faint-line { opacity: 1; }

.analysis-panel { margin-top: 1rem; padding: 1.2rem; border: 1px solid var(--line); background: var(--surface-overlay); }
.analysis-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.analysis-kicker, .profile-heading, .analysis-cell span, .analysis-cell small { font-family: var(--mono); text-transform: uppercase; }
.analysis-kicker { margin-bottom: 0.35rem; color: var(--amber); font-size: 0.55rem; letter-spacing: 0.08em; }
.analysis-heading h4 { margin: 0; color: var(--ink); font-size: 1rem; letter-spacing: -0.03em; }
.equation { padding: 0.52rem 0.65rem; border: 1px solid rgba(233, 179, 108, 0.36); color: var(--amber); font-family: var(--mono); font-size: 0.62rem; white-space: nowrap; }
.analysis-reading { max-width: 58rem; margin: 0 0 1rem; padding: 0.72rem 0.85rem; border-left: 2px solid var(--teal); color: var(--ink-soft); font-family: var(--serif); font-size: 0.85rem; line-height: 1.65; }
.analysis-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-block: 1px solid var(--line); }
.analysis-cell { min-height: 83px; padding: 0.85rem 0.75rem 0.7rem; border-right: 1px solid var(--line); }
.analysis-cell:first-child { padding-left: 0; }
.analysis-cell:last-child { border-right: 0; }
.analysis-cell span, .analysis-cell small { display: block; color: var(--ink-muted); font-size: 0.51rem; letter-spacing: 0.04em; }
.analysis-cell strong { display: block; margin: 0.3rem 0; color: var(--teal); font-family: var(--serif); font-size: 1.27rem; font-weight: 500; }
.profile-readout { padding-top: 1rem; }
.profile-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 1rem; margin-bottom: 0.35rem; color: var(--ink-muted); font-size: 0.52rem; letter-spacing: 0.05em; }
.profile-note { margin: 0 0 0.75rem; color: var(--ink-muted); font-family: var(--mono); font-size: 0.52rem; line-height: 1.45; }
.profile-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.profile-item { min-width: 0; }
.profile-label { display: flex; justify-content: space-between; gap: 0.4rem; margin-bottom: 0.36rem; color: var(--ink-soft); font-family: var(--mono); font-size: 0.55rem; }
.profile-label b { color: var(--amber); font-weight: 400; }
.profile-track { height: 4px; background: rgba(213, 229, 214, 0.11); }
.profile-fill { display: block; width: var(--profile); height: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); transition: width 420ms ease; }

.metric-strip { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 1.25rem; border-block: 1px solid var(--line); }
.metric-cell { min-height: 88px; padding: 1.1rem 1rem 0.9rem; border-right: 1px solid var(--line); }
.metric-cell:first-child { padding-left: 0; }
.metric-cell-last { border-right: 0; }
.metric-label { display: block; margin-bottom: 0.45rem; color: var(--ink-muted); font-size: 0.53rem; letter-spacing: 0.04em; }
.metric-cell strong { color: var(--ink); font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.metric-cell-accent strong { color: var(--amber); }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; padding-top: 1.1rem; }
.detail-item { padding: 0.9rem; border: 1px solid var(--line); background: var(--surface-overlay); }
.detail-item-label { display: block; margin-bottom: 0.35rem; color: var(--ink-muted); font-family: var(--mono); font-size: 0.53rem; text-transform: uppercase; }
.detail-item-value { display: block; color: var(--teal); font-size: 0.77rem; font-weight: 600; }

.page-view { border-top: 1px solid var(--line); }
.compare-intro { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.compare-intro > p { max-width: 39rem; margin-bottom: 0; color: var(--ink-soft); line-height: 1.75; }
.compare-intro-side { display: grid; justify-items: end; gap: 0.7rem; }
.compare-intro-export-actions { justify-content: end; }
.compare-callout { display: grid; min-width: 150px; padding: 0.9rem 1rem; border: 1px solid var(--amber); background: var(--amber-soft); }
.compare-callout span, .compare-callout small { color: var(--amber); font-family: var(--mono); font-size: 0.54rem; text-transform: uppercase; }
.compare-callout strong { margin: 0.2rem 0; color: var(--ink); font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.compare-helper { margin: -1rem 0 0.65rem; color: var(--ink-muted); font-size: 0.7rem; }
.compare-selection { margin: 0 0 1.5rem; padding: 0.85rem 1rem; border: 1px solid var(--line); background: var(--surface-overlay); }
.compare-selection-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.65rem; }
.compare-selection-label { margin: 0; color: var(--amber); font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.07em; text-transform: uppercase; }
.compare-selection-clear { padding: 0.32rem 0.48rem; border: 1px solid var(--line-strong); color: var(--ink-muted); background: transparent; font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.04em; text-transform: uppercase; transition: 180ms ease; }
.compare-selection-clear:hover { border-color: var(--coral); color: var(--coral); background: rgba(231, 127, 98, 0.08); }
.compare-selection-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.compare-selection-chip { display: inline-flex; min-width: 0; align-items: stretch; border: 1px solid var(--line-strong); color: var(--ink-soft); background: var(--panel); font-family: var(--mono); font-size: 0.57rem; text-align: left; transition: 180ms ease; }
.compare-selection-chip:hover { border-color: var(--coral); color: var(--ink); background: rgba(231, 127, 98, 0.08); }
.compare-selection-study-link { display: inline-flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 0.55rem; padding: 0.42rem 0.55rem 0.42rem 0.65rem; color: inherit; text-decoration: none; }
.compare-selection-study-link:hover { color: var(--ink); }
.compare-selection-chip-index { flex: 0 0 auto; color: var(--amber); font-size: 0.52rem; letter-spacing: 0.05em; }
.compare-selection-chip-name { overflow: hidden; max-width: 22ch; text-overflow: ellipsis; white-space: nowrap; }
.compare-selection-chip-axis { flex: 0 0 auto; color: var(--teal); font-size: 0.5rem; letter-spacing: 0.04em; text-transform: uppercase; }
.compare-selection-chip-status { display: inline-flex; flex: 0 0 auto; padding: 0.12rem 0.24rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-size: 0.5rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.compare-selection-chip-status[data-status="measured"] { border-color: rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); }
.compare-selection-chip-current { display: inline-flex; flex: 0 0 auto; padding: 0.12rem 0.24rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-size: 0.48rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.compare-selection-chip-remove { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 2.2rem; padding: 0.42rem 0.55rem; border: 0; border-left: 1px solid var(--line); color: var(--coral); background: transparent; font-family: var(--mono); font-size: 0.9rem; line-height: 0.8; transition: 180ms ease; }
.compare-selection-chip-remove:hover,
.compare-selection-chip-remove:focus-visible { color: var(--ink); background: rgba(231, 127, 98, 0.14); }
.compare-status-note { margin: 0 0 2rem; color: var(--ink-muted); font-family: var(--mono); font-size: 0.52rem; line-height: 1.5; }
.comparison-print-route { display: none; }
.comparison-route { display: block; margin: -1.25rem 0 1.15rem; }
.comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.comparison-card { min-height: 340px; padding: 1.35rem; border: 1px solid var(--line); background: var(--panel); }
.wide-card { grid-column: 1 / -1; min-height: 280px; }
.geometry-compare-card { min-height: 330px; }
.geometry-compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.7rem; }
.compare-study-card { display: block; min-width: 0; width: 100%; padding: 0.85rem; border: 1px solid var(--line); color: inherit; background: var(--surface-deep-overlay); text-align: left; text-decoration: none; transition: 180ms ease; }
.compare-study-card:hover { border-color: var(--amber); background: var(--amber-soft); }
.compare-study-card.is-active { border-color: var(--teal); box-shadow: inset 3px 0 0 var(--teal); }
.compare-study-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.compare-study-title { display: block; margin: 0.7rem 0 0.25rem; color: var(--ink); font-size: 0.78rem; line-height: 1.25; }
.compare-study-context { display: block; margin: 0 0 0.2rem; color: var(--ink-soft); font-family: var(--mono); font-size: 0.5rem; line-height: 1.35; }
.compare-study-measure { display: block; margin: 0.2rem 0 0; color: var(--coral); font-family: var(--mono); font-size: 0.5rem; line-height: 1.35; overflow-wrap: anywhere; }
.compare-study-emphasis { display: block; margin-top: 0.18rem; color: var(--amber); font-family: var(--mono); font-size: 0.49rem; letter-spacing: 0.04em; line-height: 1.35; text-transform: uppercase; }
.compare-study-meta { display: block; margin: 0.18rem 0 0; color: var(--ink-muted); font-family: var(--mono); font-size: 0.52rem; }
.compare-study-open { display: block; margin-top: 0.72rem; color: var(--teal); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.05em; line-height: 1.2; text-transform: uppercase; }
.compare-study-card.is-active .compare-study-open { color: var(--amber); }
.compare-study-card:hover .compare-study-open, .compare-study-card:focus-visible .compare-study-open { color: var(--amber); }
.compare-study-number { color: var(--amber); font-family: var(--mono); font-size: 0.57rem; }
.compare-study-status { display: inline-flex; margin-left: 0.18rem; padding: 0.12rem 0.24rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-size: 0.5rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.compare-study-status[data-status="measured"] { border-color: rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); }
.compare-mini { display: block; width: 100%; height: 110px; margin-top: 0.45rem; background: var(--bg-deep); }
.compare-mini .mini-primary { fill: rgba(233, 179, 108, 0.1); stroke: var(--amber); stroke-width: 1.7; }
.compare-mini .mini-secondary { fill: none; stroke: var(--teal); stroke-width: 1; stroke-dasharray: 3 3; }
.compare-mini .mini-detail { fill: none; stroke: var(--coral); stroke-width: 1; }
.card-heading { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; }
.card-kicker { display: block; margin-bottom: 0.45rem; color: var(--amber); font-size: 0.56rem; }
.card-heading h3 { margin-bottom: 0; font-size: 1.1rem; }
.card-symbol { color: var(--teal); font-family: var(--serif); font-size: 1.8rem; line-height: 1; }
.bar-chart { display: grid; gap: 0.8rem; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 0.7rem; }
.bar-label { display: grid; min-width: 0; align-content: center; gap: 0.14rem; overflow: hidden; color: var(--ink-soft); font-size: 0.65rem; }
.bar-row.is-active .bar-label,
.module-row.is-active .module-name { color: var(--ink); }
.chart-study-name { display: flex; min-width: 0; align-items: baseline; gap: 0.35rem; overflow: hidden; }
.chart-study-index { flex: 0 0 auto; color: var(--amber); font-family: var(--mono); font-size: 0.72em; letter-spacing: 0.05em; }
.chart-study-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-study-meta { display: flex; min-width: 0; align-items: center; gap: 0.3rem; overflow: hidden; }
.chart-axis-context { min-width: 0; overflow: hidden; color: var(--ink-muted); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.03em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.chart-status { display: inline-flex; flex: 0 0 auto; padding: 0.12rem 0.22rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.chart-status[data-status="measured"] { border-color: rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); }
.chart-current { display: inline-flex; flex: 0 0 auto; padding: 0.12rem 0.22rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-family: var(--mono); font-size: 0.46rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.bar-track { height: 7px; background: var(--track); }
.bar-fill { display: block; height: 100%; min-width: 3px; background: var(--amber); transition: width 450ms ease; }
.bar-fill.teal { background: var(--teal); }
.bar-value { color: var(--ink-muted); font-family: var(--mono); font-size: 0.57rem; text-align: right; }
.chart-axis-guide { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 0.6rem; padding-top: 0.35rem; border-top: 1px solid var(--line); color: var(--ink-muted); font-family: var(--mono); font-size: 0.48rem; line-height: 1; }
.chart-axis-guide span:nth-child(2) { text-align: center; }
.chart-axis-guide span:last-child { color: var(--teal); text-align: right; }
.bar-axis-guide { padding-inline: calc(92px + 0.7rem) calc(44px + 0.7rem); }
.chart-scale { margin: 1.25rem 0 0; color: var(--teal); font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.04em; line-height: 1.35; text-transform: uppercase; }
.chart-note { margin: 0.5rem 0 0; color: var(--ink-muted); font-size: 0.68rem; }
.module-chart { display: grid; gap: 0.75rem; }
.module-row { display: grid; grid-template-columns: 145px 1fr 55px; align-items: center; gap: 0.8rem; }
.module-name { display: grid; min-width: 0; align-content: center; gap: 0.14rem; color: var(--ink-soft); font-size: 0.65rem; }
.module-bars { display: flex; align-items: stretch; gap: 3px; max-width: 100%; height: 22px; }
.module-bar { flex: 1; min-width: 2px; height: 100%; background: var(--teal); opacity: 0.72; }
.module-value { color: var(--ink-muted); font-family: var(--mono); font-size: 0.57rem; text-align: right; }
.module-axis-guide { padding-inline: calc(145px + 0.8rem) calc(55px + 0.8rem); }
.profile-compare-head { display: grid; grid-template-columns: 145px 1fr; align-items: end; gap: 0.8rem; margin-bottom: 0.3rem; color: var(--ink-muted); font-family: var(--mono); font-size: 0.48rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.profile-compare-head-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.profile-compare-head-grid span { min-width: 0; }
.profile-compare { display: grid; gap: 0; }
.profile-compare-row { display: grid; grid-template-columns: 145px 1fr; align-items: center; gap: 0.8rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.profile-compare-row:last-child { border-bottom: 0; }
.profile-compare-row.is-active { padding-inline: 0.5rem; background: var(--selection-soft); box-shadow: inset 2px 0 0 var(--teal); }
.profile-compare-name { display: grid; min-width: 0; align-content: center; gap: 0.14rem; color: var(--ink-soft); font-size: 0.65rem; }
.profile-compare-row.is-active .profile-compare-name { color: var(--ink); }
.profile-compare-meta { display: flex; min-width: 0; align-items: center; gap: 0.3rem; overflow: hidden; }
.profile-compare-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.profile-compare-cell { display: grid; min-width: 0; gap: 0.22rem; }
.profile-compare-label { color: var(--ink-muted); font-family: var(--mono); font-size: 0.48rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.profile-compare-track { display: block; height: 7px; border: 1px solid var(--track-border); background: var(--track); }
.profile-compare-fill { display: block; height: 100%; min-width: 3px; background: var(--coral); transition: width 450ms ease; }
.profile-compare-value { color: var(--ink-muted); font-family: var(--mono); font-size: 0.54rem; text-align: right; }
.comparison-table-panel { margin-top: 1rem; border: 1px solid var(--line); background: var(--panel); }
.comparison-table-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.95rem 1.15rem; color: var(--teal); cursor: pointer; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.04em; list-style: none; text-transform: uppercase; }
.comparison-table-panel summary::-webkit-details-marker { display: none; }
.comparison-table-panel summary::after { color: var(--amber); content: '+'; font-size: 1rem; line-height: 1; }
.comparison-table-panel[open] summary { border-bottom: 1px solid var(--line); }
.comparison-table-panel[open] summary::after { content: '−'; }
.comparison-table-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.15rem; border-bottom: 1px solid var(--line); }
.comparison-table-copy { min-width: 0; }
.comparison-table-actions p { margin: 0; color: var(--ink-muted); font-size: 0.65rem; }
.comparison-table-actions .comparison-table-hint { margin-top: 0.28rem; color: var(--teal); font-family: var(--mono); font-size: 0.52rem; line-height: 1.45; }
.comparison-export-actions { display: flex; flex: 0 0 auto; gap: 0.45rem; }
.comparison-table-actions .share-button { flex: 0 0 auto; }
.comparison-table-scroll-cue { display: flex; align-items: center; gap: 0.55rem; margin: 0; padding: 0.55rem 1.15rem; border-bottom: 1px solid var(--line); color: var(--teal); font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.04em; line-height: 1.35; text-transform: uppercase; }
.scroll-cue-mark { color: var(--amber); font-size: 0.8rem; line-height: 1; }
.comparison-table-wrap { overflow-x: auto; overscroll-behavior-x: contain; overscroll-behavior-inline: contain; }
.comparison-table-wrap:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.comparison-table { width: 100%; min-width: 760px; border-collapse: collapse; font-family: var(--mono); font-size: 0.58rem; }
.comparison-table caption { padding: 0.9rem 1.15rem 0.65rem; color: var(--ink-muted); text-align: left; }
.comparison-table th, .comparison-table td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.comparison-table thead th { color: var(--amber); font-size: 0.52rem; font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase; }
.comparison-table thead th { position: sticky; top: 7rem; z-index: 1; background: var(--panel); box-shadow: 0 1px 0 var(--line); }
.comparison-table thead th:first-child, .comparison-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
.comparison-table thead th:first-child { z-index: 3; box-shadow: 1px 1px 0 var(--line); }
.comparison-table thead th:first-child, .comparison-table tbody th { text-align: left; }
.comparison-table tbody th { color: var(--ink-soft); font-family: var(--sans); font-size: 0.68rem; font-weight: 600; }
.comparison-table-study-link { display: inline-flex; align-items: center; gap: 0.35rem; color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; transition: 180ms ease; }
.comparison-table-study-link > span[aria-hidden="true"] { color: var(--teal); font-family: var(--mono); font-size: 0.8em; text-decoration: none; }
.comparison-table-study-link .comparison-table-study-index { color: var(--amber); font-size: 0.68em; font-weight: 500; letter-spacing: 0.08em; }
.comparison-table-study-link .comparison-table-study-state { color: var(--amber); font-family: var(--mono); font-size: 0.62em; font-weight: 500; letter-spacing: 0.05em; text-decoration: none; text-transform: uppercase; }
.comparison-table-study-link:hover, .comparison-table-study-link:focus-visible { color: var(--amber); text-decoration-color: currentColor; }
.comparison-table tbody td { color: var(--teal); }
.comparison-table tbody .comparison-profile-cell { color: var(--coral); font-variant-numeric: tabular-nums; }
.comparison-table tbody .comparison-status { color: var(--amber); letter-spacing: 0.04em; text-transform: uppercase; }
.comparison-table tbody .comparison-status[data-status="measured"] { color: var(--teal); }
.comparison-table tbody .comparison-status:not([data-status="schematic"]):not([data-status="measured"]) { color: var(--coral); }
.comparison-table tbody .comparison-source { max-width: 30ch; color: var(--ink-muted); text-align: left; white-space: normal; }
.comparison-table tbody .comparison-source strong,
.comparison-table tbody .comparison-source span { display: block; }
.comparison-table tbody .comparison-source strong { color: var(--ink-soft); font-family: var(--sans); font-size: 0.64rem; font-weight: 600; line-height: 1.35; }
.comparison-table tbody .comparison-source span { margin-top: 0.2rem; line-height: 1.45; }
.comparison-table tbody .comparison-provenance { max-width: 28ch; color: var(--ink-muted); text-align: left; white-space: normal; }
.comparison-table tbody tr:last-child th, .comparison-table tbody tr:last-child td { border-bottom: 0; }

.method-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); align-items: stretch; gap: 2.5rem; margin-bottom: 1rem; padding: 2.4rem; border: 1px solid var(--line); background: var(--panel); }
.method-copy { display: flex; flex-direction: column; justify-content: center; max-width: 36rem; }
.method-number { margin-bottom: 1.15rem; color: var(--amber); }
.method-copy h3 { margin-bottom: 1rem; font-size: clamp(1.65rem, 3.5vw, 3.15rem); line-height: 1.05; }
.method-copy p:last-child { margin-bottom: 0; color: var(--ink-soft); line-height: 1.8; }
.method-diagram { display: grid; align-items: center; min-height: 270px; background: var(--bg-deep); color: var(--ink-soft); }
.method-diagram svg { width: 100%; height: auto; }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.method-card { min-height: 225px; padding: 1.3rem; background: var(--panel); }
.method-card-index { display: grid; width: 25px; height: 25px; margin-bottom: 1.3rem; place-items: center; border: 1px solid var(--amber); color: var(--amber); font-family: var(--mono); font-size: 0.6rem; }
.method-card h3 { margin-bottom: 0.55rem; font-size: 1.05rem; }
.method-card p { min-height: 70px; margin-bottom: 1.2rem; color: var(--ink-muted); font-size: 0.72rem; line-height: 1.65; }
.method-readings { margin-top: 1rem; padding: 1.4rem; border: 1px solid var(--line); background: var(--panel); }
.method-readings-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.15rem; }
.method-readings-heading .method-number { margin-bottom: 0.45rem; }
.method-readings-heading h3 { margin-bottom: 0; font-size: 1.2rem; }
.method-readings-heading > p { max-width: 30rem; margin: 0; color: var(--ink-muted); font-size: 0.7rem; line-height: 1.6; text-align: right; }
.method-readings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; border: 1px solid var(--line); background: var(--line); }
.method-reading-item { min-height: 145px; margin: 0; padding: 1rem; background: var(--bg-deep); }
.method-reading-item dt { margin-bottom: 0.55rem; color: var(--teal); font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.04em; text-transform: uppercase; }
.method-reading-item dd { margin: 0; color: var(--ink-muted); font-size: 0.68rem; line-height: 1.65; }
.method-status-key { margin-top: 1rem; padding: 1.4rem; border: 1px solid var(--line); background: var(--surface-glow); }
.method-status-key-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.15rem; }
.method-status-key-heading .method-number { margin-bottom: 0.45rem; }
.method-status-key-heading h3 { margin-bottom: 0; font-size: 1.2rem; }
.method-status-key-heading > p { max-width: 30rem; margin: 0; color: var(--ink-muted); font-size: 0.7rem; line-height: 1.6; text-align: right; }
.method-status-key-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--line); background: var(--line); }
.method-status-key-item { min-width: 0; min-height: 100px; padding: 1rem; background: var(--bg-deep); }
.method-status-key-meta { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 0.45rem; }
.method-status-key-label { display: inline-flex; flex: 0 0 auto; padding: 0.16rem 0.3rem; border: 1px solid rgba(233, 179, 108, 0.42); color: var(--amber); background: var(--amber-soft); font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
.method-status-key-label[data-status="measured"] { border-color: rgba(136, 198, 186, 0.42); color: var(--teal); background: var(--teal-soft); }
.method-status-key-label:not([data-status="schematic"]):not([data-status="measured"]) { border-color: rgba(231, 127, 98, 0.42); color: var(--coral); background: var(--coral-soft); }
.method-status-key-meta code { min-width: 0; overflow-wrap: anywhere; color: var(--ink-muted); font-size: 0.54rem; }
.method-status-key-count { margin-left: auto; color: var(--teal); font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.method-status-key-item p { margin: 0.7rem 0 0; color: var(--ink-muted); font-size: 0.68rem; line-height: 1.6; }
.method-status-key-empty { margin: 0; padding: 1rem; color: var(--ink-muted); font-size: 0.68rem; }
.method-dictionary { margin-top: 1rem; padding: 1.4rem; border: 1px solid var(--line); background: var(--panel); }
.method-dictionary .method-readings-heading { align-items: start; }
.method-dictionary-intro { display: flex; align-items: end; justify-content: end; gap: 1rem; max-width: 34rem; }
.method-dictionary-intro > p { max-width: 24rem; margin: 0; color: var(--ink-muted); font-size: 0.7rem; line-height: 1.6; text-align: right; }
.method-dictionary-links { display: flex; flex: 0 0 auto; gap: 0.4rem; }
.method-dictionary-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 0.55rem 0.65rem; border: 1px solid var(--line-strong); color: var(--teal); font-family: var(--mono); font-size: 0.56rem; text-decoration: none; text-transform: uppercase; transition: 180ms ease; }
.method-dictionary-links a:hover { border-color: var(--amber); color: var(--amber); }
.method-dictionary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0; border: 1px solid var(--line); background: var(--line); }
.method-dictionary-item { min-height: 132px; margin: 0; padding: 1rem; background: var(--bg-deep); }
.method-dictionary-item dt { margin-bottom: 0.55rem; color: var(--teal); font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.04em; text-transform: uppercase; }
.method-dictionary-item dd { margin: 0; color: var(--ink-muted); font-size: 0.66rem; line-height: 1.65; }
.method-dictionary-formulas { margin: 1rem 0 0; color: var(--ink-muted); font-size: 0.66rem; line-height: 1.6; }
.method-dictionary-formulas span { color: var(--amber); font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.04em; text-transform: uppercase; }
code { color: var(--teal); font-family: var(--mono); font-size: 0.64rem; }
.method-note { display: flex; gap: 0.85rem; margin-top: 1rem; padding: 1.05rem 1.2rem; border: 1px solid rgba(231, 127, 98, 0.4); background: rgba(231, 127, 98, 0.08); }
.note-icon { display: grid; flex: 0 0 20px; height: 20px; place-items: center; border: 1px solid var(--coral); border-radius: 50%; color: var(--coral); font-family: var(--serif); font-size: 0.72rem; }
.method-note p { margin-bottom: 0; color: var(--ink-soft); font-size: 0.7rem; line-height: 1.65; }
.method-note strong { color: var(--coral); }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 100px; border-top: 1px solid var(--line); color: var(--ink-muted); font-family: var(--mono); font-size: 0.58rem; }
.site-footer-identity { display: grid; gap: 0.3rem; }
.site-footer p { margin: 0; }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 0.45rem 0.8rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; text-underline-offset: 0.2em; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--amber); text-decoration: underline; }
.footer-mark { margin-right: 0.35rem; color: var(--amber); }

[hidden] { display: none !important; }

@media (max-width: 1050px) {
  .site-header, .connection-status, .update-status, main, .site-footer { width: min(100% - 48px, 900px); }
  .main-nav { margin-left: 0; }
  .atlas-layout { grid-template-columns: minmax(205px, 240px) 1fr; gap: 2.2rem; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .dataset-link span:last-child { display: inline; font-size: 0; white-space: nowrap; }
  .dataset-link-json span:last-child::after { content: "JSON"; font-size: 0.56rem; }
  .dataset-link-csv span:last-child::after { content: "CSV"; font-size: 0.56rem; }
  .dataset-link-schema span:last-child::after { content: "Schema"; font-size: 0.56rem; }
  .download-button span.download-label { display: inline; font-size: 0; white-space: nowrap; }
  .download-button span.download-label::after { content: "JSON"; font-size: 0.56rem; }
  .download-button.is-complete span.download-label::after { content: "Done"; }
  .download-button.is-unavailable span.download-label::after { content: "Unavailable"; }
  #downloadCsvData span.download-label::after { content: "CSV"; }
  #downloadCsvData.is-complete span.download-label::after { content: "Done"; }
  #downloadCsvData.is-unavailable span.download-label::after { content: "Unavailable"; }
  .download-button.install-button span.download-label::after { content: "Install"; }
  .theme-toggle span.theme-toggle-label { display: inline; font-size: 0; white-space: nowrap; }
  .theme-toggle span.theme-toggle-label::after { content: "Theme"; font-size: 0.56rem; }
  .catalog-action span:last-child { display: none; }
  .catalog-action#downloadCatalogView span:last-child,
  .catalog-action#downloadCatalogCsv span:last-child { display: inline; }
}

@media (max-width: 800px) {
  html { scroll-padding-top: 9rem; }
  .route-anchor, .workspace, .page-view { scroll-margin-top: 9rem; }
  #activeName { scroll-margin-top: 9rem; }
  .comparison-table thead th { top: 9rem; }
  .site-header { flex-wrap: wrap; gap: 0.8rem; min-height: auto; padding: 1rem 0; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; border-top: 1px solid var(--line); }
  .nav-button { flex: 1; text-align: center; }
  .static-fallback-header .main-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-left: 0; }
  .static-fallback-header .nav-button { min-width: 0; padding-inline: 0.25rem; }
  .header-actions { margin-left: auto; }
  .header-data-disclosure { position: static; }
  .header-data-disclosure:not([open]) > .header-data-actions { display: none; }
  .header-data-disclosure > summary { display: inline-flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 0.55rem; padding: 0.62rem 0.72rem; border: 1px solid var(--line-strong); color: var(--ink-soft); background: var(--panel); cursor: pointer; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.04em; list-style: none; text-transform: uppercase; }
  .header-data-disclosure > summary::after { color: var(--amber); content: '+'; font-size: 0.9rem; line-height: 1; }
  .header-data-disclosure[open] > summary { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
  .header-data-disclosure[open] > summary::after { content: '−'; }
  .header-data-actions { position: absolute; top: calc(100% + 0.25rem); right: 0; z-index: 12; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; min-width: min(18rem, calc(100vw - 32px)); padding: 0.65rem; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 0.8rem 2rem rgba(7, 12, 11, 0.3); }
  .header-data-actions .dataset-link,
  .header-data-actions .download-button { min-height: 40px; }
  .download-button { margin-left: 0; }
  .catalog-panel { top: 9rem; }
  .drawing-controls { align-items: start; flex-direction: column; }
  .mode-control { width: 100%; justify-content: space-between; }
  .mode-button { flex: 1; text-align: left; }
  .layer-control { width: 100%; margin-left: 0; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 0.55rem; }
  .layer-button { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .drawing-toolbar { align-items: start; flex-direction: column; }
  .drawing-tools { width: 100%; justify-content: space-between; }
}

@media (max-width: 740px) {
  .site-header, .connection-status, .update-status, main, .site-footer { width: min(100% - 32px, 600px); }
  .noscript-index { width: min(100% - 32px, 600px); padding: 1.3rem; }
  .data-error { width: min(100% - 32px, 600px); min-height: auto; margin: 2rem auto; padding: 2rem 1.3rem; }
  .runtime-fallback { width: min(100% - 32px, 600px); margin: 2rem auto; padding: 1.4rem 1.3rem; }
  .action-recovery { width: min(100% - 32px, 600px); grid-template-columns: 1fr; }
  .action-recovery-actions { justify-content: start; }
  .noscript-list { grid-template-columns: 1fr; margin-top: 1.3rem; }
  .noscript-method { width: min(100% - 32px, 600px); padding: 1rem; }
  .noscript-method-grid { grid-template-columns: 1fr 1fr; }
  .hero { display: block; min-height: auto; padding: 56px 0 48px; }
  h1 { font-size: clamp(3.25rem, 16vw, 5.6rem); }
  .hero-aside { align-self: stretch; justify-items: stretch; max-width: none; margin-top: 3rem; }
  .hero-stats { gap: 2rem; }
  .hero-data-note { max-width: none; text-align: left; }
  .workspace, .page-view { padding: 58px 0 72px; }
  .section-heading { display: block; margin-bottom: 1.8rem; }
  .section-note { margin-top: 1rem; }
  .section-heading-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; width: 100%; gap: 0.45rem; margin-top: 1rem; }
  .section-heading-actions .section-note { margin-top: 0; }
  .section-heading-actions .section-note { grid-column: 1 / -1; margin-bottom: 0.15rem; }
  .section-heading-actions .share-button { width: 100%; min-width: 0; justify-content: center; padding-inline: 0.35rem; }
  .atlas-layout { display: block; }
  .catalog-panel { position: static; }
  .catalog-panel { margin-bottom: 3.5rem; }
  .catalog-filter-disclosure { margin-top: 0.8rem; border-block: 1px solid var(--line); }
  .catalog-filter-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 42px; padding: 0.65rem 0.1rem; color: var(--teal); cursor: pointer; font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.06em; list-style: none; text-transform: uppercase; }
  .catalog-filter-disclosure > summary::after { color: var(--amber); content: '+'; font-size: 0.95rem; line-height: 1; }
  .catalog-filter-disclosure[open] > summary { color: var(--amber); }
  .catalog-filter-disclosure[open] > summary::after { content: '−'; }
  .catalog-filter-disclosure-meta { overflow: hidden; margin-left: auto; color: var(--ink-muted); font-size: 0.5rem; letter-spacing: 0.03em; text-overflow: ellipsis; white-space: nowrap; }
  .catalog-filter-disclosure-body { padding-bottom: 0.75rem; }
  .catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
  .catalog-entry { min-width: 0; }
  .catalog-entry .catalog-card { grid-template-columns: 28px 1fr; padding-right: 0; }
  .catalog-glyph { display: none; }
  .catalog-entry:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 0.8rem; }
  .catalog-entry:nth-child(even) { padding-left: 0.8rem; }
  .catalog-card:hover { padding-left: 0.35rem; }
  .catalog-entry:nth-child(even) .catalog-card:hover { padding-left: 0.35rem; }
  .compare-toggle { flex-basis: 36px; width: 36px; height: 36px; margin-right: 0; }
  .search-clear { width: 36px; height: 36px; }
  .back-to-top { min-height: 40px; }
  .dataset-link,
  .download-button,
  .theme-toggle { min-height: 40px; }
  .nav-button,
  .segment-button,
  .mode-button,
  .layer-button,
  .share-button,
  .drawing-export,
  .drawing-reset,
  .filter-chip,
  .filter-clear-all,
  .compare-tray button,
  .shortcut-guide summary,
  .comparison-table-panel summary,
  .study-provenance summary,
  .study-context-note button,
  .compare-selection-clear,
  .compare-selection-chip,
  .catalog-batch-action,
  .clear-search,
  .visual-empty-action,
  .manual-copy-fallback-dismiss,
  .action-recovery .hero-action,
  .action-recovery-dismiss,
  .noscript-artifact-actions a,
  .noscript-link,
  .method-dictionary-links a { min-height: 36px; }
  .study-nav button { width: 40px; height: 40px; }
  .zoom-control button { width: 36px; height: 36px; }
  .search-field input,
  .select-wrap select { min-height: 40px; }
  .route-copy-button { min-height: 36px; }
  .drawing-controls { align-items: start; flex-direction: column; }
  .study-header { flex-direction: column; gap: 1.2rem; }
  .study-header-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "study-nav study-index" "study-actions study-actions"; align-items: start; width: 100%; gap: 0.75rem; }
  .study-nav { grid-area: study-nav; justify-self: start; }
  .study-share-actions { display: grid; grid-area: study-actions; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; min-width: 0; gap: 0.4rem; }
  .study-share-actions .share-button { width: 100%; min-width: 0; justify-content: center; padding-inline: 0.35rem; }
  .study-index { grid-area: study-index; margin-left: 0; }
  .study-index { font-size: 3rem; }
  .visual-empty-state { min-height: 320px; }
  .mode-control { width: 100%; justify-content: space-between; }
  .mode-button { flex: 1; text-align: left; }
  .layer-control { width: 100%; margin-left: 0; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 0.55rem; }
  .layer-button { flex: 1; }
  .drawing-toolbar { align-items: start; flex-direction: column; }
  .drawing-tools { width: 100%; justify-content: space-between; }
  .svg-wrap, .geometry-svg { min-height: 320px; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-cell:nth-child(even) { border-right: 0; }
  .metric-cell:nth-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .metric-cell:nth-child(odd) { padding-left: 0; }
  .analysis-grid { grid-template-columns: repeat(2, 1fr); }
  .analysis-cell:nth-child(2) { border-right: 0; }
  .analysis-cell:nth-child(even) { border-right: 0; }
  .analysis-cell:nth-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .analysis-cell:nth-child(3) { padding-left: 0; }
  .analysis-cell:nth-child(5) { padding-left: 0; }
  .profile-row { grid-template-columns: repeat(2, 1fr); gap: 0.8rem 1rem; }
  .compare-intro { display: block; }
  .compare-intro-side { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; justify-items: stretch; width: 100%; margin-top: 1.3rem; gap: 0.45rem; }
  .compare-intro-side .compare-callout { grid-column: 1 / -1; width: fit-content; }
  .compare-intro-side > .share-button { width: 100%; min-width: 0; justify-content: center; padding-inline: 0.35rem; }
  .compare-intro-side .compare-intro-export-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 0.45rem; }
  .compare-intro-side .compare-intro-export-actions .share-button { width: 100%; justify-content: center; }
  .compare-callout { width: fit-content; margin-top: 0; }
  .compare-helper { margin-top: -0.4rem; }
  .compare-selection-heading { align-items: start; flex-direction: column; gap: 0.55rem; }
  .comparison-table-actions { align-items: start; flex-direction: column; }
  .comparison-export-actions { width: 100%; }
  .comparison-export-actions .share-button { flex: 1 1 0; justify-content: center; }
  .comparison-grid { grid-template-columns: 1fr; }
  .wide-card { grid-column: auto; }
  .profile-compare-head,
  .profile-compare-row { grid-template-columns: 1fr; gap: 0.55rem; }
  .profile-compare-row.is-active { padding-block: 0.75rem; }
  .method-hero { grid-template-columns: 1fr; padding: 1.2rem; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .method-card { min-height: 245px; padding: 1rem; }
  .method-readings { padding: 1.1rem; }
  .method-readings-heading { align-items: start; flex-direction: column; gap: 0.7rem; }
  .method-readings-heading > p { max-width: none; text-align: left; }
  .method-readings-grid { grid-template-columns: 1fr 1fr; }
  .method-status-key { padding: 1.1rem; }
  .method-status-key-heading { align-items: start; flex-direction: column; gap: 0.7rem; }
  .method-status-key-heading > p { max-width: none; text-align: left; }
  .method-dictionary { padding: 1.1rem; }
  .method-dictionary-intro { align-items: start; justify-content: start; flex-direction: column; gap: 0.75rem; max-width: none; }
  .method-dictionary-intro > p { max-width: none; text-align: left; }
  .method-dictionary-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { align-items: start; flex-direction: column; justify-content: center; gap: 1rem; padding: 1.5rem 0; }
  .site-footer-links { justify-content: start; gap: 0.55rem 0.9rem; }
}

@media (max-width: 430px) {
  html { scroll-padding-top: 11rem; }
  .route-anchor, .workspace, .page-view { scroll-margin-top: 11rem; }
  #activeName { scroll-margin-top: 11rem; }
  .comparison-table thead th { top: 11rem; }
  .brand-name { font-size: 0.65rem; }
  .brand-subtitle { font-size: 0.5rem; }
  .static-fallback-header .nav-button { font-size: 0.52rem; letter-spacing: 0.04em; }
  .header-actions { gap: 0.3rem; }
  .header-actions { flex: 1 1 100%; justify-content: flex-end; margin-left: 0; flex-wrap: wrap; }
  .dataset-link { padding-inline: 0.6rem; }
  .dataset-link,
  .download-button { min-height: 40px; }
  .theme-toggle { min-height: 40px; padding-inline: 0.6rem; }
  .download-button { padding-inline: 0.65rem; }
  .download-button span:last-child { display: none; }
  .hero-stats { justify-content: space-between; gap: 0.75rem; }
  .share-button { padding: 0.5rem; }
  .nav-button,
  .segment-button,
  .mode-button,
  .layer-button,
  .share-button,
  .drawing-export,
  .drawing-reset,
  .filter-chip,
  .filter-clear-all,
  .compare-tray button,
  .shortcut-guide summary,
  .comparison-table-panel summary,
  .study-provenance summary,
  .study-context-note button,
  .compare-selection-clear,
  .compare-selection-chip,
  .catalog-batch-action,
  .clear-search,
  .visual-empty-action,
  .manual-copy-fallback-dismiss,
  .action-recovery .hero-action,
  .action-recovery-dismiss,
  .noscript-artifact-actions a,
  .noscript-link,
  .method-dictionary-links a { min-height: 36px; }
  .sort-direction-toggle { min-height: 36px; }
  .route-copy-button { min-height: 36px; }
  .study-nav button { width: 40px; height: 40px; }
  .zoom-control button { width: 36px; height: 36px; }
  .search-field input,
  .select-wrap select { min-height: 40px; }
  .share-button span:last-child { display: none; }
  .compare-toggle { flex-basis: 36px; width: 36px; height: 36px; }
  .catalog-source-link { width: 36px; min-height: 36px; padding-inline: 0.4rem; }
  .catalog-source-link span:last-child { display: none; }
  .search-clear { width: 36px; height: 36px; }
  .study-share-actions span.study-action-label { display: inline; font-size: 0; white-space: nowrap; }
  #shareStudy span.study-action-label::after { content: "Share"; font-size: 0.5rem; }
  #copyCitation span.study-action-label::after { content: "Cite"; font-size: 0.5rem; }
  #downloadStudy span.study-action-label::after { content: "JSON"; font-size: 0.5rem; }
  #downloadStudyCsv span.study-action-label::after { content: "CSV"; font-size: 0.5rem; }
  #printStudy span.study-action-label::after { content: "Print"; font-size: 0.5rem; }
  #shareStudy.is-copied span.study-action-label::after,
  #shareStudy.is-complete:not(.is-unavailable) span.study-action-label::after,
  #copyCitation.is-copied span.study-action-label::after,
  #downloadStudy.is-complete:not(.is-unavailable) span.study-action-label::after,
  #downloadStudyCsv.is-complete:not(.is-unavailable) span.study-action-label::after { content: "Done"; font-size: 0.5rem; }
  #shareStudy.is-unavailable span.study-action-label::after,
  #copyCitation.is-unavailable span.study-action-label::after { content: "Unavailable"; font-size: 0.5rem; }
  #downloadStudy.is-unavailable span.study-action-label::after,
  #downloadStudyCsv.is-unavailable span.study-action-label::after { content: "Unavailable"; font-size: 0.5rem; }
  #printStudy.is-complete:not(.is-unavailable) span.study-action-label::after { content: "Done"; font-size: 0.5rem; }
  #printStudy.is-unavailable span.study-action-label::after { content: "Unavailable"; font-size: 0.5rem; }
  .download-button span.download-label { display: inline; font-size: 0; }
  .download-button span.download-label::after { content: "JSON"; font-size: 0.62rem; }
  .download-button.is-complete span.download-label::after { content: "Done"; }
  #downloadCsvData span.download-label::after { content: "CSV"; font-size: 0.62rem; }
  #downloadCsvData.is-complete span.download-label::after { content: "Done"; }
  .download-button.is-unavailable span.download-label::after { content: "Unavailable"; }
  #downloadCsvData.is-unavailable span.download-label::after { content: "Unavailable"; }
  .download-button.install-button span.download-label { display: inline; font-size: 0; }
  .download-button.install-button span.download-label::after { content: "Install"; font-size: 0.62rem; }
  .theme-toggle-label { display: none !important; }
  .catalog-summary-actions { flex-wrap: wrap; justify-content: flex-end; }
  .catalog-summary .catalog-share-button span:last-child,
  .catalog-summary .catalog-citation-button span:last-child { display: inline; font-size: 0; white-space: nowrap; }
  .catalog-summary .catalog-share-button span:last-child::after { content: "Share"; font-size: 0.5rem; }
  .catalog-summary .catalog-citation-button span:last-child::after { content: "Cite"; font-size: 0.5rem; }
  .catalog-summary .catalog-share-button.is-copied span:last-child::after,
  .catalog-summary .catalog-share-button.is-complete:not(.is-unavailable) span:last-child::after,
  .catalog-summary .catalog-citation-button.is-copied span:last-child::after { content: "Done"; font-size: 0.5rem; }
  .catalog-summary .catalog-share-button.is-unavailable span:last-child::after,
  .catalog-summary .catalog-citation-button.is-unavailable span:last-child::after { content: "Unavailable"; font-size: 0.5rem; }
  .catalog-summary .catalog-print-button.is-complete:not(.is-unavailable) span:last-child { font-size: 0; }
  .catalog-summary .catalog-print-button.is-complete:not(.is-unavailable) span:last-child::after { content: "Done"; font-size: 0.5rem; }
  .catalog-summary .catalog-print-button.is-unavailable span:last-child { font-size: 0; }
  .catalog-summary .catalog-print-button.is-unavailable span:last-child::after { content: "Unavailable"; font-size: 0.5rem; }
  .catalog-summary .catalog-print-button span:last-child { display: inline; font-size: 0.5rem; white-space: nowrap; }
  .compare-intro-side .compare-edit-button span:last-child,
  .compare-intro-side .compare-share-button span:last-child,
  .compare-intro-side .compare-citation-button span:last-child,
  .compare-intro-side .compare-print-button span:last-child,
  .compare-intro-side .comparison-export span:last-child { display: inline; font-size: 0; white-space: nowrap; }
  .compare-intro-side .compare-edit-button span:last-child::after { content: "Edit"; font-size: 0.5rem; }
  .compare-intro-side .compare-share-button span:last-child::after { content: "Share"; font-size: 0.5rem; }
  .compare-intro-side .compare-citation-button span:last-child::after { content: "Cite"; font-size: 0.5rem; }
  .compare-intro-side .compare-print-button span:last-child::after { content: "Print"; font-size: 0.5rem; }
  .compare-intro-side #downloadComparison span:last-child::after { content: "CSV"; font-size: 0.5rem; }
  .compare-intro-side #downloadComparisonJson span:last-child::after { content: "JSON"; font-size: 0.5rem; }
  .compare-intro-side .compare-share-button.is-copied span:last-child::after,
  .compare-intro-side .compare-share-button.is-complete:not(.is-unavailable) span:last-child::after,
  .compare-intro-side .compare-citation-button.is-copied span:last-child::after,
  .compare-intro-side .compare-print-button.is-complete:not(.is-unavailable) span:last-child::after,
  .compare-intro-side .comparison-export.is-complete:not(.is-unavailable) span:last-child::after { content: "Done"; font-size: 0.5rem; }
  .compare-intro-side .compare-share-button.is-unavailable span:last-child::after,
  .compare-intro-side .compare-citation-button.is-unavailable span:last-child::after,
  .compare-intro-side .compare-print-button.is-unavailable span:last-child::after,
  .compare-intro-side .comparison-export.is-unavailable span:last-child::after { content: "Unavailable"; font-size: 0.5rem; }
  .method-return-button span:last-child,
  .method-share-button span:last-child,
  .method-citation-button span:last-child,
  .method-print-button span:last-child { display: inline; font-size: 0; white-space: nowrap; }
  .method-return-button span:last-child::after { content: "Atlas"; font-size: 0.5rem; }
  .method-share-button span:last-child::after { content: "Share"; font-size: 0.5rem; }
  .method-citation-button span:last-child::after { content: "Cite"; font-size: 0.5rem; }
  .method-print-button span:last-child::after { content: "Print"; font-size: 0.5rem; }
  .method-share-button.is-copied span:last-child::after,
  .method-share-button.is-complete:not(.is-unavailable) span:last-child::after,
  .method-citation-button.is-copied span:last-child::after,
  .method-print-button.is-complete:not(.is-unavailable) span:last-child::after { content: "Done"; font-size: 0.5rem; }
  .method-share-button.is-unavailable span:last-child::after,
  .method-citation-button.is-unavailable span:last-child::after { content: "Unavailable"; font-size: 0.5rem; }
  .method-print-button.is-unavailable span:last-child::after { content: "Unavailable"; font-size: 0.5rem; }
  .drawing-tools { align-items: center; flex-wrap: wrap; gap: 0.55rem; justify-content: flex-start; }
  .drawing-scale { flex: 0 0 100%; }
  .compare-tray { align-items: start; flex-direction: column; }
  .compare-tray-actions { width: 100%; justify-content: space-between; }
  .compare-tray-summary { max-width: min(100%, 32ch); }
  .compare-selection-chip { width: 100%; justify-content: space-between; }
  .compare-selection-study-link,
  .compare-selection-chip-remove { min-height: 36px; }
  .compare-selection-study-link { min-width: 0; }
  .compare-selection-chip-name { max-width: none; min-width: 0; }
  .compare-selection-chip span:first-child { max-width: none; min-width: 0; }
  .tool-row { grid-template-columns: 1fr; }
  .catalog-list { display: block; }
  .catalog-entry:nth-child(n) { border-right: 0; padding-inline: 0; }
  .catalog-entry .catalog-card { padding-inline: 0; }
  .catalog-entry:nth-child(n) .catalog-card:hover { padding-left: 0.35rem; }
  .detail-grid, .method-grid, .method-readings-grid, .method-status-key-list, .method-dictionary-grid { grid-template-columns: 1fr; }
  .method-card { min-height: auto; }
  .method-card p { min-height: 0; }
  .analysis-heading { display: block; }
  .equation { width: fit-content; margin-top: 0.8rem; }
  .noscript-method-grid { grid-template-columns: 1fr; }
  .noscript-artifact-actions a { flex: 1 1 auto; justify-content: space-between; }
  .bar-row { grid-template-columns: 78px 1fr 37px; gap: 0.45rem; }
  .bar-axis-guide { padding-inline: calc(78px + 0.45rem) calc(37px + 0.45rem); }
  .module-row { grid-template-columns: 108px 1fr 43px; gap: 0.45rem; }
  .module-axis-guide { padding-inline: calc(108px + 0.45rem) calc(43px + 0.45rem); }
  .profile-compare-head-grid,
  .profile-compare-grid { gap: 0.4rem; }
  .profile-compare-head,
  .profile-compare-label { font-size: 0.44rem; }
}

@media (max-width: 320px) {
  .catalog-summary { align-items: flex-start; flex-direction: column; gap: 0.55rem; }
  .catalog-summary-readout,
  .catalog-summary-actions { width: 100%; min-width: 0; }
  .catalog-summary-actions { justify-content: flex-start; }
  .header-actions { gap: 0.2rem; }
  .dataset-link { gap: 0.25rem; padding-inline: 0.45rem; }
  .download-button { padding-inline: 0.5rem; }
}

@media (pointer: coarse) {
  .back-to-top { min-height: 40px; }
  .dataset-link,
  .download-button { min-height: 40px; }
  .theme-toggle { min-height: 40px; }
  .nav-button,
  .segment-button,
  .mode-button,
  .layer-button,
  .share-button,
  .drawing-export,
  .drawing-reset { min-height: 36px; }
  .filter-chip, .filter-clear-all, .compare-tray button, .shortcut-guide summary, .comparison-table-panel summary, .study-provenance summary { min-height: 36px; }
  .study-context-note button { min-height: 36px; }
  .compare-selection-clear, .compare-selection-chip, .catalog-batch-action { min-height: 36px; }
  .catalog-source-link { min-height: 36px; }
  .sort-direction-toggle { min-height: 36px; }
  .compare-selection-study-link,
  .compare-selection-chip-remove { min-height: 36px; }
  .compare-toggle { flex-basis: 36px; width: 36px; height: 36px; }
  .clear-search { min-height: 36px; padding: 0.45rem 0.6rem; border-color: var(--amber); background: var(--amber-soft); }
  .clear-search:hover, .clear-search:focus-visible { color: var(--bg); background: var(--amber); }
  .visual-empty-action { min-height: 36px; padding-inline: 0.8rem; }
  .study-nav button { width: 40px; height: 40px; }
  .zoom-control button { width: 36px; height: 36px; }
  .search-clear { width: 36px; height: 36px; }
  .search-field input, .select-wrap select { min-height: 40px; }
  .manual-copy-fallback-dismiss { min-height: 36px; }
  .route-copy-button { min-height: 36px; }
  .action-recovery .hero-action, .action-recovery-dismiss { min-height: 36px; }
  .update-status-action { min-height: 36px; }
  .noscript-artifact-actions a { min-height: 36px; }
  .noscript-interactive-link { min-height: 36px; }
  .noscript-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0.35rem 0.5rem; border: 1px solid var(--coral); background: rgba(231, 127, 98, 0.08); }
  .noscript-link:hover,
  .noscript-link:focus-visible { color: var(--bg); background: var(--coral); text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (prefers-contrast: more) {
  :root {
    --ink-soft: #d8e2da;
    --ink-muted: #b6c4ba;
    --line: rgba(213, 229, 214, 0.36);
    --line-strong: rgba(213, 229, 214, 0.68);
  }

  :root[data-theme="light"] {
    --ink-soft: #34413b;
    --ink-muted: #53635a;
    --line: rgba(24, 33, 31, 0.42);
    --line-strong: rgba(24, 33, 31, 0.72);
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  summary:focus-visible { outline-width: 3px; }

  #atlas-heading:focus-visible,
  .page-view h2:focus-visible,
  #visualEmptyHeading:focus-visible,
  #activeName:focus-visible,
  #main-content:focus-visible,
  #noscript-heading:focus-visible,
  #noscript-method-heading:focus-visible,
  #dataErrorHeading:focus { outline-width: 3px; }

  .bar-track,
  .profile-track,
  .module-bars { border: 1px solid var(--line-strong); }
  .profile-compare-track { border: 1px solid var(--line-strong); }
  .geometry-svg .grid-line { stroke: var(--line-strong); opacity: 0.55; }
  .geometry-svg .faint-line { stroke: var(--line-strong); }
  .geometry-svg .axis-line { opacity: 1; }
  .geometry-svg .label-text,
  .geometry-svg .small-label { fill: var(--ink-soft); }
  .geometry-svg .dimension-bracket,
  .geometry-svg .dimension-arrow { stroke-width: 1.4; }
  .catalog-card.is-active { border-inline-start: 3px solid var(--amber); }
}

@media (prefers-color-scheme: light) and (prefers-contrast: more) {
  :root:not([data-theme]) {
    --ink-soft: #34413b;
    --ink-muted: #53635a;
    --line: rgba(24, 33, 31, 0.42);
    --line-strong: rgba(24, 33, 31, 0.72);
  }
}

@media (forced-colors: active) {
  .site-header { background: Canvas; }
  .site-footer { border-top-color: ButtonText; }
  .site-footer a { color: LinkText; }
  .back-to-top { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .back-to-top:hover { border-color: Highlight; color: HighlightText; background: Highlight; }
  .back-to-top span:first-child { color: Highlight; }
  .connection-status { border-color: ButtonText; color: CanvasText; background: Canvas; }
  .connection-status-mark { color: Highlight; }
  .connection-status[data-connection-state="online"] .connection-status-mark { color: Highlight; }
  .update-status { border-color: ButtonText; color: CanvasText; background: Canvas; }
  .update-status-mark { color: Highlight; }
  .update-status-action { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .update-status-action:hover { border-color: Highlight; color: HighlightText; background: Highlight; }
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  summary:focus-visible { outline-color: Highlight; }
  .download-button,
  .route-copy-button,
  .share-button,
  .segment-button,
  .mode-button,
  .layer-button,
  .compare-tray button,
  .header-data-disclosure > summary,
  .catalog-filter-disclosure > summary { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .header-data-actions { border-color: ButtonText; background: Canvas; }
  .header-data-disclosure[open] > summary,
  .catalog-filter-disclosure[open] > summary { border-color: Highlight; color: Highlight; }
  .header-data-disclosure > summary::after,
  .catalog-filter-disclosure > summary::after { color: Highlight; }
  .sort-direction-toggle { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .theme-toggle { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .download-button:hover,
  .route-copy-button:hover,
  .share-button:hover,
  .segment-button:hover,
  .mode-button:hover,
  .layer-button:hover,
  .compare-tray button:hover { border-color: Highlight; color: HighlightText; background: Highlight; }
  .theme-toggle:hover { border-color: Highlight; color: HighlightText; background: Highlight; }
  .sort-direction-toggle:not(:disabled):hover { border-color: Highlight; color: HighlightText; background: Highlight; }
  .sort-direction-toggle:focus-visible { border-color: Highlight; }
  .share-button span:first-child { color: ButtonText; }
  .theme-toggle-icon { color: ButtonText; }
  .sort-direction-toggle:disabled { border-color: GrayText; color: GrayText; background: ButtonFace; }
  .sort-direction-icon { color: ButtonText; }
  .download-icon { color: ButtonText; }
  .compare-tray button:last-child:disabled { border-color: GrayText; color: GrayText; background: ButtonFace; }
  #runtimeFallback:focus { outline-color: Highlight; }
  #visualEmptyHeading:focus-visible { outline-color: Highlight; }
  #dataErrorHeading:focus { outline-color: Highlight; }
  #atlas-heading:focus-visible,
  .page-view h2:focus-visible,
  #activeName:focus-visible,
  #main-content:focus-visible,
  #noscript-heading:focus-visible,
  #noscript-method-heading:focus-visible { outline-color: Highlight; }
  .nav-button.is-active,
  .mode-button.is-active,
  .layer-button.is-active { color: Highlight; }
  .nav-button.is-active::after,
  .mode-button.is-active::after { background: Highlight; }
  .nav-count { border-color: Highlight; color: HighlightText; background: Highlight; }
  .hero-data-note { border-top-color: ButtonText !important; color: CanvasText; }
  .hero-data-note-mark,
  .hero-data-note strong { border-color: Highlight !important; color: Highlight !important; }
  .hero-data-note-definition { color: CanvasText; }
  .dataset-link { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .dataset-icon { color: ButtonText; }
  .dataset-link-schema .dataset-icon { color: ButtonText; }
  .runtime-fallback-actions .hero-action { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .study-status,
  .study-status:not([data-status="schematic"]):not([data-status="measured"]),
  .study-provenance summary,
  .study-nav button,
  .drawing-export,
  .drawing-reset,
  .zoom-control,
  .comparison-table-panel,
  .method-return-button { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .study-provenance summary::after,
  .drawing-export span:first-child,
  .drawing-reset span:first-child { color: Highlight; }
  .study-nav button:disabled,
  .zoom-control button:disabled { border-color: GrayText; color: GrayText; }
  .catalog-card-status,
  .catalog-card-status[data-status="measured"],
  .catalog-card-status:not([data-status="schematic"]):not([data-status="measured"]),
  .chart-status,
  .chart-status[data-status="measured"],
  .chart-status:not([data-status="schematic"]):not([data-status="measured"]),
  .chart-current,
  .compare-study-status,
  .compare-study-status[data-status="measured"],
  .compare-study-status:not([data-status="schematic"]):not([data-status="measured"]) { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .bar-row.is-active .bar-label,
  .module-row.is-active .module-name { color: CanvasText; }
  .comparison-table tbody .comparison-status,
  .comparison-table tbody .comparison-status[data-status="measured"],
  .comparison-table tbody .comparison-status:not([data-status="schematic"]):not([data-status="measured"]) { color: ButtonText; }
  .comparison-table tbody .comparison-source,
  .comparison-table tbody .comparison-source strong { color: CanvasText; }
  .comparison-table-study-link .comparison-table-study-index,
  .comparison-table-study-link .comparison-table-study-state { color: Highlight; }
  .segment-button.is-active { color: HighlightText; background: Highlight; }
  .layer-button.is-active { border-color: Highlight; background: Canvas; }
  .catalog-card.is-active { border-inline-start: 3px solid Highlight; }
  .catalog-card.is-active .catalog-number { color: Highlight; }
  .catalog-card-measure { color: Highlight; }
  .study-measure-summary { color: Highlight; }
  .catalog-card-match { color: Highlight; }
  .search-hit { color: HighlightText; background: Highlight; }
  .compare-toggle.is-selected { border-color: Highlight; color: HighlightText; background: Highlight; }
  .compare-selection-clear,
  .compare-selection-chip { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .compare-selection-chip-remove { border-left-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .compare-selection-chip-remove:hover,
  .compare-selection-chip-remove:focus-visible { color: HighlightText; background: Highlight; }
  .compare-selection-chip-status,
  .compare-selection-chip-status[data-status="measured"],
  .compare-selection-chip-status:not([data-status="schematic"]):not([data-status="measured"]) { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .compare-selection-chip-current { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .compare-selection-chip-axis { color: ButtonText; }
  .compare-selection-chip-remove span { color: ButtonText; }
  .compare-selection-chip span:last-child { color: ButtonText; }
  .compare-selection-chip-index,
  .chart-study-index { color: Highlight; }
  .compare-study-open { color: Highlight; }
  .compare-study-card.is-active { border-color: Highlight; box-shadow: inset 3px 0 0 Highlight; }
  .compare-study-card.is-active .compare-study-open { color: Highlight; }
  .compare-study-measure,
  .compare-study-emphasis { color: Highlight; }
  .compare-tray-summary { color: ButtonText; }
  .compare-tray-provenance { color: ButtonText; }
  .noscript-derived { color: Highlight; }
  .noscript-provenance { color: Highlight; }
  .profile-note { color: CanvasText; }
  .noscript-status-key { border-color: ButtonText; background: Canvas; }
  .noscript-status-key-grid { border-color: ButtonText; background: ButtonText; }
  .noscript-status-key-grid > div { background: Canvas; }
  .noscript-status-key-kicker,
  .noscript-status-key-label,
  .noscript-status-key-label[data-status="measured"],
  .noscript-status-key-label:not([data-status="schematic"]):not([data-status="measured"]) { color: Highlight; }
  .noscript-status-key-grid dt,
  .noscript-status-key-grid dd,
  .noscript-status-key-count,
  .noscript-status-key-empty { color: CanvasText; }
  .noscript-method { border-color: ButtonText; background: Canvas; }
  .noscript-method-grid > div { border-top-color: ButtonText; }
  .noscript-method-grid dt { color: Highlight; }
  .noscript-link { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .noscript-link:hover,
  .noscript-link:focus-visible { color: HighlightText; background: Highlight; }
  .noscript-artifact-actions a { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .noscript-artifact-actions a:hover,
  .noscript-artifact-actions a:focus-visible { color: HighlightText; background: Highlight; }
  .noscript-study-link { color: LinkText; text-decoration-color: LinkText; }
  .noscript-study-link:hover { color: Highlight; }
  .noscript-interactive-link { color: LinkText; }
  .noscript-interactive-link:hover,
  .noscript-interactive-link:focus-visible { color: Highlight; }
  .noscript-list li:target,
  .noscript-list li:focus { outline-color: Highlight; background: Canvas; }
  .noscript-empty { border-top-color: ButtonText; color: CanvasText; }
  .catalog-route a,
  .study-print-route a,
  .comparison-print-route a,
  .method-route a { color: LinkText; text-decoration-color: LinkText; }
  .catalog-route a:hover,
  .catalog-route a:focus-visible,
  .study-print-route a:hover,
  .study-print-route a:focus-visible,
  .comparison-print-route a:hover,
  .comparison-print-route a:focus-visible,
  .method-route a:hover,
  .method-route a:focus-visible { color: Highlight; }
  .catalog-batch-action { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .catalog-batch-action span:first-child { color: ButtonText; }
  .catalog-batch-action:disabled { border-color: GrayText; color: GrayText; }
  .catalog-source-link { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .catalog-source-link span:first-child { color: ButtonText; }
  .catalog-source-link:hover,
  .catalog-source-link:focus-visible { border-color: Highlight; color: HighlightText; background: Highlight; }
  .clear-search { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .clear-search:hover,
  .clear-search:focus-visible { color: HighlightText; background: Highlight; }
  .visual-empty-action { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .visual-empty-action:hover,
  .visual-empty-action:focus-visible { color: HighlightText; background: Highlight; }
  .search-clear { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .search-clear:hover,
  .search-clear:focus-visible { border-color: Highlight; color: HighlightText; background: Highlight; }
  .catalog-search-note kbd { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .method-dictionary-links a { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .method-dictionary-links a:hover { color: HighlightText; background: Highlight; }
  .route-copy-button span:first-child { color: ButtonText; }
  .route-copy-button.is-complete,
  .route-copy-button.is-unavailable { border-color: Highlight; color: Highlight; background: Canvas; }
  .method-dictionary-item dt,
  .method-dictionary-formulas span { color: Highlight; }
  .method-status-key { border-color: ButtonText; background: Canvas; }
  .method-status-key-list { border-color: ButtonText; background: ButtonText; }
  .method-status-key-item { background: Canvas; }
  .method-status-key-label,
  .method-status-key-label[data-status="measured"],
  .method-status-key-label:not([data-status="schematic"]):not([data-status="measured"]) { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .method-status-key-count { color: Highlight; }
  .method-status-key-meta code,
  .method-status-key-item p,
  .method-status-key-empty { color: CanvasText; }
  .study-context-note { border-color: Highlight; color: ButtonText; background: Canvas; }
  .study-context-note button { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .manual-copy-fallback { border-color: ButtonText; background: Canvas; }
  .manual-copy-fallback-heading { color: ButtonText; }
  .manual-copy-fallback-dismiss { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .manual-copy-fallback textarea { border-color: ButtonText; color: CanvasText; background: Canvas; }
  .manual-copy-fallback textarea:focus { outline: 2px solid Highlight; outline-offset: 2px; }
  .action-recovery { border-color: ButtonText; background: Canvas; }
  .action-recovery-message { color: CanvasText; }
  .action-recovery .hero-action,
  .action-recovery-dismiss { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
  .action-recovery .hero-action:hover,
  .action-recovery-dismiss:hover { color: HighlightText; background: Highlight; }
  #downloadRecovery:focus { outline-color: Highlight; }
  .filter-chip,
  .filter-clear-all,
  .download-button.is-complete,
  .drawing-export.is-complete,
  .share-button.is-copied,
  .share-button.is-complete,
  .share-button[aria-expanded="true"] { border-color: Highlight; color: Highlight; background: Canvas; }
  .share-button[aria-expanded="true"] span:first-child { color: Highlight; }
  .zoom-control button:disabled { color: GrayText; }
  .profile-track,
  .bar-track,
  .module-bars { border: 1px solid ButtonText; background: Canvas; }
  .profile-compare-track { border: 1px solid ButtonText; background: Canvas; }
  .profile-fill,
  .bar-fill,
  .module-bar { background: Highlight; opacity: 1; }
  .profile-compare-fill { background: Highlight; opacity: 1; }
  .profile-compare-head,
  .profile-compare-label,
  .profile-compare-value { color: CanvasText; }
  .profile-compare-row { border-bottom-color: ButtonText; }
  .profile-compare-row.is-active { background: Canvas; box-shadow: inset 2px 0 0 Highlight; }
  .svg-wrap { background: Canvas; }
  .geometry-svg { color: CanvasText; forced-color-adjust: none; }
  .geometry-svg .grid-line { stroke: ButtonText; opacity: 0.35; }
  .geometry-svg .axis-line,
  .geometry-svg .secondary-line,
  .geometry-svg .tertiary-line,
  .geometry-svg .crosshair,
  .geometry-svg .dimension-bracket,
  .geometry-svg .dimension-arrow,
  .geometry-svg .primary-line,
  .geometry-svg .primary-fill,
  .geometry-svg .interior-fill { stroke: Highlight; }
  .geometry-svg .axis-line { opacity: 1; }
  .geometry-svg .primary-fill,
  .geometry-svg .interior-fill { fill: Canvas; }
  .geometry-svg .faint-line { stroke: ButtonText; opacity: 1; }
  .geometry-svg .dim-text,
  .geometry-svg .label-text,
  .geometry-svg .small-label,
  .geometry-svg .watermark { fill: CanvasText; }
  .geometry-svg .stone-dot { fill: Highlight; }
  .geometry-svg .column { fill: Canvas; stroke: Highlight; }
  .bar-value,
  .module-value,
  .chart-axis-guide,
  .chart-scale { color: CanvasText; }
  .chart-axis-guide { border-top-color: ButtonText; }
  .chart-axis-guide span:last-child { color: Highlight; }
  .comparison-table-scroll-cue { border-bottom-color: ButtonText; color: Highlight; }
  .scroll-cue-mark { color: Highlight; }
  .comparison-table thead th { color: ButtonText; background: Canvas; box-shadow: 0 1px 0 ButtonText; }
}

@media print {
  @page { margin: 14mm; }
  @page comparison-sheet { size: landscape; margin: 10mm; }

  :root {
    --ink: #111817;
    --ink-soft: #343b38;
    --ink-muted: #5d6862;
    --bg: #ffffff;
    --bg-deep: #ffffff;
    --panel: #ffffff;
    --panel-bright: #f4f6f2;
    --line: rgba(17, 24, 23, 0.2);
    --line-strong: rgba(17, 24, 23, 0.42);
    --header-bg: #ffffff;
    --surface-overlay: #ffffff;
    --surface-deep-overlay: #ffffff;
    --surface-segmented: #f4f6f2;
    --surface-glow: rgba(35, 102, 93, 0.08);
    --selection-soft: rgba(35, 102, 93, 0.08);
    --grid-line: rgba(17, 24, 23, 0.14);
    --faint-line: rgba(17, 24, 23, 0.34);
    --track: rgba(17, 24, 23, 0.1);
    --track-border: rgba(17, 24, 23, 0.2);
    --warning-surface: #ffffff;
    --amber: #965b18;
    --amber-soft: rgba(150, 91, 24, 0.1);
    --teal: #23665d;
    --teal-soft: rgba(35, 102, 93, 0.08);
    --coral: #93412d;
  }

  html { scroll-behavior: auto; }
  body { background: #fff; color: var(--ink); font-size: 10.5pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .site-header,
  .connection-status,
  .update-status,
  .hero-actions,
  .hero-stats,
  .catalog-panel,
  .drawing-controls,
  .drawing-toolbar,
  .study-header-actions,
  .manual-copy-fallback,
  .action-recovery,
  .site-footer,
  .compare-view,
  .method-view,
  .method-return-button,
  .method-share-button,
  .method-citation-button,
  .method-print-button,
  .visual-empty-state,
  .route-copy-button { display: none !important; }
  .back-to-top { display: none !important; }
  .site-header, main, .site-footer { width: 100%; }
  #atlas { display: block !important; }
  .hero { display: block; min-height: 0; padding: 0 0 1.1rem; }
  .hero-intro { max-width: 40rem; color: var(--ink-soft); }
  h1 { margin-bottom: 0.9rem; color: var(--ink); font-size: 3.8rem; }
  h1 em { color: var(--amber); }
  .workspace { padding: 1.4rem 0 0; }
  .section-heading { margin-bottom: 1.2rem; }
  .section-heading .eyebrow { color: var(--amber); }
  .section-note { color: var(--ink-muted); }
  .atlas-layout { display: block; }
  .visual-column { width: 100%; }
  .study-header { margin-bottom: 1rem; }
  .study-kicker { color: var(--amber); }
  .study-header h3 { color: var(--ink); }
  .study-meta, .study-source { color: var(--ink-muted); }
  .study-provenance { display: block; width: auto; max-width: none; margin-top: 0.45rem; }
  .study-provenance summary { display: block; min-height: 0; padding: 0; border: 0; color: var(--ink-muted); background: transparent; cursor: default; font-size: 8pt; letter-spacing: 0; text-transform: none; }
  .study-provenance summary::after { display: none; }
  .study-provenance-body,
  .study-provenance:not([open]) .study-provenance-body { display: block !important; max-width: none; margin-top: 0.2rem; padding: 0.25rem 0 0.25rem 0.55rem; border-left: 1px solid var(--line-strong); background: transparent; }
  .study-provenance-body p { color: var(--ink-soft); font-size: 8pt; }
  .study-provenance-body p + p { color: var(--ink-muted); }
  .study-print-route { display: block; margin: 0.45rem 0 0; color: var(--ink-muted); font-family: var(--mono); font-size: 7.5pt; line-height: 1.45; overflow-wrap: anywhere; }
  .drawing-card { border-color: var(--ink); background: #fff; }
  .svg-wrap { min-height: 0; background: #fff; }
  .geometry-svg { min-height: 0; color: var(--ink); background: #fff; }
  .geometry-svg .grid-line { stroke: rgba(17, 24, 23, 0.14); }
  .geometry-svg .axis-line { stroke: var(--teal); opacity: 0.9; }
  .geometry-svg .primary-line { stroke: var(--amber); }
  .geometry-svg .primary-fill { fill: rgba(150, 91, 24, 0.1); stroke: var(--amber); }
  .geometry-svg .interior-fill { fill: rgba(35, 102, 93, 0.08); stroke: var(--teal); }
  .geometry-svg .secondary-line { stroke: var(--teal); }
  .geometry-svg .tertiary-line,
  .geometry-svg .crosshair,
  .geometry-svg .dimension-bracket { stroke: var(--coral); }
  .geometry-svg .faint-line { stroke: rgba(17, 24, 23, 0.34); }
  .geometry-svg .dim-text { fill: var(--coral); }
  .geometry-svg .label-text { fill: var(--ink-soft); }
  .geometry-svg .small-label { fill: var(--ink-muted); }
  .geometry-svg .watermark { fill: rgba(150, 91, 24, 0.12); }
  .geometry-svg .stone-dot { fill: var(--amber); }
  .geometry-svg .column { fill: #fff; stroke: var(--amber); }
  .drawing-caption { border-top-color: var(--ink); }
  .drawing-caption p { color: var(--ink-soft); }
  .analysis-panel,
  .metric-strip,
  .detail-grid { break-inside: avoid; }
  .analysis-panel { background: #fff; }
  .detail-item { background: #fff; }

  body.print-method .hero,
  body.print-method #atlas,
  body.print-method .compare-view { display: none !important; }
  body.print-method .method-view { display: block !important; padding: 0; border-top: 0; }
  body.print-method .method-view .section-heading { margin-bottom: 1.2rem; }
  body.print-method .method-route { margin: -1.45rem 0 1rem; color: var(--ink-muted); font-family: var(--mono); font-size: 7.5pt; line-height: 1.45; overflow-wrap: anywhere; }
  body.print-method .method-hero { grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr); gap: 1.5rem; margin-bottom: 1rem; padding: 1.2rem; border-color: var(--ink); background: #fff; break-inside: avoid; }
  body.print-method .method-copy h3 { font-size: 2rem; }
  body.print-method .method-copy p:last-child,
  body.print-method .method-readings-heading > p,
  body.print-method .method-status-key-heading > p,
  body.print-method .method-dictionary-intro > p,
  body.print-method .method-reading-item dd,
  body.print-method .method-status-key-item p,
  body.print-method .method-dictionary-item dd,
  body.print-method .method-note p { color: var(--ink-soft); }
  body.print-method .method-diagram { min-height: 0; background: #fff; }
  body.print-method .method-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); break-inside: avoid; }
  body.print-method .method-card { min-height: 0; padding: 0.85rem; background: #fff; }
  body.print-method .method-card p { min-height: 0; }
  body.print-method .method-readings,
  body.print-method .method-status-key,
  body.print-method .method-dictionary,
  body.print-method .method-note { break-inside: avoid; background: #fff; }
  body.print-method .method-reading-item,
  body.print-method .method-status-key-item,
  body.print-method .method-dictionary-item { background: #fff; }

  body.print-comparison { page: comparison-sheet; }
  body.print-comparison .hero,
  body.print-comparison #atlas,
  body.print-comparison .method-view { display: none !important; }
  body.print-comparison .compare-view { display: block !important; padding: 0; border-top: 0; }
  body.print-comparison .compare-intro-side .compare-edit-button,
  body.print-comparison .compare-intro-side .compare-share-button,
  body.print-comparison .compare-intro-side .compare-citation-button,
  body.print-comparison .compare-intro-side .compare-print-button,
  body.print-comparison .compare-intro-side .comparison-export-actions,
  body.print-comparison .compare-helper,
  body.print-comparison .comparison-table-actions { display: none !important; }
  body.print-comparison .compare-intro { align-items: start; margin-bottom: 1.1rem; }
  body.print-comparison .compare-intro-side { display: block; }
  body.print-comparison .compare-callout { width: fit-content; min-width: 0; padding: 0.5rem 0.7rem; }
  body.print-comparison .compare-selection { margin-bottom: 1rem; }
  body.print-comparison .compare-selection-clear { display: none; }
  body.print-comparison .comparison-print-route { display: block; margin: -1.4rem 0 1rem; color: var(--ink-muted); font-family: var(--mono); font-size: 7.5pt; line-height: 1.45; overflow-wrap: anywhere; }
  body.print-comparison .comparison-grid { gap: 0.65rem; }
  body.print-comparison .comparison-card { min-height: 0; padding: 0.8rem; break-inside: avoid; }
  body.print-comparison .wide-card { min-height: 0; }
  body.print-comparison .card-heading { margin-bottom: 1rem; }
  body.print-comparison .chart-note { margin-top: 1rem; }
  body.print-comparison .comparison-table-panel { display: block; margin-top: 1rem; border-color: var(--ink); background: #fff; break-before: page; }
  body.print-comparison .comparison-table-panel summary { display: none; }
  body.print-comparison .comparison-table-scroll-cue { display: none !important; }
  body.print-comparison .comparison-table-wrap { overflow: visible; }
  body.print-comparison .comparison-table { min-width: 0; font-size: 6.4pt; }
  body.print-comparison .comparison-table th,
  body.print-comparison .comparison-table td { padding: 0.35rem 0.25rem; white-space: normal; }
  body.print-comparison .comparison-table thead th:first-child,
  body.print-comparison .comparison-table tbody th { position: static; background: #fff; box-shadow: none; }
  body.print-comparison .comparison-table thead th { position: static; background: #fff; box-shadow: none; }
  body.print-comparison .comparison-table tbody .comparison-source,
  body.print-comparison .comparison-table tbody .comparison-provenance { max-width: none; }

  body.print-catalog .site-header,
  body.print-catalog .hero-actions,
  body.print-catalog .hero-stats,
  body.print-catalog .site-footer,
  body.print-catalog .visual-column,
  body.print-catalog .catalog-summary-actions,
  body.print-catalog .catalog-batch-actions,
  body.print-catalog .compare-tray,
  body.print-catalog .catalog-footnote,
  body.print-catalog .catalog-search-note,
  body.print-catalog .catalog-filter-note,
  body.print-catalog .search-field,
  body.print-catalog .tool-row,
  body.print-catalog .manual-copy-fallback { display: none !important; }
  body.print-catalog .hero { display: block; min-height: 0; padding: 0 0 1.1rem; }
  body.print-catalog .hero-data-note { max-width: 32rem; margin-top: 1rem; color: var(--ink-muted); text-align: left; }
  body.print-catalog .workspace { padding: 1.4rem 0 0; }
  body.print-catalog .workspace .section-heading { margin-bottom: 1.2rem; }
  body.print-catalog .atlas-layout { display: block; }
  body.print-catalog .catalog-panel { display: block !important; position: static; width: 100%; }
  body.print-catalog .catalog-tools { padding: 0; border: 0; }
  body.print-catalog .catalog-data-note { margin: 0 0 0.8rem; color: var(--ink-muted); }
  body.print-catalog .catalog-summary { padding: 0.65rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  body.print-catalog .active-filters { padding: 0.75rem 0 0; }
  body.print-catalog .catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.4rem; }
  body.print-catalog .catalog-entry { break-inside: avoid; }
  body.print-catalog .catalog-card { padding: 0.8rem 0; }
  body.print-catalog .catalog-card:hover,
  body.print-catalog .catalog-card.is-active { padding-left: 0; background: transparent; }
  body.print-catalog .catalog-card.is-active { border-inline-start: 3px solid var(--amber); padding-left: 0.55rem; }
  body.print-catalog .compare-toggle { display: none; }
  body.print-catalog .catalog-route { margin-top: 0.7rem; }
  body.print-catalog .empty-state { padding: 1.2rem 0; text-align: left; }
}
