/*
 * Woodshed — styled with the Program Partner design system.
 * Tokens, type roles, radii and button hierarchy follow the Program Partner
 * theme (src/styles.css and docs/design-system in the Program Partner repo).
 * Colors are the OKLCH values from that theme; fonts are self-hosted.
 */

/* Program Partner webfonts: the same static instances the product ships
   (public/fonts in Program Partner). One file per weight, latin + latin-ext
   subsets together. Fraunces is the static 500 instance, not the variable
   build, so opsz/SOFT/WONK settings have no effect. Never let the browser
   synthesise a missing weight. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-sans-400.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-sans-500.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/dm-sans-600.woff2') format('woff2');
}

@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/fraunces-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Noto Music';
  src: url('../fonts/NotoMusic-Regular.woff2') format('woff2');
  font-display: block;
}

:root {
  color-scheme: light;
  --font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-serif: Fraunces, ui-serif, Georgia, serif;
  --radius: 0.75rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  /* Program Partner light theme: warm sand, calm charcoal, accessible terracotta. */
  --background: oklch(0.97 0.018 92);
  --foreground: oklch(0.28 0.018 210);
  --card: oklch(0.995 0.006 90);
  --card-foreground: oklch(0.28 0.018 210);
  --primary: oklch(0.52 0.14 35);
  --primary-foreground: oklch(0.99 0.005 90);
  --secondary: oklch(0.92 0.028 80);
  --secondary-foreground: oklch(0.32 0.025 210);
  --muted: oklch(0.94 0.015 85);
  --muted-foreground: oklch(0.47 0.025 215);
  --accent: oklch(0.9 0.05 40);
  --accent-foreground: oklch(0.38 0.09 35);
  --destructive: oklch(0.56 0.2 25);
  --destructive-foreground: oklch(0.99 0.005 90);
  --border: oklch(0.87 0.014 210);
  --input: oklch(0.87 0.014 210);
  --input-border: oklch(0.62 0.014 210);
  --ring: oklch(0.58 0.13 35);
  --neutral: oklch(0.22 0.01 210);
  --neutral-foreground: oklch(0.99 0.005 90);
  --success: oklch(0.53 0.13 155);
  --success-foreground: oklch(0.99 0.005 90);
  --warning: oklch(0.53 0.11 80);
  --warning-foreground: oklch(0.99 0.005 90);
  --shadow: 0 1px 2px oklch(0.28 0.018 210 / 6%), 0 4px 12px oklch(0.28 0.018 210 / 6%);
}

/* Dark follows the device; data-theme on <html> is an explicit override. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --background: oklch(0.2 0.018 210);
    --foreground: oklch(0.95 0.012 90);
    --card: oklch(0.25 0.02 210);
    --card-foreground: oklch(0.95 0.012 90);
    --primary: oklch(0.7 0.13 38);
    --primary-foreground: oklch(0.2 0.02 210);
    --secondary: oklch(0.32 0.025 210);
    --secondary-foreground: oklch(0.95 0.012 90);
    --muted: oklch(0.3 0.02 210);
    --muted-foreground: oklch(0.72 0.02 90);
    --accent: oklch(0.36 0.055 35);
    --accent-foreground: oklch(0.95 0.012 90);
    --destructive: oklch(0.68 0.18 25);
    --destructive-foreground: oklch(0.2 0.02 210);
    --border: oklch(1 0 0 / 12%);
    --input: oklch(1 0 0 / 16%);
    --input-border: oklch(0.58 0.02 210);
    --ring: oklch(0.7 0.13 38);
    --neutral: oklch(0.88 0.01 210);
    --neutral-foreground: oklch(0.2 0.02 210);
    --success: oklch(0.72 0.12 155);
    --success-foreground: oklch(0.2 0.02 210);
    --warning: oklch(0.78 0.12 80);
    --warning-foreground: oklch(0.2 0.02 210);
    --shadow: 0 1px 2px oklch(0 0 0 / 40%), 0 6px 18px oklch(0 0 0 / 35%);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --background: oklch(0.2 0.018 210);
  --foreground: oklch(0.95 0.012 90);
  --card: oklch(0.25 0.02 210);
  --card-foreground: oklch(0.95 0.012 90);
  --primary: oklch(0.7 0.13 38);
  --primary-foreground: oklch(0.2 0.02 210);
  --secondary: oklch(0.32 0.025 210);
  --secondary-foreground: oklch(0.95 0.012 90);
  --muted: oklch(0.3 0.02 210);
  --muted-foreground: oklch(0.72 0.02 90);
  --accent: oklch(0.36 0.055 35);
  --accent-foreground: oklch(0.95 0.012 90);
  --destructive: oklch(0.68 0.18 25);
  --destructive-foreground: oklch(0.2 0.02 210);
  --border: oklch(1 0 0 / 12%);
  --input: oklch(1 0 0 / 16%);
  --input-border: oklch(0.58 0.02 210);
  --ring: oklch(0.7 0.13 38);
  --neutral: oklch(0.88 0.01 210);
  --neutral-foreground: oklch(0.2 0.02 210);
  --success: oklch(0.72 0.12 155);
  --success-foreground: oklch(0.2 0.02 210);
  --warning: oklch(0.78 0.12 80);
  --warning-foreground: oklch(0.2 0.02 210);
  --shadow: 0 1px 2px oklch(0 0 0 / 40%), 0 6px 18px oklch(0 0 0 / 35%);
}

* {
  box-sizing: border-box;
  border-color: var(--border);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary);
}

/* Type roles: headings are Fraunces 500, everything else DM Sans. */
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.2;
}

