/* Design tokens lifted from ALU Portfolio v3.dc.html.
   Two amendments from the build brief are already applied here:
   - brief 1: no fixed 1000px, use max-width with width 100%
   - brief 9: #868D99 darkened to #767D89 for text below 13px */

:root {
  --page-bg: #f1f2f4;
  --surface: #ffffff;
  --surface-muted: #f5f6f8;
  --border: #e3e6eb;
  --border-strong: #cfd5de;
  --ink: #1f2a44;
  --ink-soft: #3d4451;
  --muted: #767d89;
  --muted-large: #868d99;
  /* 6.2:1 on white, 5.8:1 on --surface-muted: small text that has to meet
     WCAG AA, where --muted (4.15:1) and --muted-large do not. */
  --muted-small: #596170;
  --brand: #c22233;
  --brand-dark: #961a28;
  --brand-tint: #f9e9eb;
  --cream: #fbf9f3;
  --cream-border: #ebe7db;
  --ok: #4e7a57;
  --shell-max: 1000px;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 70px;
  box-sizing: border-box;
}

.shell {
  max-width: var(--shell-max);
  width: 100%;
}

.breadcrumb {
  font-size: 11px;
  color: var(--muted);
  padding: 0 2px 8px;
}

.frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 24px 36px;
}

.frame-body {
  padding: 0 36px 32px;
}

.title {
  font-size: 20px;
  font-weight: bold;
  color: var(--ink);
  margin: 0;
}

.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.eyebrow {
  font-size: 12px;
  font-weight: bold;
  color: var(--brand);
  letter-spacing: 0.01em;
}

.card {
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 26px 28px;
}

.card + .card {
  margin-top: 16px;
}

.card-lead {
  font-size: 25px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: bold;
  max-width: 760px;
  text-wrap: pretty;
  margin: 10px 0 0;
}

.facts {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  /* Surface, not border colour: a half filled last row must stay white
     rather than showing a grey placeholder cell. */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}

.fact {
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  padding: 14px 16px;
}

.fact dt {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fact dd {
  margin: 5px 0 0;
  font-size: 14px;
  color: var(--ink);
  word-break: break-word;
}

.note {
  margin-top: 18px;
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-radius: 11px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.pill {
  display: inline-block;
  background: var(--brand-tint);
  color: var(--brand);
  border-radius: 99px;
  padding: 4px 11px;
  font-size: 12px;
  margin: 0 6px 6px 0;
}

.error .frame {
  border-color: var(--brand-tint);
}

.error-detail {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

/* ---------------------------------------------------------- Mastery bars
   Geometry and colour taken from the v3 design: the aggregate bar is 6px on
   an #E3E6EB track with a brand fill, the per outcome bars are 5px on an
   #EDEFF3 track with a navy fill. */

.mastery-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
}

.mastery-summary-track {
  flex: 1;
  max-width: 420px;
}

.mastery-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.mastery-count {
  font-size: 13px;
  color: var(--ink);
  font-weight: bold;
}

.mastery-meta {
  font-size: 12px;
  color: var(--muted-large);
  white-space: nowrap;
}

.bar {
  height: 5px;
  background: #edeff3;
  border-radius: 99px;
  overflow: hidden;
}

.bar-lg {
  height: 6px;
  background: var(--border);
}

.bar-fill {
  height: 100%;
  background: var(--ink);
  border-radius: 99px;
}

.bar-fill-brand {
  background: var(--brand);
}

.outcome-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.outcome-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.outcome-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.outcome-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
  text-wrap: pretty;
}

.outcome-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 12px 0 0;
}

.level {
  font-size: 11px;
  font-weight: bold;
  border-radius: 99px;
  padding: 3px 11px;
  white-space: nowrap;
}

.level-mastery {
  background: var(--brand);
  color: var(--surface);
}

.level-developing {
  background: #edeff3;
  color: var(--ink);
}

.level-emerging {
  background: #edeff3;
  color: var(--muted);
}

.empty-lead {
  font-size: 17px;
  font-weight: bold;
  color: var(--ink);
  margin: 12px 0 0;
}

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-sm {
  padding: 6px 13px;
  font-size: 12px;
  border-radius: 7px;
}

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

.btn-primary:hover {
  background: var(--brand-dark);
  color: var(--surface);
}

.btn-quiet {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------- mission */

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 5px;
}

.field-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 11px;
}

.field-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 13px 14px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  font-family: inherit;
  resize: vertical;
}

.field-input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.mission-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 20px 22px;
  margin-top: 12px;
}

.influences {
  border: none;
  padding: 0;
  margin: 18px 0 0;
}

.influences legend {
  padding: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.quiet-suggestion {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ------------------------------------------------------------- timeline */

.timeline {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 14px;
}

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  box-sizing: border-box;
  margin-top: 4px;
}

.timeline-dot-current {
  background: var(--brand);
  border-color: var(--brand);
}

.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin: 4px 0;
}

.timeline-body {
  padding-bottom: 20px;
}

.timeline-when {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: bold;
  color: var(--ink);
}

.timeline-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 620px;
  text-wrap: pretty;
  margin: 0;
}

.timeline-text-current {
  color: var(--ink);
  font-weight: bold;
}

.pill-current {
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: bold;
  font-size: 11px;
  padding: 1px 9px;
  margin: 0;
}

/* ----------------------------------------------------------- lens + journey */

.lens-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 26px 0 18px;
}

.segmented {
  display: flex;
  background: #edeff3;
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}

.segment {
  border-radius: 7px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: bold;
  color: var(--muted);
  text-decoration: none;
}

.segment:hover {
  text-decoration: none;
  color: var(--ink);
}

