/* CSU Lasam — component stylesheet. Load after tokens.css.
   Every value here is a token. No component declares a raw colour, size or radius. */

.csu-root {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface-base);
}

/* ---------- Focus ---------- */

.csu-btn:focus-visible,
.csu-input:focus-visible,
.csu-select:focus-visible,
.csu-textarea:focus-visible,
.csu-nav-item:focus-visible,
.csu-tab:focus-visible,
.csu-check:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.csu-on-brand .csu-btn:focus-visible,
.csu-on-brand a:focus-visible,
.csu-appbar .csu-btn:focus-visible {
  outline-color: var(--focus-ring-inverse);
}

/* ---------- Button ---------- */

.csu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out),
    border-color var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out),
    color var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out),
    box-shadow var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out),
    transform var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out);
}

.csu-btn--primary {
  background: var(--surface-brand);
  color: var(--ink-on-brand);
}
.csu-btn--primary:hover { background: var(--surface-brand-strong); }

.csu-btn--secondary {
  background: var(--surface-gold);
  color: var(--ink-on-gold);
}
.csu-btn--secondary:hover { background: var(--brand-gold-seal); }

.csu-btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.csu-btn--outline:hover {
  border-color: var(--border-brand);
  color: var(--ink-brand);
}

.csu-btn--ghost {
  background: transparent;
  color: var(--ink-brand);
}
.csu-btn--ghost:hover { background: var(--surface-brand-soft); }

.csu-btn--danger {
  background: var(--danger);
  color: var(--surface-base);
}

.csu-btn--sm {
  font-size: 11px;
  line-height: 14px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}

.csu-btn--lg {
  font-size: 15px;
  line-height: 24px;
  padding: var(--space-3) var(--space-6);
}

.csu-btn[disabled],
.csu-btn--disabled {
  background: var(--surface-sunken);
  color: var(--ink-subtle);
  border-color: var(--border);
  cursor: not-allowed;
}

/* ---------- Field ---------- */

.csu-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.csu-label {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.csu-label .csu-req { color: var(--danger); margin-left: var(--space-1); }

.csu-input,
.csu-select,
.csu-textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  background: var(--surface-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  width: 100%;
  box-sizing: border-box;
}

.csu-input::placeholder,
.csu-textarea::placeholder { color: var(--ink-subtle); }

.csu-input:focus,
.csu-select:focus,
.csu-textarea:focus { border-color: var(--border-brand); }

.csu-input[disabled],
.csu-select[disabled] {
  background: var(--surface-sunken);
  color: var(--ink-subtle);
  border-color: var(--border);
  cursor: not-allowed;
}

.csu-field--invalid .csu-input,
.csu-field--invalid .csu-select,
.csu-field--invalid .csu-textarea { border-color: var(--danger); }

.csu-help {
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-muted);
}

.csu-error {
  font-size: 12px;
  line-height: 16px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.csu-check {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  accent-color: var(--surface-brand);
}

/* ---------- Card ---------- */

.csu-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out),
    box-shadow var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out),
    transform var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out);
}

/* Only a card that is genuinely clickable reacts. A plain csu-card has the
   transition but no hover rule, so it never moves: a content card that lifts
   under the cursor promises a click that isn't there. */
.csu-card--link {
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.csu-card__eyebrow {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--space-2);
}

.csu-card__title {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}

.csu-card__body {
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-muted);
  margin: 0;
}

.csu-card__footer {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.csu-card--brand {
  background: var(--surface-brand);
  border-color: var(--surface-brand);
  color: var(--ink-on-brand);
}
.csu-card--brand .csu-card__title,
.csu-card--brand .csu-card__body,
.csu-card--brand .csu-card__eyebrow { color: var(--ink-on-brand); }

.csu-card--cacao {
  background: var(--surface-cacao-soft);
  border-color: var(--border);
}

.csu-card--stat .csu-card__value {
  font-size: 34px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-brand);
  margin: 0;
}

/* ---------- Badge ---------- */

.csu-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  color: var(--ink-muted);
  white-space: nowrap;
}

.csu-badge--success { background: var(--success-soft); color: var(--success); }
.csu-badge--warning { background: var(--warning-soft); color: var(--warning); }
.csu-badge--danger  { background: var(--danger-soft);  color: var(--danger); }
.csu-badge--info    { background: var(--info-soft);    color: var(--info); }
.csu-badge--brand   { background: var(--surface-brand-soft); color: var(--ink-brand); }

/* ---------- Alert ---------- */

.csu-alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.csu-alert__icon { flex: none; width: 20px; height: 20px; }

