/* Grades journal: a card per discipline, a KM strip, toned marks and a tidy detail view.
   Loaded after astra.css and beta-dark.css; the #study-main prefix outranks their layered
   overrides, and every colour comes from --ui-* tokens so both themes follow automatically. */

/* Keep mobile entry fields readable without triggering input zoom in iOS. */
@media (max-width: 999px) {
  body.beta #study-main .grade-search input,
  body.beta #study-main .semester-control select { font-size: 16px; }
}

/* Discipline list: a compact card per discipline. Its marks live on the discipline sheet, which
   stands beside the list on a wide screen and is a page of its own on a narrow one. */
body.beta #study-main .course-columns { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
body.beta #study-main .course-list { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 0; border-radius: 0; background: none; }
body.beta #study-main .course-list > .grade {
  margin: 0;
  border: 0;
  border-radius: 20px;
  background: var(--ui-surface);
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s ease;
}
body.beta #study-main .course-list > .grade + .grade { border-top: 0; }

body.beta #study-main .course-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label score" "strip chevron";
  align-items: start;
  gap: 6px 14px;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: var(--ui-surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease;
}
body.beta #study-main .course-card:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: -2px; border-radius: 20px; }
body.beta #study-main .course-list > .grade:has(> .course-card:active) { transform: scale(.985); }
@media (hover: hover) {
  body.beta #study-main .course-list > .grade:has(> .course-card:hover) { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(21, 35, 67, .08); }
  body.beta #study-main .course-card:hover > svg { background: var(--ui-accent); color: var(--ui-on-accent, #fff); transform: translateX(2px); }
}
body.beta #study-main .course-card > .course-label { grid-area: label; }
body.beta #study-main .course-card > .course-final {
  grid-area: score;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: auto;
  min-width: 0;
}
/* The chevron sits in a soft disc: the card reads as "opens", not "unfolds". */
body.beta #study-main .course-card > svg {
  grid-area: chevron;
  justify-self: end;
  align-self: center;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 6px;
  border-radius: 50%;
  background: var(--ui-soft);
  color: var(--ui-muted);
  transition: transform .18s ease, color .16s ease, background-color .16s ease;
}
/* A failed KM (any of them, not only the 20 drawn dots) marks the card with a thin danger edge. */
body.beta #study-main .course-list > .grade.has-fail > .course-card { box-shadow: inset 3px 0 0 var(--ui-danger); }

body.beta #study-main .course-label { display: grid; gap: 5px; min-width: 0; }
body.beta #study-main .course-label > :is(strong, h2) {
  margin: 0;
  color: var(--ui-text);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.2px;
  overflow-wrap: break-word;
  hyphens: auto;
}
body.beta #study-main .course-label > small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.4;
}
body.beta #study-main .course-label .course-teacher {
  display: block;
  flex: 1 1 100%;
  width: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.beta #study-main .course-label .course-assessment { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
body.beta #study-main .course-label .course-count { margin: 0; white-space: nowrap; }
body.beta #study-main .course-label .course-count::before { content: "·"; margin-right: 6px; }
body.beta #study-main .course-result {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.beta #study-main .course-final > .mark-badge {
  order: -1;
  display: grid;
  place-items: center;
  min-width: 52px;
  min-height: 44px;
  max-width: calc(8ch + 20px);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