.segment-on {
  background: var(--surface);
  color: var(--ink);
}

.period + .period {
  margin-top: 26px;
}

.period-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.period-name {
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
}

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

.journey-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 118px;
  text-decoration: none;
  color: inherit;
}

.journey-card:hover {
  border-color: var(--ink);
  text-decoration: none;
  color: inherit;
}

.journey-type {
  font-size: 11px;
  color: var(--muted);
}

.journey-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.35;
  text-wrap: pretty;
}

.journey-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  font-size: 12px;
}

.journey-skills {
  color: var(--muted);
}

.journey-status {
  font-weight: bold;
  white-space: nowrap;
}

.status-done {
  color: var(--ok);
}

.status-todo {
  color: var(--brand);
}

.prompt-card {
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 18px 22px;
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #525965;
}

.prompt-link {
  font-size: 13px;
  font-weight: bold;
  color: var(--brand);
}

.invite-card {
  background: var(--surface-muted);
}

.area-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.area-count strong {
  color: var(--brand);
}

/* --------------------------------------------------------- artifact detail */

.detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.link-back {
  font-size: 13px;
  font-weight: bold;
}

.detail-nav-siblings {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.truncate {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Without this the title block claims the full row and pushes the feature
   control onto its own line even on a wide screen. */
.detail-head > :first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.type-pill {
  font-size: 11px;
  font-weight: bold;
  color: var(--surface);
  background: var(--ink);
  border-radius: 99px;
  padding: 3px 11px;
}

.detail-title {
  font-size: 25px;
  line-height: 1.3;
  font-weight: bold;
  color: var(--ink);
  margin: 0;
  max-width: 620px;
  text-wrap: pretty;
}

.detail-excerpt {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 620px;
  text-wrap: pretty;
  margin: 12px 0 0;
}

.detail-feature {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  flex-shrink: 0;
}

.btn-featured {
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand);
}

.detail-facts {
  margin-top: 22px;
}

.status-written {
  color: var(--ink);
  font-weight: bold;
}

.fact dd.status-todo {
  color: var(--brand);
  font-weight: bold;
}

/* Brief item 1: this is the 1fr/296px grid, and it must collapse below 840px. */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}

.detail-main,
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--ink);
}

.body-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  text-wrap: pretty;
  margin: 0;
}

.file-row {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface-muted);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.file-badge {
  width: 40px;
  height: 50px;
  background: var(--ink);
  border-radius: 6px;
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

.file-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
  word-break: break-all;
}

.reflect-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reflect-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
}

.reflect-number {
  font-size: 12px;
  font-weight: bold;
  color: var(--brand);
  padding-top: 2px;
}

.reflect-question {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 5px;
}

.reflect-field {
  margin-bottom: 18px;
}

.reflect-field .field-label {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.field-input-sm {
  font-size: 14px;
}

.panel-invite {
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.invite-lead {
  font-size: 17px;
  font-weight: bold;
  color: var(--ink);
  margin: 0 0 8px;
}

.invite-body {
  font-size: 14px;
  color: #616875;
  line-height: 1.65;
  max-width: 430px;
  margin: 0 auto 18px;
  text-wrap: pretty;
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-item-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.4;
}

.side-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.side-body {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.65;
  text-wrap: pretty;
  margin: 0;
}

.side-link {
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  margin-top: 12px;
}

.side-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  padding: 0 4px;
  margin: 0;
}

/* ------------------------------------------------------------ add evidence */

.add-title {
  font-size: 24px;
  color: var(--ink);
  margin: 18px 0 6px;
  font-weight: bold;
}

.add-intro {
  font-size: 14px;
  color: #616875;
  margin: 0 0 26px;
  max-width: 540px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Brief item 1: this is the 1fr/280px grid, and it must collapse below 840px. */
.add-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: start;
}

.add-main,
.add-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.step-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 14px;
}

.segmented-inline {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dropzone {
  border: 1px dashed #c2c9d3;
  border-radius: 10px;
  padding: 24px;
  background: var(--cream);
}

.file-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-top: 14px;
}

.pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pick-option {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.pick-option:hover {
  border-color: var(--ink);
}

.pick-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.pick-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pick-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
}

.pick-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.chip-label {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 9px;
}

.chip-set {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--ink);
}

.chip:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: bold;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 14px;
}

.btn-link {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  color: #616875;
  text-decoration: underline;
  cursor: pointer;
}

.btn-link:hover {
  color: var(--ink);
}

.form-error {
  background: var(--brand-tint);
  border: 1px solid var(--brand);
  color: var(--brand-dark);
  border-radius: 9px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 18px;
}

select.field-input {
  font-size: 14px;
  background: var(--surface);
}

/* --------------------------------------------------------- graduate record */

.record-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 36px;
  border-bottom: 1px solid var(--cream-border);
  background: var(--cream);
}

.record-bar-note {
  font-size: 13px;
  color: #616875;
}

.record-bar-note strong {
  color: var(--ink);
}

.record-bar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.record-hero {
  background: var(--ink);
  padding: 46px 44px 42px;
}

.record-eyebrow {
  font-size: 12px;
  font-weight: bold;
  color: #e9a7ad;
  margin-bottom: 14px;
}

.record-name {
  font-size: 36px;
  font-weight: bold;
  color: var(--surface);
  line-height: 1.15;
  text-wrap: pretty;
}

.record-program {
  font-size: 14px;
  color: #b7c0d6;
  margin: 6px 0 26px;
}

.record-mission {
  font-size: 20px;
  line-height: 1.5;
  color: #f5f1e6;
  font-weight: bold;
  max-width: 700px;
  text-wrap: pretty;
}

