@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/trama/font-0.ttf) format("truetype");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/trama/font-1.ttf) format("truetype");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/trama/font-2.ttf) format("truetype");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/trama/font-3.ttf) format("truetype");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/trama/font-4.ttf) format("truetype");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/trama/font-5.ttf) format("truetype");
}
:root {
  --canvas: #061c1a;
  --surface: #0d2925;
  --raised: #12352f;
  --line: #1c433c;
  --strong: #2a5a51;
  --text: #ecf2e9;
  --muted: #8fa9a0;
  --faint: #809d93;
  --lime: #cbf15a;
  --amber: #f5b544;
  --teal: #2cc9a7;
  --on-accent: #072019;
  --tint-lime: #1b3a26;
  --tint-amber: #2e3523;
  color-scheme: dark;
  font-family: Geist, sans-serif;
  color: var(--text);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  scrollbar-color: var(--strong) var(--canvas);
}
body {
  margin: 0;
  min-height: 100dvh;
}
button,
input,
summary {
  font: inherit;
}
button,
summary {
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--strong);
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 500;
  min-height: 36px;
}
button:active,
summary:active {
  background: var(--raised);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}
input {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--strong);
  border-radius: 9px;
  padding: 10px;
  min-width: 0;
  caret-color: var(--lime);
}
input::placeholder {
  color: var(--faint);
}
::selection {
  background: var(--lime);
  color: var(--on-accent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  overflow-wrap: anywhere;
}
h1 {
  font-size: 40px;
  line-height: 44px;
}
h2 {
  font-size: 36px;
  line-height: 1.1;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p {
  line-height: 1.55;
}
img {
  flex-shrink: 0;
}
button.primary,
.selected {
  color: var(--on-accent);
  background: var(--lime);
  border-color: var(--lime);
}
.mono,
kbd {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 400;
}
.lime {
  color: var(--lime);
}
.amber {
  color: var(--amber);
}
.muted {
  color: var(--muted);
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  padding: 12px;
  background: var(--lime);
  color: var(--on-accent);
  z-index: 100;
}
.skip:focus {
  top: 8px;
}
.app-bar {
  height: 66px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  font-family: "Instrument Serif", serif;
  font-size: 28px;
  font-weight: 400;
}
.view-nav {
  display: flex;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 3px;
  border-radius: 99px;
  gap: 2px;
}
.view-nav button {
  border: 0;
  border-radius: 99px;
  padding: 6px 14px;
  min-height: 30px;
  color: var(--muted);
}
[data-view][aria-current="page"] {
  background: var(--lime);
  color: var(--on-accent);
}
.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 340px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 9px 0 12px;
}
.search input {
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  font-size: 13px;
  outline-offset: 7px;
}
.search kbd {
  color: var(--muted);
  border: 1px solid var(--strong);
  border-radius: 4px;
  padding: 1px 6px;
}
.seed-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border-color: var(--line);
  padding: 8px 12px;
  white-space: nowrap;
  color: var(--muted);
}
.seed-chip span {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-button {
  width: 36px;
  padding: 8px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border-color: var(--line);
}
main {
  padding: 0 24px 24px;
  outline: none;
}
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding: 22px 0 18px;
}
.subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  margin-top: 4px;
}
.legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 3px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.legend i {
  display: block;
  width: 14px;
  height: 10px;
  border-radius: 3px;
}
.requires {
  background: var(--tint-lime);
  border-color: var(--lime) !important;
}
.unlocks {
  background: var(--tint-amber);
  border-color: var(--amber) !important;
}
.indirect {
  border: 1px dashed var(--amber) !important;
}
.legend .requires {
  border: 1.5px solid;
}
.legend .unlocks {
  border: 1.5px solid;
}
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}
.cycle {
  min-width: 0;
}
.cycle h2 {
  font-family: Geist, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 24px;
  margin-bottom: 6px;
  color: var(--muted);
}
.cycle h2 span {
  margin-left: 6px;
  color: var(--text);
}
.course {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-align: left;
  width: 100%;
  height: 84px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 6px;
  font-size: 12px;
  min-width: 0;
}
.course.selected {
  background: var(--lime);
  color: var(--on-accent);
  border-color: var(--lime);
}
.course.requires {
  background: var(--tint-lime);
}
.course.unlocks {
  background: var(--tint-amber);
}
.course-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 3px;
  font:
    10px "Geist Mono",
    monospace;
  color: var(--faint);
}
.course-meta > span:last-child {
  font-size: 9px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.course.selected .course-meta {
  color: var(--on-accent);
}
.course.requires .course-meta {
  color: var(--lime);
}
.course.unlocks .course-meta,
.course.indirect .course-meta > span:last-child {
  color: var(--amber);
}
.course-name {
  font-weight: 500;
  line-height: 15px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.relationship-strip {
  position: relative;
  margin-top: 20px;
  padding: 22px 28px;
  display: flex;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.course-identity {
  width: 30%;
  max-width: 380px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding-right: 30px;
}
.course-identity h2 {
  margin: 6px 0 18px;
  font-size: 36px;
}
.stats {
  display: flex;
  gap: 20px;
  margin: 15px 0;
}
.stats > span {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 11px;
  gap: 2px;
}
.stats strong {
  font-size: 22px;
  color: var(--text);
  font-weight: 600;
  line-height: 26px;
}
.stats .lime {
  color: var(--lime);
}
.stats .amber {
  color: var(--amber);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dependency-flow {
  flex: 1;
  min-width: 0;
}
.dependency-flow > h3 {
  margin: 2px 0 20px;
}
.flow-lanes {
  display: flex;
  align-items: center;
  gap: 12px;
}
.flow-lane {
  flex: 1;
  min-width: 0;
  align-self: stretch;
}
.flow-lane h3 {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 22px;
}
.flow-lane:first-child h3 {
  color: var(--lime);
}
.flow-lane:nth-of-type(3) h3 {
  color: var(--amber);
}
.flow-lane > div {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  min-height: 135px;
}
.flow-lane .course {
  height: auto;
  min-height: 62px;
}
.flow-lane .course-meta > span:last-child {
  display: none;
}
.flow-arrow {
  margin-top: 32px;
}
.clear-selection {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  padding: 4px 8px;
  min-height: 24px;
}
.cycle-picker,
.cycle-caption,
.bottom-nav,
.mobile-selection {
  display: none;
}
.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.empty {
  text-align: center;
  padding: 90px 20px;
  max-width: 600px;
  margin: auto;
}
.empty p {
  color: var(--muted);
  margin: 16px 0 24px;
}
.analysis-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -54px 0 26px;
  position: relative;
}
.analysis-tabs,
.segmented {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 10px;
}
.analysis-tabs button,
.segmented button {
  border: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  padding: 6px 12px;
}
.analysis-tabs [aria-current="true"],
.segmented [aria-pressed="true"] {
  background: var(--raised);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--strong);
}
.export-menu {
  position: relative;
  font-size: 13px;
  display: inline-block;
}
.export-menu summary {
  padding: 10px 15px;
  border: 1px solid var(--strong);
  border-radius: 10px;
  list-style: none;
  white-space: nowrap;
}
.export-menu summary::after {
  content: "⌄";
  margin-left: 8px;
}
.export-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 5px;
  border: 1px solid var(--strong);
  background: var(--raised);
  border-radius: 10px;
  z-index: 15;
}
.export-menu button {
  text-align: left;
  border: 0;
}
.analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 20px;
}
.panel p {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0;
}
.verdict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
}
.verdict-head strong {
  font-size: 32px;
  flex-shrink: 0;
}
.rule {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.rule:last-child {
  padding-bottom: 0;
}
.rule > div {
  flex: 1;
}
.rule h3 {
  font-size: 15px;
}
.rule p {
  font-size: 13px;
  margin: 4px 0 0;
}
.rule > span:last-child {
  font:
    12px "Geist Mono",
    monospace;
  min-width: 55px;
  text-align: right;
}
.rule-progress {
  height: 6px;
  width: 100px;
  border-radius: 4px;
  background: var(--amber);
}
.rule-progress.ok {
  background: var(--lime);
}
.demo-note {
  border: 1px solid var(--amber);
  background: var(--tint-amber);
  padding: 20px;
  border-radius: 18px;
}
.demo-note h3 {
  color: var(--amber);
}
.analysis-cycle {
  margin-top: 28px;
}
.analysis-cycle > h3 {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 12px;
}
.analysis-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 7px 0;
}
.analysis-row > button {
  border: 0;
  text-align: left;
  padding-left: 0;
}
.analysis-row .mono {
  color: var(--muted);
  margin-right: 16px;
}
.analysis-row > span {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.relation-chip {
  font:
    11px "Geist Mono",
    monospace;
  min-height: 28px;
  padding: 5px 9px;
  margin: 3px;
}
.graph-options {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.graph-options label {
  font-size: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.graph-options input {
  accent-color: var(--lime);
}
.graph-shell {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  height: calc(100dvh - 260px);
  min-height: 400px;
  overflow: hidden;
}
.graph-bands {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: 0 0;
}
.graph-band {
  position: absolute;
  background: #0a2521;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  padding-top: 12px;
}
.graph-band:nth-child(even) {
  background: #10312b;
}
#graph {
  position: absolute;
  inset: 0;
}
.graph-toolbar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--raised);
  border: 1px solid var(--strong);
  border-radius: 12px;
  padding: 3px;
  z-index: 2;
  white-space: nowrap;
}
.graph-toolbar > button,
.graph-toolbar summary {
  border: 0;
  padding: 7px 12px;
}
.graph-toolbar .export-menu > div {
  top: auto;
  bottom: calc(100% + 10px);
}
.graph-hint {
  position: absolute;
  left: 20px;
  bottom: 20px;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}