body.beta #study-main .course-final > small {
  color: var(--ui-muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

/* KM strip: one cell per KM (up to 20), coloured like its mark. */
body.beta #study-main .course-card > .course-progress { grid-area: strip; align-self: center; display: block; min-width: 0; margin: 4px 0 0; }
body.beta #study-main .course-km-dots { display: flex; align-items: center; justify-content: flex-start; gap: 3px; min-height: 8px; }
body.beta #study-main .course-km-dots > .km-dot { flex: 1 1 0; max-width: 32px; min-width: 4px; height: 6px; border-radius: 3px; }
body.beta #study-main .course-km-dots > .km-missing { background: var(--ui-border); background: color-mix(in srgb, var(--ui-muted) 32%, transparent); }
body.beta #study-main .course-km-dots > span { flex: none; margin-left: 4px; color: var(--ui-muted); font-size: 11px; line-height: 1; }

/* Discipline sheet. Hidden until a discipline is chosen; a wide screen always shows it (below).
   Two surfaces: a hero in the language of the study summaries, then the KM of the semester. */
body.beta #study-main .course-panel { display: none; min-width: 0; }
body.beta #study-main .course-sheet { min-width: 0; }
body.beta #study-main .course-sheet > .course-hero {
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "back back" "label score" "count count" "strip strip" "notes notes";
  align-items: start;
  gap: 0 16px;
  box-sizing: border-box;
  padding: 18px 18px 16px;
}
/* The shared back control is styled with a doubled class; these rules have to outrank it. */
body.beta #study-main .course-hero > button.astra-back.course-back { grid-area: back; justify-self: start; margin: -6px 0 10px -4px; color: #dce4f5; }
body.beta #study-main .course-hero > button.astra-back.course-back .astra-back-icon { width: 36px; height: 36px; background: rgba(255, 255, 255, .1); color: #fff; }
@media (hover: hover) {
  body.beta #study-main .course-hero > button.astra-back.course-back:hover { background: rgba(255, 255, 255, .08); }
}
body.beta #study-main .course-hero > .course-label { grid-area: label; gap: 6px; align-self: center; }
body.beta #study-main .course-hero .course-kind { margin: 0; color: #a9bcff; font-size: 11px; line-height: 1.3; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; }
body.beta #study-main .course-hero h2 { color: #fff; font-size: 22px; line-height: 1.18; font-weight: 750; letter-spacing: -.5px; text-wrap: balance; outline: none; }
body.beta #study-main .course-hero .course-teacher { margin: 0; overflow: visible; white-space: normal; overflow-wrap: anywhere; color: #c6d2e9; font-size: 13px; line-height: 1.4; }
/* The current mark is the loudest thing on the sheet. */
body.beta #study-main .course-hero > .course-final {
  grid-area: score;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: auto;
  min-width: 76px;
  padding: 10px 12px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
}
body.beta #study-main .course-hero > .course-final > .mark-badge {
  min-width: 0;
  min-height: 0;
  max-width: 7ch;
  padding: 0;
  border-radius: 0;
  background: none;
  color: #fff;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1px;
}
body.beta #study-main .course-hero > .course-final > .mark-badge.mark-word { max-width: 96px; font-size: 14px; line-height: 1.25; letter-spacing: 0; }
body.beta #study-main .course-hero > .course-final > .mark-excellent { color: #7fd8ae; }
body.beta #study-main .course-hero > .course-final > .mark-good { color: #a9bcff; }
body.beta #study-main .course-hero > .course-final > .mark-pass { color: #f2c879; }
body.beta #study-main .course-hero > .course-final > .mark-fail { color: #ff97a6; }
body.beta #study-main .course-hero > .course-final > small { color: #bcc9df; font-size: 10px; }
body.beta #study-main .course-hero-count { grid-area: count; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 8px; color: #bcc9df; font-size: 12px; line-height: 1.3; }
body.beta #study-main .course-hero-count > strong { color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.beta #study-main .course-hero > .course-progress { grid-area: strip; display: block; min-width: 0; margin: 0; }
body.beta #study-main .course-hero .course-km-dots { gap: 4px; min-height: 8px; }
body.beta #study-main .course-hero .course-km-dots > .km-dot { max-width: none; height: 8px; border-radius: 4px; background: #3a4763; }
body.beta #study-main .course-hero .course-km-dots > .km-excellent { background: #7fd8ae; }
body.beta #study-main .course-hero .course-km-dots > .km-good { background: #93b3ff; }
body.beta #study-main .course-hero .course-km-dots > .km-pass { background: #f2c879; }
body.beta #study-main .course-hero .course-km-dots > .km-neutral { background: #c3cce0; }
body.beta #study-main .course-hero .course-km-dots > .km-fail { background: #ff97a6; }
body.beta #study-main .course-hero .course-km-dots > span { color: #bcc9df; }
body.beta #study-main .course-hero > .grade-summary-notes { grid-area: notes; margin-top: 14px; padding-top: 12px; }
body.beta #study-main .course-hero > .grade-summary-notes > .course-result { padding: 4px 10px; border-radius: 999px; font-size: 12px; line-height: 1.35; }
/* A slim copy of the title and the current mark. It lies under the hero and stays afloat at the
   top once the hero has scrolled away: long lists of KM keep their discipline in sight. */
body.beta #study-main .course-pin {
  position: sticky;
  top: var(--course-pin-top, 6px);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  width: calc(100% - 12px);
  height: 44px;
  min-height: 0;
  margin: -68px 6px 34px;
  padding: 0 14px 0 8px;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  background: var(--ui-surface);
  background: color-mix(in srgb, var(--ui-surface) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 10px 24px rgba(16, 25, 54, .12);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
body.beta #study-main .course-pin > svg { flex: none; width: 18px; height: 18px; color: var(--ui-accent); }
body.beta #study-main .course-pin > strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ui-text); font-size: 14px; line-height: 1.3; font-weight: 650; }
body.beta #study-main .course-pin > .mark-badge { flex: none; display: grid; place-items: center; min-width: 36px; min-height: 28px; max-width: 96px; padding: 2px 8px; border-radius: 9px; font-size: 14px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
body.beta #study-main .course-sheet > .course-detail { padding: 6px 16px 16px; border: 0; border-radius: 20px; background: var(--ui-surface); }
body.beta #study-main .course-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 0 4px; padding: 0; }
body.beta #study-main .course-totals:empty { display: none; }
body.beta #study-main .course-totals > span {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--ui-soft);
  color: var(--ui-muted);
  font-size: 12px;
}
body.beta #study-main .course-totals strong { color: var(--ui-text); font-size: 18px; line-height: 1.25; font-weight: 700; text-align: left; }
body.beta #study-main .course-sheet .km-columns { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0 4px; border: 0; color: var(--ui-muted); font-size: 11px; }
body.beta #study-main .course-sheet .km-columns > span { text-transform: uppercase; font-size: 10px; letter-spacing: .08em; font-weight: 700; }

/* Narrow screen: the chosen discipline is the whole page, under the app bar. */
@media (max-width: 999px) {
  body.beta #study-main[data-study-route=course] > :not(.course-columns),
  body.beta #study-main[data-study-route=course] .course-list { display: none; }
  body.beta #study-main[data-study-route=course] .course-panel.is-selected { display: block; }
  body.beta #study-main[data-study-route=course] .course-pin { --course-pin-top: calc(var(--app-safe-top, 0px) + 64px); }
}
@media (max-width: 999px) and (prefers-reduced-motion: no-preference) {
  body.beta #study-main[data-study-route=course] .course-panel.is-selected { animation: course-sheet-in .28s cubic-bezier(.2, .7, .2, 1); }
}
@keyframes course-sheet-in { from { opacity: 0; transform: translateX(22px); } }

