@layer reset, tokens, base, layout, components, states, responsive, theme,
  print, utilities;

@layer reset {
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  min-height: 100vh;
}
button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}
button,
a,
input,
select,
label,
summary {
  touch-action: manipulation;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
ul,
ol {
  list-style: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
}
@layer tokens {
:root {
  color-scheme: light;

  --color-canvas: #f5f5f5;
  --color-navbar: #000000;
  --color-navbar-text: #ffffff;
  --color-navbar-muted: rgba(255, 255, 255, 0.7);
  --color-navbar-faint: rgba(255, 255, 255, 0.55);
  --color-navbar-divider: rgba(255, 255, 255, 0.16);
  --color-navbar-active: rgba(255, 255, 255, 0.1);
  --color-surface: #ffffff;
  --color-surface-hover: var(--color-canvas);
  --color-inset: #ffffff;
  --color-badge: #eeeeee;
  --color-track: var(--color-badge);
  --color-chip: var(--color-surface);

  --color-border: #c4c4c4;
  --color-border-muted: #e3e3e3;
  --color-field-border: #b0b0b0;

  --color-text: #000000;
  --color-text-muted: #545454;
  --color-text-faint: #6b6b6b;

  --color-accent: #9a6700;
  --color-accent-emphasis: #704b00;
  --color-accent-soft: rgba(247, 201, 72, 0.22);
  --color-soon: rgba(247, 201, 72, 0.12);
  --color-highlight: #f7c948;
  --color-on-highlight: #000000;

  --color-danger: #9b1c1c;
  --color-danger-soft: #fde8e8;
  --color-kind-resource: var(--color-canvas);
  --color-kind-special: #f9dfb3;
  --color-sae-1: #cbdcfa;
  --color-sae-2: #c8ead0;
  --color-sae-3: #ddd2fa;
  --color-sae-4: #c2e6e8;
  --color-sae-5: #f7cfe0;
  --color-sae-6: #dce8b8;
  --color-label-orange-bg: #fff0e0;
  --color-label-orange-fg: #9a4700;
  --color-label-blue-bg: #e2eeff;
  --color-label-blue-fg: #0b4fa8;
  --color-label-red-bg: #ffe7e7;
  --color-label-red-fg: #a3191f;
  --color-label-purple-bg: #f0e7ff;
  --color-label-purple-fg: #6a2bb3;
  --color-label-green-bg: #e0f4e5;
  --color-label-green-fg: #1d6b34;
  --color-label-slate-bg: #e7ecf2;
  --color-label-slate-fg: #3f5266;
  --color-now: var(--color-field-invalid);
  --color-backdrop: rgba(0, 0, 0, 0.45);
  --color-now-soft: rgba(229, 72, 77, 0.16);
  --color-now-glow: rgba(229, 72, 77, 0.45);
  --color-field-invalid: #e5484d;
  --color-pass: var(--color-label-green-fg);
  --color-pass-soft: var(--color-label-green-bg);
  --color-fail: var(--color-danger);

  --color-link: #000000;
  --color-field-focus: #0b63ce;
  --color-primary: #000000;
  --color-primary-hover: #262626;
  --color-on-primary: #ffffff;
  --color-bound: var(--color-accent);

  --paper: #ffffff;
  --paper-ink: #1b1f27;
  --paper-muted: #5b636e;
  --paper-rule: #d3dae2;

  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.375rem;
  --text-xl: clamp(1.75rem, 4vw, 2.25rem);
  --leading-tight: 1.25;
  --leading-normal: 1.55;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;
  --tracking-label: 0.04em;
  --tracking-eyebrow: 0.08em;
  --tracking-heading: -0.015em;
  --tracking-brand: -0.03em;
  --decoration-thickness: 0.08em;

  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  --page-gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 68ch;
  --height-box-row: 2.5rem;
  --topbar-height: 3.5rem;
  --width-drawer: min(20rem, calc(100vw - var(--touch-target)));
  --height-sheet: 85dvh;
  --width-app-sidebar: 15rem;
  --width-picker: 28rem;
  --height-picker-option: 3.5rem;
  --picker-slide: 2.5rem;
  --width-toolbar-search: 13rem;
  --width-toolbar-search-min: 7rem;
  --control-height: 2.25rem;
  --control-font-size: var(--text-sm);
  --touch-target: 2.75rem;
  --height-box-title: 1.5rem;

  --rule-width: 1px;
  --rule-accent-width: 2px;
  --focus-ring-width: 2px;
  --radius-control: 0.5rem;
  --radius-medium: 0.75rem;
  --radius-large: 1rem;
  --radius-pill: 999px;

  --icon-size: 1rem;
  --icon-size-sm: 0.875rem;
  --icon-size-nav: 1.125rem;

  --width-grade-input: 5rem;
  --width-event-time: 6.5rem;
  --width-event-card: 18rem;
  --width-summary-label: 6.5rem;
  --width-grades-panel: 20rem;
  --width-coef-column: 2.75rem;
  --width-hour-axis: 3.5rem;
  --calendar-hour-height-max: 4.5rem;
  --calendar-hour-height-min: 3.25rem;
  --calendar-hour-height: var(--calendar-hour-height-max);
  --calendar-minute-height: calc(var(--calendar-hour-height) / 60);
  --event-title-lines: 2;
  --size-progress-dot: 0.5rem;
  --width-time-range: 7.5rem;
  --width-eval-date: 9rem;
  --width-fact: 9rem;
  --width-year-title: 16rem;
  --width-setting-label: 14rem;
  --width-module-links: 12rem;
  --width-module-fact-label: 7.5rem;
  --width-shortcut-keys: 4rem;
  --size-key: 1.375rem;
  --radius-key: 0.25rem;
  --grid-year-row: minmax(0, 10fr) minmax(0, 6fr) minmax(0, 5fr) minmax(0, 5fr);
  --size-module-dot: 0.625rem;
  --width-eval-category: 9.5rem;
  --size-order-rank: 1.5rem;
  --menu-min-width: 13rem;
  --width-choice-menu: 26rem;
  --width-select-menu: 11rem;
  --height-choice-menu: 24rem;

  --visually-hidden-size: 1px;

  --opacity-disabled: 0.5;
  --opacity-dimmed: 0.45;
  --opacity-indicator: 0.6;
  --mix-past: 35%;
  --mix-event-edge: 82%;
  --transition-fast: 180ms ease;
  --transition-undim: opacity 0s 150ms;
  --motion-spotlight: 1400ms linear 250ms;
  --motion-slide: 320ms cubic-bezier(0.2, 0, 0, 1);
  --size-spotlight-halo: 0.25rem;
  --size-spotlight-ping: 0.625rem;
  --scale-spotlight-line: 2;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-overlay: 0 18px 48px rgba(0, 0, 0, 0.18);
  --shadow-menu: 0 8px 24px rgba(0, 0, 0, 0.12);

  --site-header-height: 0px;

  --z-raised: 1;
  --z-menu: 30;
  --z-header: 40;
  --z-backdrop: 50;
  --z-overlay: 60;
}

@media screen {
  :root[data-color-scheme="dark"] {
    color-scheme: dark;

    --color-canvas: #1c1c1c;
    --color-surface: #121212;
    --color-inset: #171717;
    --color-badge: #262626;
    --color-chip: #3d3d3d;

    --color-border: #3a3a3a;
    --color-border-muted: #262626;
    --color-field-border: #4a4a4a;

    --color-text: #f2f2f2;
    --color-text-muted: #b0b0b0;
    --color-text-faint: #8f8f8f;

    --color-accent: #f0c14b;
    --color-accent-emphasis: #f7c948;
    --color-accent-soft: rgba(247, 201, 72, 0.18);
    --color-soon: rgba(247, 201, 72, 0.1);

    --color-danger: #ff8a8a;
    --color-danger-soft: rgba(229, 72, 77, 0.16);
    --color-kind-resource: #222222;
    --color-kind-special: #3a3020;
    --color-sae-1: #1e2c44;
    --color-sae-2: #1d3327;
    --color-sae-3: #2c2648;
    --color-sae-4: #1b3336;
    --color-sae-5: #3e2433;
    --color-sae-6: #2f3521;
    --color-label-orange-bg: #3d2710;
    --color-label-orange-fg: #ffb86b;
    --color-label-blue-bg: #12294a;
    --color-label-blue-fg: #8ab8ff;
    --color-label-red-bg: #451a1c;
    --color-label-red-fg: #ff9a9e;
    --color-label-purple-bg: #2e1f4d;
    --color-label-purple-fg: #c7a6ff;
    --color-label-green-bg: #173322;
    --color-label-green-fg: #7fd69b;
    --color-label-slate-bg: #232b34;
    --color-label-slate-fg: #a9bccf;
    --color-backdrop: rgba(0, 0, 0, 0.6);

    --color-link: #f2f2f2;
    --color-field-focus: #6aa9ff;
    --color-primary: #dedede;
    --color-primary-hover: #f2f2f2;
    --color-on-primary: #0d0d0d;

    --shadow-overlay: 0 18px 48px rgba(0, 0, 0, 0.6);
    --shadow-menu: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}
}
@layer base {
html {
  background: var(--color-navbar);
  color: var(--color-text);
  font-family: var(--font-family);
  scroll-behavior: smooth;
}
body {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  color: var(--color-text);
  line-height: var(--leading-tight);
}
h1 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading);
}
h2 {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading);
}
h3 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}
h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
p {
  margin-block-end: var(--space-md);
}
p:last-child {
  margin-block-end: 0;
}
a {
  color: var(--color-link);
  text-decoration: none;
  text-decoration-thickness: var(--decoration-thickness);
}
strong {
  font-weight: var(--weight-semibold);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--color-accent);
}
button,
input,
select,
textarea {
  border-radius: var(--radius-control);
}
button {
  cursor: pointer;
}
.icon-sprite {
  display: none;
}
.icon {
  display: inline-block;
  inline-size: var(--icon-size);
  block-size: var(--icon-size);
  flex: none;
  fill: currentColor;
  vertical-align: text-bottom;
}
.icon-sm {
  inline-size: var(--icon-size-sm);
  block-size: var(--icon-size-sm);
}
.external-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}
}
@layer layout {
.site-main {
  flex: 1;
  min-width: 0;
}
.page-container {
  width: 100%;
  min-width: 0;
  padding: var(--space-lg) var(--page-gutter) var(--space-3xl);
}
.site-main p {
  max-width: var(--measure);
}
}
@layer components {
.app {
  display: grid;
  grid-template-columns: var(--width-app-sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}
.app-sidebar {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  height: 100dvh;
  padding: var(--space-md) var(--space-sm);
  overflow-y: auto;
  background: var(--color-navbar);
  color: var(--color-navbar-text);
}
.app-sidebar-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-inline: calc(-1 * var(--space-sm));
  padding-inline: var(--space-sm);
  padding-block-end: var(--space-md);
  border-block-end: var(--rule-width) solid var(--color-navbar-divider);
}
.app-brand {
  display: flex;
  margin: 0;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  color: var(--color-navbar-text);
  font-size: var(--text-md);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-brand);
}
.menu-group {
  color: var(--color-navbar-faint);
}
.menu-group {
  margin: var(--space-xs) var(--space-sm) var(--space-2xs);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}