.csu-alert__title {
  font-size: 15px;
  line-height: 24px;
  font-weight: 600;
  margin: 0 0 var(--space-1);
  color: var(--ink);
}

.csu-alert__body {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
  margin: 0;
}

.csu-alert--success { background: var(--success-soft); border-color: var(--success); }
.csu-alert--success .csu-alert__icon { color: var(--success); }
.csu-alert--warning { background: var(--warning-soft); border-color: var(--warning); }
.csu-alert--warning .csu-alert__icon { color: var(--warning); }
.csu-alert--danger  { background: var(--danger-soft);  border-color: var(--danger); }
.csu-alert--danger .csu-alert__icon { color: var(--danger); }
.csu-alert--info    { background: var(--info-soft);    border-color: var(--info); }
.csu-alert--info .csu-alert__icon { color: var(--info); }

/* ---------- Table ---------- */

.csu-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-base);
  box-shadow: var(--shadow-sm);
}

.csu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 20px;
}

.csu-table th {
  text-align: left;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-raised);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.csu-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

.csu-table tbody tr:last-child td { border-bottom: 0; }
.csu-table tbody tr:hover td { background: var(--surface-raised); }
.csu-table tbody tr.csu-table__row--selected td { background: var(--surface-brand-soft); }
.csu-table .csu-num { text-align: right; font-variant-numeric: tabular-nums; }
.csu-table .csu-code { font-family: var(--font-mono); font-size: 13px; }

/* ---------- App bar ---------- */

.csu-appbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--surface-brand);
  color: var(--ink-on-brand);
  padding: var(--space-3) var(--space-5);
}

.csu-appbar__mark { flex: none; height: 40px; width: auto; display: block; }

.csu-appbar__titles { display: flex; flex-direction: column; min-width: 0; }

.csu-appbar__kicker {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.csu-appbar__title {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  margin: 0;
}

.csu-appbar__spacer { flex: 1 1 auto; }

.csu-appbar__rule { height: 4px; background: var(--surface-gold); }

/* ---------- Side nav ---------- */

.csu-sidenav {
  background: var(--surface-raised);
  border-right: 1px solid var(--border);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 232px;
}

.csu-sidenav__group {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: var(--space-3) var(--space-3) var(--space-1);
}

.csu-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.csu-nav-item:hover { background: var(--surface-sunken); color: var(--ink); }

.csu-nav-item--active {
  background: var(--surface-brand-soft);
  color: var(--ink-brand);
  border-left-color: var(--border-brand);
}

.csu-nav-item__count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
}

/* ---------- Logo lockup ---------- */

.csu-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.csu-lockup__mark { flex: none; display: block; width: auto; }

.csu-lockup__rule {
  width: 1px;
  align-self: stretch;
  background: var(--border);
}

.csu-lockup__text { display: flex; flex-direction: column; gap: var(--space-1); }

.csu-lockup__university {
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-brand);
  margin: 0;
}

.csu-lockup__campus {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}

/* ---------- Slide title ---------- */

.csu-slide {
  position: relative;
  background: var(--surface-brand);
  color: var(--ink-on-brand);
  border-radius: var(--radius-lg);
  padding: var(--space-12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
}

.csu-slide__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--space-2);
  background: var(--surface-gold);
}

.csu-slide__eyebrow {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-gold-light);
  margin: 0 0 var(--space-3);
}

.csu-slide__title {
  font-size: 44px;
  line-height: 46px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.csu-slide__sub {
  font-size: 17px;
  line-height: 28px;
  margin: var(--space-3) 0 0;
  opacity: 0.9;
}

.csu-slide__mark {
  position: absolute;
  top: var(--space-6);
  right: var(--space-12);
  height: 72px;
  width: auto;
}

/* ---------- Poster banner ---------- */

.csu-poster {
  position: relative;
  background: var(--cacao-deep);
  color: var(--ink-inverse);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-12);
  overflow: hidden;
  box-sizing: border-box;
}

.csu-poster__mark { height: 64px; width: auto; display: block; margin-bottom: var(--space-5); }

.csu-poster__title {
  font-size: 56px;
  line-height: 56px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--brand-gold);
  margin: 0;
}

.csu-poster__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.csu-poster__chip {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--cacao-light);
  color: var(--ink-inverse);
}

.csu-poster__pods {
  position: absolute;
  right: calc(var(--space-12) * -1);
  bottom: calc(var(--space-10) * -1);
  opacity: 0.5;
}

/* ---------- Hero ---------- */

.csu-hero {
  position: relative;
  overflow: hidden;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
  padding: var(--space-16) var(--space-10);
}