/* Wide screen: the sheet stays beside the list and scrolls on its own, so a long discipline
   never pushes the list away. Before a choice it shows the first discipline. */
@media (min-width: 1000px) {
  body.beta #study-main .course-columns { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  body.beta #study-main .course-list:only-child { grid-column: 1 / -1; }
  body.beta #study-main .course-panel {
    display: block;
    position: sticky;
    top: calc(var(--app-safe-top, 0px) + 92px);
    max-height: calc(100vh - var(--app-safe-top, 0px) - 116px);
    max-height: calc(100dvh - var(--app-safe-top, 0px) - 116px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 20px;
    scrollbar-width: none;
  }
  body.beta #study-main .course-panel::-webkit-scrollbar { display: none; }
  body.beta #study-main .course-panel button.astra-back.course-back,
  body.beta #study-main .course-pin > svg { display: none; }
  /* Beside the list the pin only names the discipline: there is no page to go back from. */
  body.beta #study-main .course-pin { padding-left: 14px; pointer-events: none; }
  /* The discipline on the sheet is tied to its card by the accent. */
  body.beta #study-main .course-list > .grade.is-shown { box-shadow: 0 0 0 1.5px var(--ui-accent), 0 10px 24px rgba(21, 35, 67, .08); }
  body.beta #study-main .course-list > .grade.is-shown > .course-card { background: linear-gradient(var(--ui-accent-soft), var(--ui-accent-soft)), var(--ui-surface); }
  body.beta #study-main .course-list > .grade.is-shown.has-fail > .course-card { box-shadow: none; }
  body.beta #study-main .course-list > .grade.is-shown > .course-card > svg { background: var(--ui-accent); color: var(--ui-on-accent, #fff); }
}

body.beta #study-main .task-row {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 12px;
  padding: 12px 0 12px 14px;
  border-top: 1px solid var(--ui-border);
}
body.beta #study-main .task-row::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--ui-border);
}
body.beta #study-main .task-row:has(> .task-score > .mark-excellent)::before { background: var(--study-positive, var(--ui-success)); }
body.beta #study-main .task-row:has(> .task-score > .mark-good)::before { background: var(--ui-accent); }
body.beta #study-main .task-row:has(> .task-score > .mark-pass)::before { background: var(--ui-warning); }
body.beta #study-main .task-row:has(> .task-score > .mark-fail)::before { background: var(--ui-danger); }
body.beta #study-main .task-row:has(> .task-score > .mark-neutral:not(.mark-missing))::before { background: var(--ui-muted); }
body.beta #study-main .task-work { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
body.beta #study-main .task-work > strong { flex: 1 1 100%; margin: 0; color: var(--ui-text); font-size: 14px; line-height: 1.35; font-weight: 600; }
body.beta #study-main .task-work > small { display: inline; margin: 0; color: var(--ui-muted); font-size: 12px; line-height: 1.4; }
body.beta #study-main .task-work > .task-weight { padding: 1px 8px; border-radius: 999px; background: var(--ui-soft); font-size: 11px; }
body.beta #study-main .task-score { display: grid; justify-items: end; gap: 4px; }
body.beta #study-main .task-row .task-mark {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 40px;
  max-width: 132px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}
body.beta #study-main .task-row .task-mark.mark-missing {
  min-width: 44px;
  max-width: 44px;
  border: 1.5px dashed var(--ui-border);
  background: transparent;
  color: var(--ui-muted);
  font-size: 16px;
}
body.beta #study-main :is(.course-list, .course-sheet) .mark-badge.mark-word { font-size: 12px; line-height: 1.25; font-weight: 650; text-align: center; overflow-wrap: anywhere; hyphens: auto; }
body.beta #study-main .course-final > .mark-badge.mark-word { max-width: 96px; font-size: 13px; }
body.beta #study-main .task-assessed-date { color: var(--ui-muted); font-size: 11px; line-height: 1.2; white-space: nowrap; }

/* KM details and its history. */
body.beta #study-main .task-row > .task-extra { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; background: none; }
body.beta #study-main .task-row > .task-extra > summary.study-card-heading { width: fit-content; min-height: 32px; padding: 4px 0; gap: 6px; }
body.beta #study-main .task-row > .task-extra .study-card-copy strong { color: var(--ui-accent); font-size: 12px; font-weight: 600; }
body.beta #study-main .task-row > .task-extra .study-card-chevron { color: var(--ui-accent); }
body.beta #study-main .task-row > .task-extra[open] > :not(summary) { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--ui-soft); color: var(--ui-text); font-size: 12px; line-height: 1.45; }
body.beta #study-main .task-row > .task-extra[open] > :not(summary) + :not(summary) { margin-top: 0; padding-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }

/* Forecast and grade history as soft cards. */
body.beta #study-main .course-tools { display: grid; gap: 8px; margin-top: 14px; }
body.beta #study-main .course-tools > details.study-disclosure { margin: 0; border: 0; border-radius: 16px; background: var(--ui-soft); }
body.beta #study-main .course-tools > details > summary.study-card-heading { min-height: 52px; padding: 10px 14px; }
body.beta #study-main .course-tools .study-card-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ui-surface); color: var(--ui-accent); }
body.beta #study-main .course-tools .study-card-copy strong { font-size: 14px; }
body.beta #study-main .course-tools .course-auto-body,
body.beta #study-main .course-tools .study-card-body { padding: 0 14px 14px; }
body.beta #study-main .course-tools .course-auto-body > p:first-child,
body.beta #study-main .course-tools .study-card-body > p { margin: 0 0 8px; color: var(--ui-muted); font-size: 12px; line-height: 1.45; }
/* Automatic forecast (clause 6.5.4): a verdict line, a 0–5 meter with the 4,20 and 4,50 ticks,
   one tile per exemption grade and the list of conditions. */