.menu-list a[aria-current="true"] {
  font-weight: var(--weight-semibold);
}
.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100dvh;
}
.app-topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--topbar-height);
  padding-inline: var(--page-gutter);
  border-block-end: var(--rule-width) solid var(--color-border-muted);
  background: var(--color-surface);
}
.app-topbar-main {
  display: flex;
  flex: 1;
  align-items: center;
  align-self: stretch;
  gap: var(--space-xs);
  min-width: 0;
}
.app-breadcrumb {
  min-width: 0;
}
.app-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.app-breadcrumb li + li::before {
  color: var(--color-text-faint);
  content: "/";
}
.app-breadcrumb a {
  color: var(--color-text-muted);
  white-space: nowrap;
}
.app-breadcrumb h1,
.app-topbar-main > h1 {
  margin: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-topbar-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-xs);
}
.app-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  margin-block-start: auto;
  padding: var(--space-md) var(--page-gutter);
  border-block-start: var(--rule-width) solid var(--color-border-muted);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}
}
@layer components {
.app-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.app-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--control-height);
  padding-inline: var(--space-sm);
  border-radius: var(--radius-control);
  color: var(--color-navbar-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.app-nav a .icon:not(.icon-sm) {
  inline-size: var(--icon-size-nav);
  block-size: var(--icon-size-nav);
}
.app-nav a .icon {
  flex: none;
  color: var(--color-navbar-faint);
}
.app-nav a[aria-current="page"] {
  background: var(--color-navbar-active);
  color: var(--color-navbar-text);
  font-weight: var(--weight-semibold);
}
.app-nav a[aria-current="page"] .icon {
  color: var(--color-highlight);
}
.app-nav-classes a[aria-current="page"] {
  color: var(--color-highlight);
}
.app-nav-heading {
  margin: var(--space-md) calc(-1 * var(--space-sm)) var(--space-2xs);
  padding: var(--space-md) calc(2 * var(--space-sm)) 0;
  border-block-start: var(--rule-width) solid var(--color-navbar-divider);
  color: var(--color-navbar-text);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
.app-nav > .app-nav-heading:first-child {
  margin-block-start: 0;
  padding-block-start: 0;
  border-block-start: 0;
}
.app-nav-classes + .app-nav-classes::before {
  content: "";
  margin: var(--space-xs) var(--space-sm);
  border-block-start: var(--rule-width) solid var(--color-navbar-divider);
}
.app-nav-links a {
  justify-content: space-between;
}
.app-nav .app-nav-foot {
  margin-block-start: auto;
  margin-inline: calc(-1 * var(--space-sm));
  padding: var(--space-sm) var(--space-sm) 0;
  border-block-start: var(--rule-width) solid var(--color-navbar-divider);
}
}
@layer components {
.page-container > :first-child {
  margin-block-start: 0;
}
.page-container > h2 {
  margin-block: var(--space-xl) var(--space-sm);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
}
.page-container > h2:first-child {
  margin-block-start: 0;
}
.collapsible-heading {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
}
.heading-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  margin: calc((var(--touch-target) - var(--height-box-title)) / -2);
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
}
.toggle-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}
.toggle-arrow.is-collapsed {
  transform: rotate(-90deg);
}
}
@layer components {
.btn,
.choice-trigger,
.filter-form select,
.filter-form input[type="text"],
.filter-form input[type="date"],
.calendar-nav-bar input[type="date"],
.filter-form button,
.calendar-nav-bar button,
.segmented button,
.grade-input {
  min-height: var(--control-height);
  padding-inline: var(--space-sm);
  border: var(--rule-width) solid var(--color-field-border);
  border-radius: var(--radius-control);
  background: var(--color-inset);
  color: var(--color-text);
  font-size: var(--control-font-size);
  transition: color var(--transition-fast);
}
.btn,
.choice-trigger,
.filter-form button,
.calendar-nav-bar button,
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.btn {
  padding-inline: var(--space-md);
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--size-key);
  height: var(--size-key);
  padding-inline: var(--space-2xs);
  border: var(--rule-width) solid var(--color-border);
  border-radius: var(--radius-key);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
}
.shortcut-keys {
  display: flex;
  flex: none;
  gap: var(--space-2xs);
  min-width: var(--width-shortcut-keys);
}
.search-key {
  position: absolute;
  inset-inline-end: var(--space-2xs);
  pointer-events: none;
}
.search-field:has(input:focus) .search-key,
.search-field:has(input:not(:placeholder-shown)) .search-key {
  display: none;
}
[data-shortcut] {
  position: relative;
}
.feed-choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  max-width: 100%;
}
.btn-primary,
.display-menu:has(input:checked) > summary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.filter-form input::placeholder {
  color: var(--color-text-faint);
  opacity: 1;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}