.csu-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.csu-hero__mark {
  height: 88px;
  width: auto;
  display: block;
  margin: 0 auto var(--space-6);
}

.csu-hero__eyebrow {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--space-3);
}

.csu-hero__title {
  font-size: 44px;
  line-height: 46px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-brand);
  margin: 0;
}

.csu-hero__lead {
  font-size: 17px;
  line-height: 28px;
  color: var(--ink-muted);
  margin: var(--space-4) auto 0;
  max-width: 560px;
}

.csu-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.csu-hero--brand {
  background: var(--surface-brand);
  border-bottom-color: var(--surface-gold);
  border-bottom-width: 4px;
  color: var(--ink-on-brand);
}
.csu-hero--brand .csu-hero__title { color: var(--ink-on-brand); }
.csu-hero--brand .csu-hero__eyebrow { color: var(--brand-gold-light); }
.csu-hero--brand .csu-hero__lead { color: var(--ink-on-brand); opacity: 0.9; }

/* Photograph behind a hero.
   The ground stays maroon and the picture is a texture on it — copy never sits
   directly on a photograph, which is the rule in the brand book. Two dials,
   both custom properties: --csu-photo-opacity is how much picture comes
   through, --csu-photo-scrim is how much maroon goes back over it. The
   defaults were chosen by measuring rendered contrast under the lead, the
   smallest type in the block, in both themes. */

.csu-hero--photo {
  background: var(--surface-brand);
  border-bottom: 4px solid var(--surface-gold);
  color: var(--ink-on-brand);
}

.csu-hero--photo .csu-hero__title { color: var(--ink-on-brand); }
.csu-hero--photo .csu-hero__eyebrow { color: var(--brand-gold-light); }
.csu-hero--photo .csu-hero__lead { color: var(--ink-on-brand); }

.csu-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--csu-photo-opacity, 0.55);
  mix-blend-mode: luminosity;
  z-index: 0;
  pointer-events: none;
}

/* ::after, not ::before: a pseudo-element placed after the children paints
   over the image, which is what a scrim has to do. */
.csu-hero--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--surface-brand-strong);
  opacity: var(--csu-photo-scrim, 0.55);
  pointer-events: none;
}

/* A photograph and the drifting rings together is two textures competing. */
.csu-hero--photo .csu-hero__rays { display: none; }

/* ---------- Section header ---------- */

.csu-section-head { max-width: 640px; margin: 0 0 var(--space-6); }

.csu-section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.csu-section-head__eyebrow {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--space-2);
}

.csu-section-head__title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.csu-section-head__lead {
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-muted);
  margin: var(--space-2) 0 0;
}

/* ---------- System tile ---------- */

.csu-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.csu-tile {
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out),
    box-shadow var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out),
    transform var(--csu-duration-hover, 120ms) var(--csu-ease, ease-out);
}

.csu-tile:hover {
  border-color: var(--border-brand);
  box-shadow: var(--shadow-md);
}

.csu-tile:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.csu-tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.csu-tile__abbr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--surface-brand);
  color: var(--ink-on-brand);
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.csu-tile__name {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}

.csu-tile__body {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
  margin: 0 0 var(--space-5);
}

.csu-tile__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.csu-tile__version {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-subtle);
}

.csu-tile__action {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  color: var(--link);
}

.csu-tile--inactive { background: var(--surface-sunken); }
.csu-tile--inactive .csu-tile__abbr { background: var(--surface-sunken); color: var(--ink-muted); border: 1px solid var(--border-strong); }
.csu-tile--inactive .csu-tile__action { color: var(--ink-subtle); }
.csu-tile--inactive:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }

/* ---------- Footer ---------- */

.csu-footer {
  background: var(--surface-brand);
  color: var(--ink-on-brand);
  border-top: 4px solid var(--surface-gold);
  padding: var(--space-12) var(--space-10) var(--space-6);
}

.csu-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: var(--space-10);
  max-width: 1040px;
  margin: 0 auto;
}

.csu-footer__brand { display: flex; align-items: center; gap: var(--space-4); }
.csu-footer__mark { height: 56px; width: auto; display: block; }
.csu-footer__name { font-size: 17px; line-height: 24px; font-weight: 700; margin: 0; }
.csu-footer__unit {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-gold-light);
  margin: var(--space-1) 0 0;
}

.csu-footer__heading {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-gold-light);
  margin: 0 0 var(--space-3);
}

.csu-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }

.csu-footer__link {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-on-brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.csu-footer__link:hover { border-bottom-color: var(--brand-gold-light); }
.csu-footer__link:focus-visible { outline: 2px solid var(--focus-ring-inverse); outline-offset: 2px; }

.csu-footer__contact { font-size: 13px; line-height: 20px; margin: 0; }

.csu-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: 1040px;
  margin: var(--space-10) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--surface-brand-strong);
  font-size: 12px;
  line-height: 16px;
}

.csu-footer__status { display: inline-flex; align-items: center; gap: var(--space-2); }

.csu-footer__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-gold-light);
  flex: none;
}

/* ---------- Motion ----------
   Durations and easings live here, not in tokens.json: this design-system format
   has no motion token family. Treat them as tokens anyway — never hard-code a
   duration in a page. Every rule below is switched off under
   prefers-reduced-motion at the end of this section. */

:root {
  --csu-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --csu-ease-ambient: ease-in-out;
  --csu-duration-enter: 420ms;
  --csu-stagger: 60ms;
  --csu-duration-ambient: 12s;
  --csu-duration-kenburns: 28s;
  --csu-duration-sheen: 4s;
  --csu-duration-cycle: 9s;
  --csu-duration-hover: 120ms;
  --csu-lift: -1px;
  --csu-lift-card: -2px;
  --csu-press: 1px;
}

/* Hover and press.
   Hover eases in over 120ms. Press does NOT: `transition-duration: 0s` on
   :active makes the control move the instant the mouse goes down, which is what
   makes a button feel connected to the finger — a transition on the way in
   reads as lag. It still eases back out on release.
   The lift is 1px on a button, 2px on a card. Anything larger makes an
   institutional portal feel like a toy. */

.csu-btn:hover:not([disabled]):not(.csu-btn--disabled) {
  transform: translateY(var(--csu-lift));
  box-shadow: var(--shadow-sm);
}

/* The :not() chain is carried through so this matches the specificity of the
   rule above; without it the shadow wins. */
.csu-btn--ghost:hover:not([disabled]):not(.csu-btn--disabled) { box-shadow: none; }

.csu-btn:active:not([disabled]):not(.csu-btn--disabled) {
  transform: translateY(var(--csu-press));
  box-shadow: none;
  transition-duration: 0s;
}

.csu-btn[disabled]:hover,
.csu-btn--disabled:hover {
  transform: none;
  box-shadow: none;
}

.csu-card--link:hover {
  transform: translateY(var(--csu-lift-card));
  box-shadow: var(--shadow-md);
  border-color: var(--border-brand);
}

.csu-card--link:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
  transition-duration: 0s;
}

.csu-card--link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.csu-tile:hover { transform: translateY(var(--csu-lift-card)); }

.csu-tile:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
  transition-duration: 0s;
}

/* An unreachable system does not react at all — the absence of feedback is the
   message. */
.csu-tile--inactive:hover,
.csu-tile--inactive:active {
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* Visually hidden, still read aloud. Use it to give a screen reader the full
   sentence where motion replaces words on screen. */
.csu-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Entrance — csu-hero--enter. Runs once. Elements keep their place in the
   layout the whole time, so the sign-in button is clickable from the first
   frame even while it is still fading up. */

@keyframes csu-rise {
  from { opacity: 0; transform: translateY(var(--space-3)); }
  to   { opacity: 1; transform: none; }
}

.csu-hero--enter .csu-hero__mark,
.csu-hero--enter .csu-hero__eyebrow,
.csu-hero--enter .csu-hero__title,
.csu-hero--enter .csu-hero__lead,
.csu-hero--enter .csu-hero__actions {
  animation: csu-rise var(--csu-duration-enter) var(--csu-ease) both;
}

.csu-hero--enter .csu-hero__eyebrow { animation-delay: var(--csu-stagger); }
.csu-hero--enter .csu-hero__title   { animation-delay: calc(var(--csu-stagger) * 2); }
.csu-hero--enter .csu-hero__lead    { animation-delay: calc(var(--csu-stagger) * 3); }
.csu-hero--enter .csu-hero__actions { animation-delay: calc(var(--csu-stagger) * 4); }

/* Seal rays — csu-hero--rays. Concentric rings behind the hero, echoing the
   light radiating from the torch in the seal. Decorative only: aria-hidden,
   never carries meaning, never sits under text at a contrast that competes. */

.csu-hero__rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1200px;
  height: 1200px;
  margin: -600px 0 0 -600px;
  pointer-events: none;
  color: var(--brand-gold-seal);
  opacity: 0.22;
  z-index: 0;
}

.csu-hero--brand .csu-hero__rays { color: var(--brand-gold-light); opacity: 0.16; }