body.beta #study-main .course-tools .course-auto-body > p.course-auto-lead { margin: 0 0 12px; color: var(--ui-text); font-size: 15px; line-height: 1.4; font-weight: 600; }
body.beta #study-main .course-auto-lead[data-auto-tone=ok] { color: var(--ui-success); }
body.beta #study-main .course-auto-lead:is([data-auto-tone=lost], [data-auto-tone=wait]) { color: var(--ui-muted); font-weight: 500; }
body.beta #study-main .course-auto > summary .study-card-badge { padding: 3px 10px; border-radius: 999px; background: var(--ui-surface); color: var(--ui-muted); font-size: 12px; font-weight: 650; }
body.beta #study-main .course-auto[data-auto-tone=open] > summary .study-card-badge { background: var(--ui-accent-soft); color: var(--ui-accent); }
body.beta #study-main .course-auto[data-auto-tone=ok] > summary .study-card-badge { background: var(--ui-success-bg); color: var(--ui-success); }
body.beta #study-main .course-auto[data-auto-tone=fail] > summary .study-card-badge { background: var(--ui-danger-bg); color: var(--ui-danger); }
body.beta #study-main .course-auto-meter { position: relative; height: 8px; }
body.beta #study-main .course-auto-meter > progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--ui-surface); appearance: none; -webkit-appearance: none; }
body.beta #study-main .course-auto-meter > progress::-webkit-progress-bar { background: var(--ui-surface); }
body.beta #study-main .course-auto-meter > progress::-webkit-progress-value { border-radius: 999px; background: var(--ui-accent); }
body.beta #study-main .course-auto-meter > progress::-moz-progress-bar { border-radius: 999px; background: var(--ui-accent); }
body.beta #study-main .course-auto[data-auto-tone=ok] .course-auto-meter > progress::-webkit-progress-value { background: var(--ui-success); }
body.beta #study-main .course-auto[data-auto-tone=ok] .course-auto-meter > progress::-moz-progress-bar { background: var(--ui-success); }
body.beta #study-main .course-auto-meter > i { position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 1px; background: var(--ui-text); opacity: .55; }
body.beta #study-main .course-auto-meter > i[data-auto-tick="4"] { left: 84%; }
body.beta #study-main .course-auto-meter > i[data-auto-tick="5"] { left: 90%; }
body.beta #study-main .course-tools .course-auto-body > p.course-auto-scale { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 12px; color: var(--ui-muted); font-size: 12px; }
body.beta #study-main .course-auto-scale strong { color: var(--ui-text); font-variant-numeric: tabular-nums; }
body.beta #study-main .course-auto-outlook { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; margin: 0 0 12px; }
body.beta #study-main .course-auto-outlook > div { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--ui-surface); }
body.beta #study-main .course-auto-outlook dt { color: var(--ui-text); font-size: 13px; font-weight: 650; }
body.beta #study-main .course-auto-outlook dt small { margin-left: 4px; color: var(--ui-muted); font-size: 12px; font-weight: 500; }
body.beta #study-main .course-auto-outlook dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 0; }
body.beta #study-main .course-auto-outlook dd strong { color: var(--ui-text); font-size: 24px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
body.beta #study-main .course-auto-outlook dd small { color: var(--ui-muted); font-size: 12px; }
body.beta #study-main .course-auto-outlook [data-auto-state=done] dd strong { color: var(--ui-success); }
body.beta #study-main .course-auto-outlook [data-auto-state=lost] :is(dt, dd strong) { color: var(--ui-muted); font-weight: 500; }
body.beta #study-main .course-tools .course-auto-body > p.course-auto-finals { margin: 0 0 12px; color: var(--ui-text); font-size: 13px; line-height: 1.45; }
body.beta #study-main .course-auto-terms { display: grid; gap: 6px; margin: 0 0 8px; padding: 12px 0 0; border-top: 1px solid var(--ui-border); list-style: none; }
body.beta #study-main .course-auto-terms > li { position: relative; padding-left: 16px; color: var(--ui-muted); font-size: 12px; line-height: 1.45; }
body.beta #study-main .course-auto-terms > li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--ui-border); }
body.beta #study-main .course-auto-terms > li[data-auto-term=ok]::before { background: var(--ui-success); }
body.beta #study-main .course-auto-terms > li[data-auto-term=fail] { color: var(--ui-danger); }
body.beta #study-main .course-auto-terms > li[data-auto-term=fail]::before { background: var(--ui-danger); }
body.beta #study-main .course-auto-terms strong { color: var(--ui-text); }
body.beta #study-main .course-tools .course-auto-body > p.course-auto-note { margin: 0; color: var(--ui-muted); font-size: 11px; line-height: 1.45; }
body.beta #study-main .grade-history-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
body.beta #study-main .grade-history-list > li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--ui-surface);
  color: var(--ui-muted);
  font-size: 12px;
}
body.beta #study-main .grade-history-list strong { color: var(--ui-text); font-size: 14px; }
body.beta #study-main .grade-history-list time { color: var(--ui-muted); font-size: 11px; }

/* Grade banner: the dark card stays, with cells coloured by exact source marks and two notes:
   failed KMs and the nearest KM by its source period. No averages or percentages. */