.filter-group-item {
  display: flex;
  min-width: 0;
}
.filter-field-title {
  display: none;
}
.filter-form label:has(input),
.toggle-pill:has(input) {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--control-height);
  padding-inline: var(--space-sm);
  border: var(--rule-width) solid var(--color-field-border);
  border-radius: var(--radius-control);
  background: var(--color-inset);
  color: var(--color-text-muted);
  font-size: var(--control-font-size);
  font-weight: var(--weight-medium);
  cursor: pointer;
  user-select: none;
}
.filter-form label:has(input) input,
.toggle-pill:has(input) input {
  position: absolute;
  width: var(--visually-hidden-size);
  height: var(--visually-hidden-size);
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.filter-form label:has(input:focus-visible),
.toggle-pill:has(input:focus-visible) {
  outline: var(--focus-ring-width) solid var(--color-accent);
  outline-offset: var(--focus-ring-width);
}
.filter-form label:has(input) .icon,
.toggle-pill:has(input) .icon {
  display: none;
}
.filter-form label:has(input:checked) .icon,
.toggle-pill:has(input:checked) .icon {
  display: inline-block;
}
.choice-trigger-key {
  color: var(--color-text-faint);
  font-weight: var(--weight-normal);
}
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.search-field .icon {
  position: absolute;
  inset-inline-start: var(--space-sm);
  color: var(--color-text-faint);
  pointer-events: none;
}
.filter-form .search-field input {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  padding-inline: calc(2 * var(--space-sm) + var(--icon-size-sm))
    calc(var(--space-xs) + var(--size-key));
  border-color: transparent;
  background: var(--color-track);
}
.filter-form .search-field input:focus {
  border-color: var(--color-field-border);
  background: var(--color-surface);
}
.filter-form label:has(input:checked),
.toggle-pill:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.filter-form .choice-trigger,
.segmented {
  display: none;
}
.choice-trigger .icon {
  color: var(--color-text-faint);
  transition: transform var(--transition-fast);
}
.choice-trigger[aria-expanded="true"] {
  border-color: var(--color-text-faint);
  background: var(--color-canvas);
}
.choice-trigger[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}
.segmented {
  align-items: stretch;
  gap: var(--space-3xs);
  min-height: var(--control-height);
  padding: var(--space-3xs);
  border-radius: var(--radius-control);
  background: var(--color-track);
}
.segmented .segmented-option {
  min-height: 0;
  padding-inline: var(--space-sm);
  border: 0;
  border-radius: calc(var(--radius-control) - var(--space-3xs));
  background: transparent;
  color: var(--color-text-muted);
}
.segmented .segmented-option[aria-pressed="true"] {
  background: var(--color-chip);
  box-shadow: 0 0 0 var(--rule-width) var(--color-border);
  color: var(--color-text);
}
.has-filter-bar .filter-group-item {
  position: relative;
}
.filter-form select[data-control="menu"] {
  max-width: var(--width-select-menu);
  text-overflow: ellipsis;
}
.choice-menu.menu-list {
  inset-inline: 0 auto;
  width: var(--width-choice-menu);
  max-height: var(--height-choice-menu);
  padding: 0;
  overflow: hidden;
}
.choice-menu-search-field {
  flex: none;
  width: auto;
  margin: var(--space-sm) var(--space-sm) var(--space-xs);
}
.choice-menu-search {
  width: 100%;
  min-height: var(--control-height);
  padding-inline: calc(2 * var(--space-sm) + var(--icon-size-sm))
    var(--space-sm);
  border: var(--rule-width) solid transparent;
  border-radius: var(--radius-control);
  background: var(--color-track);
  color: var(--color-text);
  font-size: var(--control-font-size);
}
.choice-menu-search:focus {
  border-color: var(--color-field-border);
  background: var(--color-surface);
}
.choice-menu-list {
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-2xs) var(--space-2xs);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.choice-menu-group {
  margin: var(--space-xs) var(--space-sm) var(--space-3xs);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}
.filter-form .choice-menu-item {
  justify-content: flex-start;
  gap: var(--space-xs);
  min-height: var(--control-height);
  padding-inline: var(--space-xs);
}
.choice-menu-item .icon {
  visibility: hidden;
  flex: none;
}
.choice-menu-item[aria-pressed="true"] .icon {
  visibility: visible;
  color: var(--color-text);
}
.choice-menu-code {
  flex: none;
  font-weight: var(--weight-semibold);
}
.choice-menu-label {
  overflow: hidden;
  color: var(--color-text-muted);
  font-weight: var(--weight-normal);
  text-overflow: ellipsis;
}
.choice-menu-empty {
  margin: 0;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.filter-group-reset button,
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--color-text-muted);
}
.results-count {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.calendar-nav-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.calendar-nav-bar input[type="date"] {
  font-variant-numeric: tabular-nums;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: var(--opacity-indicator);
}
.cal-nav-center {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.cal-period {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.cal-period-heading {
  color: var(--color-text);
  font-size: var(--text-md);
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  white-space: nowrap;
}
.heading-eyebrow {
  display: block;
  color: var(--color-text-muted);
  font-family: var(--font-family);
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
}
.cal-period-caret {
  color: var(--color-text-faint);
}
.btn-text {
  display: none;
}
.btn-symbol {
  display: inline-flex;
}

.menu > summary:not(.btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-text-muted);
}

.menu {
  position: relative;
  display: inline-flex;
}
.menu > summary {
  list-style: none;
  cursor: pointer;
}
.menu > summary::-webkit-details-marker {
  display: none;
}
.menu > summary::marker {
  content: "";
}
.menu-list,
.menu-panel {
  position: absolute;
  z-index: var(--z-menu);
  inset-block-start: calc(100% + var(--space-2xs));
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  min-width: var(--menu-min-width);
  padding: var(--space-2xs);
  border: var(--rule-width) solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  box-shadow: var(--shadow-menu);
}
.menu-panel {
  gap: var(--space-xs);
  padding: var(--space-sm);
}
.display-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.menu-panel .filter-group-item {
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.menu-panel .filter-field-title {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.menu-panel label:has(input) {
  justify-content: center;
  white-space: nowrap;
}
.menu[open] > summary {
  background: var(--color-canvas);
  color: var(--color-text);
}
.menu-list button,
.menu-list a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: var(--control-height);
  padding-inline: var(--space-sm);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-align: start;
}
.menu-list .icon {
  color: var(--color-text-faint);
}
.menu-list .menu-item-danger {
  color: var(--color-danger);
}
.menu-list .menu-item-danger .icon {
  color: var(--color-danger);
}
}
@layer components {
.room-tag {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.category-badge,
.filter-panel.is-open .filter-tone {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--label-bg, var(--color-badge));
  color: var(--label-fg, var(--color-text-muted));
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.label-orange {
  --label-bg: var(--color-label-orange-bg);
  --label-fg: var(--color-label-orange-fg);
}
.label-blue {
  --label-bg: var(--color-label-blue-bg);
  --label-fg: var(--color-label-blue-fg);
}
.label-red {
  --label-bg: var(--color-label-red-bg);
  --label-fg: var(--color-label-red-fg);
}
.label-purple {
  --label-bg: var(--color-label-purple-bg);
  --label-fg: var(--color-label-purple-fg);
}
.label-green {
  --label-bg: var(--color-label-green-bg);
  --label-fg: var(--color-label-green-fg);
}
.label-slate {
  --label-bg: var(--color-label-slate-bg);
  --label-fg: var(--color-label-slate-fg);
}
}
@layer components {
table {
  width: 100%;
  margin-block-end: var(--space-xl);
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}
th,
td {
  padding: var(--space-sm) var(--space-md);
  border-block-end: var(--rule-width) solid var(--color-border-muted);
  color: var(--color-text);
  font-size: var(--text-base);
  text-align: start;
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-inline-start: 0;
}
th:last-child,
td:last-child {
  padding-inline-end: 0;
}
thead th {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
tbody tr:last-child > * {
  border-block-end: 0;
}
.grade-input {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.col-grade-input {
  text-align: end;
}
.grade-input {
  width: var(--width-grade-input);
  text-align: end;
}
.table-card {
  overflow-x: auto;
}
}
@layer components {
.box-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.box-list > li:not([hidden]) ~ li {
  border-block-start: var(--rule-width) solid var(--color-border-muted);
}
.box-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
  min-height: var(--height-box-row);
  padding: var(--space-xs) var(--space-md);
  color: var(--color-text);
}
.box-row-main {
  flex: 1;
  min-width: 0;
}
.setting-row {
  flex-wrap: wrap;
  padding-block: var(--space-sm);
}
.setting-row .box-row-main {
  flex-basis: var(--width-setting-label);
}
.setting-name,
.setting-help {
  display: block;
}
.setting-name {
  font-weight: var(--weight-medium);
}
.setting-help {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.module-row {
  display: grid;
  grid-template-columns:
    minmax(0, 8fr) minmax(0, 5fr) minmax(0, 5fr)
    var(--width-module-links);
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  min-height: var(--height-box-row);
  padding: var(--space-sm) var(--space-md);
}
.module-name,
.module-progress,
.module-fact-label {
  display: block;
}
.module-name strong {
  font-weight: var(--weight-semibold);
}
.module-progress,
.module-fact-label {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.module-fact {
  font-size: var(--text-sm);
}
.module-fact-label {
  font-size: var(--text-xs);
}
.module-upcoming > :not(:nth-child(1 of [data-past="false"])) {
  display: none;
}
.module-upcoming:not(:has([data-past="false"]))::after {
  content: attr(data-empty);
  color: var(--color-text-faint);
}
.module-upcoming a {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-xs);
  color: var(--color-text);
}
.module-links {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-xs);
}
.box-row-icon {
  flex: none;
  color: var(--color-text-faint);
}

.noscript-notice,
.privacy-notice {
  max-width: var(--measure);
  margin-block: var(--space-md);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.grades-message,
.site-main .stale-notice {
  max-width: none;
  margin-block: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-width) solid var(--color-pass);
  border-radius: var(--radius-control);
  background: var(--color-pass-soft);
  color: var(--color-text);
  font-size: var(--text-sm);
}
.grades-message.is-pending {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
}
.site-main .stale-notice {
  margin: var(--space-md) var(--page-gutter) 0;
}
.grades-message[role="alert"],
.site-main .stale-notice {
  border-color: var(--color-danger);
  background: var(--color-danger-soft);
  color: var(--color-text);
}
.empty-state-message {
  max-width: none;
  margin-block: var(--space-md);
  padding-block: var(--space-xl);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
}
.text-block > p {
  max-width: none;
}
.text-block > :first-child {
  margin-block-start: 0;
}
.eval-link {
  display: grid;
  grid-template-columns:
    var(--width-eval-date) var(--width-time-range) minmax(0, 1fr)
    var(--width-eval-category) auto;
}
.eval-date {
  display: flex;
  flex-direction: column;
}
.eval-day {
  font-weight: var(--weight-medium);
}
.eval-delay {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.eval-row.is-soon .eval-link {
  background: var(--color-soon);
}
.is-soon .eval-delay {
  color: var(--color-accent-emphasis);
  font-weight: var(--weight-medium);
}
.eval-delay:empty {
  display: none;
}
.eval-delay::first-letter {
  text-transform: uppercase;
}
.eval-time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.eval-module strong {
  font-weight: var(--weight-semibold);
}
.eval-link .category-badge {
  justify-self: start;
}
.eval-summary h2 {
  margin-block: 0 var(--space-xs);
  font-size: var(--text-md);
  font-weight: var(--weight-normal);
  letter-spacing: 0;
}
.eval-summary strong {
  font-weight: var(--weight-semibold);
}
.eval-summary-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-block-end: var(--space-md);
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--width-fact), 1fr));
  gap: var(--space-md) var(--space-lg);
  margin: 0;
  padding: var(--space-md);
}
.fact-grid dt {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.fact-grid dd {
  margin: 0;
}
.fact-time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.order-slot.is-current {
  background: var(--color-accent-soft);
}
.order-rank {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--size-order-rank);
  height: var(--size-order-rank);
  border: var(--rule-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.order-time {
  flex: none;
  min-width: var(--width-time-range);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.order-classes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-xs);
  min-width: 0;
}
.order-class {
  padding-inline: var(--space-xs);
  border: var(--rule-width) solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.order-class.is-current {
  font-weight: var(--weight-semibold);
}
.order-note {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
}
@layer components {
.calendar-view-week {
  display: grid;
  grid-template-columns: repeat(var(--calendar-day-count), minmax(0, 1fr));
  gap: var(--space-md);
  align-items: start;
}
.calendar-view-week:has(> .empty-state-message) {
  display: block;
}
.day-section,
.current-time-marker {
  scroll-margin-block-start: calc(var(--site-header-height) + var(--space-md));
}
.day-section {
  min-width: 0;
  margin-block-end: var(--space-xl);
}
.day-section > h3 {
  margin-block-end: var(--space-sm);
  color: var(--color-text);
}
.calendar-view-week .day-section > h3 {
  margin-block-end: var(--space-sm);
  padding-block-end: var(--space-xs);
  border-block-end: var(--rule-width) solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.day-heading-name,
.day-heading-date {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-heading-date {
  font-weight: var(--weight-normal);
}
.calendar-view-week .day-section.is-today > h3,
.calendar-view-year .day-section.is-today > h3 {
  color: var(--color-accent-emphasis);
}
.calendar-view-week .day-section.is-today > h3 {
  border-block-end-color: var(--color-highlight);
  box-shadow: 0 var(--rule-width) 0 var(--color-highlight);
}
.calendar-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.calendar-event-item {
  display: grid;
  grid-template-columns: var(--width-event-time) minmax(0, 1fr);
  gap: var(--space-sm);
  min-width: 0;
  padding: var(--space-sm);
  --event-surface: var(--event-fill, var(--color-surface));
  --event-surface-past: color-mix(
    in srgb,
    var(--event-surface) var(--mix-past),
    var(--color-surface)
  );
  border: var(--rule-width) solid
    color-mix(
      in srgb,
      var(--event-surface) var(--mix-event-edge),
      var(--color-text)
    );
  border-radius: var(--radius-control);
  background: var(--event-surface);
}
.calendar-event-item.kind-resource {
  --event-fill: var(--color-kind-resource);
}
.calendar-event-item.kind-sae,
.calendar-event-item.is-special {
  --color-bound: var(--color-accent-emphasis);
}
.calendar-event-item.is-special {
  --event-fill: var(--color-kind-special);
}
.calendar-event-item.kind-sae.tone-1 {
  --event-fill: var(--color-sae-1);
}
.calendar-event-item.kind-sae.tone-2 {
  --event-fill: var(--color-sae-2);
}
.calendar-event-item.kind-sae.tone-3 {
  --event-fill: var(--color-sae-3);
}
.calendar-event-item.kind-sae.tone-4 {
  --event-fill: var(--color-sae-4);
}
.calendar-event-item.kind-sae.tone-5 {
  --event-fill: var(--color-sae-5);
}
.calendar-event-item.kind-sae.tone-6 {
  --event-fill: var(--color-sae-6);
}
.calendar-event-item.is-evaluation {
  border: var(--rule-accent-width) solid var(--color-text);
}
.calendar-event-item .session-mark {
  border: var(--rule-width) solid var(--color-field-border);
  background: transparent;
  color: var(--color-text-muted);
}
.calendar-view-week .calendar-event-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.event-time {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.calendar-view-container:not(.is-grid) .is-day-start,
.calendar-view-container:not(.is-grid) .is-day-end {
  color: var(--color-bound);
  font-weight: var(--weight-semibold);
}
.event-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}
.event-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.event-name strong {
  font-weight: var(--weight-semibold);
}
.event-series {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
}
.event-teachers,
.event-rooms,
.event-groups {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  overflow-wrap: anywhere;
}
.current-time-marker {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
  margin-block: var(--space-xs);
  color: var(--color-now);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semibold);
}
.current-time-marker.is-off-view {
  grid-column: 1 / -1;
  margin-block: 0 var(--space-md);
}
.current-time-text {
  border-radius: var(--radius-pill);
}
.current-time-marker.is-spotlit .current-time-text {
  animation: now-halo var(--motion-spotlight);
}
.current-time-marker.is-spotlit .current-time-line {
  animation: now-line var(--motion-spotlight);
}
@keyframes now-halo {
  0%,
  100% {
    background: transparent;
    box-shadow: 0 0 0 0 transparent;
  }
  10%,
  90% {
    background: var(--color-now-soft);
    box-shadow: 0 0 0 var(--size-spotlight-halo) var(--color-now-soft);
  }
}
@keyframes now-line {
  0%,
  100% {
    transform: scaleY(1);
  }
  10%,
  90% {
    transform: scaleY(var(--scale-spotlight-line));
  }
}
@keyframes now-ping {
  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
  10%,
  90% {
    box-shadow: 0 0 0 var(--size-spotlight-ping) var(--color-now-glow);
  }
}
.current-time-line {
  flex: 1;
  border: 0;
  color: inherit;
  border-block-start: var(--rule-width) solid currentColor;
}
.calendar-event-item.is-past {
  border-color: var(--color-border-muted);
  background: var(--event-surface-past);
}
.calendar-event-item.is-past .event-title {
  color: var(--color-text-muted);
}
.calendar-event-item.is-past .event-name strong {
  font-weight: var(--weight-medium);
}
.calendar-event-item.is-past
  :is(
    .event-time,
    .event-rooms,
    .event-teachers,
    .event-groups,
    .event-series,
    .room-tag
  ) {
  color: var(--color-text-faint);
}
.calendar-event-item.is-ongoing {
  position: relative;
  background: linear-gradient(
    to bottom,
    var(--event-surface-past) calc(var(--course-progress) * 100%),
    var(--event-surface) calc(var(--course-progress) * 100%)
  );
}
.current-time-marker.is-line {
  position: absolute;
  inset-inline: 0;
  z-index: var(--z-raised);
  gap: 0;
  margin: 0;
  transform: translateY(-50%);
}
.calendar-event-item > .current-time-marker.is-line {
  inset-block-start: calc(var(--course-progress) * 100%);
}
.current-time-marker.is-line .current-time-text {
  position: absolute;
  width: var(--visually-hidden-size);
  height: var(--visually-hidden-size);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.current-time-marker.is-line::before {
  content: "";
  flex: none;
  width: var(--size-progress-dot);
  height: var(--size-progress-dot);
  border-radius: var(--radius-pill);
  background: var(--color-now);
}
.current-time-marker.is-line.is-spotlit::before {
  animation: now-ping var(--motion-spotlight);
}
.year-month-title {
  margin-block: var(--space-xl) var(--space-sm);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
}
.calendar-view-year .day-section {
  display: grid;
  grid-template-columns: var(--width-eval-date) minmax(0, 1fr);
  gap: 0 var(--space-md);
  margin: 0;
  padding-block: var(--space-xs);
  border-block-start: var(--rule-width) solid var(--color-border-muted);
}
.calendar-view-year .day-section > h3 {
  margin: 0;
  padding-block: var(--space-3xs);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}
.calendar-view-year .calendar-events-list {
  gap: 0;
}
.calendar-view-year .calendar-event-item {
  grid-template-columns: var(--width-time-range) minmax(0, 1fr);
  align-items: baseline;
  padding: var(--space-3xs) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.calendar-view-year .event-time,
.calendar-view-year .event-title {
  font-size: var(--text-base);
}
.calendar-view-year .event-info {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-md);
}
.calendar-view-year .event-title {
  flex: 1 1 var(--width-year-title);
}
.calendar-view-year .event-name::before {
  content: "";
  display: inline-block;
  width: var(--size-module-dot);
  height: var(--size-module-dot);
  margin-inline-end: var(--space-xs);
  border: var(--rule-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--event-fill, var(--color-surface));
}
.calendar-view-year .event-teachers,
.calendar-view-year .event-rooms,
.calendar-view-year .event-groups {
  font-size: var(--text-sm);
}
@media (min-width: 60em) {
  .calendar-view-year .event-info {
    display: grid;
    grid-template-columns: var(--grid-year-row);
  }
  .calendar-view-year .event-info > * {
    grid-row: 1;
  }
  .calendar-view-year .event-teachers {
    grid-column: 2;
  }
  .calendar-view-year .event-rooms {
    grid-column: 3;
  }
  .calendar-view-year .event-groups {
    grid-column: 4;
  }
  .calendar-view-year .event-title {
    flex-wrap: nowrap;
  }
  .calendar-view-year .event-title > :not(.event-name) {
    flex: none;
  }
  .calendar-view-year .event-name,
  .calendar-view-year .event-teachers,
  .calendar-view-year .event-rooms,
  .calendar-view-year .event-groups {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .calendar-view-year .room-tag {
    display: inline;
  }
}
.calendar-view-year .empty-state-message {
  margin: 0;
  padding-block: var(--space-sm);
  border-block-start: var(--rule-width) solid var(--color-border-muted);
  text-align: start;
}
.calendar-view-container.is-grid {
  display: grid;
  gap: var(--space-md);
  align-items: start;
  grid-template-columns:
    var(--width-hour-axis)
    repeat(var(--calendar-day-count), minmax(0, 1fr));
  grid-template-rows: [before] auto [heading] auto [body] auto [after] auto;
  row-gap: 0;
}
.calendar-view-container.is-grid > .day-section {
  display: grid;
  grid-row: heading / after;
  grid-template-rows: subgrid;
  margin-block-end: 0;
}
.calendar-view-container.is-grid > .day-section > h3 {
  grid-row: heading;
}
.calendar-view-container.is-grid > .current-time-marker {
  grid-row: before;
}
.calendar-view-container.is-grid > .day-section ~ .current-time-marker {
  grid-row: after;
  margin-block: var(--space-md) 0;
}
.calendar-view-container.is-grid {
  --calendar-fit-height: calc(
    (100dvh - var(--calendar-grid-top) - var(--space-lg)) * 60 /
      var(--calendar-grid-minutes)
  );
  --calendar-hour-height: clamp(
    var(--calendar-hour-height-min),
    var(--calendar-fit-height),
    var(--calendar-hour-height-max)
  );
  --calendar-minute-height: calc(var(--calendar-hour-height) / 60);
}
.calendar-hours {
  position: relative;
  grid-row: body;
  grid-column: 1;
  height: calc(var(--calendar-grid-minutes) * var(--calendar-minute-height));
}
.calendar-hour {
  position: absolute;
  inset-block-start: calc(
    var(--calendar-offset) * var(--calendar-minute-height)
  );
  inset-inline-start: 0;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
}
.calendar-view-container.is-grid .calendar-events-list {
  position: relative;
  display: block;
  grid-row: body;
  height: calc(var(--calendar-grid-minutes) * var(--calendar-minute-height));
  background-image: repeating-linear-gradient(
    to bottom,
    var(--color-border-muted) 0 var(--rule-width),
    transparent var(--rule-width) var(--calendar-hour-height)
  );
}
.calendar-view-container.is-grid .calendar-event-item {
  position: absolute;
  inset-block-start: calc(
    var(--calendar-offset) * var(--calendar-minute-height)
  );
  inset-inline-start: calc(100% * var(--event-lane) / var(--event-lanes));
  display: block;
  width: calc(100% / var(--event-lanes));
  height: calc(
    var(--event-span) * var(--calendar-minute-height) - var(--space-3xs)
  );
  padding: var(--space-xs);
}
.calendar-view-day.is-grid .calendar-event-item {
  display: grid;
  align-content: start;
  padding: var(--space-xs) var(--space-sm);
  overflow: hidden;
}
.calendar-view-container.is-grid .calendar-event-item {
  transition: var(--transition-undim);
}
.calendar-view-container.is-grid .calendar-event-item:hover,
.calendar-view-container.is-grid .calendar-event-item:focus-visible {
  transition: none;
}
.calendar-view-container.is-grid:not(.has-pinned):has(
    .calendar-event-item:hover,
    .calendar-event-item:focus-visible
  )
  .calendar-event-item:not(:hover, :focus-visible),
.calendar-view-container.is-grid.has-pinned
  .calendar-event-item:not(.is-pinned) {
  opacity: var(--opacity-dimmed);
  transition: none;
}
.calendar-view-container.is-grid:not(.has-pinned) .calendar-event-item:hover,
.calendar-view-container.is-grid .calendar-event-item:has(:focus-visible),
.calendar-view-container.is-grid .calendar-event-item:focus-visible,
.calendar-view-container.is-grid .calendar-event-item.is-pinned {
  z-index: var(--z-menu);
}
.event-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: var(--space-3xs) var(--space-xs);
  height: 100%;
  overflow: hidden;
}
.event-summary .event-info {
  display: contents;
}
.event-summary .event-teachers,
.event-summary .event-groups {
  display: none;
}
.event-summary .event-title,
.event-summary .category-badge {
  grid-column: 1 / -1;
}
.event-summary .category-badge {
  justify-self: start;
}
.event-summary .event-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--event-title-lines);
  overflow: hidden;
}
.event-summary .event-rooms {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  overflow: hidden;
  text-align: end;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-view-container.is-grid .calendar-event-item {
  container: event / size;
}
@container event (max-height: 3rem) {
  .event-summary {
    row-gap: 0;
    line-height: var(--leading-tight);
  }
  .event-summary .event-title {
    -webkit-line-clamp: 1;
  }
  .event-summary .category-badge {
    display: none;
  }
}
@container event (max-height: 2.25rem) {
  .event-summary .event-title {
    grid-column: 2;
    grid-row: 1;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .event-summary .event-rooms {
    display: none;
  }
}
.event-card {
  position: absolute;
  pointer-events: none;
  width: var(--visually-hidden-size);
  height: var(--visually-hidden-size);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.calendar-view-container:not(.has-pinned)
  .calendar-event-item:hover
  > .event-card,
.calendar-event-item:focus-visible > .event-card,
.calendar-event-item:has(:focus-visible) > .event-card,
.calendar-event-item.is-pinned > .event-card {
  z-index: var(--z-menu);
  inset-block-start: 0;
  inset-inline-start: calc(100% + var(--space-xs));
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  width: var(--width-event-card);
  height: auto;
  padding: var(--space-sm);
  overflow: visible;
  clip-path: none;
  border: var(--rule-width) solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  box-shadow: var(--shadow-overlay);
  white-space: normal;
}
.calendar-event-item:has(:focus-visible) > .event-card,
.calendar-event-item.is-pinned > .event-card {
  pointer-events: auto;
}
.calendar-view-container.is-grid .calendar-event-item {
  cursor: pointer;
}
.event-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
}
.event-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.event-card .event-links {
  margin-block-start: var(--space-2xs);
  padding-block-start: var(--space-xs);
  border-block-start: var(--rule-width) solid var(--color-border-muted);
}
.event-card .event-links a {
  color: var(--color-text);
  font-size: var(--text-sm);
}
.event-summary .event-links,
.calendar-view-year .event-links {
  display: none;
}
.event-card-title {
  font-size: var(--text-base);
}
.event-card-title strong {
  font-weight: var(--weight-semibold);
}
.event-card-when {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.event-card-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2xs) var(--space-sm);
  margin: var(--space-2xs) 0 0;
  font-size: var(--text-sm);
}
.event-card-facts dt {
  color: var(--color-text-muted);
}
.event-card-facts dd {
  margin: 0;
}
.calendar-view-container.is-grid
  .day-section:nth-last-child(-n + 2 of .day-section)
  .event-card {
  inset-inline: auto calc(100% + var(--space-xs));
}
.calendar-view-container.is-grid .calendar-events-list > .current-time-marker {
  inset-block-start: calc(
    var(--calendar-offset) * var(--calendar-minute-height)
  );
}
}
@layer components {
.grades-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}
.grades-panel {
  margin-block-end: 0;
}
.grades-panel-empty {
  margin: 0;
  border-block-start: var(--rule-width) solid var(--color-border-muted);
  padding: var(--space-md);
  color: var(--color-text-muted);
}
.grades-page abbr {
  text-decoration: none;
  cursor: help;
}
.grades-summary-table {
  margin: 0;
  table-layout: fixed;
}
.grades-summary-table th:first-child {
  width: var(--width-summary-label);
}
.grades-summary-table th,
.grades-summary-table td {
  padding: var(--space-xs) var(--space-md) var(--space-xs) 0;
}
.grades-summary-table th:first-child {
  padding-inline-start: var(--space-md);
}
.grades-summary-table thead th {
  font-size: var(--text-xs);
}
.grades-summary-total > * {
  border-block-start: var(--rule-width) solid var(--color-border);
  font-weight: var(--weight-semibold);
}
.grades-summary-table td,
.grades-summary-table thead th:not(:first-child) {
  text-align: end;
  white-space: nowrap;
}
.grades-summary-table td {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.grades-summary-table tbody th {
  font-weight: var(--weight-semibold);
}
.grades-panel [data-empty-mark]:empty::before {
  content: attr(data-empty-mark);
  color: var(--color-text-faint);
  font-weight: var(--weight-normal);
}
.grades-needs-head {
  margin-block-start: var(--space-md);
}
.grades-needs .box-row {
  align-items: baseline;
  min-height: 0;
  font-size: var(--text-sm);
}
.needs-scope {
  flex: none;
  font-weight: var(--weight-semibold);
}
.needs-value {
  color: var(--color-text-muted);
  text-align: end;
}
.is-pass {
  color: var(--color-pass);
}
.is-fail {
  color: var(--color-fail);
}
.grades-table {
  margin: 0;
}
.grades-table th,
.grades-table td {
  padding: var(--space-xs) var(--space-md);
}
.grades-table td {
  border-block-end: 0;
  border-block-start: var(--rule-width) solid var(--color-border-muted);
}
.grades-table tbody tr:has(.grade-input:not([hidden])) {
  cursor: pointer;
}
.grades-table .grade-input {
  cursor: text;
}
.grades-table tbody tr:first-child > td {
  border-block-start: 0;
}
.grades-table tbody tr {
  height: var(--height-box-row);
}
.grades-table .col-module {
  min-width: 0;
}
.module-title {
  display: block;
}
.grades-table .col-coef,
.coef-list {
  display: none;
}
.grades-table .col-coef {
  width: var(--width-coef-column);
  padding-inline: var(--space-2xs);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.show-coefs .grades-table .col-coef {
  display: table-cell;
}
.coef-list {
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2xs) var(--space-xs);
  margin-block-start: var(--space-3xs);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}
.coef {
  white-space: nowrap;
}
.coef-unit,
.coef-sep {
  color: var(--color-text-faint);
}
.coef strong {
  font-weight: var(--weight-semibold);
}
.grades-table .grade-input {
  border-color: transparent;
  background: transparent;
}
.grades-table .grade-input:focus,
.grades-table .grade-input[aria-invalid="true"] {
  border-color: var(--color-field-border);
  background: var(--color-surface);
}
.grades-table .grade-input.is-pass,
.grades-table .grade-input.is-fail,
.grade-computed.is-pass,
.grade-computed.is-fail {
  font-weight: var(--weight-semibold);
}
@media (min-width: 75em) {
  .grades-layout {
    grid-template-columns: minmax(0, 1fr) var(--width-grades-panel);
  }
  .grades-panel {
    position: sticky;
    inset-block-start: calc(var(--topbar-height) + var(--space-lg));
    grid-column: 2;
    grid-row: 1;
  }
  #notes-content {
    grid-column: 1;
    grid-row: 1;
  }
}
.grades-page .privacy-notice {
  max-width: none;
  margin-block: 0 var(--space-lg);
}
.grades-band {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.grades-band .toggle-pill {
  flex: none;
}
.grades-actions {
  display: flex;
  gap: var(--space-xs);
}
.grades-backup,
.grades-toggles {
  display: contents;
}
@media (max-width: 59.99em) {
  .grades-band {
    flex-wrap: wrap;
  }
  .show-coefs .grades-table .col-coef {
    display: none;
  }
  .show-coefs .coef-list {
    display: flex;
  }
}
.grades-table .evaluation-row .col-module {
  padding-inline-start: var(--space-xl);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.evaluation-weight {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.grade-computed {
  display: inline-flex;
  vertical-align: middle;
  font-size: var(--control-font-size);
  align-items: center;
  justify-content: flex-end;
  width: var(--width-grade-input);
  min-height: var(--control-height);
  padding-inline: var(--space-sm);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semibold);
}
}
@layer components {
.data-box {
  margin-block-end: var(--space-xl);
}
.data-box > :not(.data-box-head) {
  border: var(--rule-width) solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  overflow: hidden;
}
.data-box-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--height-box-title);
  margin-block-end: var(--space-sm);
}
.data-box-head > h2,
.data-box-head > h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
}
.data-box-head.is-sub > h3 {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.data-box.is-sub {
  margin-block-end: var(--space-md);
}
.data-box-meta {
  padding: 0 var(--space-xs);
  border-radius: var(--radius-pill);
  background: var(--color-badge);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.data-box .table-card {
  margin: 0;
}
.data-box table {
  margin: 0;
}
.data-box th,
.data-box td {
  padding-block: var(--space-xs);
}
.data-box th:first-child,
.data-box td:first-child {
  padding-inline-start: var(--space-md);
}
.data-box th:last-child,
.data-box td:last-child {
  padding-inline-end: var(--space-md);
}
}
@layer components {
.site-main:has(.class-picker-page) {
  display: flex;
  flex-direction: column;
}
.class-picker-page {
  flex: 1;
  display: grid;
  place-items: center;
}
.class-picker {
  width: min(100%, var(--width-picker));
}
.picker-step + .picker-step {
  margin-block-start: var(--space-2xl);
}
.picker-progress {
  margin: 0 auto var(--space-2xs);
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  text-align: center;
}
.picker-title {
  margin: 0 0 var(--space-lg);
  font-size: var(--text-lg);
  text-align: center;
}
.picker-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--height-picker-option);
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-width) solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.picker-option-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}
.picker-option-label {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
.picker-option-meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.picker-chevron {
  color: var(--color-text-faint);
}
.picker-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin: 0 0 var(--space-md);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
}
html:not(.js-enabled) [data-step-panel="program"],
html:not(.js-enabled) .picker-back {
  display: none;
}
html.js-enabled .class-picker {
  display: grid;
}
html.js-enabled .class-picker > .picker-step {
  grid-area: 1 / 1;
  align-self: center;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(var(--picker-slide));
}
.class-picker.is-ready > .picker-step {
  transition:
    opacity var(--motion-slide),
    transform var(--motion-slide),
    visibility var(--motion-slide);
}
html.js-enabled .class-picker > [data-step-panel="program"] {
  transform: translateX(calc(-1 * var(--picker-slide)));
}
html.js-enabled .class-picker > .picker-step.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}
}
@layer states {
*:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-accent);
  outline-offset: var(--focus-ring-width);
  border-radius: var(--radius-control);
}
input[type="text"]:not([aria-invalid="true"]):focus-visible,
input[type="search"]:not([aria-invalid="true"]):focus-visible,
input[type="date"]:not([aria-invalid="true"]):focus-visible,
input[type="number"]:not([aria-invalid="true"]):focus-visible,
textarea:not([aria-invalid="true"]):focus-visible {
  outline-color: var(--color-field-focus);
}
button:disabled,
input:disabled,
select:disabled {
  opacity: var(--opacity-disabled);
  cursor: not-allowed;
}
[aria-invalid="true"] {
  outline: var(--focus-ring-width) solid var(--color-field-invalid);
  outline-offset: var(--focus-ring-width);
}
@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration: underline;
    text-underline-offset: var(--space-3xs);
  }
  .app-nav a:hover {
    text-decoration: none;
  }
  .app-nav a:not([aria-current="page"]):hover {
    background: var(--color-navbar-active);
    color: var(--color-navbar-text);
  }
  .picker-option:hover {
    border-color: var(--color-text-faint);
    background: var(--color-canvas);
    text-decoration: none;
  }
  .picker-option:hover .picker-chevron {
    color: var(--color-text);
  }
  .picker-back:hover {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: var(--space-3xs);
  }
  a.box-row:hover {
    background: var(--color-canvas);
    text-decoration: none;
  }
  tbody tr:hover {
    background: var(--color-canvas);
  }
  button:hover:not(:disabled):not(
      .heading-toggle-btn,
      .picker-back,
      .segmented button
    ),
  select:hover:not(:disabled):not(:focus):not([aria-invalid="true"]),
  input:hover:not(:disabled):not(:focus):not([aria-invalid="true"]),
  textarea:hover:not(:disabled):not(:focus):not([aria-invalid="true"]),
  .filter-form label:has(input):hover,
  .toggle-pill:has(input):hover,
  summary.btn:hover {
    border-color: var(--color-text-faint);
    background: var(--color-surface-hover);
    text-decoration: none;
  }
  .segmented .segmented-option:not([aria-pressed="true"]):hover {
    color: var(--color-text);
  }
  [data-shortcut]:hover::after,
  [data-shortcut]:focus-visible::after {
    content: attr(data-shortcut);
    position: absolute;
    inset-block-start: calc(100% + var(--space-2xs));
    inset-inline-start: 50%;
    z-index: var(--z-menu);
    padding: var(--space-3xs) var(--space-xs);
    border-radius: var(--radius-key);
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .filter-form label:has(input:checked):hover,
  .toggle-pill:has(input:checked):hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-hover);
  }
  .menu-list button:hover,
  .menu-list a:hover {
    background: var(--color-surface-hover);
    text-decoration: none;
  }
  .menu-list .menu-item-danger:hover {
    background: var(--color-danger-soft);
  }
  .cal-period:has(.filter-group-item:not([hidden])):hover {
    background: var(--color-surface-hover);
  }
  .btn.btn-primary:hover:not(:disabled),
  .display-menu:has(input:checked) > summary:hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-hover);
  }
  .btn.btn-danger:hover:not(:disabled) {
    border-color: var(--color-danger);
    background: var(--color-danger-soft);
    color: var(--color-danger);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
  }
}
html.js-enabled .has-filter-bar:not(.is-layout-ready) > .section-main,
html.js-enabled
  .has-filter-bar:not(.is-layout-ready)
  > .filter-bar
  > :is(#calendar-nav-bar, #calendar-controls, #filters-container) {
  visibility: hidden;
}
}
@layer responsive {
@media (max-width: 59.99em) {
  :root {
    --control-height: var(--touch-target);
    --control-font-size: var(--text-base);
  }
  select,
  input[type="text"],
  input[type="date"] {
    height: var(--control-height);
  }
  input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
  }
  select:focus-visible {
    outline: none;
  }
  .page-band {
    margin: calc(-1 * var(--space-lg)) calc(-1 * var(--page-gutter))
      var(--space-lg);
    width: auto;
    padding: var(--space-sm) var(--page-gutter);
    border-block-end: var(--rule-width) solid var(--color-border);
    background: var(--color-surface);
  }
  .calendar-view-week {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 39.99em) {
  .filter-group,
  .filter-group-scroll {
    grid-template-columns: 1fr;
  }
  .calendar-event-item {
    grid-template-columns: 1fr;
    gap: var(--space-2xs);
  }
}
@media (min-width: 60em) {
  .has-filter-bar > .filter-bar > #calendar-controls[hidden] {
    display: flex !important;
  }
  .has-filter-bar > .filter-bar > #filters-container[hidden] {
    display: block !important;
  }
  .filters-toggle {
    display: none;
  }
  .cal-period {
    min-height: var(--control-height);
    padding-inline: var(--space-xs);
    border-radius: var(--radius-control);
  }
  .cal-period:has(.filter-group-item[hidden]) .cal-period-caret {
    display: none;
  }
  .cal-period:has(input:focus-visible) {
    outline: var(--focus-ring-width) solid var(--color-field-focus);
    outline-offset: var(--focus-ring-width);
  }
  .cal-period #cal-date-input-group {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
  }
  .cal-period #cal-date-input {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    cursor: pointer;
  }
  .cal-period #cal-date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
  }
  .has-filter-bar .filter-form select[data-control] {
    display: none;
  }
  .filter-form .choice-trigger,
  .segmented {
    display: inline-flex;
  }
  .has-filter-bar > .filter-bar,
  .page-band {
    margin: calc(-1 * var(--space-lg)) calc(-1 * var(--page-gutter))
      var(--space-lg);
    padding: var(--space-sm) var(--page-gutter);
    border-block-end: var(--rule-width) solid var(--color-border-muted);
    background: var(--color-surface);
  }
  .has-filter-bar > .filter-bar {
    container: filter-bar / inline-size;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs) var(--space-md);
  }
  .has-filter-bar > .filter-bar > .filter-panel {
    flex: 1 1 auto;
    min-width: 0;
  }
  .has-filter-bar > .filter-bar > .calendar-nav-bar + .filter-panel {
    flex-basis: 0;
    justify-content: flex-end;
    min-width: auto;
  }
  .has-filter-bar .filter-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--space-xs);
  }
  .has-filter-bar .filter-group-scroll {
    flex: 1;
  }
  .calendar-nav-bar + .filter-form .filter-group-scroll {
    flex: none;
    flex-wrap: nowrap;
  }
  .calendar-nav-bar + .filter-form :is(.filter-group-reset, .results-count) {
    order: -2;
  }
  .calendar-nav-bar
    + .filter-form
    .filter-group-reset:has(button[hidden])
    + .results-count {
    display: none;
  }
  .has-filter-bar .reset-label {
    display: none;
  }
  @container filter-bar (max-width: 62rem) {
    .calendar-nav-bar + .filter-form .results-count {
      display: none;
    }
  }
  @container filter-bar (max-width: 57rem) {
    .display-menu .btn-label {
      display: none;
    }
  }
  .has-filter-bar .filter-form > :not(.filter-group-scroll) {
    flex: none;
    min-width: 0;
  }
  .has-filter-bar .filter-form > .filter-group-last {
    flex: 0 1 var(--width-toolbar-search);
    order: -1;
    min-width: var(--width-toolbar-search-min);
    margin-inline-end: var(--space-2xs);
  }
  .filter-form label:has(input:checked) .icon,
  .toggle-pill:has(input:checked) .icon {
    display: none;
  }
  .filter-form label:has(input:not(:checked)),
  .toggle-pill:has(input:not(:checked)) {
    border-style: dashed;
  }
  .has-filter-bar .results-count {
    display: flex;
    align-self: flex-start;
    align-items: center;
    min-height: var(--control-height);
    color: var(--color-text-faint);
  }
}
@media (min-width: 60em) and (max-width: 74.99em) {
  :root {
    --width-toolbar-search: var(--width-toolbar-search-compact);
  }
}

