/* Curriculum section: program outline, course outlines, and review index */

.curr-wrap {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.crumbs {
  font-size: 0.9rem;
  color: var(--muted);
}

.crumbs a {
  font-weight: 700;
}

.outline-hero h1 {
  margin: 0.25rem 0 0.75rem;
  color: var(--elderberry);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}

.hero-sub {
  display: block;
  margin-top: 0.4rem;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  color: var(--stinger-blue);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  color: var(--muted);
}

.print-btn {
  margin-left: auto;
}

.review-note {
  max-width: 820px;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--hornet-yellow);
  background: var(--lemon-zest);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-badge.is-not-started { background: #eef1f5; color: #4a5562; border-color: #d3dae3; }
.status-badge.is-draft { background: #e8f0fb; color: var(--sky); border-color: #c6d6ee; }
.status-badge.is-in-review { background: #fff6cc; color: #6b5200; border-color: #f0dc7a; }
.status-badge.is-revising { background: #fde8e7; color: #9b2c27; border-color: #f2c1be; }
.status-badge.is-complete { background: #e5f4e8; color: #1f6b2a; border-color: #b9dfc0; }

/* Two-column layout with sticky table of contents */
.outline-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.outline-toc {
  position: sticky;
  top: 96px;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.88rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.outline-toc ol {
  margin: 0;
  padding-left: 1.4rem;
}

.outline-toc li + li {
  margin-top: 0.25rem;
}

.outline-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
}

.outline-section {
  padding: clamp(1rem, 3vw, 1.75rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 96px;
}

.outline-section h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--line);
}

.outline-section h3 {
  margin: 1.25rem 0 0.4rem;
  color: var(--stinger-blue);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.outline-section h2 + h3 {
  margin-top: 0.5rem;
}

.sec-num {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--stinger-blue);
  color: #fff;
  font-size: 0.9rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-grid div {
  display: grid;
  grid-template-columns: minmax(150px, 40%) 1fr;
  border-bottom: 1px solid var(--line);
}

.field-grid div:not(.wide) {
  border-right: 1px solid var(--line);
}

.field-grid div.wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(150px, 20%) 1fr;
}

.field-grid dt {
  padding: 0.55rem 0.75rem;
  background: var(--soft);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--elderberry);
}

.field-grid dd {
  margin: 0;
  padding: 0.55rem 0.75rem;
  overflow-wrap: anywhere;
}

.blank {
  color: #8a94a0;
  font-style: italic;
}

.field-note {
  color: var(--muted);
  font-style: italic;
  margin: 0.25rem 0;
}

.outline-list {
  margin: 0.25rem 0 0;
  padding-left: 1.4rem;
}

.outline-list li + li {
  margin-top: 0.35rem;
}

.slo-list li span {
  display: block;
}

.assess {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.88rem;
  color: var(--sky);
}

.content-list {
  margin: 0;
  padding-left: 1.6rem;
  columns: 2;
  column-gap: 2rem;
}

.content-list > li {
  break-inside: avoid;
  margin-bottom: 0.9rem;
}

.content-list .outline-list {
  font-size: 0.94rem;
}

.todo {
  margin: 0;
  padding: 0.6rem 0.8rem;
  color: #6c7682;
  background: repeating-linear-gradient(-45deg, #f7f9fc, #f7f9fc 8px, #eef2f7 8px, #eef2f7 16px);
  border-radius: var(--radius);
  font-style: italic;
}

mark.confirm {
  background: #ffe9a8;
  color: #5a4300;
  padding: 0 0.25rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-weight: 700;
}

.pager {
  width: min(100% - 2rem, var(--max-width));
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
}

/* Index + program tables */
.status-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}

.status-summary div {
  padding: 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.status-summary strong {
  display: block;
  font-size: 1.8rem;
  color: var(--stinger-blue);
  line-height: 1.1;
}

.status-summary span {
  font-size: 0.85rem;
  color: var(--muted);
}

.curr-table {
  min-width: 640px;
}

.curr-table th,
.curr-table td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.curr-table thead th {
  background: var(--stinger-blue);
  color: #fff;
}

.block-row th {
  background: var(--soft);
  color: var(--elderberry);
}

.or-row td {
  padding: 0.1rem 0.8rem 0.1rem 2rem;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--muted);
  border-bottom: 0;
}

.total-row th,
.total-row td {
  font-weight: 800;
  border-top: 2px solid var(--stinger-blue);
}

.new-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.4rem;
  border-radius: 4px;
  background: var(--breeze);
  color: var(--stinger-blue);
  font-size: 0.75rem;
  font-weight: 800;
}

.existing-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.4rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.existing-tag:hover,
.existing-tag:focus-visible {
  text-decoration: underline;
}

.curr-section {
  margin-top: 2.5rem;
}

.curr-section > h2 {
  margin-bottom: 0.4rem;
}

.curr-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.curr-cards.four {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.curr-cards a {
  display: block;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--stinger-blue);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}

.curr-cards a:hover {
  border-top-color: var(--creek);
}

.curr-cards strong {
  display: block;
  color: var(--stinger-blue);
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .outline-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .outline-toc {
    position: static;
    max-height: none;
  }

  .outline-toc ol {
    columns: 2;
  }

  .content-list {
    columns: 1;
  }

  .curr-cards,
  .curr-cards.four {
    grid-template-columns: 1fr;
  }

  .status-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-grid div:not(.wide) {
    border-right: 0;
  }

  .field-grid div,
  .field-grid div.wide {
    grid-template-columns: 1fr;
  }

  .field-grid dt {
    padding-bottom: 0.2rem;
  }

  .outline-toc ol {
    columns: 1;
  }

  .print-btn {
    margin-left: 0;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .outline-toc,
  .pager,
  .print-btn,
  .crumbs {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .outline-layout,
  .outline-body {
    display: block;
  }

  .curr-wrap {
    width: 100%;
  }

  .field-grid div,
  .field-grid div.wide {
    grid-template-columns: 34% 1fr;
  }

  .field-grid dt,
  .field-grid dd {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
  }

  .outline-section {
    border: 0;
    padding: 0.5rem 0;
    break-inside: auto;
  }

  .outline-section h2 {
    break-after: avoid;
  }

  .content-list {
    columns: 1;
  }
}

.ct-verb {
  color: var(--elderberry);
}

.de-table {
  min-width: 620px;
  font-size: 0.92rem;
}

/* Pathway map */
.journey {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1.25rem 0;
  max-width: 820px;
}
.journey div {
  position: relative;
  padding-top: 1.4rem;
  border-top: 4px solid var(--stinger-blue);
}
.journey div:last-child { border-top-color: var(--creek); }
.journey .dot {
  position: absolute;
  top: -0.6rem;
  left: 0;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--stinger-blue);
}
.journey .dot.end { border-color: var(--creek); background: var(--creek); }
.journey strong { display: block; color: var(--elderberry); }
.journey small { color: var(--muted); }
.path-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.term-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--stinger-blue);
  border-radius: var(--radius);
  overflow: hidden;
}
.term-card:nth-child(n + 5) { border-top-color: var(--creek); }
.term-card header { padding: 1rem 1.1rem 0.5rem; }
.term-card h3 { margin: 0; color: var(--elderberry); font-size: 1.15rem; }
.term-card h3 span { font-weight: 400; color: var(--muted); margin-left: 0.4rem; }
.term-card header p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.9rem; }
.term-courses { list-style: none; margin: 0; padding: 0 1.1rem; flex: 1; }
.term-courses li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.tc-main { min-width: 0; }
.tc-main strong { display: block; color: var(--stinger-blue); }
.tc-main .or { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.tc-title { display: block; font-size: 0.93rem; }
.tc-note { display: block; font-size: 0.82rem; color: var(--muted); font-style: italic; }
.tc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex: 0 0 auto; text-align: right; }
.tc-units { font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.ptag {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  background: #eef1f5;
  color: #3d4855;
}
.ptag.tag-major { background: #e3edf8; color: var(--stinger-blue); }
.ptag.tag-major-gen-ed { background: #e6f4f5; color: #1c6c72; }
.ptag.tag-gen-ed { background: #eef1f5; color: #4a5562; }
.ptag.tag-upper-division { background: var(--stinger-blue); color: #fff; }
.ptag.tag-capstone { background: var(--elderberry); color: var(--hornet-yellow); }
.ptag.tag-elective { background: #f1ecfa; color: #5b3f8c; }
.ptag.tag-milestone { background: var(--hornet-yellow); color: #3d3000; }
.milestone {
  margin: 0.75rem 1.1rem 0;
  padding: 0.6rem 0.8rem;
  background: var(--lemon-zest);
  border-radius: var(--radius);
}
.milestone strong { display: block; margin-top: 0.25rem; }
.milestone p { margin: 0.15rem 0 0; font-size: 0.9rem; }
.term-card footer {
  margin-top: 0.75rem;
  padding: 0.6rem 1.1rem;
  background: var(--soft);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}
[data-view][aria-pressed="true"] { background: var(--stinger-blue); color: #fff; }
@media (max-width: 760px) {
  .path-cards { grid-template-columns: minmax(0, 1fr); }
  .journey { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .hero-actions, .journey { display: none !important; }
  .path-cards { grid-template-columns: 1fr 1fr; }
  .term-card { break-inside: avoid; }
}

.lock-form {
  display: grid;
  gap: 0.5rem;
  max-width: 360px;
}
.lock-form label { font-weight: 700; }
.lock-form input {
  min-height: 46px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

/* KSA crosswalk */
.status-summary.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lv { text-align: center; vertical-align: middle; font-weight: 800; font-size: 0.8rem; }
.lv-I { background: #e8f0fb; color: var(--sky); }
.lv-D { background: var(--creek); color: #0b3a3e; }
.lv-M { background: var(--stinger-blue); color: #fff; }
.ksa-legend .lv { display: inline-block; min-width: 1.6rem; padding: 0.1rem 0.4rem; border-radius: 4px; margin: 0 0.25rem 0 0.75rem; }
.ksa-legend .lv:first-child { margin-left: 0; }
.ksa-id {
  display: inline-block;
  min-width: 2.6rem;
  padding: 0 0.3rem;
  margin-right: 0.3rem;
  border-radius: 4px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}
.ksa-list .ksa-id.lv-M { background: var(--stinger-blue); color: #fff; border-color: var(--stinger-blue); }
.ksa-list .ksa-id.lv-D { background: var(--creek); color: #0b3a3e; border-color: var(--creek); }
.ksa-list .ksa-id.lv-I { background: #e8f0fb; color: var(--sky); }
.ksa-wrap { max-height: 80vh; overflow: auto; }
.ksa-table { min-width: 1100px; font-size: 0.85rem; }
.ksa-table th, .ksa-table td { padding: 0.35rem 0.4rem; }
.ksa-table thead th { position: sticky; top: 0; z-index: 2; }
.ksa-table thead tr:nth-child(2) th { top: 2.1rem; }
.ksa-table .grp { text-align: center; background: var(--sky); }
.ksa-table .grp-ud { background: var(--stinger-blue); }
.ksa-table .vcol { height: 7.5rem; vertical-align: bottom; width: 2.2rem; padding: 0.3rem 0; }
.ksa-table .vcol span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.ksa-table .vcol a { color: #fff; }
.ksa-table .vcol.ud { background: var(--elderberry); }
.ksa-table .ksa-item {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 300px;
  max-width: 380px;
  background: #fff;
  text-align: left;
  font-weight: 400;
}
.ksa-table thead .ksa-item { z-index: 3; background: var(--stinger-blue); font-weight: 700; }
.ksa-table td { border-left: 1px solid var(--line); }
.ksa-table tr.ksa-none .ksa-item { color: #8a94a0; }
.ksa-table.hide-none tr.ksa-none { display: none; }
.ksa-toggle { font-weight: 700; cursor: pointer; }
@media (max-width: 760px) {
  .status-summary.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ksa-table .ksa-item { min-width: 200px; max-width: 220px; }
}