body.beta #study-main .grade-summary {
  gap: 10px 12px;
  padding: 16px 18px;
  border-radius: 20px;
  background: radial-gradient(130% 150% at 100% 0%, #2c3d68 0%, #19233a 58%);
  box-shadow: 0 10px 24px rgba(25, 35, 58, .16);
}
body.beta #study-main .grade-summary .astra-progress-number { font-size: 30px; line-height: 32px; }
body.beta #study-main .grade-summary .astra-progress-bar { gap: 3px; height: 10px; }
body.beta #study-main .grade-summary .astra-progress-bar i { border-radius: 3px; background: #3a4763; }
body.beta #study-main .grade-summary .astra-progress-bar i.tone-excellent { background: #7fd8ae; }
body.beta #study-main .grade-summary .astra-progress-bar i.tone-good { background: #93b3ff; }
body.beta #study-main .grade-summary .astra-progress-bar i.tone-pass { background: #f2c879; }
body.beta #study-main .grade-summary .astra-progress-bar i.tone-neutral { background: #c3cce0; }
body.beta #study-main .grade-summary .astra-progress-bar i.tone-fail { background: #ff97a6; }
body.beta #study-main .grade-summary-notes {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
body.beta #study-main .grade-summary-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #dce4f5;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
body.beta #study-main .grade-summary-note svg { flex: none; width: 14px; height: 14px; }
body.beta #study-main .grade-summary-note.is-fail { background: rgba(255, 120, 140, .16); color: #ffb3be; }

/* Attendance: a big total with a reason strip and an inline legend; courses with an unexcused
   absence get a danger edge; lessons read as a list with a date tile instead of a two-column grid. */
body.beta #study-main .attendance-overview { display: grid; gap: 10px; margin: 12px 0; padding: 16px; border: 0; border-radius: 20px; background: var(--ui-surface); }
body.beta #study-main .attendance-overview > p { margin: 0; font-size: 12px; }
body.beta #study-main .attendance-overview dl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0; }
body.beta #study-main .attendance-overview dl > div { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 6px; padding: 0; border-radius: 0; background: none; color: var(--ui-muted); }
body.beta #study-main .attendance-overview dl > div:first-child { flex-basis: 100%; }
body.beta #study-main .attendance-overview dt { color: var(--ui-muted); font-size: 13px; text-transform: lowercase; white-space: nowrap; }
body.beta #study-main .attendance-overview dd { display: flex; align-items: center; gap: 6px; color: var(--ui-text); font-size: 15px; line-height: 1.3; font-weight: 700; }
body.beta #study-main .attendance-overview dl > div:first-child dd { font-size: 34px; line-height: 1; }
body.beta #study-main .attendance-overview dl > div:not(:first-child) dd::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ui-border); }
body.beta #study-main .attendance-overview dl > div.is-unexcused:not(:first-child) dd::before { background: var(--ui-danger); }
body.beta #study-main .attendance-overview dl > div.is-excused:not(:first-child) dd::before { background: var(--ui-success); }
body.beta #study-main .attendance-bar { display: flex; gap: 3px; height: 10px; }
body.beta #study-main .attendance-bar > i { flex: 1 1 0; min-width: 4px; border-radius: 3px; background: var(--ui-border); }
body.beta #study-main .attendance-bar > i.is-unexcused { background: var(--ui-danger); }
body.beta #study-main .attendance-bar > i.is-excused { background: var(--ui-success); }
body.beta #study-main .attendance-bar > i.is-unknown { background: var(--ui-muted); opacity: .45; }
body.beta #study-main .attendance-overview > small { color: var(--ui-muted); font-size: 12px; }
/* One column at every width, like the grades list: an unfolded discipline never leaves a hole beside it. */
body.beta #study-main .attendance-list { grid-template-columns: minmax(0, 1fr); }
body.beta #study-main .attendance-course.has-unexcused > summary { box-shadow: inset 3px 0 0 var(--ui-danger); }

body.beta #study-main .attendance-lessons { grid-template-columns: 1fr; gap: 0; margin: 4px 0 8px; }
body.beta #study-main .attendance-lesson {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--ui-border);
  border-radius: 0;
  background: none;
}
body.beta #study-main .attendance-lesson:first-child { border-top: 0; }
body.beta #study-main .attendance-lesson > time { padding: 8px 4px; border-radius: 12px; font-size: 14px; line-height: 1.2; text-align: center; }
body.beta #study-main .attendance-lesson > time small { margin-top: 2px; font-size: 11px; }
body.beta #study-main .attendance-lesson > div { gap: 3px; }
body.beta #study-main .attendance-lesson strong { color: var(--ui-text); font-size: 14px; line-height: 1.3; }
body.beta #study-main .attendance-lesson span { font-size: 12px; }
body.beta #study-main .attendance-lesson .attendance-reason {
  align-items: center;
  width: fit-content;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ui-soft);
  font-size: 12px;
  font-weight: 600;
}
body.beta #study-main .attendance-lesson .attendance-reason svg { width: 14px; height: 14px; }
body.beta #study-main .attendance-lesson.is-excused .attendance-reason { background: var(--ui-success-bg); color: var(--ui-success); }
body.beta #study-main .attendance-lesson.is-unexcused .attendance-reason { background: var(--ui-danger-bg); color: var(--ui-danger); }