@media (min-width: 720px) {
  h1 {
    font-size: 2rem;
  }
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
}

h3 {
  font-size: 1rem;
  line-height: 1.4;
}

p {
  margin: 0 0 0.75rem;
}

.reading {
  font-size: 1rem;
  line-height: 1.6;
}

.muted {
  color: var(--muted-foreground);
}

.small {
  font-size: 0.75rem;
}

/* ------------------------------------------------------------ layout */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
  color: var(--primary);
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1;
}

.topnav {
  display: flex;
  gap: 0.25rem;
}

.topnav a {
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  white-space: nowrap;
}

.topnav a:hover {
  color: var(--foreground);
  background: var(--muted);
}

.topnav a.active {
  color: var(--accent-foreground);
  background: var(--accent);
}

.app {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  flex: 1;
}

.footer {
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand img {
  height: 22px;
  width: auto;
  display: block;
}

.footer-brand .dark-only {
  display: none;
}

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

  :root:not([data-theme='light']) .footer-brand .dark-only {
    display: block;
  }
}

:root[data-theme='dark'] .footer-brand .light-only {
  display: none;
}

:root[data-theme='dark'] .footer-brand .dark-only {
  display: block;
}

.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card + .card {
  margin-top: 1.5rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.spread {
  justify-content: space-between;
}

.stack > * + * {
  margin-top: 1rem;
}

/* ------------------------------------------------------------ controls */
button,
.btn {
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--neutral);
  color: var(--neutral-foreground);
  border-radius: var(--radius-md);
  height: 2.25rem;
  padding: 0 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}

button:hover,
.btn:hover {
  opacity: 0.9;
}

button:focus-visible,
.btn:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background: var(--accent);
  color: var(--accent-foreground);
  opacity: 1;
}

.btn-lg {
  height: 2.5rem;
  padding: 0 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
}

label.field {
  display: block;
  font-weight: 500;
}

label.field span,
.field > .field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

select,
input[type='text'],
textarea {
  font: inherit;
  width: 100%;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--input-border);
  background: var(--card);
  color: var(--foreground);
}

textarea {
  height: auto;
  padding: 0.6rem 0.75rem;
}

@media (max-width: 720px) {
  input[type='text'] {
    font-size: 1rem;
  }
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--card);
}

.check input {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.seg button {
  background: var(--card);
  color: var(--foreground);
  border-color: var(--input-border);
}

.seg button.active {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: transparent;
}

.pill {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 500;
}

.pill.bad {
  background: color-mix(in oklch, var(--destructive) 12%, transparent);
  color: var(--destructive);
}

code,
.linkbox {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
}

.linkbox {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--muted);
  word-break: break-all;
  user-select: all;
}

