:root {
  --font-body: "Manrope", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --bg: #f2ede6;
  --ink: #1f1a16;
  --ink-soft: #5e564d;
  --ink-faint: #8a7f73;
  --panel: rgba(245, 239, 230, 0.93);
  --panel-strong: rgba(252, 248, 242, 0.96);
  --border: rgba(72, 58, 44, 0.16);
  --shadow: 0 24px 60px rgba(28, 20, 12, 0.16);
  --shadow-soft: 0 14px 30px rgba(28, 20, 12, 0.1);
  --accent: #9e2a2b;
  --accent-soft: rgba(158, 42, 43, 0.12);
  --radius: 22px;
  --transition: 180ms ease;
  --panel-top: 176px;
  --panel-max-height: calc(100vh - 196px);
  --inspector-top: auto;
  --inspector-max-height: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(228, 205, 176, 0.42), transparent 26%),
    linear-gradient(180deg, #f6f1ea 0%, #efe7de 100%);
  overflow: hidden;
}

body.notes-page {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

#map {
  position: absolute;
  inset: 0;
}

.intro-rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise-in 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.control-panel.intro-rise {
  animation-delay: 90ms;
}

.inspector.intro-rise {
  animation-delay: 150ms;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.title-shell {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 4;
  max-width: min(560px, calc(100vw - 40px));
  padding: 18px 20px 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(250, 246, 239, 0.96), rgba(242, 233, 222, 0.88));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.title-shell h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.floating-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.floating-panel-header .eyebrow {
  margin: 0;
}

.minimize-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0 0 2px;
  border: 1px solid rgba(72, 58, 44, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--ink-soft);
  font: 700 1.05rem/1 var(--font-body);
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.minimize-button:hover {
  transform: translateY(-1px);
  border-color: rgba(158, 42, 43, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
}

.minimize-button:focus-visible {
  outline: 3px solid rgba(158, 42, 43, 0.28);
  outline-offset: 2px;
}

.title-shell-content,
.inspector-body {
  overflow: hidden;
  max-height: 1800px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 260ms ease, opacity 180ms ease, transform 220ms ease, margin 220ms ease;
}

.title-shell-content[hidden],
.inspector-body[hidden] {
  display: none;
}

.title-shell.is-minimized,
.inspector.is-minimized {
  width: fit-content;
  min-width: 0;
  padding: 12px 14px;
}

.title-shell.is-minimized .title-shell-content,
.inspector.is-minimized .inspector-body {
  max-height: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.lede {
  margin: 0.85rem 0 0;
  max-width: 48ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.story-strip {
  margin-top: 1rem;
  display: grid;
  gap: 10px;
}

.story-kicker {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(158, 42, 43, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(158, 42, 43, 0.1), rgba(255, 255, 255, 0.42));
  font-size: 0.86rem;
  line-height: 1.5;
}

.story-kicker strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.story-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.story-metric {
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(72, 58, 44, 0.1);
}

.story-metric-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.story-metric-label {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.hero-note {
  margin: 12px 0 0;
  max-width: 50ch;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero-link,
.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.hero-link {
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(72, 58, 44, 0.14);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.hero-link:hover,
.inline-link:hover {
  transform: translateY(-1px);
}

.hero-link:hover {
  border-color: rgba(158, 42, 43, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.inline-link {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--accent);
}

.panel-handle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  display: none;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.control-panel,
.inspector {
  position: absolute;
  z-index: 4;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.control-panel {
  top: var(--panel-top);
  left: 20px;
  width: 360px;
  max-height: var(--panel-max-height);
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(94, 86, 77, 0.62) rgba(72, 58, 44, 0.08);
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), opacity 240ms ease;
}

.control-panel::-webkit-scrollbar {
  width: 13px;
}

.control-panel::-webkit-scrollbar-track {
  margin: 12px 0;
  border-radius: 999px;
  background: rgba(72, 58, 44, 0.08);
}

.control-panel::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(94, 86, 77, 0.62);
  background-clip: padding-box;
}

.control-panel::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent);
}

.control-panel.is-collapsed {
  transform: translateX(calc(-100% - 28px));
  opacity: 0;
  pointer-events: none;
}

.inspector {
  right: 20px;
  bottom: 20px;
  width: 360px;
  max-height: var(--inspector-max-height);
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  overflow: auto;
}

.inspector .floating-panel-header {
  margin-bottom: 10px;
}

.inspector.is-minimized .floating-panel-header {
  margin-bottom: 0;
}

.panel-section + .panel-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(72, 58, 44, 0.12);
}

.section-label,
.legend-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preset-button,
.layer-toggle {
  width: 100%;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  font: inherit;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.preset-button {
  padding: 11px 12px;
  border-radius: 14px;
  font-weight: 800;
  text-align: center;
}

.preset-button:hover,
.preset-button.active {
  border-color: rgba(158, 42, 43, 0.2);
  background: linear-gradient(180deg, rgba(158, 42, 43, 0.12), rgba(158, 42, 43, 0.04));
  box-shadow: inset 0 0 0 1px rgba(158, 42, 43, 0.08);
}

.mode-caption {
  margin: 10px 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.panel-intro {
  margin: 0 0 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.layer-list {
  display: grid;
  gap: 10px;
}

.layer-toggle {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 13px;
  border-radius: 16px;
  text-align: left;
}

.layer-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(72, 58, 44, 0.14);
  background: rgba(255, 255, 255, 0.56);
}

.layer-toggle.active {
  border-color: rgba(72, 58, 44, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 238, 228, 0.9));
  box-shadow: inset 0 0 0 1px rgba(72, 58, 44, 0.06);
}

.layer-dot {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(31, 26, 22, 0.18);
}

.classification-dot { background: #9e2a2b; }
.holc-dot { background: #76a865; }
.continuation-dot { background: #2f5a88; }
.burden-dot { background: #d36b1f; }
.interstate-dot { background: #4f4f57; }

.layer-copy {
  display: grid;
  gap: 3px;
}

.layer-copy strong {
  font-size: 0.93rem;
}

.layer-copy span {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.legend-stack {
  display: grid;
  gap: 12px;
}

.legend-block {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease, max-height 220ms ease, margin 220ms ease;
}

.legend-block.is-hidden {
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

.legend-grid,
.legend-rich-list {
  display: grid;
  gap: 8px;
}

.legend-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.legend-note {
  margin: 10px 0 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.legend-read {
  margin-top: 12px;
}

.legend-rich-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(72, 58, 44, 0.08);
}

.legend-rich-item:last-child {
  border-bottom: 0;
}

.legend-copy {
  display: grid;
  gap: 4px;
}

.legend-copy strong {
  font-size: 0.82rem;
}

.legend-copy span {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.legend-count {
  align-self: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.legend-bar {
  display: grid;
  gap: 8px;
}

.gradient-bar {
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f6edd9 0%, #e7b256 38%, #ce5b3b 68%, #7e1517 100%);
}

.gradient-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.toplines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 12px 12px 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(72, 58, 44, 0.1);
}

.metric-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.metric-label {
  display: block;
  margin-top: 4px;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.finding-list,
.scope-notes {
  margin-top: 12px;
}

.finding-list {
  display: grid;
  gap: 9px;
}

.finding-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(72, 58, 44, 0.08);
}

.finding-item:last-child {
  border-bottom: 0;
}

.finding-copy {
  display: grid;
  gap: 4px;
}

.finding-copy strong {
  font-size: 0.84rem;
}

.finding-copy span {
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.finding-count {
  align-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.scope-notes {
  padding-left: 18px;
  color: var(--ink-soft);
}

.scope-notes li {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.inspector-content h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.inspector-content p,
.inspector-grid {
  margin-top: 10px;
}

.inspector-content p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.inspector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inspector-stat {
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(72, 58, 44, 0.08);
}

.inspector-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.inspector-stat-value {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.inspector-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(72, 58, 44, 0.1);
}

.inspector-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.maplibregl-ctrl-bottom-right {
  right: 20px;
  bottom: 20px;
  z-index: 5;
}

.maplibregl-ctrl-group {
  border-radius: 14px !important;
  border: 1px solid var(--border) !important;
  background: rgba(252, 248, 242, 0.94) !important;
  box-shadow: var(--shadow-soft) !important;
}

.maplibregl-ctrl button:hover {
  background: rgba(158, 42, 43, 0.06) !important;
}

.notes-page .intro-rise {
  opacity: 1;
  transform: none;
  animation: none;
}

.guide-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.guide-toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(72, 58, 44, 0.12);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: rgba(250, 246, 239, 0.98);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.guide-toolbar-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.guide-toolbar-home,
.guide-toolbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.guide-toolbar-home {
  border: 1px solid rgba(158, 42, 43, 0.18);
  background: linear-gradient(180deg, rgba(158, 42, 43, 0.12), rgba(255, 255, 255, 0.7));
  color: var(--ink);
}

.guide-toolbar-link {
  border: 1px solid rgba(72, 58, 44, 0.1);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink-soft);
}

.guide-toolbar-home:hover,
.guide-toolbar-link:hover {
  transform: translateY(-1px);
}

.guide-hero {
  padding: 24px 24px 22px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(250, 246, 239, 0.96), rgba(242, 233, 222, 0.9));
  box-shadow: var(--shadow);
}

.guide-kicker {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.6;
  max-width: 62ch;
}

.guide-hero h1,
.guide-section h2,
.guide-band h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.guide-hero-stats,
.guide-summary-grid,
.guide-layer-grid,
.guide-method-grid {
  display: grid;
  gap: 14px;
}

.guide-hero-stats,
.guide-summary-grid,
.guide-method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-stat,
.guide-summary-card,
.guide-method-card,
.guide-layer-card,
.guide-build-meta {
  padding: 16px 16px 15px;
  border-radius: 18px;
  border: 1px solid rgba(72, 58, 44, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.guide-stat strong,
.guide-summary-card strong,
.guide-build-meta strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-stat span,
.guide-summary-card span {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.guide-stat p,
.guide-summary-card p,
.guide-method-card p,
.guide-layer-card p,
.guide-build-meta p,
.guide-text p,
.guide-footer p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.guide-section,
.guide-band {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(72, 58, 44, 0.1);
  border-radius: 28px;
  background: rgba(248, 243, 236, 0.88);
  box-shadow: var(--shadow-soft);
}

.guide-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.guide-main {
  display: grid;
  gap: 22px;
}

.guide-rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.guide-rail-card {
  padding: 16px;
  border: 1px solid rgba(72, 58, 44, 0.1);
  border-radius: 20px;
  background: rgba(248, 243, 236, 0.92);
  box-shadow: var(--shadow-soft);
}

.guide-hero-stats-rail {
  grid-template-columns: 1fr;
}

.guide-hero-stats-rail .guide-stat {
  padding: 14px 14px 13px;
}

.guide-hero-stats-rail .guide-stat span {
  font-size: 1.25rem;
}

.guide-rail-button {
  width: 100%;
  margin-top: 2px;
}

.guide-rail-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.guide-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.guide-grid-wide {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.guide-text {
  display: grid;
  gap: 14px;
}

.guide-text-narrow {
  max-width: 72ch;
}

.guide-subhead-block {
  margin-top: 18px;
}

.guide-stack {
  display: grid;
  gap: 14px;
}

.guide-callout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.guide-callout {
  padding: 16px 16px 15px;
  border-radius: 18px;
  border: 1px solid rgba(72, 58, 44, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.guide-callout strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-callout ul,
.guide-step-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.guide-callout li,
.guide-step-list li {
  margin-top: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.guide-step-list strong {
  color: var(--ink);
}

.guide-layer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-layer-grid-compact {
  gap: 12px;
}

.guide-layer-grid-wide {
  margin-top: 18px;
}

.guide-layer-card strong,
.guide-method-card strong,
.guide-classification-copy strong {
  display: block;
  font-size: 0.9rem;
}

.guide-layer-header,
.guide-classification-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(31, 26, 22, 0.16);
}

.guide-method-grid {
  margin-top: 14px;
}

.guide-method-grid-compact {
  gap: 12px;
}

.guide-method-card ul,
.guide-scope-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.guide-method-card li,
.guide-scope-list li {
  margin-top: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.guide-glossary {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.guide-glossary-item {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(72, 58, 44, 0.08);
}

.guide-glossary-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guide-glossary-item strong {
  font-size: 0.84rem;
}

.guide-glossary-item span {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.guide-classification-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 0;
}

.guide-classification-list-wide {
  margin-top: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 22px;
}

.guide-classification-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(72, 58, 44, 0.08);
}

.guide-classification-item:first-child {
  padding-top: 0;
}

.guide-classification-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.guide-classification-copy {
  display: grid;
  gap: 5px;
}

.guide-classification-copy p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.guide-count {
  align-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.guide-summary-card-utility {
  height: 100%;
}

.guide-summary-grid-stack {
  grid-template-columns: 1fr;
}

.guide-end-link {
  justify-self: start;
}

.guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 0 4px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1101px) {
  .title-shell {
    left: auto;
    right: 20px;
    width: min(440px, calc(100vw - 460px));
    max-width: none;
    max-height: calc(100vh - 40px);
    overflow: auto;
    scrollbar-gutter: stable;
  }

  .title-shell.is-minimized {
    width: fit-content;
  }

  .control-panel {
    top: 20px;
    max-height: calc(100vh - 40px);
  }

  .inspector {
    top: var(--inspector-top);
    bottom: auto;
  }
}

@media (max-width: 1100px) {
  .title-shell {
    max-width: calc(100vw - 40px);
  }

  .control-panel {
    width: min(360px, calc(100vw - 40px));
  }

  .inspector {
    width: min(360px, calc(100vw - 40px));
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-callout-grid {
    grid-template-columns: 1fr;
  }

  .guide-classification-list-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .panel-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .control-panel:not(.is-collapsed) {
    transform: translateX(0);
    opacity: 1;
  }

  .inspector {
    left: 20px;
    right: 20px;
    width: auto;
    bottom: 20px;
  }

  .story-metrics,
  .guide-hero-stats,
  .guide-summary-grid,
  .guide-layer-grid,
  .guide-method-grid,
  .guide-grid,
  .guide-layout,
  .guide-rail,
  .guide-classification-list {
    grid-template-columns: 1fr;
  }

  .guide-toolbar {
    top: 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .guide-toolbar-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .title-shell {
    top: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    padding: 16px 16px 17px;
  }

  .title-shell h1 {
    font-size: 2.2rem;
  }

  .title-shell.is-minimized,
  .inspector.is-minimized {
    width: fit-content;
  }

  .lede {
    font-size: 0.88rem;
  }

  .panel-handle {
    top: auto;
    right: 16px;
    bottom: 16px;
  }

  .control-panel {
    top: 160px;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: calc(100vh - 320px);
    padding: 16px;
  }

  .inspector {
    left: 16px;
    right: 16px;
    bottom: 70px;
    padding: 16px;
  }

  .toplines {
    grid-template-columns: 1fr;
  }

  .guide-shell {
    padding: 0 16px 28px;
  }

  .guide-toolbar {
    padding: 10px 12px;
    border-radius: 0 0 16px 16px;
  }

  .guide-hero,
  .guide-section,
  .guide-band,
  .guide-rail-card {
    padding: 18px 18px 20px;
    border-radius: 22px;
  }

  .guide-toolbar-home,
  .guide-toolbar-link {
    width: 100%;
  }
}