/* A wide single column (tablet): a little more air around each discipline. */
@media (min-width: 800px) and (max-width: 999px) {
  body.beta #study-main .course-card { padding: 18px 20px; column-gap: 20px; }
  body.beta #study-main .course-sheet > .course-hero { padding: 22px 24px 20px; }
  body.beta #study-main .course-hero h2 { font-size: 26px; }
  body.beta #study-main .course-sheet > .course-detail { padding: 8px 24px 24px; }
  body.beta #study-main .course-label > strong { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  body.beta #study-main .course-list > .grade,
  body.beta #study-main .course-card,
  body.beta #study-main .course-card > svg { transition: none; }
  body.beta #study-main .course-list > .grade:has(> .course-card:is(:hover, :active)) { transform: none; }
  body.beta #study-main .course-sheet .task-row.is-next::before { animation: none; }
  body.beta #study-main .course-hero .course-verdict { transition: none; }
}

/* Discipline sheet: the KM read as a line of the semester. Each row hangs on a node coloured like
   its mark; a KM without a mark is a hollow node, the nearest one carries the accent. */
body.beta #study-main .course-sheet .task-row { padding: 14px 0 14px 30px; border-top: 0; }
body.beta #study-main .course-sheet .task-row::before {
  top: 19px;
  bottom: auto;
  left: 3px;
  z-index: 1;
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--ui-surface);
}
body.beta #study-main .course-sheet .task-row::after { content: ""; position: absolute; top: 19px; bottom: -19px; left: 8px; width: 2px; border-radius: 1px; background: var(--ui-border); }
body.beta #study-main .course-sheet .task-row:not(:has(+ :is(.task-row, .task-today)))::after { display: none; }
body.beta #study-main .course-sheet .task-row:has(> .task-score > .mark-missing)::before { border: 2px solid var(--ui-border); background: var(--ui-surface); }
body.beta #study-main .course-sheet .task-row.is-next::before { border-color: var(--ui-accent); box-shadow: 0 0 0 4px var(--ui-surface), 0 0 0 7px var(--ui-accent-soft); animation: course-next-pulse 2.4s ease-in-out infinite; }
@keyframes course-next-pulse { 50% { box-shadow: 0 0 0 4px var(--ui-surface), 0 0 0 10px transparent; } }
body.beta #study-main .course-sheet .task-work > strong { font-size: 15px; line-height: 1.35; font-weight: 650; letter-spacing: -.1px; }
body.beta #study-main .course-sheet .task-work > .task-next { padding: 1px 8px; border-radius: 999px; background: var(--ui-accent-soft); color: var(--ui-accent); font-size: 11px; font-weight: 650; }
body.beta #study-main .course-sheet .task-row > .task-extra { margin-top: 2px; }
/* Today on the line: everything above has begun, everything below is still ahead. */
body.beta #study-main .course-sheet .task-today { position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 0 8px 30px; }
body.beta #study-main .course-sheet .task-today::before { content: ""; position: absolute; top: 0; bottom: 0; left: 8px; width: 2px; background: var(--ui-border); }
body.beta #study-main .course-sheet .task-today::after { content: ""; flex: 1 1 auto; height: 0; border-top: 1.5px dashed var(--ui-accent); opacity: .45; }
body.beta #study-main .course-sheet .task-today > span { position: relative; flex: none; padding: 3px 10px; border-radius: 999px; background: var(--ui-accent); color: var(--ui-on-accent, #fff); font-size: 11px; line-height: 1.4; font-weight: 700; white-space: nowrap; }
body.beta #study-main .course-sheet .task-today > span::before { content: ""; position: absolute; top: 50%; left: -25px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--ui-accent); box-shadow: 0 0 0 3px var(--ui-surface); }

/* Hero strip by weight: a cell is as wide as its KM weighs. The share arrives in twentieths
   (weightShares in beta-dashboard.js), because the markup carries no inline styles. */
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="1"] { flex-grow: 1; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="2"] { flex-grow: 2; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="3"] { flex-grow: 3; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="4"] { flex-grow: 4; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="5"] { flex-grow: 5; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="6"] { flex-grow: 6; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="7"] { flex-grow: 7; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="8"] { flex-grow: 8; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="9"] { flex-grow: 9; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="10"] { flex-grow: 10; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="11"] { flex-grow: 11; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="12"] { flex-grow: 12; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="13"] { flex-grow: 13; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="14"] { flex-grow: 14; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="15"] { flex-grow: 15; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="16"] { flex-grow: 16; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="17"] { flex-grow: 17; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="18"] { flex-grow: 18; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="19"] { flex-grow: 19; }
body.beta #study-main .course-hero .is-weighted .km-dot[data-share="20"] { flex-grow: 20; }

/* The forecast verdict in the hero: a note that opens the forecast below. */
body.beta #study-main .course-hero .course-verdict { min-height: 32px; padding: 6px 10px 6px 12px; border: 0; font: inherit; font-size: 12px; font-weight: 650; line-height: 1.35; cursor: pointer; transition: background-color .16s ease, transform .12s ease; }
body.beta #study-main .course-hero .course-verdict > svg:last-child { width: 12px; height: 12px; opacity: .7; }
body.beta #study-main .course-hero .course-verdict[data-auto-tone=open] { background: rgba(147, 179, 255, .22); color: #cfdaff; }
body.beta #study-main .course-hero .course-verdict[data-auto-tone=ok] { background: rgba(127, 216, 174, .2); color: #a6ebc9; }
body.beta #study-main .course-hero .course-verdict[data-auto-tone=fail] { background: rgba(255, 120, 140, .16); color: #ffb3be; }
body.beta #study-main .course-hero .course-verdict:active { transform: scale(.97); }
body.beta #study-main .course-hero .course-verdict:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) {
  body.beta #study-main .course-hero .course-verdict:hover { background: rgba(255, 255, 255, .18); }
}