.record-mission-empty {
  color: #b7c0d6;
  font-weight: normal;
  font-size: 15px;
}

.record-section {
  padding: 32px 36px 8px;
}

.record-section:last-child {
  padding-bottom: 42px;
}

.record-section-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--muted-small);
  margin-bottom: 14px;
}

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

.record-stat {
  font-size: 26px;
  font-weight: bold;
  color: var(--brand);
}

.record-stat-of {
  font-size: 16px;
  color: var(--ink);
}

.record-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0 12px;
}

.skills-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.skills-col-label {
  font-size: 16px;
  font-weight: bold;
  color: var(--ink);
}

.skills-col-sub {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  margin-top: 2px;
}

.skills-col-caption {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 8px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.skills-col-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skills-col-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.skills-col-outcome {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
  flex: 1 1 140px;
}

.record-work {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.work-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 24px;
}

.work-meta {
  font-size: 11px;
  color: var(--muted-small);
  margin-bottom: 6px;
}

.work-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.35;
  text-wrap: pretty;
}

.work-quote {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  font-style: italic;
  text-wrap: pretty;
}

.work-skills {
  font-size: 12px;
  color: var(--muted-small);
  margin-top: 9px;
}

.record-footnote {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-small);
}

/* ------------------------------------------------------------ meta skills */

.meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* At phone width inside the Canvas frame the tabs wrap onto a second row
   rather than overflow the page. */
.meta-bar .segmented {
  flex-wrap: wrap;
  row-gap: 3px;
}

.constellation {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(240px, 340px);
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
}

.constellation-chart {
  min-width: 0;
}

.radar {
  width: 100%;
  height: auto;
  display: block;
  /* The viewBox already carries padding for the labels, so nothing should
     escape. Clipping rather than spilling keeps it out of the column beside. */
  overflow: hidden;
}

.radar-ring {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.radar-ring:last-of-type {
  fill: var(--surface-muted);
  fill-opacity: 0.5;
}

.radar-spoke {
  stroke: var(--border);
  stroke-width: 1;
}

.radar-shape {
  fill: var(--brand);
  fill-opacity: 0.14;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linejoin: round;
}

.radar-dot {
  fill: var(--brand);
}

/* Sized in viewBox units, not screen pixels. The viewBox is wider than the
   rendered chart, so this is scaled down on screen and 15 reads as about 10. */
.radar-label {
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
  fill: var(--ink);
}

.radar-label-count {
  font-size: 13px;
  font-weight: normal;
  fill: var(--muted);
}

.constellation-side {
  min-width: 0;
}

.constellation-lead {
  font-size: 19px;
  font-weight: bold;
  color: var(--ink);
  margin: 0 0 8px;
}

.constellation-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 16px;
  max-width: 460px;
  text-wrap: pretty;
}

.constellation-note strong {
  color: var(--ink);
}

.meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.meta-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.meta-name {
  font-size: 14px;
  color: var(--ink);
}

.meta-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.meta-count strong {
  color: var(--brand);
}

/* ------------------------------------------------------------ chips
   The programme's course filter, a course's skill areas, and Add evidence.
   These come after the earlier .chip rules and win over them. */

.chip {
  display: inline-block;
  font-size: 12px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  text-decoration: none;
}

.chip-on,
.chip-on:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* -------------------------------------------------------- programme home */

.year-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.year-badge {
  font-size: 11px;
  font-weight: bold;
  color: var(--surface);
  background: var(--ink);
  border-radius: 99px;
  padding: 4px 11px;
  white-space: nowrap;
}

.card-lead-quiet {
  color: var(--muted);
  font-weight: normal;
  font-size: 17px;
}

/* Two families, seven each, side by side. A flat list of fourteen reads as
   admin; two labelled columns reads as a choice. */
.gcgo-families {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 12px;
}

.gcgo-family {
  min-width: 0;
}

.gcgo-family-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  font-weight: bold;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.gcgo-family-count {
  font-weight: normal;
  letter-spacing: 0;
  color: var(--border-strong);
}

.gcgo-family-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gcgo-item,
.gcgo-pick {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
}

.gcgo-pick {
  border-color: var(--border);
  background: var(--surface);
  cursor: pointer;
}

.gcgo-pick:hover {
  border-color: var(--ink);
}

.gcgo-pick:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: bold;
}

.gcgo-item-primary {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: bold;
}

.gcgo-item-secondary {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--ink);
  font-weight: bold;
}

