@font-face {
  font-family: LiteratureSans;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-display: swap;
}
:root {
  --paper: #f3f0e5;
  --ink: #214846;
  --muted: #71827a;
  --line: #d7d9c9;
  --gold: #b98250;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: LiteratureSans, Arial, sans-serif;
  font-size: 13px;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  background: #f9f6eb;
  border-radius: 4px;
}
button:hover {
  background: #e5e9da;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  padding: 12px;
  background: white;
  z-index: 10;
}
.masthead {
  height: 58px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.brand {
  font-weight: 750;
  font-size: 14px;
}
.brand span {
  font-size: 12px;
  font-weight: 450;
  color: var(--muted);
  margin-left: 10px;
}
main {
  max-width: 1800px;
  margin: auto;
  padding: 26px 32px 0;
}
.intro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(30px, 3.3vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
}
h1 em {
  color: #3c7c71;
}
.edition {
  font-size: 11px;
  line-height: 1.8;
  text-align: right;
}
.edition span {
  font-size: 9px;
  color: #a0744c;
}
.view-tabs {
  display: flex;
  gap: 5px;
  margin-top: 25px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.view-tabs button {
  padding: 12px 20px;
  min-height: 44px;
  border-color: transparent;
  background: transparent;
  font-size: 12px;
}
.view-tabs button span {
  color: var(--muted);
  margin-right: 9px;
  font-size: 9px;
}
.view-tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.view-tabs button[aria-pressed="true"] span {
  color: #afd1c0;
}
.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
}
.view-toolbar p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.view-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}
.view-actions button {
  width: 36px;
  height: 34px;
  font-size: 18px;
}
.view-actions #motion {
  font-size: 13px;
}
select {
  background: #f9f6eb;
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: 230px;
  padding: 8px 24px 8px 10px;
  font-size: 11px;
}
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: clamp(530px, 65vh, 790px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: radial-gradient(ellipse at 48% 35%, #fbf7ed 0%, #eaeedf 100%);
  overflow: hidden;
}
.pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.canvas-host {
  width: 100%;
  height: 100%;
  position: relative;
}
.canvas-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.stage.split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: clamp(560px, 70vh, 800px);
}
.stage.split #right-pane {
  border-left: 1px solid var(--line);
}
.pane-title {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 3;
  font-family: Georgia, serif;
  font-size: 21px;
  margin: 0;
  pointer-events: none;
}
.loading,
.fallback-message {
  position: absolute;
  top: 45%;
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px;
  line-height: 1.8;
}
.stage-hint {
  position: absolute;
  bottom: 12px;
  left: 20px;
  right: 20px;
  font-size: 9px;
  color: #73877b;
  pointer-events: none;
}
.scene-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scene-labels button {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  background: #fbf8eeed;
  border: 1px solid #bdcbbd;
  font-size: 11px;
  padding: 7px 11px;
  box-shadow: 0 2px 8px #4965550a;
  max-width: 150px;
  line-height: 1.35;
}
.scene-labels button[aria-pressed="true"] {
  color: white;
  background: #214846;
  border-color: #214846;
}
.scene-labels .small-label {
  font-size: 9px;
  padding: 3px 5px;
  border-color: transparent;
  background: #f9f6eadd;
  max-width: 110px;
}
.scene-labels .actor-label:not(.small-label) {
  font-weight: 600;
}
.page-controls {
  position: absolute;
  bottom: 43px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fbf8eee8;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 8px;
  z-index: 4;
}
.page-controls button {
  width: 38px;
  height: 32px;
  border: 0;
  background: transparent;
}
.page-controls span {
  font-size: 10px;
  white-space: nowrap;
}
#place-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
#place-lines path {
  fill: none;
  stroke: #ac7946;
  stroke-width: 1.5;
  opacity: 0.85;
}
#place-lines circle {
  fill: #ac7946;
  stroke: var(--paper);
  stroke-width: 1;
}
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 46px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.connection-key {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.connection-key span {
  width: 20px;
  border-top: 2px solid var(--gold);
}
.connection-key .dashed {
  border-top-style: dashed;
}
.info-card {
  padding: 21px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(240px, 0.65fr);
  gap: 26px;
  min-height: 160px;
}
.info-card h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 27px;
  margin: 4px 0 9px;
}
.info-card .role {
  font-size: 10px;
  color: #a0784e;
  line-height: 1.6;
  margin: 0;
}
.info-card .body {
  font-size: 12px;
  line-height: 1.85;
  margin: 0;
}
.info-card .minor {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin: 7px 0 0;
}
.info-card .section-name {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 8px;
  color: var(--muted);
  margin: 0;
}
.info-card .look {
  font-size: 11px;
  line-height: 1.7;
  margin: 0;
}
.info-card details {
  font-size: 10px;
  line-height: 1.75;
  color: var(--muted);
  margin-top: 9px;
}
.info-card details p {
  margin: 6px 0;
}
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.related button {
  padding: 5px 8px;
  font-size: 10px;
  min-height: 30px;
}
.info-card details summary,
footer summary {
  cursor: pointer;
  color: var(--ink);
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 19px 0 28px;
  color: var(--muted);
  font-size: 10px;
}
footer p {
  margin: 0;
  line-height: 1.9;
}
footer details {
  max-width: 750px;
}
footer details[open] {
  max-width: 900px;
}
footer details p {
  margin-top: 12px;
}
footer a {
  text-decoration: underline;
}
.empty-lines {
  font-size: 11px;
}
.fallback .stage {
  height: 260px;
}
.fallback #place-lines,
.fallback .stage-hint {
  display: none;
}
@media (max-width: 1000px) {
  .info-card {
    grid-template-columns: 170px 1fr;
  }
  .info-card .appearance {
    grid-column: 2;
  }
  .edition {
    display: none;
  }
  .stage.split .small-label {
    font-size: 8px;
    padding: 2px 3px;
  }
}
@media (max-width: 700px) {
  .masthead {
    padding: 0 18px;
  }
  .brand span {
    font-size: 10px;
    margin-left: 5px;
  }
  main {
    padding: 22px 14px 0;
  }
  .intro-row {
    display: block;
  }
  .eyebrow {
    font-size: 8px;
  }
  h1 {
    font-size: 34px;
  }
  .view-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 20px;
    padding-bottom: 13px;
  }
  .view-tabs button {
    padding: 11px 8px;
    font-size: 11px;
  }
  .view-toolbar {
    gap: 8px;
    align-items: flex-start;
    padding: 12px 0;
    min-height: 70px;
  }
  .view-toolbar p {
    margin: 0;
    max-width: 49%;
    font-size: 10px;
  }
  .view-actions {
    gap: 3px;
  }
  select {
    max-width: 143px;
    padding: 8px 6px;
    font-size: 10px;
  }
  .view-actions button {
    width: 30px;
    height: 32px;
  }
  .stage {
    height: 570px;
  }
  .scene-labels button {
    font-size: 10px;
    padding: 6px 8px;
    max-width: 120px;
  }
  .scene-labels .small-label {
    font-size: 8px;
    padding: 3px;
  }
  .stage.split {
    height: 900px;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
  .stage.split #right-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .pane-title {
    top: 16px;
    left: 18px;
    font-size: 19px;
  }
  .stage-hint {
    font-size: 8px;
    left: 14px;
    bottom: 9px;
  }
  .key-row {
    display: block;
    padding: 10px 0;
    font-size: 9px;
  }
  .key-row p {
    margin: 0;
  }
  .connection-key {
    margin-top: 5px !important;
  }
  .info-card {
    display: block;
    padding: 18px 3px;
    min-height: 0;
  }
  .info-card .body {
    margin-top: 13px;
    font-size: 11px;
  }
  .info-card .appearance {
    border-top: 1px solid var(--line);
    margin-top: 15px;
    padding-top: 12px;
  }
  .info-card h2 {
    font-size: 26px;
  }
  .info-card .look {
    font-size: 10px;
  }
  footer {
    display: block;
    font-size: 9px;
  }
  footer details {
    margin-top: 10px;
  }
  .page-controls {
    bottom: 40px;
    gap: 13px;
  }
  .fallback .stage.split {
    height: 380px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.label-leaders {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.label-leaders line {
  stroke: #729783;
  stroke-width: 1;
  opacity: 0.65;
}
@media (max-width: 700px) {
  html[data-view="world"] .stage {
    height: 440px;
  }
  html[data-view="network"] .stage {
    height: 450px;
  }
}