/* Card ↔ hero on a narrow screen (courseMorph in beta-dashboard.js): the card of the discipline
   grows into the hero of its page and shrinks back. Only one side carries the shared names at a
   time; browsers without view transitions simply switch. */
body.beta #study-main[data-course-morph=card] .course-list > .grade.is-morphing,
body.beta #study-main[data-course-morph=sheet] .course-panel.is-selected .course-hero { view-transition-name: course-surface; }
body.beta #study-main[data-course-morph=card] .course-list > .grade.is-morphing .course-label > strong,
body.beta #study-main[data-course-morph=sheet] .course-panel.is-selected .course-hero h2 { view-transition-name: course-title; }
body.beta #study-main[data-course-morph=card] .course-list > .grade.is-morphing .course-final,
body.beta #study-main[data-course-morph=sheet] .course-panel.is-selected .course-hero > .course-final { view-transition-name: course-score; }
body.beta #study-main[data-course-morph] .course-panel.is-selected { animation: none; }
::view-transition-group(course-surface),
::view-transition-group(course-title),
::view-transition-group(course-score) { animation-duration: .36s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-group(course-surface) { overflow: clip; border-radius: 20px; }
::view-transition-old(course-surface),
::view-transition-new(course-surface) { height: 100%; object-fit: none; object-position: top center; }

/* Final grade of a course project defence (table 6.4). */
body.beta #study-main .course-tools > p.course-project-finals { margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--ui-soft); color: var(--ui-text); font-size: 13px; line-height: 1.5; }
body.beta #study-main .course-project-finals small { display: block; margin-top: 4px; color: var(--ui-muted); font-size: 11px; }

/* One summary treatment across all three study sections. */
body.beta #study-main :is(.grade-summary,.rating-hero,.attendance-overview,.course-hero) {
  background: #1b2942; color: #f5f7ff; border: 0; border-radius: 20px; padding: 18px;
}
body.beta #study-main :is(.rating-hero > p,.rating-complex small,.attendance-overview > p,.attendance-overview dt,.attendance-overview > small) { color: #bcc9df; opacity: 1; }
body.beta #study-main .attendance-overview dd { color: #f5f7ff; }
body.beta #study-main .attendance-overview dl > div.is-unexcused dd::before { background: #ff97a6; }
body.beta #study-main .attendance-overview dl > div.is-excused dd::before { background: #7fd8ae; }
body.beta #study-main :is(.rating-complex > strong,.attendance-overview dl > div:first-child dd) { font-size: 32px; line-height: 1.1; }
body.beta #study-main .course-auto-conditions { margin-top: 10px; }
body.beta #study-main .course-auto-conditions > summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; color: var(--ui-muted); font-size: 13px; cursor: pointer; list-style: none; }
body.beta #study-main .course-auto-conditions > summary::-webkit-details-marker { display: none; }
body.beta #study-main .course-auto-conditions > summary svg { width: 16px; height: 16px; transform: rotate(90deg); }
body.beta #study-main .course-auto-conditions[open] > summary svg { transform: rotate(-90deg); }

