:root {
  --paper: #f4f0e6;
  --paper-deep: #ece5d7;
  --surface: #fbf8f0;
  --surface-strong: #fffdf8;
  --ink: #15324a;
  --ink-2: #294a62;
  --muted: #6f7f82;
  --line: rgba(21, 50, 74, 0.14);
  --line-strong: rgba(21, 50, 74, 0.24);
  --indigo: #173f61;
  --indigo-deep: #0f304b;
  --blue: #4f7690;
  --blue-soft: #dfe9ec;
  --green: #567564;
  --green-soft: #dfe8df;
  --earth: #8a6751;
  --earth-soft: #ece1d6;
  --sand: #a58154;
  --sand-soft: #eee3cf;
  --orange: #b9572a;
  --orange-soft: #f3dfd3;
  --focus: #dc6d2e;
  --shadow: 0 18px 50px rgba(24, 49, 67, 0.10);
  --header-height: 78px;
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
[role="button"] {
  -webkit-user-select: none;
  user-select: none;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

svg {
  display: block;
}

svg:not(.curriculum-graph) {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#app,
.application-shell {
  width: 100%;
  height: 100dvh;
}

.application-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    radial-gradient(circle at 62% 18%, rgba(255, 255, 255, .72), transparent 27%),
    linear-gradient(145deg, #f5f1e8, #f0ebdf 58%, #eee7da);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 18px;
  top: 12px;
  transform: translateY(-150%);
  background: var(--indigo-deep);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.boot-screen,
.fatal-state,
.noscript-message {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  place-items: center;
  gap: 18px;
  text-align: center;
  background: var(--paper);
  color: var(--ink);
}

.boot-screen p {
  margin: 0;
  font-size: 14px;
  letter-spacing: .05em;
}

.boot-mark {
  display: block;
  position: relative;
  width: 66px;
  height: 30px;
  border-top: 4px solid var(--indigo);
  border-radius: 60% 60% 0 0;
}

.boot-mark::before,
.boot-mark::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 3px;
  height: 30px;
  background: var(--indigo);
}

.boot-mark::before { left: 8px; }
.boot-mark::after { right: 8px; }

.command-bar {
  min-height: calc(var(--header-height) + var(--safe-top));
  padding: calc(12px + var(--safe-top)) calc(18px + var(--safe-right)) 12px calc(18px + var(--safe-left));
  display: grid;
  grid-template-columns: 220px minmax(220px, 520px) auto minmax(130px, 1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 237, .94);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.brand {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 50px;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.brand > span:last-child {
  display: grid;
  min-width: 0;
}

.brand b {
  font-size: 16px;
  letter-spacing: -.015em;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-bridge {
  position: relative;
  width: 42px;
  height: 27px;
  flex: 0 0 auto;
  border-top: 3px solid var(--indigo);
  border-radius: 50% 50% 0 0;
}

.brand-bridge::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 3px;
  height: 2px;
  background: var(--orange);
}

.brand-bridge i {
  position: absolute;
  top: 0;
  width: 2px;
  height: 24px;
  background: var(--indigo);
}

.brand-bridge i:nth-child(1) { left: 5px; }
.brand-bridge i:nth-child(2) { left: 20px; }
.brand-bridge i:nth-child(3) { right: 5px; }

.search-trigger {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.entry-pair {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.entry-pair .search-trigger {
  flex: 1 1 auto;
}

.idea-trigger {
  flex: 0 0 auto;
  min-height: 48px;
  border: 1px solid rgba(185, 87, 42, .24);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  background: var(--orange-soft);
  color: #70442f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.idea-trigger:hover {
  background: #efd1c0;
}

.idea-trigger svg {
  width: 19px;
  height: 19px;
}

.search-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-size: 13px;
}

.search-trigger kbd {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
}

.view-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .42);
}

.view-switcher button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.view-switcher button.is-active {
  color: var(--indigo);
  background: var(--surface-strong);
  box-shadow: 0 3px 10px rgba(21, 50, 74, .08);
}

.command-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.icon-button,
.icon-label-button {
  min-width: 46px;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}

.icon-label-button {
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.icon-label-button:hover,
.icon-button:hover {
  background: rgba(21, 50, 74, .06);
}

.icon-label-button em {
  font-style: normal;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--surface-strong);
  background: var(--indigo);
  font-size: 10px;
}

.workspace-grid {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) auto;
  overflow: hidden;
}

.subject-rail {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(247, 243, 234, .74);
  padding: 18px 12px;
  overflow: hidden auto;
  scrollbar-width: thin;
}

.rail-heading {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 7px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.rail-heading button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  cursor: pointer;
}

.subject-list {
  display: grid;
  gap: 7px;
}

.subject-button {
  width: 100%;
  min-height: 62px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.subject-button:hover {
  background: rgba(255, 255, 255, .5);
}

.subject-button.is-active {
  border-color: var(--line);
  background: var(--surface-strong);
}

.subject-button > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.subject-button b {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subject-button small {
  color: var(--muted);
  font-size: 10px;
}

.subject-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
}

.tone-blue { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.tone-indigo { --tone: var(--indigo); --tone-soft: #dce4eb; }
.tone-green { --tone: var(--green); --tone-soft: var(--green-soft); }
.tone-earth { --tone: var(--earth); --tone-soft: var(--earth-soft); }
.tone-sand { --tone: var(--sand); --tone-soft: var(--sand-soft); }
.tone-clay { --tone: #8b6657; --tone-soft: #ecdfd8; }
.tone-ochre { --tone: #927143; --tone-soft: #eee3cb; }
.tone-slate { --tone: #536d7c; --tone-soft: #dfe8ec; }
.tone-moss { --tone: #60735a; --tone-soft: #e0e7dc; }
.tone-rosewood { --tone: #805f62; --tone-soft: #eadfe0; }

.subject-mark {
  color: var(--tone);
  background: var(--tone-soft);
}

.atlas-workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr);
  overflow: hidden;
}

.context-row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(21, 50, 74, .08);
}

.context-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.context-back:hover {
  background: rgba(21, 50, 74, .05);
}

.breadcrumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  white-space: nowrap;
}

.breadcrumb > span svg {
  width: 15px;
  height: 15px;
  color: rgba(21, 50, 74, .3);
}

.breadcrumb button {
  min-width: 0;
  min-height: 36px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 0 5px;
  font-size: 12px;
}

.breadcrumb button:last-child {
  color: var(--ink);
  font-weight: 700;
}

.view-hint {
  margin: 0;
  padding: 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.atlas-viewport {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: default;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, .7), transparent 38%),
    linear-gradient(rgba(21, 50, 74, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 50, 74, .026) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

.atlas-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(82, 67, 42, .045);
}

.atlas-viewport.is-panning {
  cursor: grabbing;
}

.canvas-content {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.canvas-content.is-graph {
  display: grid;
  place-items: center;
}

.canvas-content.is-html {
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.curriculum-graph {
  width: 100%;
  height: 100%;
  min-height: 360px;
  font-family: inherit;
  overflow: visible;
}

.curriculum-graph [role="button"] {
  cursor: pointer;
}

.territory > path {
  fill: rgba(255, 253, 248, .92);
  stroke: rgba(21, 50, 74, .16);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 12px 18px rgba(21, 50, 74, .08));
  transition: stroke .18s ease, fill .18s ease, transform .18s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.territory:hover > path,
.territory:focus > path {
  fill: #fffdf8;
  stroke: var(--tone, var(--indigo));
  transform: translateY(-5px);
}

.territory-blue { --tone: var(--blue); }
.territory-indigo { --tone: var(--indigo); }
.territory-green { --tone: var(--green); }
.territory-earth { --tone: var(--earth); }
.territory-sand { --tone: var(--sand); }
.territory-clay { --tone: #8b6657; }
.territory-ochre { --tone: #927143; }
.territory-slate { --tone: #536d7c; }
.territory-moss { --tone: #60735a; }
.territory-rosewood { --tone: #805f62; }

.territory-mark {
  fill: var(--tone);
  font-size: 24px;
  font-weight: 800;
}

.territory-title {
  fill: var(--ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.025em;
}

.territory-description {
  fill: var(--ink-2);
  font-size: 13px;
}

.territory-count {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.territory-link,
.domain-route {
  fill: none;
  stroke: rgba(21, 50, 74, .15);
  stroke-width: 2;
  stroke-dasharray: 3 10;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.territory-link-label {
  fill: var(--muted);
  font-size: 10px;
  text-anchor: middle;
  letter-spacing: .04em;
}

.domain-route {
  stroke: rgba(21, 50, 74, .13);
  stroke-dasharray: 2 9;
}

.domain-card rect {
  fill: rgba(255, 253, 248, .94);
  stroke: rgba(21, 50, 74, .16);
  stroke-width: 1.5;
  filter: drop-shadow(0 10px 18px rgba(21, 50, 74, .065));
  transition: transform .18s ease, stroke .18s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.domain-card:hover rect,
.domain-card:focus rect {
  stroke: var(--tone);
  transform: translateY(-5px);
}

.domain-index {
  fill: var(--tone);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
}

.domain-title {
  fill: var(--ink);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.025em;
}

.domain-meta {
  fill: var(--muted);
  font-size: 12px;
}

.domain-arrow {
  fill: none;
  stroke: var(--tone);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.subject-centre circle {
  fill: var(--tone);
  stroke: rgba(255, 255, 255, .65);
  stroke-width: 10;
  filter: drop-shadow(0 14px 22px rgba(21, 50, 74, .14));
}

.subject-centre text {
  fill: #fffdf8;
  text-anchor: middle;
  font-size: 27px;
  font-weight: 700;
}

.subject-centre .subject-centre-title {
  font-size: 20px;
}

.concept-edge,
.connection-edge > path:not(.edge-hit) {
  fill: none;
  stroke: rgba(21, 50, 74, .34);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.strength-useful .concept-edge,
.connection-edge.strength-useful > path:not(.edge-hit) {
  stroke: rgba(81, 111, 104, .45);
  stroke-dasharray: 5 6;
}

.strength-possible .concept-edge,
.connection-edge.strength-possible > path:not(.edge-hit) {
  stroke: rgba(138, 103, 81, .35);
  stroke-dasharray: 2 8;
}

#arrow-strong { fill: rgba(21, 50, 74, .5); }
#arrow-useful { fill: rgba(81, 111, 104, .5); }
#arrow-possible { fill: rgba(138, 103, 81, .4); }

.edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 20;
  pointer-events: stroke;
}

.edge-group:hover .concept-edge,
.edge-group:focus .concept-edge {
  stroke: var(--orange);
  stroke-width: 4;
}

.concept-card rect {
  fill: rgba(255, 253, 248, .95);
  stroke: rgba(21, 50, 74, .16);
  stroke-width: 1.5;
  filter: drop-shadow(0 8px 14px rgba(21, 50, 74, .065));
  transition: stroke .16s ease, transform .16s ease, fill .16s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.concept-card:hover rect,
.concept-card:focus rect {
  stroke: var(--tone);
  transform: translateY(-4px);
}

.concept-card.is-selected rect {
  fill: color-mix(in srgb, var(--tone-soft) 58%, #fffdf8);
  stroke: var(--tone);
  stroke-width: 2.5;
}

.concept-year {
  fill: var(--tone);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.concept-title {
  fill: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.018em;
}

.concept-status {
  fill: var(--muted);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.concept-summary {
  fill: var(--ink-2);
  font-size: 10px;
}

.selection-ring {
  fill: transparent;
  stroke: var(--line-strong);
  stroke-width: 2;
}

.concept-card.is-selected .selection-ring {
  fill: var(--orange);
  stroke: var(--surface-strong);
  stroke-width: 4;
}

.connections-graph {
  font-family: inherit;
}

.connection-edge text {
  fill: var(--muted);
  font-size: 11.5px;
  text-anchor: middle;
  letter-spacing: .035em;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 7;
  stroke-linejoin: round;
}

.connection-edge:hover > path:not(.edge-hit),
.connection-edge:focus > path:not(.edge-hit) {
  stroke: var(--orange);
  stroke-width: 4;
}

.connection-node rect {
  fill: rgba(255, 253, 248, .96);
  stroke: rgba(21, 50, 74, .18);
  stroke-width: 1.5;
  filter: drop-shadow(0 8px 14px rgba(21, 50, 74, .07));
}

.connection-node:hover rect,
.connection-node:focus rect,
.connection-node.is-selected rect {
  stroke: var(--tone);
  stroke-width: 2.5;
}

.connection-subject {
  fill: var(--tone);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.connection-title {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.connection-type {
  fill: var(--muted);
  font-size: 11px;
}

.connection-root circle {
  fill: var(--tone);
  stroke: rgba(255, 255, 255, .72);
  stroke-width: 10;
  filter: drop-shadow(0 16px 28px rgba(21, 50, 74, .18));
}

.connection-root text {
  text-anchor: middle;
  fill: #fffdf8;
}

.connection-root-subject {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.connection-root-title {
  font-size: 21px;
  font-weight: 700;
}

.connection-root-meta {
  font-size: 12px;
  opacity: .8;
}

.zoom-cluster {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: grid;
  gap: 1px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 8px 22px rgba(21, 50, 74, .08);
}

.zoom-cluster button {
  width: 42px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.zoom-cluster button:hover {
  background: var(--paper-deep);
}

.semantic-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  min-height: 28px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 253, 248, .88);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.inspector {
  width: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(252, 249, 242, .98);
  border-left: 0 solid var(--line);
  transition: width .22s ease, border-width .22s ease;
}

.inspector.is-open {
  width: clamp(340px, 29vw, 430px);
  border-left-width: 1px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.inspector-header {
  min-width: 340px;
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 18px 18px 22px;
  border-bottom: 1px solid var(--line);
}

.inspector-header h2 {
  margin: 4px 0 0;
  max-width: 310px;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.inspector-header button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.eyebrow {
  color: var(--orange);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.inspector-body {
  min-width: 340px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px 22px calc(34px + var(--safe-bottom));
  scrollbar-width: thin;
}

.provenance-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.provenance-bar i {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.inspector-position {
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 11px;
}

.inspector-position b {
  margin: 0 5px;
  color: rgba(21, 50, 74, .28);
}

.statutory-block {
  margin: 0 0 22px;
  padding: 17px 17px 15px;
  border-left: 3px solid var(--indigo);
  background: #ebe9e0;
}

.statutory-block span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.statutory-block p {
  margin: 8px 0 11px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.48;
}

.statutory-block a {
  color: var(--indigo);
  font-size: 11px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.inspector-lead {
  padding: 0 0 22px;
}

.inspector-lead h3,
.connection-list h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.inspector-lead p {
  margin: 0;
  font-size: 15px;
  line-height: 1.58;
}

.direction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 24px;
}

.direction-grid section {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .42);
}

.direction-grid section > span {
  display: block;
  margin-bottom: 7px;
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.direction-grid button {
  width: 100%;
  min-height: 37px;
  border: 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.25;
}

.direction-grid button:first-of-type {
  border-top: 0;
}

.direction-grid button svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.direction-grid p {
  margin: 4px 0 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.connection-list {
  margin: 0 0 20px;
}

.connection-list > button {
  width: 100%;
  min-height: 65px;
  border: 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.connection-list > button > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.connection-list b {
  font-size: 12px;
}

.connection-list small {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.strength-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--indigo);
}

.strength-dot.strength-useful { background: var(--green); }
.strength-dot.strength-possible { background: var(--earth); border: 2px solid var(--earth-soft); }

.inspector details {
  border-top: 1px solid var(--line);
}

.inspector summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
}

.inspector summary::-webkit-details-marker { display: none; }

.inspector summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 19px;
  font-weight: 400;
}

.inspector details[open] summary::after { content: "−"; }

.inspector summary span {
  order: 2;
  margin-left: 7px;
  margin-right: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.inspector details ul {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}

.tag-list span,
.provenance-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: rgba(255, 255, 255, .5);
  color: var(--ink-2);
  font-size: 10px;
}

.inspector-primary {
  width: 100%;
  min-height: 49px;
  margin-top: 20px;
  border: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--indigo);
  color: #fffdf8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.inspector-secondary {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.relationship-guidance {
  padding: 18px 0 4px;
}

.relationship-guidance h3 {
  margin: 13px 0 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.relationship-guidance p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.boundary-note b {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.relationship-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7px;
  margin: 0 0 24px;
}

.relationship-route button {
  min-width: 0;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 9px;
  background: rgba(255, 255, 255, .55);
  text-align: left;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.relationship-route small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.relationship-route > span svg {
  width: 16px;
  height: 16px;
  color: var(--orange);
}

.relationship-facts {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.relationship-facts > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.relationship-facts dt { color: var(--muted); }
.relationship-facts dd { margin: 0; }

.boundary-note,
.provenance-note {
  padding: 13px;
  border-left: 3px solid var(--orange);
  background: var(--orange-soft);
  color: #634337;
  font-size: 11px;
  line-height: 1.5;
}

.selection-dock {
  min-height: 0;
  max-height: 0;
  padding: 0 calc(18px + var(--safe-right)) 0 calc(18px + var(--safe-left));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 0 solid var(--line);
  background: rgba(249, 246, 239, .97);
  transition: max-height .2s ease, min-height .2s ease, padding .2s ease, border-width .2s ease;
  z-index: 18;
}

.selection-dock.is-visible {
  min-height: calc(72px + var(--safe-bottom));
  max-height: calc(100px + var(--safe-bottom));
  padding-top: 10px;
  padding-bottom: calc(10px + var(--safe-bottom));
  border-top-width: 1px;
}

.dock-copy,
.dock-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dock-copy > span:last-child {
  min-width: 0;
  display: grid;
}

.dock-copy b {
  font-size: 12px;
}

.dock-copy small {
  color: var(--muted);
  font-size: 10px;
}

.dock-count,
.dock-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--indigo);
  color: #fffdf8;
  font-size: 14px;
  font-weight: 800;
}

.quiet-button,
.primary-button {
  min-height: 44px;
  border-radius: 11px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.quiet-button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
}

.primary-button {
  border: 1px solid var(--indigo);
  background: var(--indigo);
  color: #fffdf8;
}

.primary-button:hover { background: var(--indigo-deep); }

.toast-region {
  position: fixed;
  z-index: 1000;
  right: calc(20px + var(--safe-right));
  bottom: calc(20px + var(--safe-bottom));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.selection-dock.is-visible ~ .toast-region {
  bottom: calc(94px + var(--safe-bottom));
}

.toast {
  max-width: min(360px, calc(100vw - 32px));
  transform: translateY(12px);
  opacity: 0;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 12px;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-success { border-left: 4px solid var(--green); }
.toast-warning { border-left: 4px solid var(--orange); }

dialog {
  color: var(--ink);
  border: 0;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: none;
}

dialog::backdrop {
  background: rgba(14, 31, 44, .34);
  backdrop-filter: blur(4px);
}

.dialog-shell {
  width: min(680px, calc(100vw - 30px));
  max-height: min(760px, calc(100dvh - 30px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 22px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface-strong);
  box-shadow: 0 30px 90px rgba(11, 31, 45, .23);
}

.small-dialog .dialog-shell {
  width: min(560px, calc(100vw - 30px));
  display: block;
  overflow: auto;
}

.saved-dialog .dialog-shell {
  width: min(720px, calc(100vw - 30px));
}

.dialog-shell > header {
  min-height: 88px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.dialog-shell > header h2 {
  margin: 3px 0 0;
  font-size: 26px;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.dialog-shell > header button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.search-shell {
  width: min(760px, calc(100vw - 30px));
  height: min(680px, calc(100dvh - 30px));
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.dialog-search {
  margin: 18px 22px 8px;
  min-height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 0 15px;
  background: var(--paper);
}

.dialog-search input {
  width: 100%;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
}

.dialog-help {
  margin: 0;
  padding: 0 22px 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.search-results,
.saved-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 22px 22px;
}

.results-label {
  margin: 5px 0 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.result-row {
  width: 100%;
  min-height: 82px;
  border: 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 3px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.result-row:hover { background: rgba(21, 50, 74, .025); }

.result-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.result-copy b { font-size: 13px; }
.result-copy small { color: var(--orange); font-size: 9px; font-weight: 700; }
.result-copy em {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.no-results {
  min-height: 260px;
  display: grid;
  place-content: center;
  place-items: center;
  text-align: center;
  padding: 28px;
}

.no-results > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 7px;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--indigo);
  font-size: 24px;
}

.no-results h3 { margin: 7px 0; font-size: 18px; }
.no-results p { max-width: 400px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.field-label {
  display: grid;
  gap: 7px;
  margin: 18px 22px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.field-label input,
.field-label textarea,
.field-label select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
}

.field-label input,
.field-label select { min-height: 47px; }
.field-label textarea { resize: vertical; min-height: 104px; }

.dialog-shell > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 22px 20px;
}

.idea-shell {
  width: min(760px, calc(100vw - 30px));
  height: min(650px, calc(100dvh - 30px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.idea-entry-body {
  min-height: 0;
  overflow: auto;
  padding: 23px 24px 8px;
}

.idea-field {
  display: grid;
  gap: 9px;
}

.idea-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.idea-field textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid rgba(21, 50, 74, .2);
  border-radius: 17px;
  padding: 19px;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 3vw, 30px);
  line-height: 1.35;
  letter-spacing: -.02em;
}

.idea-entry-body > p {
  margin: 11px 2px 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.idea-refinement {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.idea-refinement summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.idea-refinement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 16px;
}

.idea-refinement-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.idea-refinement-grid input,
.idea-refinement-grid select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 11px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
}

.open-idea-view {
  max-width: 1160px;
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 68px);
  display: grid;
  align-content: start;
  gap: 30px;
}

.idea-origin {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 8px 42px 8px 42px;
  background: rgba(255, 253, 248, .88);
  box-shadow: var(--shadow);
}

.idea-origin::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -2px;
  width: 90px;
  height: 4px;
  background: var(--orange);
}

.idea-origin-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
}

.idea-origin-mark svg {
  width: 27px;
  height: 27px;
}

.idea-origin h2 {
  max-width: 850px;
  margin: 7px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -.035em;
}

.idea-origin p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.idea-structure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px;
}

.idea-structure > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.idea-structure > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.idea-structure em {
  border-bottom: 1px solid var(--line-strong);
  padding: 4px 7px;
  color: var(--ink-2);
  font-size: 10px;
  font-style: normal;
}

.idea-directions > header h3 {
  margin: 5px 0 16px;
  font-size: clamp(21px, 3vw, 34px);
  letter-spacing: -.035em;
}

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

.idea-purpose-grid > button,
.purpose-grid > button {
  min-width: 0;
  min-height: 136px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 5px 10px;
  padding: 18px;
  background: rgba(255, 253, 248, .78);
  text-align: left;
  cursor: pointer;
}

.idea-purpose-grid > button:hover,
.purpose-grid > button:hover {
  border-color: var(--orange);
  background: var(--surface-strong);
}

.idea-purpose-grid > button > span,
.purpose-grid > button > span {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--indigo);
  font-size: 17px;
  font-weight: 800;
}

.idea-purpose-grid b,
.purpose-grid b { font-size: 15px; }
.idea-purpose-grid small,
.purpose-grid small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.idea-purpose-grid svg,
.purpose-grid svg { grid-column: 3; grid-row: 1 / 3; align-self: center; color: var(--orange); }

.idea-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-left: 3px solid var(--orange);
  background: rgba(243, 223, 211, .62);
}

.idea-footer > div > span {
  color: #70442f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.idea-footer p {
  margin: 4px 0 0;
  max-width: 700px;
  color: #634337;
  font-size: 11px;
  line-height: 1.45;
}

.make-dialog .make-shell {
  width: min(1120px, calc(100vw - 28px));
  height: min(880px, calc(100dvh - 24px));
  max-height: none;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.make-progress {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.make-progress span {
  color: rgba(21, 50, 74, .36);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.make-progress span.is-active { color: var(--indigo); }
.make-progress i { width: 32px; height: 1px; background: var(--line-strong); }

.make-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface-strong);
}

.make-step {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
}

.make-step > header {
  max-width: 720px;
  margin-bottom: 24px;
}

.make-step > header > span,
.ready-summary > div > span {
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.make-step > header h3 {
  margin: 7px 0;
  font-size: clamp(28px, 4.2vw, 47px);
  line-height: 1.03;
  letter-spacing: -.045em;
}

.make-step > header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.step-back {
  min-height: 38px;
  margin: 0 0 15px;
  border: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px 0 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.other-purposes {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.other-purposes summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.representation-card {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  background: rgba(244, 240, 230, .45);
  text-align: left;
  cursor: pointer;
}

.representation-card:hover {
  border-color: var(--orange);
  background: #fffaf3;
  transform: translateY(-3px);
}

.recommendation-rank {
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.representation-card h4 {
  margin: 17px 0 7px;
  font-size: 23px;
  letter-spacing: -.035em;
}

.representation-card > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.representation-card > div {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.representation-card > div b { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.representation-card > div span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.representation-card > em { margin-top: 12px; color: var(--green); font-size: 9px; font-style: normal; font-weight: 700; }
.representation-card > svg { position: absolute; right: 20px; bottom: 20px; color: var(--orange); }

.make-ready {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(380px, 1.2fr);
  grid-template-rows: auto auto auto minmax(150px, 1fr) auto;
  column-gap: 22px;
  padding: 22px;
}

.ready-summary {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--line);
}

.ready-summary .step-back { grid-column: 1 / -1; justify-self: start; margin-bottom: 1px; }
.ready-summary h3 { margin: 5px 0 3px; font-size: 24px; letter-spacing: -.035em; }
.ready-summary p { margin: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); font-size: 10px; }
.ready-summary label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ready-summary select { min-height: 39px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-strong); padding: 0 9px; color: var(--ink); font-size: 10px; }

.sequence-composer {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  border-bottom: 1px solid var(--line);
}

.sequence-composer > summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.sequence-composer > summary span { font-size: 12px; font-weight: 750; }
.sequence-composer > summary b { color: var(--muted); font-size: 9px; font-weight: 600; }
.sequence-composer > p { color: var(--muted); font-size: 9px; line-height: 1.45; }

.sequence-stage-list {
  display: grid;
  gap: 6px;
}

.sequence-stage {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 28px 76px minmax(0, 1fr) 44px 44px;
  align-items: center;
  gap: 7px;
  padding: 7px;
  background: rgba(244, 240, 230, .45);
}

.sequence-stage > i { color: var(--orange); font-size: 9px; font-style: normal; font-weight: 800; }
.sequence-stage > div { display: grid; }
.sequence-stage > div b { font-size: 10px; }
.sequence-stage > div small { color: var(--muted); font-size: 8px; }
.sequence-stage select { min-width: 0; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-strong); color: var(--ink); padding: 0 6px; font-size: 9px; }
.sequence-stage button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--surface-strong); cursor: pointer; }
.sequence-stage button { width: 44px; height: 44px; }

.teacher-note-field {
  grid-column: 1;
  grid-row: 4;
  display: grid;
  gap: 6px;
  padding-top: 14px;
}

.teacher-note-field span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.teacher-note-field textarea { width: 100%; min-height: 72px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--paper); color: var(--ink); font-size: 11px; line-height: 1.4; }

.preview-tabs {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: end;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.preview-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.preview-tabs button.is-active { color: var(--indigo); border-bottom-color: var(--orange); }

.prompt-preview {
  grid-column: 2;
  grid-row: 2 / 5;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
  background: #f4f1e8;
}

.prompt-preview pre {
  margin: 0;
  padding: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #20394c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.62;
}

.make-actions {
  grid-column: 2;
  grid-row: 5;
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 7px;
  padding-top: 14px;
}

.idea-result-mark,
.idea-glyph {
  background: var(--orange-soft);
  color: var(--orange);
}

.production-glyph {
  background: var(--green);
}

.project-glyph {
  background: var(--indigo);
}

.production-refinement {
  grid-column: 1;
  grid-row: 3;
  border-bottom: 1px solid var(--line);
}

.production-refinement > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.production-refinement > summary span { font-size: 12px; font-weight: 750; }
.production-refinement > summary b { color: var(--muted); font-size: 9px; font-weight: 600; }

.refinement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding-bottom: 14px;
}

.refinement-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.refinement-grid input,
.refinement-grid select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 9px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.relationship-pair {
  margin: 18px 22px 2px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.relationship-pair > span { color: var(--orange); }

.saved-list {
  padding-top: 14px;
}

.saved-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px 4px;
  border-bottom: 1px solid var(--line);
}

.saved-toolbar svg { width: 17px; height: 17px; }

.saved-card {
  border-bottom: 1px solid var(--line);
  padding: 5px 0 10px;
}

.saved-open {
  width: 100%;
  min-height: 78px;
  border: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.saved-open > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.saved-open b { font-size: 14px; }
.saved-open small { color: var(--orange); font-size: 9px; font-weight: 700; }
.saved-open em { color: var(--muted); font-size: 10px; font-style: normal; }

.saved-glyph {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fffdf8;
  background: var(--indigo);
  font-size: 13px;
  font-weight: 800;
}

.saved-card-actions {
  display: flex;
  gap: 4px;
  padding-left: 58px;
}

.saved-card-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.saved-card-actions button:hover { background: var(--paper-deep); color: var(--ink); }

.framework-list {
  display: grid;
  gap: 8px;
  margin: 16px 22px;
}

.framework-list article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .52);
}

.framework-list article span { color: var(--orange); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.framework-list h3 { margin: 4px 0; font-size: 13px; }
.framework-list p { margin: 0; color: var(--muted); font-size: 10px; }
.framework-list em { display: block; margin-top: 6px; color: var(--green); font-size: 9px; font-style: normal; font-weight: 700; }
.provenance-note { margin: 14px 22px 22px; }

.empty-journey {
  min-height: 100%;
  display: grid;
  place-content: center;
  place-items: center;
  padding: 34px;
  text-align: center;
}

.empty-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  color: var(--indigo);
  font-size: 30px;
}

.empty-journey h2 {
  max-width: 520px;
  margin: 5px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.empty-journey p:not(.eyebrow) {
  max-width: 480px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.journey-view {
  max-width: 980px;
  min-height: 100%;
  margin: 0 auto;
  padding: 54px clamp(24px, 6vw, 90px) 80px;
}

.journey-view > header {
  max-width: 680px;
  margin-bottom: 38px;
}

.journey-view > header h2 {
  margin: 7px 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: .98;
  letter-spacing: -.055em;
}

.journey-view > header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.journey-river {
  position: relative;
}

.journey-river::before {
  content: "";
  position: absolute;
  left: 89px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(var(--blue), var(--orange), var(--green));
}

.journey-step {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 24px;
  cursor: pointer;
}

.journey-step::before {
  content: "";
  position: absolute;
  left: 82px;
  top: 34px;
  width: 16px;
  height: 16px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.journey-step.is-current::before { background: var(--orange); transform: scale(1.25); }

.journey-time {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 3px;
  padding-top: 24px;
}

.journey-time span { font-size: 11px; font-weight: 800; }
.journey-time i { color: var(--muted); font-size: 9px; font-style: normal; }

.journey-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  background: rgba(255, 253, 248, .8);
  box-shadow: 0 8px 20px rgba(21, 50, 74, .045);
}

.journey-step.is-current .journey-card {
  border-color: rgba(185, 87, 42, .46);
  background: #fffaf3;
}

.journey-card h3 { margin: 10px 0 6px; font-size: 20px; letter-spacing: -.025em; }
.journey-card p { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.journey-card > div { margin-top: 13px; color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }

.fatal-state { padding: 30px; }
.fatal-state h1 { margin: 0; font-size: 32px; }
.fatal-state p { margin: 0; color: var(--muted); }

@media (max-width: 1240px) {
  .command-bar {
    grid-template-columns: 190px minmax(190px, 1fr) auto auto;
  }
  .icon-label-button span { display: none; }
  .workspace-grid { grid-template-columns: 82px minmax(0, 1fr) auto; }
  .subject-rail { padding-inline: 8px; }
  .rail-heading span { display: none; }
  .rail-heading { justify-content: center; }
  .subject-button { grid-template-columns: 1fr; justify-items: center; min-height: 58px; padding: 7px; }
  .subject-button > span:last-child { display: none; }
}

@media (max-width: 980px) {
  .command-bar {
    grid-template-columns: 178px minmax(170px, 1fr) auto auto;
    gap: 8px;
    padding-left: calc(12px + var(--safe-left));
    padding-right: calc(12px + var(--safe-right));
  }
  .view-switcher button span { display: none; }
  .view-switcher button { padding-inline: 10px; }
  .workspace-grid {
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .subject-rail { grid-column: 1; grid-row: 1; }
  .atlas-workspace { grid-column: 2; grid-row: 1; }
  .inspector {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    height: 0;
    border-left: 0;
    border-top: 0 solid var(--line);
    transition: height .22s ease, border-width .22s ease;
  }
  .inspector.is-open {
    width: auto;
    height: min(52dvh, 560px);
    border-left: 0;
    border-top-width: 1px;
  }
  .inspector-header,
  .inspector-body { min-width: 0; }
  .inspector-header { min-height: 74px; padding: 15px 20px 12px; }
  .inspector-header h2 { font-size: 23px; }
  .inspector-body { padding-top: 16px; }
  .make-ready {
    grid-template-columns: minmax(250px, .85fr) minmax(330px, 1.15fr);
    padding: 16px;
  }
}

@media (max-width: 720px) {
  :root { --header-height: 116px; }
  .command-bar {
    grid-template-columns: minmax(130px, 1fr) auto auto;
    grid-template-rows: 52px 48px;
    gap: 5px 8px;
    padding-top: calc(6px + var(--safe-top));
    padding-bottom: 7px;
  }
  .brand { height: 48px; }
  .brand small { display: none; }
  .brand-bridge { width: 35px; }
  .search-trigger {
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    justify-content: center;
  }
  .entry-pair { gap: 5px; }
  .idea-trigger { min-height: 46px; padding-inline: 10px; }
  .search-trigger span,
  .search-trigger kbd { display: none; }
  .command-actions { grid-column: 3; }
  .icon-label-button { min-width: 42px; padding: 0; }
  .view-switcher {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: stretch;
  }
  .view-switcher button {
    flex: 1;
    justify-content: center;
    gap: 7px;
  }
  .view-switcher button span { display: inline; }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 63px minmax(0, 1fr) auto;
  }
  .subject-rail {
    grid-column: 1;
    grid-row: 1;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 6px 9px;
    overflow: hidden;
  }
  .rail-heading { display: none; }
  .subject-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .subject-list::-webkit-scrollbar { display: none; }
  .subject-button {
    width: auto;
    min-width: 52px;
    min-height: 50px;
    flex: 0 0 auto;
  }
  .subject-mark { width: 36px; height: 36px; }
  .atlas-workspace { grid-column: 1; grid-row: 2; }
  .inspector { grid-column: 1; grid-row: 3; }
  .context-row { padding-inline: 8px; }
  .view-hint { display: none; }
  .breadcrumb button { max-width: 135px; }
  .semantic-label { display: none; }
  .zoom-cluster { right: 10px; bottom: 10px; }
  .selection-dock.is-visible {
    max-height: 154px;
    min-height: calc(96px + var(--safe-bottom));
    flex-wrap: wrap;
    padding-inline: 10px;
  }
  .dock-actions { margin-left: auto; }
  .dock-actions .quiet-button:first-child { display: none; }
  .quiet-button,
  .primary-button { padding-inline: 11px; }
  .direction-grid { grid-template-columns: 1fr; }
  .idea-purpose-grid,
  .purpose-grid,
  .representation-grid { grid-template-columns: 1fr; }
  .idea-origin { grid-template-columns: 1fr; border-radius: 8px 28px 8px 28px; }
  .idea-origin-mark { width: 48px; height: 48px; }
  .idea-structure { align-items: flex-start; flex-direction: column; }
  .idea-structure > div { justify-content: flex-start; }
  .idea-footer { align-items: flex-start; flex-direction: column; }
  .idea-footer .primary-button { width: 100%; }
  .idea-refinement-grid { grid-template-columns: 1fr; }
  .make-ready {
    display: block;
    padding: 14px;
  }
  .ready-summary,
  .sequence-composer,
  .teacher-note-field,
  .preview-tabs,
  .prompt-preview,
  .make-actions { margin-bottom: 14px; }
  .prompt-preview { min-height: 360px; max-height: 48dvh; }
  .make-actions { flex-wrap: wrap; }
  .make-actions .primary-button { flex: 1; }
  .representation-card { min-height: 230px; }
  .dialog-shell > header h2 { font-size: 22px; }
  .search-shell { height: calc(100dvh - 18px); width: calc(100vw - 18px); }
  .journey-view { padding-inline: 18px; }
  .journey-river::before { left: 63px; }
  .journey-step { grid-template-columns: 64px minmax(0, 1fr); gap: 23px; }
  .journey-step::before { left: 56px; }
  .journey-card { padding: 16px; }
}

@media (max-width: 430px) {
  .brand b { font-size: 14px; }
  .brand-bridge { width: 31px; }
  .icon-label-button span { display: none; }
  .command-bar { grid-template-columns: minmax(120px, 1fr) auto auto; }
  .idea-trigger span { display: none; }
  .idea-trigger { width: 46px; padding: 0; }
  .dock-copy small { display: none; }
  .dock-actions .quiet-button:first-child { display: none; }
  .dialog-shell { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); border-radius: 17px; }
  .relationship-pair { grid-template-columns: 1fr; }
  .relationship-pair > span { transform: rotate(90deg); justify-self: center; }
  .sequence-stage { grid-template-columns: 22px 54px minmax(110px, 1fr) 44px 44px; overflow-x: auto; }
  .sequence-stage button { display: grid; place-items: center; }
  .make-progress i { width: 15px; }
  .make-progress span { font-size: 8px; }
}

@media (max-height: 650px) and (min-width: 721px) {
  :root { --header-height: 64px; }
  .command-bar { min-height: 64px; padding-top: 7px; padding-bottom: 7px; }
  .brand, .search-trigger, .idea-trigger { min-height: 44px; height: 44px; }
  .atlas-workspace { grid-template-rows: 46px minmax(0, 1fr); }
  .context-row { padding-block: 3px; }
  .subject-rail { padding-block: 10px; }
  .subject-button { min-height: 52px; }
  .inspector.is-open { height: min(44dvh, 300px); }
  .selection-dock.is-visible { min-height: 64px; padding-top: 6px; padding-bottom: calc(6px + var(--safe-bottom)); }
}

.territory-compact .territory-title { font-size: 22px; }
.territory-compact .territory-description { font-size: 10px; }
.territory-compact .territory-count { font-size: 9px; }
.territory-compact .territory-mark { font-size: 20px; }

@media (max-width: 980px) {
  .territory-compact .territory-title { font-size: 28px; }
  .territory-compact .territory-mark { font-size: 26px; }
  .territory-compact .territory-description,
  .territory-compact .territory-count,
  .concept-status,
  .concept-summary,
  .connection-edge text { display: none; }
  .concept-title { font-size: 26px; }
  .concept-year { font-size: 16px; }
  .connection-title { font-size: 21px; }
}

.classroom-bar {
  display: none;
}

body.is-classroom .application-shell {
  grid-template-rows: minmax(0, 1fr) auto;
}

body.is-classroom .command-bar,
body.is-classroom .subject-rail,
body.is-classroom .inspector,
body.is-classroom .selection-dock,
body.is-classroom .zoom-cluster,
body.is-classroom .context-row,
body.is-classroom .semantic-label {
  display: none !important;
}

body.is-classroom .workspace-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.is-classroom .atlas-workspace {
  grid-column: 1;
  grid-row: 1;
  grid-template-rows: minmax(0, 1fr);
}

body.is-classroom .classroom-bar {
  min-height: calc(78px + var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px calc(24px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(24px + var(--safe-left));
  border-top: 1px solid var(--line);
  background: #f8f4eb;
  z-index: 30;
}

.classroom-bar > div:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.classroom-bar > div:first-child span {
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.classroom-bar > div:first-child b {
  max-width: 52vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(15px, 2vw, 22px);
}

.classroom-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.classroom-actions button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  background: var(--surface-strong);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.classroom-actions button:disabled { opacity: .38; cursor: default; }
.classroom-actions .classroom-exit { border-color: var(--indigo); background: var(--indigo); color: #fffdf8; }
.classroom-actions svg { width: 17px; height: 17px; }

.print-surface {
  display: none;
}

@media (max-width: 720px) {
  body.is-classroom .classroom-bar { align-items: stretch; flex-direction: column; gap: 8px; }
  .classroom-bar > div:first-child b { max-width: 90vw; }
  .classroom-actions { display: grid; grid-template-columns: 1fr 1fr 1fr auto; }
  .classroom-actions button { min-width: 0; padding: 0 8px; }
  .refinement-grid { grid-template-columns: 1fr; }
}

body.is-fullscreen .subject-rail,
body.is-fullscreen .inspector,
body.is-fullscreen .selection-dock {
  display: none !important;
}

body.is-fullscreen .workspace-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.is-fullscreen .atlas-workspace {
  grid-column: 1;
  grid-row: 1;
}

body.is-fullscreen .command-bar {
  grid-template-columns: 220px minmax(200px, 1fr) auto auto;
}

body.is-fullscreen .curriculum-graph {
  width: min(100%, 1800px);
  margin-inline: auto;
}

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

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  @page landscape { size: A4 landscape; margin: 12mm; }
  html, body, #app, .application-shell { height: auto; min-height: 0; overflow: visible; background: white; }
  .command-bar, .subject-rail, .context-row, .inspector, .selection-dock, .classroom-bar, .zoom-cluster, .semantic-label, .toast-region { display: none !important; }
  .workspace-grid, .atlas-workspace { display: block; overflow: visible; }
  .atlas-viewport { height: 174mm; overflow: visible; background: white; }
  .atlas-viewport::after { display: none; }
  .curriculum-graph { width: 100%; height: 174mm; }
  .territory > path, .domain-card rect, .concept-card rect, .connection-node rect { filter: none; }
  .concept-edge, .connection-edge > path:not(.edge-hit) { stroke: #526474; }
  body.is-printing-spec .application-shell,
  body.is-printing-spec dialog,
  body.is-printing-surface .application-shell,
  body.is-printing-surface dialog { display: none !important; }
  body.is-printing-spec #app,
  body.is-printing-surface #app { display: block; }
  body.is-printing-spec .print-surface,
  body.is-printing-surface .print-surface {
    display: block !important;
    width: 100%;
    color: #173247;
    background: white;
  }
  body.print-landscape .print-surface { page: landscape; }
  body.is-printing-spec .print-surface header { margin-bottom: 10mm; border-bottom: 2px solid #173f61; padding-bottom: 6mm; }
  body.is-printing-spec .print-surface header span { color: #a64e28; font-size: 9pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  body.is-printing-spec .print-surface h1 { margin: 3mm 0 1mm; font-size: 24pt; }
  body.is-printing-spec .print-surface p { margin: 0; color: #596d78; font-size: 10pt; }
  body.is-printing-spec .print-surface pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 9.5pt/1.48 "Avenir Next", Avenir, "Segoe UI", sans-serif; }
  body.is-printing-surface .print-surface header { margin-bottom: 8mm; border-bottom: 2px solid #173f61; padding-bottom: 5mm; }
  body.is-printing-surface .print-surface header span { color: #a64e28; font-size: 9pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  body.is-printing-surface .print-surface h1 { margin: 2mm 0 1mm; font-size: 25pt; line-height: 1.05; }
  body.is-printing-surface .print-surface h2 { margin: 0 0 2mm; font-size: 13pt; }
  body.is-printing-surface .print-surface p,
  body.is-printing-surface .print-surface li,
  body.is-printing-surface .print-surface blockquote { font-size: 10pt; line-height: 1.45; }
  body.is-printing-surface .print-surface section { break-inside: avoid; margin-bottom: 6mm; }
  body.is-printing-surface .print-surface blockquote { margin: 2mm 0; padding: 4mm; border-left: 3px solid #a64e28; background: #f4f0e6; }
  .print-columns, .print-concepts, .print-subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6mm; }
  .print-columns section, .print-concepts section, .print-subjects section, .print-relations section, .print-journey section { padding: 4mm; border: 1px solid #aab4b8; }
  .print-subjects section { display: grid; grid-template-columns: 12mm 1fr; gap: 3mm; }
  .print-subjects h2, .print-subjects p { margin: 0 0 1mm; }
  .print-journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4mm; }
  .print-journey section { display: grid; grid-template-columns: 8mm 1fr; gap: 2mm; }
  .print-journey i { color: #a64e28; font-style: normal; font-weight: 800; }
  .print-journey span, .print-concepts span, .print-relations span, .print-statutory span { color: #596d78; font-size: 8.5pt; font-weight: 700; }
  .print-relations { columns: 2; column-gap: 6mm; }
  .print-relations section { display: grid; gap: 1mm; break-inside: avoid; }
  .print-provenance { margin-top: 10mm; padding-top: 4mm; border-top: 1px solid #aab4b8; color: #596d78; font-size: 8pt; }
}