.gcgo-rank {
  margin-left: auto;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gcgo-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  background: #edeff3;
  border: 1px solid #dde1e8;
  border-radius: 99px;
  padding: 6px 13px;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.year-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.year-current {
  border-color: var(--ink);
}

.year-head {
  padding: 14px 16px;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.year-current .year-head {
  background: var(--ink);
}

.year-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
}

.year-theme {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.year-current .year-title,
.year-current .year-theme {
  color: var(--surface);
}

.year-current .year-theme {
  color: rgba(255, 255, 255, 0.72);
}

.year-tag {
  font-size: 11px;
  font-weight: bold;
  border-radius: 99px;
  padding: 4px 9px;
  white-space: nowrap;
  background: #edeff3;
  color: var(--ink);
}

.year-current .year-tag {
  background: rgba(255, 255, 255, 0.16);
  color: var(--surface);
}

.year-ahead .year-tag {
  background: var(--surface-muted);
  color: var(--muted);
}

.year-body {
  padding: 6px 16px 14px;
}

.tri-row {
  padding: 13px 0;
  border-bottom: 1px solid #edeff3;
}

.tri-row:last-child {
  border-bottom: none;
}

.tri-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tri-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
}

.tri-dates {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.tri-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}

.pips {
  display: flex;
  gap: 3px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.pip {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.pip-on {
  background: var(--ink);
  border-color: var(--ink);
}

.programme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.programme-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.skill-rows {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.skill-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.skill-row-name {
  font-size: 12px;
  color: var(--ink);
}

.skill-row-count {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.skill-row-none {
  color: #a9b0bb;
}

.stat-quiet {
  color: #a9b0bb;
}

.next-card {
  background: var(--cream);
  border-color: var(--cream-border);
}

.next-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.35;
  text-wrap: pretty;
  margin-top: 7px;
}

.next-body {
  font-size: 13px;
  color: #525965;
  line-height: 1.6;
  margin: 7px 0 0;
  text-wrap: pretty;
}

/* ------------------------------------------------------ skills progression */

.focus-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.focus-chart,
.focus-steps {
  min-width: 0;
}

.focus-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--ink);
  margin-top: 6px;
}

.focus-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 16px;
  overflow: visible;
}

.chart-grid {
  stroke: #edeff3;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-headroom {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.chart-dot {
  fill: var(--surface);
  stroke: var(--brand);
  stroke-width: 2;
}

.chart-dot-gained {
  fill: var(--brand);
}

.chart-labels {
  display: flex;
  margin-top: 6px;
}

.chart-labels span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.chart-label-now {
  font-weight: bold;
  color: var(--ink) !important;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.key {
  width: 16px;
  height: 2px;
  display: inline-block;
}

.key-line {
  background: var(--brand);
}

.key-headroom {
  background: var(--border-strong);
}

.step-list {
  display: flex;
  flex-direction: column;
}

.step-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid #edeff3;
}

.gap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #edeff3;
}

.step-tri {
  font-size: 12px;
  font-weight: bold;
  color: var(--muted);
}

.step-title {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.step-source {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.step-delta {
  font-size: 12px;
  font-weight: bold;
  color: var(--ok);
  white-space: nowrap;
}

.spark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.spark-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 11px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 96px 92px;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.spark-card:hover {
  border-color: var(--ink);
  text-decoration: none;
  color: inherit;
}

.spark-on {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.spark-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.3;
}

.spark-state {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.spark-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.spark-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
}

.spark-line-flat {
  stroke: var(--border-strong);
}

.spark-dot {
  fill: var(--brand);
}

.spark-dot-flat {
  fill: var(--border-strong);
}

.spark-figures {
  text-align: right;
}

.spark-count {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  white-space: nowrap;
}

.spark-delta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.spark-delta-up {
  color: var(--ok);
  font-weight: bold;
}

/* -------------------------------------------------------- evidence library */

.filters {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.filter-label {
  font-size: 11px;
  color: var(--muted);
  width: 82px;
  flex-shrink: 0;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  text-decoration: none;
}

.filter-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.filter-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.filter-on:hover {
  color: var(--surface);
}

.lib-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.lib-row {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px 16px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, background 0.12s ease;
}

/* A short inset marker rather than a full height slab down the edge. It reads
   as a bookmark on the row, and it stops the list looking like a stack of
   colour coded boxes. */
.lib-row::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--border-strong);
}

/* Work from outside the programme reads differently at a glance, so a reader
   never has to open one to know where it came from. Carried by the marker and
   a warm surface rather than by a heavy border. */
.lib-outside {
  background: var(--cream);
  border-color: var(--cream-border);
}

.lib-outside::before {
  background: var(--brand);
}

.lib-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  text-decoration: none;
  color: inherit;
}

.lib-outside:hover {
  border-color: #ded6c2;
  background: #f7f3e8;
}

.lib-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* The kind is a quiet label, not a badge. Two loud chips per row competing
   with the title is what made these read as generated. */
.lib-kind {
  font-size: 11px;
  font-weight: bold;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lib-kind-outside {
  color: var(--brand);
}

.lib-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.35;
  text-wrap: pretty;
}

.lib-source {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.55;
  max-width: 62ch;
  /* Keeps rows to a comparable height so the list scans as a list. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lib-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}

/* Skills read as a quiet caption rather than a row of pills. */
.lib-chip {
  font-size: 12px;
  color: var(--muted);
}

.lib-chip + .lib-chip::before {
  content: "\00b7";
  margin: 0 6px;
  color: var(--border-strong);
}

.lib-tags .journey-status {
  font-size: 12px;
}

/* --------------------------------------------------------------- feedback */

.thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.comment {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  background: var(--surface);
}

/* A coach's words look different from the student's own, so a thread is
   readable at a glance without checking each name. */
.comment-coach {
  background: var(--surface-muted);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}

.comment-author {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
}

.comment-role {
  font-size: 10px;
  font-weight: bold;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.comment-coach .comment-role {
  color: var(--brand);
}

.comment-when {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

.comment-body {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
  white-space: pre-wrap;
}

.comment-form {
  margin-top: 4px;
}

.feedback-flag {
  font-size: 11px;
  font-weight: bold;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: 99px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* ------------------------------------------------------------ checkpoints */

.cp-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.cp-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}

.cp-open {
  border-color: var(--ink);
}

.cp-ahead {
  background: var(--surface-muted);
}

.cp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.cp-stage {
  font-size: 11px;
  font-weight: bold;
  color: var(--brand);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cp-title {
  font-size: 17px;
  font-weight: bold;
  color: var(--ink);
  margin-top: 5px;
}

.cp-question {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 4px;
  text-wrap: pretty;
}

.cp-prompt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 0;
  max-width: 62ch;
  text-wrap: pretty;
}

.flag-done {
  background: #eef4ef;
  color: var(--ok);
}

.flag-next {
  background: var(--brand-tint);
  color: var(--brand);
}

.flag-ahead {
  background: #edeff3;
  color: var(--muted);
}

.cp-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.cp-slot {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
}

.cp-slot-filled {
  border: 1px solid var(--border);
  background: var(--surface);
}

/* An empty slot is shown, not hidden. Seeing the gap is what prompts a
   choice, and it says how much is still being asked of you. */
.cp-slot-empty {
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  justify-content: center;
}

.cp-slot-title {
  font-weight: bold;
  color: var(--ink);
  line-height: 1.35;
}

.cp-slot-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.cp-add {
  margin-top: 14px;
}

.cp-add-row {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.cp-add-row select {
  flex: 1 1 240px;
  min-width: 0;
}

/* --------------------------------------------------------- add experience */

.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.exp-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.exp-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.kind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
}

.kind-tile {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
}

.kind-tile:hover {
  border-color: var(--ink);
}

/* Chosen: the radio's own dot and a doubled ink border, as the approved
   skills tree step form has it, so it never rests on colour. Brand red is
   kept for the standard line. */
.kind-tile:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.exp-title {
  font-size: 15px;
  padding: 12px 14px;
}

/* -------------------------------------------------------- programme health */

.coverage-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.coverage-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 1.2fr);
  gap: 14px;
  align-items: center;
}

.coverage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.coverage-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
}

