/* plan.css — this page's shell only. Components and tokens are ui.css's
   (vendored from jgeschwendt/ui, one comment edited — see AGENTS.md). */

.plan-shell {
  margin: 0 auto;
  max-width: 100rem;
  padding: 1.5rem 1.25rem 5rem;
}

.eyebrow {
  color: var(--ui-fg-faint);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  color: var(--ui-fg-muted);
  max-width: 48rem;
}

.plan-toc {
  flex-wrap: wrap;
  margin-top: 1rem;
}

.plan-section {
  margin-top: 3rem;
}

.plan-section > header {
  margin-bottom: 1rem;
}

.plan-note {
  color: var(--ui-fg-muted);
  font-size: 0.9375rem;
  max-width: 48rem;
}

pre.tree {
  background: var(--ui-sunken);
  border: 1px solid var(--ui-border);
  border-radius: 0.5rem;
  font-family: var(--ui-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
  padding: 1rem 1.25rem;
}

.stations {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 1rem;
}

.stations .panel-body p {
  color: var(--ui-fg-muted);
  font-size: 0.875rem;
}

.stations-detail {
  grid-template-columns: 1fr;
}

.stations-detail .panel-body ul {
  color: var(--ui-fg-muted);
  display: grid;
  font-size: 0.875rem;
  gap: 0.375rem;
}

.stations-detail .panel-body li::before {
  color: var(--ui-fg-faint);
  content: "— ";
}

ol.port-order {
  display: grid;
  gap: 0.625rem;
  margin-top: 1rem;
  padding-left: 1.5rem;
}

ol.port-order > li::marker {
  color: var(--ui-fg-faint);
  font-weight: 600;
}

/* A plate is tldraw's own export, and every frame is exported twice — once in
   each theme (tldraft export --both). The figure holds both; this file shows
   the one that matches, so the ink follows the page instead of fighting it.
   No width or height attribute — an <object> takes the plate's own size, and
   max-width scales it down whole rather than cropping it. */
.plate {
  margin: 1.5rem 0 0;
}

.plate img,
.plate object {
  background: var(--plate-paper);
  border: 1px solid var(--ui-border);
  border-radius: 0.5rem;
  display: block;
  height: auto;
  max-width: 100%;
  padding: 0.75rem;
}

/* Each variant carries its own paper, and the PNG fallback inside it inherits
   the custom property: the light plate keeps the off-white it was drawn on, the
   dark one sits on the page's own sunken ground rather than a white card. */
.plate .plate-light {
  --plate-paper: #fdfdfb;
}

.plate .plate-dark {
  --plate-paper: var(--ui-sunken);
}

/* ui.css's theme contract, applied to the pair: light is the ground truth on
   bare :root, dark arrives through the media query (guarded so a manual light
   choice wins), and both [data-theme] blocks restate their side so the toggle
   wins over the system in either direction. Two classes beat `.plate object`,
   which is where the display: block above comes from. */
.plate .plate-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plate .plate-light {
    display: none;
  }

  :root:not([data-theme="light"]) .plate .plate-dark {
    display: block;
  }
}

:root[data-theme="dark"] .plate .plate-light {
  display: none;
}

:root[data-theme="dark"] .plate .plate-dark {
  display: block;
}

:root[data-theme="light"] .plate .plate-light {
  display: block;
}

:root[data-theme="light"] .plate .plate-dark {
  display: none;
}

.plate figcaption {
  color: var(--ui-fg-muted);
  font-size: 0.875rem;
  margin-top: 0.625rem;
  max-width: 48rem;
}