@media (min-width: 75em) {
  html {
    overscroll-behavior-y: none;
  }
  .app-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--width-app-sidebar);
  }
  .app-main {
    grid-column: 2;
  }
}

.app:has(:where(.page-band, .filter-bar > .filter-panel:not([hidden])))
  .app-topbar {
  border-block-end-color: transparent;
}
@media (min-width: 60em) {
  .app:has(:where(.filter-bar)) .app-topbar {
    border-block-end-color: transparent;
  }
}
html.is-scrolled .app-topbar {
  border-block-end-color: var(--color-border-muted);
}
}
@layer responsive {
.nav-agenda,
.nav-toggle,
.nav-class-chip,
.nav-close,
.app-backdrop {
  display: none;
}

@media (max-width: 74.99em) {
  .app {
    display: block;
  }
  .app-topbar {
    display: contents;
  }
  .app-topbar-main {
    position: sticky;
    inset-block-start: 0;
    z-index: var(--z-header);
    flex: none;
    min-height: var(--topbar-height);
    padding-inline: var(--page-gutter);
    background: var(--color-navbar);
    color: var(--color-navbar-text);
  }
  .app-breadcrumb {
    flex: 1;
  }
  .app-breadcrumb h1,
  .app-topbar-main > h1 {
    color: var(--color-navbar-text);
  }
  .app-breadcrumb a {
    color: var(--color-navbar-muted);
  }
  .app-breadcrumb li + li::before {
    color: var(--color-navbar-faint);
  }
  .app-topbar:has(.nav-class-chip)
    .app-breadcrumb
    li:first-child:not(:last-child) {
    display: none;
  }
  .app-topbar:has(.nav-class-chip) .app-breadcrumb li:nth-child(2)::before {
    content: none;
  }
  .feed-entry,
  .app-topbar-actions:not(:has(> :not(.feed-entry))) {
    display: none;
  }
  .nav-agenda {
    display: block;
  }
  .app-topbar-actions {
    padding: var(--space-xs) var(--page-gutter);
    border-block-end: var(--rule-width) solid var(--color-border-muted);
    background: var(--color-surface);
  }
  html.js-enabled .nav-burger,
  html.js-enabled .nav-close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: var(--touch-target);
    height: var(--touch-target);
    padding: 0;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--color-navbar-text);
  }
  html.js-enabled .nav-burger {
    margin-inline-start: calc(-1 * var(--space-sm));
  }
  html.js-enabled .nav-close {
    margin-inline-end: calc(-1 * var(--space-xs));
  }
  .nav-class-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    min-height: var(--height-box-title);
    padding: var(--space-2xs) var(--space-sm);
    border: var(--rule-width) solid var(--color-navbar-divider);
    border-radius: var(--radius-control);
    color: var(--color-navbar-text);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
  }
  .app-topbar .nav-toggle:hover,
  .app-sidebar .nav-close:hover {
    border-color: var(--color-navbar-divider);
    background: var(--color-navbar-active);
  }
  html.js-enabled .app-sidebar {
    display: none;
  }
  html.js-enabled .is-nav-open .app-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: var(--z-overlay);
    display: flex;
    width: var(--width-drawer);
  }
  html:not(.js-enabled) .app-sidebar {
    position: static;
    height: auto;
  }
  .app-sidebar-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-block-end: var(--space-xs);
  }
  .app-nav .app-nav-classes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2xs);
    padding-inline: var(--space-sm);
  }
  .app-nav-classes + .app-nav-classes {
    margin-block-start: var(--space-2xs);
  }
  .app-nav-classes + .app-nav-classes::before {
    content: none;
  }
  .app-nav-classes a {
    justify-content: center;
    padding-inline: 0;
    border: var(--rule-width) solid var(--color-navbar-divider);
  }
  .app-nav-classes a[aria-current="page"] {
    border-color: var(--color-highlight);
  }
  .app-backdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: var(--z-backdrop);
    display: block;
    background: var(--color-backdrop);
  }
  html.is-overlay-open {
    overflow: hidden;
  }
}
}
@layer responsive {
.filter-quick,
.filters-toggle {
  display: none;
}

@media (max-width: 59.99em) {
  html.js-enabled .filters-toggle {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: var(--control-height);
    min-height: var(--control-height);
    padding: 0;
    border: var(--rule-width) solid var(--color-field-border);
    border-radius: var(--radius-control);
    background: var(--color-inset);
    color: var(--color-text);
  }
  .filter-quick,
  .calendar-nav-bar:not([hidden]) {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-xs);
    margin: calc(-1 * var(--space-lg)) calc(-1 * var(--page-gutter))
      var(--space-lg);
    padding: var(--space-xs) var(--page-gutter);
    border-block-end: var(--rule-width) solid var(--color-border-muted);
    background: var(--color-surface);
  }
  .filter-quick-slot {
    display: flex;
    flex: 1;
    min-width: 0;
  }
  .filter-quick-slot .results-count {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    text-align: start;
  }
  .has-filter-bar select[data-control] {
    display: none;
  }
  html.js-enabled .segmented {
    display: flex;
    flex: none;
  }
  .cal-nav-center {
    display: grid;
    flex: 1;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-xs);
    min-width: 0;
  }
  .cal-nav-center button {
    width: var(--control-height);
    padding: 0;
  }
  .cal-nav-center #cal-next-btn {
    grid-column: 3;
    grid-row: 1;
  }
  .cal-period {
    display: contents;
  }
  .cal-period-caret {
    display: none;
  }
  .cal-period-heading {
    font-size: var(--text-base);
    text-align: center;
    white-space: normal;
  }
  .cal-nav-center #cal-prev-btn {
    grid-column: 1;
  }
  .cal-nav-center .cal-period-heading {
    grid-column: 2;
    grid-row: 1;
  }
}
}
@layer responsive {
.label-long,
.sheet-only,
.sheet-section-title,
.choice-trigger-default,
.choice-menu-head,
.sheet-head,
.sheet-apply,
.filter-mobile-slot {
  display: none;
}

@media (max-width: 59.99em) {
  html.js-enabled .filter-panel {
    display: none;
  }
  html.js-enabled .filter-panel.is-open {
    position: fixed;
    inset: auto 0 0;
    z-index: var(--z-overlay);
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: auto;
    max-height: var(--height-sheet);
    margin: 0;
    padding: var(--space-sm) var(--page-gutter)
      calc(var(--space-md) + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-overlay);
  }
  .filter-panel .filter-form,
  .filter-panel .filter-group-scroll,
  .filter-panel .filter-group-reset,
  .filter-panel .filter-mobile-slot,
  .filter-panel .display-options {
    display: contents;
  }
  .filter-panel .display-menu {
    display: none;
  }
  .sheet-head {
    display: flex;
    order: -5;
    align-items: center;
    justify-content: space-between;
  }
  .sheet-title {
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
  }
  .filter-panel .sheet-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target);
    min-height: var(--touch-target);
    margin-inline-end: calc(-1 * var(--space-sm));
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text);
  }
  .filter-panel .sheet-apply {
    display: flex;
    flex: none;
    order: 2;
    align-items: center;
    justify-content: center;
    min-height: var(--control-height);
    margin-block-start: var(--space-md);
    border: 0;
    border-radius: var(--radius-control);
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: var(--control-font-size);
    font-weight: var(--weight-semibold);
  }
  .filter-panel .filter-group-last {
    display: block;
    order: -4;
    margin-block: var(--space-xs) var(--space-sm);
  }
  .filter-panel .filter-group-last input {
    width: 100%;
  }
  .filter-panel .filter-field-title,
  .filter-panel .results-count,
  .filter-panel .label-short,
  .filter-panel .choice-trigger-key {
    display: none;
  }
  .filter-panel .label-long {
    display: inline;
  }
  .filter-panel .filter-group-item:not([hidden]),
  .filter-panel label:has(input),
  .filter-panel #cal-today-btn,
  .filter-panel .filter-group-reset button,
  .filter-panel .btn {
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    width: 100%;
    min-height: var(--touch-target);
    padding: var(--space-2xs) 0;
    border: 0;
    border-block-start: var(--rule-width) solid var(--color-border-muted);
    border-radius: 0;
    background: transparent;
    color: var(--color-text);
    font-size: var(--control-font-size);
    font-weight: var(--weight-normal);
  }
  .filter-panel .filter-group-item .filter-field-title {
    display: block;
    flex: 1;
  }
  .filter-panel #cal-view-select-group {
    order: -3;
  }
  .filter-panel #cal-date-input-group {
    order: -2;
  }
  .filter-panel #cal-today-btn {
    order: -1;
  }
  .filter-panel .filter-group-reset button {
    order: 1;
  }
  .filter-panel #cal-today-btn,
  .filter-panel .filter-group-reset button,
  .filter-panel .btn {
    justify-content: flex-start;
  }
  .filter-panel #cal-today-btn {
    font-weight: var(--weight-medium);
  }
  .filter-panel .filter-group-reset button {
    color: var(--color-text-muted);
  }
  .filter-panel .btn-danger {
    color: var(--color-danger);
  }
  .filter-panel label:has(input) {
    color: var(--color-text-muted);
  }
  .filter-panel label:has(input:checked) {
    color: var(--color-text);
  }
  .filter-panel label:has(input) .icon {
    order: 1;
    color: var(--color-text);
  }
  .filter-panel #cal-date-input {
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: end;
  }
  .filter-panel .segmented-option {
    padding-inline: var(--space-sm);
  }
  .filter-panel .choice-trigger {
    display: inline-flex;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-weight: var(--weight-normal);
  }
  .filter-panel .choice-trigger::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .filter-panel .choice-trigger[data-empty="true"] .choice-trigger-default {
    display: inline;
  }
  .filter-panel .choice-trigger .icon {
    transform: rotate(-90deg);
  }
  .filter-panel .choice-menu.menu-list {
    position: fixed;
    inset: auto 0 0;
    z-index: var(--z-raised);
    width: auto;
    height: var(--height-sheet);
    max-height: none;
    padding: var(--space-sm) var(--page-gutter) env(safe-area-inset-bottom);
    border: 0;
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    box-shadow: none;
  }
  .choice-menu-head {
    display: flex;
    flex: none;
  }
  .filter-panel .choice-menu-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    width: auto;
    min-height: var(--touch-target);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text);
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
  }
  .filter-panel .choice-menu-search-field {
    margin: var(--space-xs) 0 var(--space-sm);
  }
  .filter-panel .choice-menu-list {
    flex: 1;
    min-height: 0;
    padding: 0;
  }
  .filter-panel .choice-menu-group {
    margin-inline: 0;
  }
  .filter-panel .choice-menu-item {
    min-height: var(--touch-target);
    padding-inline: 0;
    border-block-start: var(--rule-width) solid var(--color-border-muted);
    border-radius: 0;
    font-size: var(--control-font-size);
  }
  .filter-panel .choice-menu-item .icon {
    order: 1;
    margin-inline-start: auto;
  }
  .sheet-section-title {
    display: block;
    flex: none;
    margin-block: var(--space-md) var(--space-2xs);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
  }
  .sheet-head + .filter-mobile-slot .sheet-section-title {
    margin-block-start: var(--space-xs);
  }
}
}
@layer responsive {
.grades-panel-toggle {
  display: none;
}

@media (max-width: 74.99em) {
  html.js-enabled .grades-panel-toggle:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: var(--control-height);
    padding: 0 var(--space-md);
    border: 0;
    border-block-start: var(--rule-width) solid var(--color-border-muted);
    border-radius: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
  }
  .grades-panel-toggle[aria-expanded="true"] .icon {
    transform: rotate(180deg);
  }
  html.js-enabled
    .grades-panel:not(.is-expanded)
    .grades-summary-table
    tbody
    tr:not(.grades-summary-total) {
    display: none;
  }
  .grades-panel:not(.is-expanded) .grades-summary-total > * {
    border-block-start: 0;
  }
  html.js-enabled .grades-panel:not(.is-expanded) .grades-needs-head,
  html.js-enabled .grades-panel:not(.is-expanded) .grades-needs {
    display: none;
  }
}