/* ------------------------------------------------------------ instrument picker */
.inst-groups h3 {
  margin: 1.25rem 0 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.inst-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.inst-btn {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  justify-content: flex-start;
  text-align: left;
  height: auto;
  min-height: 2.75rem;
  padding: 0.6rem 0.9rem;
  white-space: normal;
}

.inst-btn:hover {
  background: var(--muted);
  border-color: var(--input-border);
  opacity: 1;
}

.inst-btn.planned {
  opacity: 0.55;
  cursor: default;
}

/* ------------------------------------------------------------ practice */
.practice-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stats {
  display: flex;
  gap: 0.5rem 1.25rem;
  flex-wrap: wrap;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.stats .muted {
  font-weight: 400;
}

.progress {
  height: 6px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.4rem 0 1.25rem;
}

.progress > div {
  height: 100%;
  background: var(--primary);
  transition: width 0.2s;
}

.question {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .question {
    grid-template-columns: 1fr;
  }
}

.prompt {
  text-align: center;
}

.prompt .staff {
  max-width: 100%;
  height: auto;
}

.prompt-text {
  font-weight: 500;
  margin-top: 0.4rem;
}

.answer-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.diagram-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.diagram-wrap svg {
  max-width: 100%;
  height: auto;
}

.diagram-valves {
  width: 320px;
}

.diagram-slide {
  width: 520px;
}

.diagram-flute,
.diagram-sax,
.diagram-clarinet,
.diagram-oboe {
  max-height: 460px;
  width: auto;
}

.diagram-bassoon {
  width: 320px;
}

.diagram-strings {
  width: 300px;
}

.diagram-keyboard {
  width: 100%;
  max-width: 920px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: auto;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.choice:hover {
  background: var(--muted);
  opacity: 1;
}

.choice .staff {
  width: 100%;
  height: auto;
}

.choice.name {
  font-size: 1.25rem;
  font-weight: 500;
  padding: 0.9rem;
}

.choice.correct {
  border-color: var(--success);
  background: color-mix(in oklch, var(--success) 14%, var(--card));
}

.choice.wrong {
  border-color: var(--destructive);
  background: color-mix(in oklch, var(--destructive) 12%, var(--card));
}

.feedback {
  min-height: 2.4rem;
  text-align: center;
  font-weight: 500;
}

.feedback.ok {
  color: var(--success);
}

.feedback.bad {
  color: var(--destructive);
}

.feedback.warn {
  color: var(--warning);
}

.kbd-hint {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

kbd {
  font: inherit;
  font-size: 0.75rem;
  border: 1px solid var(--input-border);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 0 0.35em;
  background: var(--muted);
  color: var(--foreground);
}

.btn-primary kbd {
  background: color-mix(in oklch, var(--primary-foreground) 22%, transparent);
  border-color: color-mix(in oklch, var(--primary-foreground) 40%, transparent);
  color: inherit;
}

/* ------------------------------------------------------------ staff svg */
.staff .staff-lines line,
.staff .ledger-lines line {
  stroke: var(--foreground);
  stroke-width: 1.1;
}

.staff .stem {
  stroke: var(--foreground);
  stroke-width: 1.4;
}

.staff .notehead {
  fill: var(--foreground);
}

.music-glyph {
  font-family: 'Noto Music', serif;
  fill: var(--foreground);
}

.staff-hint {
  fill: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
}

/* ------------------------------------------------------------ diagrams */
.diagram text {
  font-family: var(--font-sans);
}

.diagram .key {
  cursor: pointer;
  outline: none;
}

.diagram.static .key {
  cursor: default;
}

.diagram .key-shape {
  fill: var(--card);
  stroke: var(--foreground);
  stroke-width: 2;
  transition: fill 0.1s;
}

.diagram .key:hover .key-shape {
  fill: var(--muted);
}

.diagram.static .key:hover .key-shape {
  fill: var(--card);
}

.diagram .key:focus-visible .key-shape {
  stroke: var(--ring);
  stroke-width: 3;
}

.diagram .key.pressed .key-shape,
.diagram.static .key.pressed:hover .key-shape {
  fill: var(--primary);
  stroke: var(--primary);
}

.diagram .key-label {
  fill: var(--foreground);
  font-weight: 600;
  font-size: 18px;
  pointer-events: none;
}

.diagram .key-label.small {
  font-size: 12px;
}

.diagram .key.pressed .key-label {
  fill: var(--primary-foreground);
}

.diagram .key-caption {
  fill: var(--muted-foreground);
  font-size: 12px;
  paint-order: stroke;
  stroke: var(--card);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.diagram .key-caption.strong {
  fill: var(--foreground);
  font-weight: 600;
  font-size: 15px;
}

.diagram .key.correct .key-shape,
.diagram.static .key.correct:hover .key-shape {
  fill: var(--success);
  stroke: var(--success);
}

.diagram .key.missed .key-shape,
.diagram.static .key.missed:hover .key-shape {
  fill: color-mix(in oklch, var(--success) 18%, var(--card));
  stroke: var(--success);
  stroke-dasharray: 4 3;
}

.diagram .key.wrong .key-shape,
.diagram.static .key.wrong:hover .key-shape {
  fill: var(--destructive);
  stroke: var(--destructive);
}

.diagram .key.correct .key-label {
  fill: var(--success-foreground);
}

.diagram .key.wrong .key-label {
  fill: var(--destructive-foreground);
}

.diagram .key.missed .key-label {
  fill: var(--success);
}

.diagram .body-line,
.diagram .slide-tube {
  stroke: var(--border);
  stroke-width: 6;
  stroke-linecap: round;
}

.diagram .quadrant-line {
  stroke: var(--border);
  stroke-width: 2;
}

.diagram .slide-bell,
.diagram .fingerboard {
  fill: var(--muted);
  stroke: var(--border);
}

.diagram .nut {
  fill: var(--foreground);
}

.diagram .string {
  stroke: var(--muted-foreground);
}

.diagram-keyboard .pkey.white .key-shape {
  fill: #fff;
  stroke: #555;
  stroke-width: 1;
}

.diagram-keyboard .pkey.black .key-shape {
  fill: #222;
  stroke: #222;
  stroke-width: 1;
}

.diagram-keyboard .pkey.white .key-label {
  fill: #555;
}

.diagram-keyboard .pkey.pressed .key-shape {
  fill: var(--primary);
}

.diagram-keyboard .pkey.correct .key-shape {
  fill: var(--success);
}

.diagram-keyboard .pkey.missed .key-shape {
  fill: color-mix(in oklch, var(--success) 25%, #fff);
  stroke: var(--success);
  stroke-width: 2;
}

.diagram-keyboard .pkey.wrong .key-shape {
  fill: var(--destructive);
}

/* ------------------------------------------------------------ results */
.score-big {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 3rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat-tile {
  background: var(--muted);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
}

.stat-tile .v {
  font-size: 1.5rem;
  font-weight: 500;
  font-family: var(--font-serif);
  font-variant-numeric: tabular-nums;
}

.stat-tile .k {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.missed-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

textarea.report {
  width: 100%;
  min-height: 12rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  background: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--neutral);
  color: var(--neutral-foreground);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 50;
}

.toast.show {
  opacity: 1;
}

.preview-staff {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.preview-staff .staff {
  width: 120px;
  height: auto;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 560px) {
  .topbar {
    padding: 0.5rem 0.75rem;
  }

  .brand-name {
    display: none;
  }

  .topnav a {
    padding: 0.4rem 0.55rem;
  }

  .topnav a[data-route='create'] {
    font-size: 0;
  }

  .topnav a[data-route='create']::after {
    content: 'Create';
    font-size: 0.875rem;
  }

  .app {
    padding: 1rem 1rem 2rem;
  }

  .card {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------------------------------------------- skill pathway assessments */
.choice.chosen {
  border-color: var(--ring);
  background: var(--accent);
  color: var(--accent-foreground);
}
.pathway-notes ul,
.review-list {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}
.review-list li span + span {
  margin-left: 0.5rem;
}
.pathway-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--muted);
  font-weight: 500;
}
.pathway-status.ok {
  border-color: var(--success);
  background: color-mix(in oklch, var(--success) 12%, var(--card));
}
.pathway-status.warn {
  border-color: var(--warning);
  background: color-mix(in oklch, var(--warning) 12%, var(--card));
}
.pathway-status.bad {
  border-color: var(--destructive);
  background: color-mix(in oklch, var(--destructive) 10%, var(--card));
}
.field-error {
  margin: 0;
  color: var(--destructive);
}
.field-error:empty {
  display: none;
}
.pp-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.pp-card > .stack {
  flex: 1 1 26rem;
  min-width: 0;
}

@media print {
  .topbar,
  .footer,
  button {
    display: none !important;
  }
}