.graph-list {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}
.graph-list p {
  margin-top: 6px;
}
.graph-list button {
  border: 0;
  padding: 4px 0;
}
.graph-list summary {
  padding: 8px 0;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--strong);
  border-radius: 20px;
  padding: 28px;
  max-width: min(600px, calc(100% - 32px));
  width: 100%;
  max-height: calc(100dvh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: rgb(0 12 10 / 0.72);
}
.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font-size: 36px;
}
.dialog-head button {
  border: 0;
  color: var(--muted);
}
dialog p {
  font-size: 14px;
  margin: 16px 0;
}
dialog form label {
  display: block;
  margin: 20px 0 8px;
  font-size: 13px;
}
dialog form input {
  width: 100%;
}
.about-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font:
    40px "Instrument Serif",
    serif;
}
dialog .relationship-strip {
  display: block;
  border: 0;
  padding: 0;
  margin: 0;
}
dialog .course-identity {
  width: auto;
  max-width: none;
  border: 0;
  padding: 0;
}
dialog .dependency-flow {
  margin-top: 28px;
}
dialog .flow-lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
dialog .flow-arrow {
  display: none;
}
dialog .flow-lane h3 {
  margin-bottom: 8px;
}
dialog .clear-selection {
  display: none;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--raised);
  border: 1px solid var(--teal);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 13px;
  z-index: 50;
  max-width: calc(100% - 32px);
  width: max-content;
}
@media (hover: hover) and (pointer: fine) {
  button:hover,
  summary:hover {
    background: var(--raised);
  }
  button.primary:hover,
  .course.selected:hover,
  [data-view][aria-current="page"]:hover {
    background: #d8fa78;
  }
  .course:hover {
    border-color: var(--strong);
  }
  .brand:hover {
    background: transparent;
    color: var(--lime);
  }
}
@media (min-width: 1600px) {
  main,
  .app-bar {
    padding-left: 32px;
    padding-right: 32px;
  }
  .course {
    height: 94px;
  }
  .relationship-strip {
    margin-top: 24px;
  }
}
@media (max-width: 1100px) and (min-width: 701px) {
  .app-bar {
    gap: 12px;
  }
  .search {
    width: 220px;
  }
  .seed-chip span {
    max-width: 110px;
  }
  .legend {
    gap: 8px;
    font-size: 11px;
  }
  .course-meta > span:last-child {
    display: none;
  }
  .course-name {
    font-size: 11px;
  }
  .course-identity {
    width: 28%;
  }
  .course-identity h2 {
    font-size: 30px;
  }
  .relationship-strip {
    gap: 20px;
    padding: 20px;
  }
  .flow-lanes {
    gap: 6px;
  }
  .flow-arrow {
    width: 16px;
  }
  .analysis-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
  .rule-progress {
    display: none;
  }
  .analysis-controls {
    margin-top: 0;
    justify-content: flex-start;
  }
  .graph-hint {
    display: none;
  }
}
@media (max-width: 700px) {
  .app-bar {
    height: auto;
    min-height: 68px;
    gap: 8px;
    padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top));
    flex-wrap: wrap;
  }
  .brand {
    font-size: 28px;
    margin-right: auto;
  }
  .view-nav {
    display: none;
  }
  .seed-chip {
    padding: 10px;
    min-height: 44px;
    max-width: 155px;
    order: 0;
  }
  .seed-chip span {
    font-size: 11px;
    max-width: 116px;
  }
  .seed-chip img:last-child {
    display: none;
  }
  .icon-button {
    width: 44px;
    height: 44px;
  }
  .search {
    order: 5;
    width: 100%;
    margin-top: 4px;
    height: 44px;
  }
  .search input {
    font-size: 16px;
  }
  .search kbd {
    display: none;
  }
  main {
    padding: 0 16px 110px;
  }
  .title-row {
    padding: 18px 0 14px;
    display: block;
  }
  h1 {
    font-size: 32px;
    line-height: 36px;
  }
  .subtitle {
    font-size: 11px;
    margin-top: 5px;
  }
  .legend {
    display: none;
  }
  .cycle-picker {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .cycle-picker button {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    width: 48px;
    min-height: 52px;
    border-color: var(--line);
    background: var(--surface);
    color: var(--muted);
    padding: 6px;
    font-size: 12px;
    scroll-snap-align: center;
  }
  .cycle-picker button strong {
    font:
      14px "Geist Mono",
      monospace;
    color: var(--text);
  }
  .cycle-picker [aria-current="true"] {
    background: var(--lime);
    color: var(--on-accent);
    border-color: var(--lime);
  }
  .cycle-picker [aria-current="true"] strong {
    color: var(--on-accent);
  }
  .cycle-caption {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin: 6px 0 14px;
  }
  .curriculum-grid {
    display: block;
  }
  .cycle {
    display: none;
  }
  .cycle.current-cycle {
    display: block;
  }
  .cycle h2 {
    display: none;
  }
  .course {
    height: 64px;
    padding: 10px 8px;
    margin-bottom: 8px;
  }
  .course-name {
    font-size: 12px;
  }
  .course-meta {
    font-size: 11px;
  }
  .course-meta > span:last-child {
    font-size: 11px;
  }
  .relationship-strip {
    display: none;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--strong);
    display: flex;
    justify-content: space-around;
    padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
    z-index: 10;
  }
  .bottom-nav button {
    min-width: 84px;
    min-height: 52px;
    border: 0;
    color: var(--muted);
  }
  .bottom-nav [aria-current="page"] {
    background: var(--lime);
    color: var(--on-accent);
    border-radius: 16px;
  }
  .mobile-selection {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--raised);
    border: 1px solid var(--strong);
    border-radius: 14px;
    padding: 10px;
    margin-top: 26px;
  }
  .mobile-selection button {
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
    min-height: 44px;
  }
  .mobile-selection span {
    font-size: 13px;
    font-weight: 500;
  }
  .analysis-controls {
    margin: 0 0 18px;
    justify-content: space-between;
    gap: 8px;
    align-items: start;
    flex-wrap: wrap;
  }
  .analysis-tabs {
    width: 100%;
    overflow: auto;
  }
  .analysis-tabs button {
    flex: 1;
    padding: 8px;
    font-size: 11px;
    min-height: 40px;
  }
  .analysis-layout {
    display: block;
  }
  .panel {
    padding: 20px;
    border-radius: 16px;
  }
  .panel h2 {
    font-size: 30px;
  }
  .verdict-head {
    align-items: start;
  }
  .verdict-head strong {
    font-size: 24px;
  }
  .rule {
    padding: 16px 0;
    gap: 10px;
    align-items: start;
  }
  .rule h3 {
    font-size: 13px;
  }
  .rule p {
    font-size: 12px;
  }
  .rule-progress {
    display: none;
  }
  .rule > span:last-child {
    font-size: 11px;
    min-width: 40px;
  }
  .analysis-row {
    align-items: start;
    gap: 8px;
  }
  .analysis-row > button {
    max-width: 65%;
    font-size: 12px;
    min-height: 44px;
  }
  .analysis-row .mono {
    display: block;
    margin-bottom: 4px;
  }
  .analysis-row > span {
    font-size: 11px;
    padding-top: 5px;
  }
  .graph-options {
    justify-content: flex-start;
    gap: 8px;
  }
  .graph-options .segmented {
    width: 100%;
  }
  .segmented button {
    flex: 1;
    min-height: 40px;
    font-size: 11px;
    padding: 6px;
  }
  .graph-options label {
    min-height: 44px;
    font-size: 11px;
  }
  .graph-shell {
    height: 55dvh;
    min-height: 350px;
  }
  .graph-toolbar {
    bottom: 12px;
    max-width: calc(100% - 16px);
    gap: 0;
  }
  .graph-toolbar > button,
  .graph-toolbar summary {
    padding: 7px 9px;
    font-size: 11px;
    min-height: 44px;
  }
  .graph-hint {
    display: none;
  }
  .search-results {
    grid-template-columns: 1fr;
  }
  .empty {
    padding: 60px 10px;
  }
  .empty h2 {
    font-size: 32px;
  }
  dialog {
    max-width: 100%;
    width: 100%;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
    max-height: 88dvh;
  }
  dialog .relationship-strip {
    display: block;
  }
  dialog .course-identity h2 {
    font-size: 34px;
  }
  dialog .dialog-head h2 {
    font-size: 30px;
  }
  dialog button {
    min-height: 44px;
  }
  #toast {
    bottom: 90px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.mobile-search-toggle {
  display: none;
}
@media (min-width: 701px) {
  .flow-lane > div {
    max-height: 210px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .relationship-strip {
    min-height: 246px;
  }
  .course:not(.selected):not(.requires):not(.unlocks):not(.indirect)
    .course-name {
    color: var(--muted);
  }
}
@media (max-width: 700px) {
  .mobile-search-toggle {
    display: grid;
  }
  .search {
    display: none;
  }
  .search-open .search {
    display: flex;
  }
  .seed-chip {
    max-width: 130px;
  }
  .seed-chip span {
    max-width: 98px;
  }
  .app-bar .brand {
    font-size: 26px;
  }
  .app-bar {
    gap: 6px;
  }
  dialog .flow-lane > div {
    max-height: 210px;
    overflow: auto;
    overscroll-behavior: contain;
  }
}
@media (min-width: 701px) {
  .relationship-strip {
    min-height: 224px;
  }
}
@media (max-width: 700px) {
  .bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 12px;
  }
  .bottom-nav button[aria-current="page"] {
    background: transparent;
    color: var(--text);
  }
  .bottom-nav button img {
    padding: 0;
  }
  .bottom-nav button[aria-current="page"] img {
    background: var(--lime);
    border-radius: 8px;
    outline: 5px solid var(--lime);
  }
}

/* Keep mobile labels readable and all interactive targets touchable. */
@media (max-width: 700px) {
  button,
  summary,
  .analysis-tabs button {
    min-height: 44px;
  }
  .course-meta,
  .course-meta > span:last-child,
  .analysis-tabs button {
    font-size: 12px;
  }
}
.graph-metrics {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

/* Every mobile interaction, including compact graph and analysis controls,
   owns a full touch target rather than relying on visual padding alone. */
@media (max-width: 700px) {
  button,
  summary,
  input,
  .segmented button,
  .relation-chip {
    min-width: 44px;
    min-height: 44px;
  }
  .graph-toolbar {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .seed-chip span,
  .stats span,
  .rule > span:last-child,
  .analysis-row > span,
  .segmented button,
  .graph-options label,
  .graph-toolbar > button,
  .graph-toolbar summary,
  .analysis-tabs button,
  .course-meta,
  .course-meta > span:last-child {
    font-size: 12px;
  }
}