/* Shared study summary: colour lives in the surface; content remains steady. */
body.beta #study-main :is(.grade-summary,.attendance-overview,.rating-hero,.course-hero) {
 position:relative; isolation:isolate; overflow:hidden; border:1px solid #ffffff19;
 background:radial-gradient(ellipse at 95% 0%,#5957b566,transparent 65%),radial-gradient(ellipse at 0% 100%,#176b8266,transparent 65%),#192942;
 color:#f5f7ff; box-shadow:0 8px 24px #15234312;
}
body.beta #study-main :is(.grade-summary,.attendance-overview,.rating-hero,.course-hero)::before {
 content:""; position:absolute; z-index:-1; pointer-events:none; inset:-60%;
 background:linear-gradient(115deg,transparent 35%,#c7ddff12 50%,transparent 65%);
 transform:translateX(-25%) rotate(-10deg); animation:study-sheen 12s ease-in-out infinite alternate;
}
@keyframes study-sheen { to { transform:translateX(25%) rotate(10deg); } }
@media(prefers-reduced-motion:reduce){body.beta #study-main :is(.grade-summary,.attendance-overview,.rating-hero,.course-hero)::before{animation:none;}}

/* A compact, readable sync status, next to the data it describes. */
body.beta #study-main .resource-sync-note{display:flex;align-items:flex-start;gap:10px;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:16px;padding:14px;margin:12px 0;box-shadow:none}
body.beta #study-main .resource-sync-note .resource-sync-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:10px;background:var(--ui-accent-soft);color:var(--ui-accent)}
body.beta #study-main .resource-sync-note svg{width:16px;height:16px}
body.beta #study-main .resource-sync-note>div{flex:1;min-width:0}
body.beta #study-main .resource-sync-note strong{font-size:13px;line-height:1.4}
body.beta #study-main .resource-sync-note p{font-size:12px;line-height:1.5;color:var(--ui-muted);margin:4px 0}
body.beta #study-main .resource-sync-note small{font-size:11px;line-height:1.4;color:var(--ui-muted)}
body.beta #study-main .resource-sync-note>button{display:flex;align-items:center;gap:4px;min-height:36px;padding:6px;color:var(--ui-accent);font-size:12px;flex-shrink:0}
@media(max-width:430px){body.beta #study-main .resource-sync-note>button span{display:none}body.beta #study-main .resource-sync-note>button{width:36px;justify-content:center}}
body.beta #study-main .attendance-summary{padding:20px;gap:16px}
body.beta #study-main .attendance-summary-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
body.beta #study-main .attendance-summary-top p{margin:0 0 8px;color:#c6d2e9;font-size:12px}
body.beta #study-main .attendance-summary-top strong{font-size:36px;line-height:1;display:flex;align-items:baseline;gap:10px;color:#fff}
body.beta #study-main .attendance-summary-top small{font-size:13px;font-weight:450;color:#c6d2e9}
body.beta #study-main .attendance-summary-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:15px;background:#ffffff14;color:#c6d2e9}
body.beta #study-main .attendance-summary-icon svg{width:22px;height:22px}
body.beta #study-main .attendance-summary-bar{display:flex;gap:3px;height:10px;overflow:hidden;border-radius:8px}
body.beta #study-main .attendance-summary-bar i{flex:1;min-width:0;background:#8a99b3}
body.beta #study-main .attendance-summary .is-excused{--reason-color:#7fd8ae}
body.beta #study-main .attendance-summary .is-unexcused{--reason-color:#ff97a6}
body.beta #study-main .attendance-summary .is-unknown{--reason-color:#a8b5cc}
body.beta #study-main .attendance-summary-bar i{background:var(--reason-color)}
body.beta #study-main .attendance-summary ul{display:grid;gap:9px;margin:0;padding:0;list-style:none}
body.beta #study-main .attendance-summary li{display:flex;align-items:center;gap:8px;font-size:12px;color:#d9e2f5;background:transparent}
body.beta #study-main .attendance-summary li>i{width:7px;height:7px;border-radius:50%;background:var(--reason-color);flex-shrink:0}
body.beta #study-main .attendance-summary li>strong{margin-left:auto;color:var(--reason-color);font-size:14px;font-variant-numeric:tabular-nums}
body.beta #study-main .course-grade-plans{margin:16px 0}
body.beta #study-main .course-grade-plans h4{margin:0 0 4px;font-size:14px}
body.beta #study-main .course-grade-plans>p{font-size:12px;color:var(--ui-muted);margin:0 0 10px}
body.beta #study-main .grade-plan{border-top:1px solid var(--ui-border);padding:10px 0}
body.beta #study-main .grade-plan summary{display:flex;justify-content:space-between;align-items:center;list-style:none;cursor:pointer;font-size:13px;font-weight:600;min-height:30px}
body.beta #study-main .grade-plan summary::-webkit-details-marker{display:none}
body.beta #study-main .grade-plan summary svg{width:14px;height:14px}
body.beta #study-main .grade-plan[open] summary svg{transform:rotate(90deg)}
body.beta #study-main .grade-plan ul{list-style:none;display:grid;gap:10px;padding:8px 0;margin:0}
body.beta #study-main .grade-plan li{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}
body.beta #study-main .grade-plan .mark-badge{font-size:15px;min-width:30px;min-height:30px;padding:4px 8px;flex-shrink:0;border-radius:10px}
body.beta #study-main .grade-plan>small{color:var(--ui-muted);font-size:11px}
body.beta #study-main .campus-comment.is-deleted{background:var(--ui-soft);border:1px dashed var(--ui-border)}
body.beta #study-main .comment-deleted-content{display:flex;gap:10px;opacity:.45;filter:grayscale(1);pointer-events:none}
body.beta #study-main .comment-deleted-content .campus-avatar{width:30px;height:30px;flex:0 0 30px}
body.beta #study-main .comment-deleted-content strong{font-size:13px}
body.beta #study-main .comment-deleted-content p{margin:4px 0;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
body.beta #study-main .comment-undo{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px;font-size:12px;color:var(--ui-muted)}
body.beta #study-main .comment-undo button{font-size:13px;min-height:36px;color:var(--ui-accent)}

/* The semester as a whole: scholarship and retakes (src/study-standing.js). */
body.beta #study-main .semester-standing { margin: 12px 0 0; border: 1px solid var(--ui-border); border-radius: 18px; background: var(--ui-surface); }
body.beta #study-main .semester-standing > summary .study-card-badge { padding: 3px 10px; border-radius: 999px; background: var(--ui-soft); color: var(--ui-muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
body.beta #study-main .semester-standing[data-standing-tone=ok] > summary .study-card-badge { background: var(--ui-success-bg); color: var(--ui-success); }
body.beta #study-main .semester-standing[data-standing-tone=risk] > summary .study-card-badge { background: var(--ui-accent-soft); color: var(--ui-accent); }
body.beta #study-main .semester-standing[data-standing-tone=lost] > summary .study-card-badge { background: var(--ui-danger-bg, var(--ui-soft)); color: var(--ui-danger); }
body.beta #study-main .semester-standing-body { padding: 0 16px 16px; }
body.beta #study-main .semester-standing-body p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--ui-text); }
body.beta #study-main .standing-reasons { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 8px; }
body.beta #study-main .standing-reasons li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--ui-soft); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
body.beta #study-main .standing-reasons li[data-standing-level=lost] { background: var(--ui-danger-bg, var(--ui-soft)); }
body.beta #study-main .standing-reasons li span { color: var(--ui-muted); }
body.beta #study-main .semester-standing-body p.standing-retakes { overflow-wrap: anywhere; }
body.beta #study-main .semester-standing-body p.standing-note { margin: 0; font-size: 12px; color: var(--ui-muted); }