@media (max-width: 59.99em) {
  .grades-band,
  .search-key,
  .shortcuts-box {
    display: none;
  }
  .calendar-view-year .day-section,
  .module-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .module-fact {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
  }
  .module-fact:not(:has([data-past="false"])) {
    display: none;
  }
  .module-fact-label {
    flex: none;
    width: var(--width-module-fact-label);
  }
  .module-links {
    justify-content: flex-start;
    margin-block-start: var(--space-2xs);
  }
  .calendar-view-year .calendar-event-item {
    grid-template-columns: var(--width-time-range) minmax(0, 1fr);
    gap: var(--space-sm);
  }
  .order-slot {
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-sm);
  }
  .order-time {
    min-width: 0;
  }
  .order-classes {
    flex-basis: 100%;
    padding-inline-start: calc(var(--size-order-rank) + var(--space-sm));
  }
  .eval-link {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "day time icon"
      "delay delay icon"
      "module module icon"
      "badge badge icon";
    gap: var(--space-3xs) var(--space-sm);
    padding-block: var(--space-sm);
  }
  .eval-date {
    display: contents;
  }
  .eval-day {
    grid-area: day;
  }
  .eval-delay {
    grid-area: delay;
  }
  .eval-time {
    grid-area: time;
  }
  .eval-module {
    grid-area: module;
  }
  .eval-link .category-badge {
    grid-area: badge;
    margin-block-start: var(--space-2xs);
  }
  .eval-link .box-row-icon {
    grid-area: icon;
  }
  .grades-actions {
    flex: 1;
  }
  .grades-actions .filters-toggle {
    margin-inline-start: auto;
  }
}
}
@layer print {
@media print {
  :root {
    color-scheme: light;
    --color-canvas: var(--paper);
    --color-surface: var(--paper);
    --color-surface-hover: var(--paper);
    --color-inset: var(--paper);
    --color-text: var(--paper-ink);
    --color-text-muted: var(--paper-muted);
    --color-text-faint: var(--paper-muted);
    --color-border: var(--paper-rule);
    --color-border-muted: var(--paper-rule);
    --color-field-border: var(--paper-rule);
  }
  .app-sidebar,
  .app-topbar-actions,
  .app-footnote,
  .filter-form,
  .calendar-nav-bar,
  .heading-toggle-btn,
  .menu {
    display: none !important;
  }
  body,
  .app,
  .site-main,
  .page-container {
    width: 100%;
    max-width: none;
    padding: 0;
    background: var(--paper);
    color: var(--paper-ink);
  }
  table,
  tr,
  th,
  td {
    break-inside: avoid;
  }
}
}
@layer utilities {
.visually-hidden {
  position: absolute;
  width: var(--visually-hidden-size);
  height: var(--visually-hidden-size);
  padding: 0;
  margin: calc(-1 * var(--visually-hidden-size));
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden],
html:not(.js-enabled) .js-only {
  display: none !important;
}
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}