.coverage-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.coverage-bar .bar {
  flex: 1;
}

.coverage-pct {
  font-size: 12px;
  font-weight: bold;
  color: var(--ink);
  width: 38px;
  text-align: right;
}

table.matrix {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

table.matrix th {
  font-size: 10px;
  font-weight: bold;
  color: var(--muted);
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

table.matrix th:first-child {
  text-align: left;
  padding-left: 14px;
}

table.matrix abbr {
  text-decoration: none;
  border-bottom: 1px dotted var(--border-strong);
  cursor: help;
}

table.matrix td {
  padding: 10px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

table.matrix tbody tr:last-child td {
  border-bottom: none;
}

.matrix-course {
  text-align: left !important;
  padding-left: 14px !important;
  font-size: 13px;
  color: var(--ink);
}

.matrix-unread {
  font-size: 12px;
  color: var(--muted);
  text-align: left !important;
}

.cell {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.cell-on {
  background: var(--ink);
  border-color: var(--ink);
}

/* ------------------------------------------------------------ coach view */

.stat-row {
  display: grid;
  /* 160px keeps all four tiles on one row inside a Canvas frame. Wider and
     the fourth wraps onto a line of its own. */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-figure {
  font-size: 28px;
}

.stat-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.stat-figure {
  font-size: 30px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.1;
}

.stat-warn {
  color: #9a6b00;
}

.stat-label {
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
  margin-top: 6px;
}

.stat-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.5;
}

.attention-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.attention-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.attention-body {
  flex: 1 1 240px;
  min-width: 0;
}

.attention-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
}

.attention-reason {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.5;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flag {
  font-size: 12px;
  font-weight: bold;
  border-radius: 99px;
  padding: 4px 12px;
  white-space: nowrap;
}

.flag-stalled {
  background: var(--brand-tint);
  color: var(--brand);
}

.flag-pending {
  background: #fbf1dd;
  color: #8a6100;
}

.search-form {
  flex: 0 1 260px;
}

.search-input {
  font-size: 13px;
  padding: 8px 12px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table.cohort {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

table.cohort th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: bold;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  white-space: nowrap;
}

table.cohort td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.cohort tbody tr:last-child td {
  border-bottom: none;
}

table.cohort tbody tr:hover {
  background: var(--surface-muted);
}

.cell-student {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cell-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
}

.cell-strong {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
}

.cell-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.cell-warn {
  color: #8a6100;
  font-weight: bold;
}

.coach-artifacts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.coach-artifacts .panel {
  background: var(--surface);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 840px) {
  .detail-grid,
  .add-grid,
  .field-row,
  .work-row,
  .constellation {
    grid-template-columns: 1fr;
  }

  .constellation-chart {
    max-width: 420px;
    margin: 0 auto;
  }

  .record-hero,
  .record-bar,
  .record-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .record-name {
    font-size: 28px;
  }

  .outcome-grid,
  .journey-grid,
  .influence-options {
    grid-template-columns: 1fr;
  }

  .mastery-summary-track {
    max-width: none;
  }

  .frame-header,
  .frame-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .card {
    padding: 20px;
  }

  .card-lead {
    font-size: 21px;
  }
}

/* --------------------------------------------------------- mission journal
   The mission is a purpose statement in the student's words. Under it, six
   strands it grew from, one strip, hairline dividers, no cards. */

.mission-write {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: start;
}

.mission-asks {
  display: grid;
  gap: 8px;
}

.mission-ask {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  padding: 8px 10px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.mission-ask b {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  margin-bottom: 2px;
}

.mission-pulls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 6px;
}

.mission-line {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 6px 0 0;
  max-width: 70ch;
  line-height: 1.5;
}

.mission-line b {
  color: var(--ink);
}

.mission-why-label {
  font-size: 14px;
  margin-top: 14px;
}

.mission-nudge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 0;
  padding: 11px 14px;
  background: var(--brand-tint);
  border: 1px solid #f0cfd3;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
}

.mission-nudge .btn:first-of-type {
  margin-left: auto;
}

/* the fourteen as chips */

.gcgo-row-head {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gcgo-row-head::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.gcgo-row-head.gcgo-row-go::before {
  background: var(--ok);
}

.gcgo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gcgo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  position: relative;
}

.gcgo-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gcgo-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.gcgo-chip-go::before {
  background: var(--ok);
}

.gcgo-chip-none::before {
  background: var(--border-strong);
}

.gcgo-chip:hover {
  border-color: var(--ink);
}

.gcgo-chip:has(input:checked),
.gcgo-chip-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.gcgo-chip:has(input:checked)::before,
.gcgo-chip-on::before {
  background: #fff;
}

.gcgo-chip:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.gcgo-chip-read {
  cursor: default;
  font-size: 13px;
  padding: 5px 11px;
}

.gcgo-chip-read em {
  font-style: normal;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
}

.strand-seed {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.strand-seed b {
  color: var(--ink);
}

.strand-seed-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}

.seed-chip {
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seed-chip i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.seed-chip:hover {
  border-color: var(--ink);
}

/* history with what changed */

.mission-history {
  margin-top: 10px;
}

.mission-history .timeline-body {
  padding-bottom: 18px;
}

.mission-history .timeline-when .mastery-meta {
  font-weight: normal;
}

.influences {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 8px 10px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.influence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-soft);
}

.influence b {
  flex: none;
  min-width: 82px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.delta-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 0;
}

.delta-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  color: var(--ink-soft);
}

.delta-added {
  border-color: var(--ok);
  color: var(--ok);
}

.delta-rewritten {
  border-color: var(--brand);
  color: var(--brand);
}

.delta-written {
  border-color: var(--border-strong);
}

@media (max-width: 760px) {
  .strands {
    grid-template-columns: repeat(3, 1fr);
  }

  .strand:nth-child(3n) {
    border-right: 0;
  }

  .strand:nth-child(-n+3) {
    border-bottom: 1px solid var(--border);
  }

  .mission-write {
    grid-template-columns: 1fr;
  }

}

/* ------------------------------------------------- mission journal, tidied
   The six parts as one row of pills under a hairline; a strand opens in
   place of the row; the editor in three quiet steps. */

.journal {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.journal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}

.journal-head b {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.journal-head span {
  font-size: 13px;
  color: var(--muted);
}

.parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.part {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.part::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}

.part:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.part-empty {
  color: var(--muted);
  border-style: dashed;
}

.part-empty::before {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  box-sizing: border-box;
}

.part-changed {
  border-color: var(--brand);
}

.part-changed::after {
  content: "changed";
  font-size: 9.5px;
  font-weight: bold;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

.part-used {
  background: #e7efe9;
}

.strand-panel {
  margin: 4px 0 0;
}

.strand-back {
  display: inline-block;
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
  margin: 0 0 8px;
}

.strand-title {
  display: block;
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 2px;
}

.strand-q {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 10px;
}

.strand-src {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

/* the editor's three steps */

.step {
  padding: 16px 0 0;
  margin: 16px 0 0;
  border-top: 1px solid var(--border);
}

.mission-form .step:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 2px;
}

.step-n {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .1em;
  color: var(--muted);
}

.step-head .field-label {
  margin: 0;
}

.step .field-help {
  margin-bottom: 10px;
}

.step .mission-write {
  align-items: stretch;
}

.step .mission-asks {
  align-content: space-between;
}

.step .mission-ask {
  padding: 6px 10px;
  line-height: 1.35;
}

.draw {
  display: none;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.draw.has-script {
  display: flex;
}

.draw .part {
  font-size: 12px;
  padding: 4px 9px;
}

.pick .gcgo-chips {
  gap: 8px;
}

.gcgo-chip-secondary {
  box-shadow: inset 0 0 0 1px var(--ink);
  border-color: var(--ink);
}

.gcgo-chip em {
  font-style: normal;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
}

.pick-secondary {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  max-width: 36ch;
  font-size: 13px;
  color: var(--ink-soft);
}

.pick-secondary.has-script {
  display: none;
}

.pick-secondary select {
  padding: 8px 10px;
  font-size: 14px;
}

.pick-line {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

.pick-line:empty {
  display: none;
}

.pick-line b {
  color: var(--ink);
}

.shaped {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shaped-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  position: relative;
}

.shaped-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.shaped-chip:hover {
  border-color: var(--ink);
}

.shaped-chip:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.shaped-chip:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ------------------------------------------------------------ skills mapping
   Quiet by default; only what needs attention speaks. The header says what
   is left. A mapped criterion is one line: its name and its sub skill. One
   still to map sits on cream with its description and a suggestion. A rubric
   with work left says how much, in red; a finished one shows a tick. No
   coloured edges anywhere: a meta skill's hue is a dot, selection is navy. */

.mscope {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.mscope select,
.mrow select {
  font: inherit;
  font-size: 13px;
  padding: 6px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background-color: var(--surface);
  color: var(--ink);
  max-width: 100%;
}

/* A muted or dashed picker must not tint its option list (Firefox, Windows Chrome). */
.mrow select option,
.mrow select optgroup {
  color: var(--ink);
}

.mscope select:focus-visible,
.mrow select:focus-visible,
.mrow-add > summary:focus-visible,
.mrubric > summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.mnotice {
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e7efe9;
  color: var(--ok);
  font-weight: bold;
}

/* Header: the course, what is left, one muted line, a hairline bar. */
.mhead {
  align-items: flex-start;
}

.mhead-main {
  flex: 1 1 320px;
  min-width: 0;
}

.msum-lead {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
}

.msum-note {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.msum-act {
  margin-left: 6px;
  font-weight: bold;
  white-space: nowrap;
}

.mcheck {
  margin-right: 6px;
  color: var(--ok);
}

.mbar {
  display: flex;
  gap: 2px;
  max-width: 320px;
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}

.mbar i {
  display: block;
  min-width: 3px;
}

.mbar-done { background: var(--ink); }
.mbar-left { background: transparent; }

.mempty {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Rubrics: a flat list between hairlines, not a stack of boxes. */
.mform {
  border-bottom: 1px solid var(--border);
}

.mrubric {
  border-top: 1px solid var(--border);
}

.mrubric > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  padding: 12px 4px;
  cursor: pointer;
  list-style: none;
}

.mrubric > summary::-webkit-details-marker {
  display: none;
}

.mrubric > summary::before {
  content: "\25B8";
  flex: none;
  width: 10px;
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.15s;
}

.mrubric[open] > summary::before {
  transform: rotate(90deg);
}

.mrubric-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
}

.mrubric-graded {
  font-size: 12px;
  color: var(--muted);
}

.mrubric-aside {
  flex: 1 1 120px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mrubric-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: bold;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mrubric-done {
  font-weight: normal;
  color: var(--muted-large);
}

/* Criteria: name left, picker right. */
.mrows {
  display: grid;
  gap: 3px;
  padding: 0 0 12px 14px;
}

.mrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 20px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
}

.mrow:hover,
.mrow:focus-within {
  background: var(--surface-muted);
}

.mrow-unmapped,
.mrow-unmapped:hover,
.mrow-unmapped:focus-within {
  align-items: start;
  padding: 12px 10px;
  background: var(--cream);
}

.mrow-name {
  min-width: 0;
}

.mrow-title {
  font-size: 14px;
  color: var(--ink);
}

.mrow-unmapped .mrow-title {
  font-weight: bold;
}

.mrow-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.mrow-saved {
  margin-left: 8px;
  font-size: 12px;
  font-weight: bold;
  color: var(--ok);
  white-space: nowrap;
  animation: mrow-saved 2.4s ease-out forwards;
}

@keyframes mrow-saved {
  0%, 65% { opacity: 1; }
  100% { opacity: 0; }
}

.mrow-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.mrow-pick > select {
  flex: 1 1 180px;
  min-width: 0;
}

.mrow-unmapped .mrow-pick > select {
  border-style: dashed;
  border-color: var(--muted-large);
  color: var(--ink-soft);
}

.mrow-no_skill select {
  color: var(--muted);
}

/* The meta skill's dot, drawn inside the picker. Decorative: the meta skill
   is the picker's option group and is counted in the foot. */
.mrow .has-hue {
  padding-left: 24px;
  background-image: radial-gradient(circle at 12px 50%, var(--hue) 0 4px, transparent 4.5px);
  background-repeat: no-repeat;
}

.mrow-add {
  flex: none;
  font-size: 12px;
}

.mrow-add > summary {
  padding: 4px 2px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.mrow-add > summary::-webkit-details-marker {
  display: none;
}

.mrow-add > summary:hover {
  color: var(--ink);
  text-decoration: underline;
}

.mrow-add[open] {
  flex: 1 1 100%;
}

.mrow-add > select {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.mrow-suggest {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.btn.mrow-use {
  background: var(--surface);
  border-color: var(--ink);
  color: var(--ink);
}

.btn.mrow-use:hover,
.btn.mrow-use:focus-visible {
  background: var(--ink);
  color: #fff;
}

.mrow-why {
  font-size: 12px;
  color: var(--muted);
}

.mrow.htmx-request {
  opacity: 0.6;
  transition: opacity 0.2s;
}

.mrow-error {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12.5px;
  color: var(--brand);
}

.mform-save {
  display: flex;
  justify-content: flex-end;
  padding: 12px 0;
}

/* Foot: what the course's criteria are mapped to, and the rare refresh. */
.mfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.mfoot-metas {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

.mfoot-label {
  flex: none;
}

.mfoot-metas .mmetas {
  flex: 1 1 300px;
}

.mfoot-refresh {
  margin: 0 0 0 auto;
}

.mfoot-refresh a {
  color: var(--ink-soft);
  text-decoration: underline;
}

.mfoot-refresh a:hover {
  color: var(--ink);
}

.mmetas,
.mlegend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--ink-soft);
}

.mmetas li,
.mlegend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mmetas i,
.mlegend i,
.mgaps i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.mmetas b {
  font-weight: normal;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.mlegend {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.msync {
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-soft);
}

.msync summary {
  cursor: pointer;
  color: var(--muted);
}

.msync p,
.msync ul {
  margin: 8px 0;
  max-width: 70ch;
}

.mcmd {
  background: var(--surface-muted);
  color: var(--ink);
  font: 12px/1.5 Consolas, monospace;
  padding: 10px 12px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Programme: two lines up top, three columns, only work left is loud. */
.mprog-sum .msum-lead {
  margin-top: 0;
}

.mtable-wrap {
  margin: 14px 0 10px;
  overflow-x: auto;
}

.mtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mtable th,
.mtable td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.mtable thead th {
  font-size: 11.5px;
  font-weight: normal;
  color: var(--muted);
}

.mtable tbody th {
  font-weight: normal;
}

.mtable tbody th a {
  color: var(--ink-soft);
}

.mtable .is-todo th a {
  color: var(--ink);
  font-weight: bold;
}

.mtable .mtable-group th {
  padding-top: 18px;
  font-size: 12px;
  font-weight: bold;
  color: var(--ink-soft);
}

.mtable .mtable-end {
  text-align: right;
  white-space: nowrap;
}

.mtodo {
  color: var(--brand);
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

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

.mdots {
  display: inline-flex;
  gap: 5px;
}

.mdots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--hue);
  box-sizing: border-box;
}

.mdots i.on {
  background: var(--hue);
}

.msection {
  margin: 26px 0 8px;
  font-size: 14px;
  color: var(--ink);
}

.mgaps {
  margin: 0;
  font-size: 13px;
}

.mgaps > div {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
  gap: 2px 16px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
}

.mgaps dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
}

.mgaps dd {
  margin: 0;
  color: var(--ink);
}

.mgaps dd.mquiet {
  color: var(--muted);
}

@media (max-width: 640px) {
  .mrows { padding-left: 0; }
  .mrow { grid-template-columns: minmax(0, 1fr); }
  .mgaps > div { grid-template-columns: minmax(0, 1fr); }
  .mfoot-refresh { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mrow-saved { animation: none; }
  .mrubric > summary::before { transition: none; }
}

@media (forced-colors: active) {
  .mdots i,
  .mmetas i,
  .mlegend i,
  .mgaps i { forced-color-adjust: none; }
}

/* Spreadsheet: a quiet disclosure, three numbered steps. */
.msheet { margin: 14px 0 4px; font-size: 13px; color: var(--ink-soft); }
.msheet > summary { cursor: pointer; color: var(--muted); }
.msheet > summary:hover { color: var(--ink); }
.msheet-body { display: grid; gap: 8px; margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: var(--surface-muted); }
.msheet-step { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.msheet-step > span:first-child { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: bold; }
.msheet-step input[type="file"] { font: inherit; font-size: 12px; max-width: 100%; }
.msheet-note { margin: 0; font-size: 12px; color: var(--muted); }

/* The upload check. */
.mtable-plan th[scope="row"] { font-weight: normal; color: var(--ink); }
.mplan-problem { color: var(--brand); }
.mplan-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mplan-notes { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--ink-soft); }
.mplan-notes li { margin: 3px 0; }

/* Programmes: one quiet disclosure each, edited in place. */
.mscope-edit { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mscope-edit:hover { color: var(--ink); }
.mprog-list { border-bottom: 1px solid var(--border); }
.mprog { border-top: 1px solid var(--border); }
.mprog > summary { display: flex; align-items: baseline; gap: 10px; padding: 12px 4px; cursor: pointer; list-style: none; }
.mprog > summary::-webkit-details-marker { display: none; }
.mprog > summary::before { content: "\25B8"; width: 10px; color: var(--muted); font-size: 12px; transition: transform 0.15s; }
.mprog[open] > summary::before { transform: rotate(90deg); }
.mprog-name { font-size: 14px; font-weight: bold; color: var(--ink); }
.mprog-new .mprog-name { font-weight: normal; color: var(--ink-soft); }
.mprog-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.mprog-form { display: grid; gap: 6px; max-width: 640px; padding: 0 4px 16px 24px; font-size: 13px; color: var(--ink-soft); }
.mprog-form label { font-weight: bold; color: var(--ink); margin-top: 6px; }
.mprog-form input[name="name"], .mprog-form textarea { font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--ink); background: var(--surface); }
.mprog-form textarea { font-family: Consolas, monospace; line-height: 1.5; resize: vertical; }
.mprog-form input:focus-visible, .mprog-form textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.mprog-hint { margin: 0; font-size: 12px; color: var(--muted); }
.mprog-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 20px; margin-top: 8px; }
.mprog-delete { font-size: 12px; }
.mprog-delete > summary { padding-top: 6px; color: var(--muted); cursor: pointer; }
.mprog-delete p { margin: 6px 0; }
.mprog-problems { margin: 0 0 14px; padding: 10px 12px 10px 30px; border-radius: 8px; background: var(--brand-tint); color: var(--brand); font-size: 13px; }
.mprog-warn { margin: 0 0 14px; padding: 8px 12px; border-radius: 8px; background: var(--cream); color: var(--ink-soft); font-size: 13px; }

/* ------------------------------------------------------- student-led work
   Anything without a Canvas assignment. It is never graded, and says so
   wherever it shows, in ink and never in brand red, so it cannot be read as
   a grade. Faculty saying they have seen it is words only. */

.own-flag {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: bold;
  color: var(--ink);
}

.work-title + .own-flag {
  margin-top: 8px;
}

/* The same "Not graded" as the skills tree's own work, so it reads the same
   on every page. */
.own-nm {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: bold;
  line-height: 1.55;
}

.own-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.own-links a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.own-links a:hover {
  color: var(--ink-soft);
}

.side-meta {
  font-size: 12px;
  color: var(--muted-small);
}

.own-link-form {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.own-link-form > summary,
.sub-group > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
}

.own-link-form > summary {
  padding: 2px 0;
}

.own-link-form form {
  margin-top: 10px;
}

.own-link-form .field-help,
.ack-help {
  color: var(--muted-small);
}

.sub-group {
  border-top: 1px solid var(--border);
}

.sub-group > summary {
  padding: 8px 0;
}

.sub-group .shaped {
  padding: 2px 0 10px;
}

.own-link-form > summary:focus-visible,
.sub-group > summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.seen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* On the graduate record: who has seen a piece, under its story. */
.work-seen {
  margin-top: 9px;
  font-size: 12px;
  color: var(--ink-soft);
}

.record-lead {
  margin: -6px 0 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

.record-end {
  padding-top: 0;
}

/* Seen it, on the coach's view of one student. */
/* Between the piece and its feedback thread, ruled off from both. */
.ack {
  margin: 16px 0 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ack-said {
  margin: 0;
  font-size: 13px;
  font-weight: bold;
  color: var(--ink);
}

.ack-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.ack-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ack-input {
  flex: 1 1 220px;
  width: auto;
  min-width: 0;
  padding: 8px 11px;
}

.ack-help {
  margin: 6px 0 0;
}

@media (forced-colors: active) {
  .own-nm {
    border-color: CanvasText;
  }
}