@keyframes csu-drift {
  from { transform: rotate(-8deg) scale(1); }
  to   { transform: rotate(8deg) scale(1.1); }
}

.csu-hero--rays .csu-hero__rays {
  animation: csu-drift var(--csu-duration-ambient) var(--csu-ease-ambient) infinite alternate;
}

/* Ken Burns — csu-hero--kenburns. The ambient layer for a hero that has a
   photograph: the picture itself drifts instead of a pattern over it. The
   image is already object-fit: cover, so scaling up only ever crops inward —
   no edge can pull into frame. Scale and pan are deliberately small; the
   contrast behind the text was measured across the whole sweep, not just at
   rest. */

@keyframes csu-kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1.5%, -1%); }
}

.csu-hero--kenburns .csu-hero__photo {
  animation: csu-kenburns var(--csu-duration-kenburns) var(--csu-ease-ambient) infinite alternate;
  will-change: transform;
}

/* Sheen — csu-appbar__rule--sheen. A highlight crossing the gold band. */

@keyframes csu-sheen {
  0%        { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}

.csu-appbar__rule--sheen { position: relative; overflow: hidden; }

.csu-appbar__rule--sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, var(--brand-gold-light) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: csu-sheen var(--csu-duration-sheen) var(--csu-ease-ambient) infinite;
}

/* Rotator — cycling words. The visible words are aria-hidden; a .csu-sr span
   beside them carries the whole sentence for screen readers and for search.
   Sized by its widest word, so the line never reflows. */

.csu-rotator {
  display: inline-grid;
  vertical-align: bottom;
  /* The box is as wide as the LONGEST word, so the line never reflows as words
     change. Centring shares the leftover space either side of a shorter word
     instead of dumping it all after — and choosing words of similar length
     leaves almost none to share. */
  text-align: center;
}

.csu-rotator__word {
  grid-area: 1 / 1;
  opacity: 0;
  color: var(--ink-brand);
  font-weight: 600;
  /* `both` fills from the 0% keyframe during a word's delay, so words 2 and 3
     stay hidden before their turn — and it means the base opacity below only
     ever shows when the animation is not running at all. */
  animation: csu-cycle var(--csu-duration-cycle) var(--csu-ease) infinite both;
}

/* If animations never run — an old browser, a blocked stylesheet — the first
   word stays on screen rather than leaving a hole in the sentence. */
.csu-rotator__word:first-child { opacity: 1; }

/* Exactly three words. Delays are set by position, not by a custom property
   divided inside calc(): that form is not reliable everywhere, and when it
   fails every word animates at once and they pile on top of each other. */
.csu-rotator__word:nth-child(2) { animation-delay: calc(var(--csu-duration-cycle) / 3); }
.csu-rotator__word:nth-child(3) { animation-delay: calc(var(--csu-duration-cycle) / 3 * 2); }

/* On any maroon ground the word must leave ink-brand behind — dark maroon on
   maroon is invisible. */
.csu-hero--brand .csu-rotator__word,
.csu-hero--photo .csu-rotator__word { color: var(--brand-gold-light); }

@keyframes csu-cycle {
  0%            { opacity: 0; transform: translateY(0.3em); }
  4%, 29%       { opacity: 1; transform: none; }
  33%, 100%     { opacity: 0; transform: translateY(-0.3em); }
}

/* Reduced motion — everything above resolves to its finished state. */

@media (prefers-reduced-motion: reduce) {
  .csu-hero--enter .csu-hero__mark,
  .csu-hero--enter .csu-hero__eyebrow,
  .csu-hero--enter .csu-hero__title,
  .csu-hero--enter .csu-hero__lead,
  .csu-hero--enter .csu-hero__actions,
  .csu-hero--rays .csu-hero__rays,
  .csu-hero--kenburns .csu-hero__photo,
  .csu-appbar__rule--sheen::after,
  .csu-rotator__word {
    animation: none;
  }

  .csu-appbar__rule--sheen::after { display: none; }
  .csu-rotator__word { opacity: 0; transform: none; }
  .csu-rotator__word:first-child { opacity: 1; }

  /* Hover and press keep their colour, border and shadow changes — those are
     feedback, not motion, and removing them would leave controls feeling dead.
     Only the movement goes. */
  /* A media query adds no specificity, so these selectors must match the ones
     they override, :not() chains included. */
  .csu-btn:hover:not([disabled]):not(.csu-btn--disabled),
  .csu-btn:active:not([disabled]):not(.csu-btn--disabled),
  .csu-card--link:hover,
  .csu-card--link:active,
  .csu-tile:hover,
  .csu-tile:active {
    transform: none;
  }
}
