﻿:root {
    --blue-dark: #003057;
    --blue-mid:  #00629B;
    --blue-light:#0085CA;
    --bg:        #F4F6FB;
    --white:     #ffffff;
    --text:      #0A1628;
    --muted:     #5A6A85;
    --border:    rgba(0,98,155,0.13);

    --c-idle:       #ffffff;
    --c-idle-border:rgba(0,98,155,0.18);
    --c-hover:      #EBF4FB;
    --c-active:     #00629B;
    --c-active-text:#ffffff;
    --c-prereq:     #FFF3E0;
    --c-prereq-border:#F59200;
    --c-unlocks:    #E3F6EE;
    --c-unlocks-border:#1A8C5B;
    --c-done:       #E8F5E9;
    --c-done-border:#43A047;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root:not([data-palette]),
:root[data-palette='enhanced'] {
    --blue-dark: #112f55;
    --blue-mid: #245fb8;
    --blue-light: #38a2db;
    --teal-mid: #187e8f;
    --indigo-mid: #5d67d6;
    --amber-mid: #d39a31;
    --bg: #ecf2f8;
    --white: #ffffff;
    --text: #122235;
    --muted: #607086;
    --border: rgba(24, 84, 151, 0.14);
    --topbar-bg: rgba(255, 255, 255, 0.88);
    --topbar-border: rgba(24, 84, 151, 0.1);
    --topbar-shadow: 0 6px 22px rgba(14, 31, 54, 0.06);
    --sidebar-panel-bg: rgba(255, 255, 255, 0.92);
    --sidebar-panel-border: rgba(24, 84, 151, 0.14);
    --sidebar-panel-shadow: 0 24px 48px rgba(14, 31, 54, 0.12);
    --sidebar-current-bg: rgba(244, 248, 252, 0.96);
    --sidebar-current-border: rgba(24, 126, 143, 0.16);
    --sidebar-link-hover-bg: rgba(242, 247, 252, 0.96);
    --sidebar-link-hover-border: rgba(24, 126, 143, 0.2);
    --sidebar-icon-bg: rgba(24, 126, 143, 0.1);
    --sidebar-icon-border: rgba(24, 126, 143, 0.12);
    --sidebar-label: rgba(24, 126, 143, 0.76);
    --flow-header-bg: #112f55;
    --flow-header-subtext: rgba(226, 238, 252, 0.68);
    --controls-bg: rgba(255, 255, 255, 0.9);
    --controls-border: rgba(24, 84, 151, 0.1);
    --bottom-bar-bg: rgba(255, 255, 255, 0.92);
    --bottom-bar-border: rgba(24, 84, 151, 0.12);
    --tooltip-bg: #112f55;
    --tooltip-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    --scrollbar-track: rgba(36, 95, 184, 0.12);
    --scrollbar-thumb: rgba(36, 95, 184, 0.55);

    --c-idle: #ffffff;
    --c-idle-border: rgba(24, 84, 151, 0.18);
    --c-hover: #edf5fb;
    --c-active: #245fb8;
    --c-active-text: #ffffff;
    --c-prereq: #f9ede0;
    --c-prereq-border: #d38f2f;
    --c-unlocks: #e5f6f0;
    --c-unlocks-border: #208667;
    --c-done: #ebf7ef;
    --c-done-border: #49a075;
  }

:root[data-palette='legacy'] {
    --topbar-bg: rgba(255, 255, 255, 0.84);
    --topbar-border: rgba(0, 98, 155, 0.08);
    --topbar-shadow: 0 6px 22px rgba(0, 48, 87, 0.04);
    --sidebar-panel-bg: rgba(255, 255, 255, 0.9);
    --sidebar-panel-border: rgba(0, 98, 155, 0.12);
    --sidebar-panel-shadow: 0 24px 48px rgba(0, 48, 87, 0.12);
    --sidebar-current-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 252, 0.92) 100%);
    --sidebar-current-border: rgba(0, 98, 155, 0.12);
    --sidebar-link-hover-bg: rgba(255, 255, 255, 0.62);
    --sidebar-link-hover-border: rgba(0, 98, 155, 0.12);
    --sidebar-icon-bg: rgba(0, 133, 202, 0.1);
    --sidebar-icon-border: rgba(0, 98, 155, 0.08);
    --sidebar-label: rgba(0, 98, 155, 0.72);
    --flow-header-bg: var(--blue-dark);
    --flow-header-subtext: rgba(255, 255, 255, 0.5);
    --controls-bg: var(--white);
    --controls-border: var(--border);
    --bottom-bar-bg: var(--white);
    --bottom-bar-border: var(--border);
    --tooltip-bg: var(--blue-dark);
    --tooltip-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    --scrollbar-track: rgba(0, 98, 155, 0.12);
    --scrollbar-thumb: rgba(0, 98, 155, 0.55);
  }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 104px;
  }

  body.page-flow {
    --flow-sidebar-top: calc(92px + env(safe-area-inset-top));
    font-family: 'Open Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
  }

  body.page-flow.flow-embed-home .site-topbar,
  body.page-flow.flow-embed-home .page-sidebar-shell,
  body.page-flow.flow-embed-home .page-sidebar,
  body.page-flow.flow-embed-home .page-sidebar__mobile-trigger,
  body.page-flow.flow-embed-home .page-sidebar__backdrop {
    display: none !important;
  }

  body.page-flow.flow-embed-home .flow-header,
  body.page-flow.flow-embed-home .controls,
  body.page-flow.flow-embed-home .flow-scroll,
  body.page-flow.flow-embed-home .bottom-bar {
    padding-left: 40px;
  }

  body.page-flow.flow-embed-home .flow-next-step {
    display: none;
  }

  body.page-flow.flow-embed-home .flow-scrollbar-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .site-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) minmax(400px, 780px) minmax(max-content, 1fr);
    align-items: center;
    column-gap: 24px;
    padding: 22px 36px;
    background: var(--topbar-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--topbar-border);
    box-shadow: var(--topbar-shadow);
  }

  .site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    justify-self: start;
  }

  .site-brand-badge {
    position: relative;
    width: 40px;
    height: 50px;
    flex-shrink: 0;
  }

  .site-brand-mark {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(0, 48, 87, 0.12));
  }

  .site-brand-mark--dark {
    display: none;
  }

  .site-brand-lockup {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
  }

  .site-brand-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--blue-dark);
    letter-spacing: -0.5px;
    line-height: 1;
    text-transform: uppercase;
  }

  .site-brand-meta {
    font-family: Calibri, 'Open Sans', sans-serif;
    font-size: 11px;
    color: rgba(10, 22, 40, 0.62);
    font-style: italic;
    line-height: 1.2;
  }

  .topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    justify-content: flex-end;
    justify-self: end;
    margin-left: 0;
  }

  .topbar-sidebar-trigger {
    min-height: 40px;
    padding: 0 14px 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 98, 155, 0.16);
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue-dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }

  .topbar-sidebar-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 98, 155, 0.24);
    background: rgba(0, 98, 155, 0.05);
    box-shadow: 0 10px 22px rgba(0, 48, 87, 0.08);
  }

  .topbar-sidebar-trigger:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 3px;
  }

  .topbar-sidebar-trigger__icon {
    position: relative;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .topbar-sidebar-trigger__icon::before,
  .topbar-sidebar-trigger__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .topbar-sidebar-trigger__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .topbar-sidebar-trigger.is-active .topbar-sidebar-trigger__icon::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scaleX(0);
  }

  .site-topbar__search {
    position: relative;
    width: 100%;
    max-width: 680px;
    justify-self: center;
  }

  .topbar-link {
    padding: 11px 16px;
    border-radius: 999px;
    color: rgba(10, 22, 40, 0.62);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
  }

  .topbar-link:hover,
  .topbar-link[aria-current='page'] {
    color: var(--blue-dark);
    background: rgba(24, 126, 143, 0.08);
    border-color: rgba(24, 126, 143, 0.14);
  }

  body.page-flow.has-page-sidebar .flow-header {
    padding-left: 430px;
    transition: padding-left 0.24s ease;
  }

  body.page-flow.has-page-sidebar .controls,
  body.page-flow.has-page-sidebar .flow-scroll,
  body.page-flow.has-page-sidebar .bottom-bar,
  body.page-flow.has-page-sidebar .flow-next-step {
    padding-left: 430px;
    transition: padding-left 0.24s ease;
  }

  body.page-flow.has-page-sidebar .flow-scrollbar-shell {
    padding-left: 390px;
    padding-right: 40px;
    transition: padding-left 0.24s ease;
  }

  body.page-flow.page-sidebar-hidden .flow-header {
    padding-left: 40px;
  }

  body.page-flow.page-sidebar-hidden .controls,
  body.page-flow.page-sidebar-hidden .bottom-bar,
  body.page-flow.page-sidebar-hidden .flow-next-step {
    padding-left: 44px;
  }

  body.page-flow.page-sidebar-hidden .flow-scroll {
    padding-left: 40px;
  }

  body.page-flow.page-sidebar-hidden .flow-scrollbar-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .page-sidebar {
    position: fixed;
    top: var(--flow-sidebar-top);
    left: 24px;
    width: 344px;
    z-index: 40;
    transition: transform 0.24s ease, opacity 0.18s ease;
  }

  .page-sidebar__panel {
    max-height: calc(100vh - var(--flow-sidebar-top) - 24px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 22px 20px;
    border-radius: 24px;
    border: 1px solid var(--sidebar-panel-border);
    background: var(--sidebar-panel-bg);
    box-shadow: var(--sidebar-panel-shadow);
    backdrop-filter: blur(18px);
    overflow-y: auto;
  }

  .page-sidebar__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .page-sidebar__header-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  .page-sidebar__eyebrow,
  .page-sidebar__group-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sidebar-label);
  }

  .page-sidebar__title {
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--blue-dark);
  }

  .page-sidebar__toggle {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--sidebar-panel-border);
    background: rgba(244, 248, 252, 0.94);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 0;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }

  .page-sidebar__toggle:hover {
    border-color: var(--sidebar-link-hover-border);
    background: rgba(231, 239, 247, 0.98);
  }

  .page-sidebar__toggle-bar {
    position: absolute;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: var(--blue-dark);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .page-sidebar__toggle-bar:last-child {
    transform: rotate(90deg) scaleX(1);
  }

  .page-sidebar__toggle[aria-expanded='true'] .page-sidebar__toggle-bar:last-child {
    opacity: 0;
    transform: rotate(90deg) scaleX(0);
  }

  .page-sidebar__desc,
  .page-sidebar__current-meta,
  .page-sidebar__link-meta {
    font-size: 12px;
    line-height: 1.55;
    color: var(--muted);
  }

  .page-sidebar__current {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--sidebar-current-border);
    background: var(--sidebar-current-bg);
  }

  .page-sidebar__current-title,
  .page-sidebar__link-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--blue-dark);
  }

  .page-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .page-sidebar__group {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .page-sidebar__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .page-sidebar__spotlight {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--sidebar-current-border);
    background: var(--sidebar-current-bg);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .page-sidebar__spotlight:hover,
  .page-sidebar__spotlight.current {
    transform: translateY(-2px);
    border-color: var(--sidebar-link-hover-border);
    box-shadow: 0 16px 32px rgba(0, 48, 87, 0.12);
  }

  .page-sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 18px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
  }

  .page-sidebar__link:hover,
  .page-sidebar__link.current {
    background: var(--sidebar-link-hover-bg);
    border-color: var(--sidebar-link-hover-border);
    transform: translateX(2px);
  }

  .page-sidebar__spotlight-icon,
  .page-sidebar__icon,
  .page-sidebar__mobile-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--sidebar-icon-border);
    background: var(--sidebar-icon-bg);
  }

  .page-sidebar__spotlight-copy,
  .page-sidebar__link-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }

  .page-sidebar__spotlight-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sidebar-label);
  }

  .page-sidebar__spotlight-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--blue-dark);
  }

  .page-sidebar__spotlight-desc {
    font-size: 12px;
    line-height: 1.55;
    color: var(--muted);
  }

  .page-sidebar__spotlight-cta {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-mid);
  }

  .icon-svg {
    display: block;
    width: 24px;
    height: 24px;
  }

  .icon-svg--button {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .page-sidebar__mobile-trigger,
  .page-sidebar__backdrop {
    display: none;
  }

  .page-sidebar-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 160;
    max-width: 220px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--sidebar-panel-border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 36px rgba(0, 48, 87, 0.14);
    backdrop-filter: blur(16px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%) translateX(-8px);
    transition: opacity 0.14s ease, transform 0.14s ease;
  }

  .page-sidebar-tooltip[hidden] {
    display: none;
  }

  .page-sidebar-tooltip.is-visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  .page-sidebar-tooltip__title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--blue-dark);
  }

  .page-sidebar-tooltip__meta {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--muted);
  }

  body.page-flow.page-sidebar-hidden .page-sidebar {
    transform: translateX(calc(-100% - 32px));
    opacity: 0;
    pointer-events: none;
  }

  /* ── HEADER ─────────────────────────────── */
  .flow-header {
    background: var(--flow-header-bg);
    padding: 32px 40px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  .flow-header h1 {
    font-size: 27px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
  }

  .flow-header p {
    font-size: 15px;
    color: var(--flow-header-subtext);
    margin-top: 4px;
    font-weight: 300;
  }

  .legend {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
  }

  .legend-dot {
    width: 12px; height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
  }

  .legend-dot--default {
    background: #fff;
    border: 1.5px solid rgba(0,98,155,0.25);
  }

  .legend-dot--selected { background: #00629B; }

  .legend-dot--prereq {
    background: #FFF3E0;
    border: 1.5px solid #F59200;
  }

  .legend-dot--unlocks {
    background: #E3F6EE;
    border: 1.5px solid #1A8C5B;
  }

  .legend-dot--done {
    background: #E8F5E9;
    border: 1.5px solid #43A047;
  }

  /* ── CONTROLS ───────────────────────────── */
  .controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 44px;
    background: var(--controls-bg);
    border-bottom: 1px solid var(--controls-border);
    flex-wrap: wrap;
  }

  .controls label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.3px;
  }

  .flow-select {
    min-width: 240px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: var(--text);
    outline: none;
  }

  .flow-select:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(0, 133, 202, 0.14);
  }

  .btn-toggle {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
  }

  .btn-toggle.active, .btn-toggle:hover {
    background: var(--blue-mid);
    color: #fff;
    border-color: var(--blue-mid);
  }

  .sep { width: 1px; height: 20px; background: var(--border); }

  .info-bar {
    margin-left: auto;
    font-size: 14px;
    color: var(--muted);
    font-family: 'Open Sans', sans-serif;
  }

  /* ── GRID ───────────────────────────────── */
  .flow-scroll {
    overflow-x: auto;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    padding: 32px 40px 48px;
  }

  .flow-scroll::-webkit-scrollbar {
    height: 14px;
  }

  .flow-scroll::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
  }

  .flow-scroll::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid rgba(244, 246, 251, 0.9);
  }

  .flow-scroll::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--blue-mid) 72%, #0d2544 28%);
  }

  .flow-scrollbar-shell {
    position: sticky;
    bottom: var(--bottom-bar-height, 56px);
    z-index: 6;
    padding: 0 0 8px;
    background: linear-gradient(180deg, rgba(236, 242, 248, 0), var(--bg) 55%);
  }

  .flow-scrollbar {
    overflow-x: auto;
    overflow-y: hidden;
    height: 18px;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  }

  .flow-scrollbar-fill {
    height: 1px;
    min-width: 100%;
  }

  .flow-scrollbar::-webkit-scrollbar {
    height: 14px;
  }

  .flow-scrollbar::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
  }

  .flow-scrollbar::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid rgba(244, 246, 251, 0.9);
  }

  .flow-scrollbar::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--blue-mid) 72%, #0d2544 28%);
  }

  .flow-grid {
    display: grid;
    grid-template-columns: repeat(var(--period-count, 10), 184px);
    gap: 0;
    min-width: var(--grid-min-width, 1880px);
    position: relative;
  }

  /* period column */
  .period-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 8px;
    position: relative;
    z-index: 1;
  }

  .period-col::after {
    content: '';
    position: absolute;
    top: 48px; bottom: 0;
    right: 0;
    width: 1px;
    background: var(--border);
  }

  .period-col:last-child::after { display: none; }

  .period-label {
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--blue-mid);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0 4px 16px;
    text-align: center;
  }

  /* discipline card */
  .disc {
    background: var(--c-idle);
    border: 1.5px solid var(--c-idle-border);
    border-radius: 10px;
    padding: 12px 12px 11px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .12s, box-shadow .15s;
    position: relative;
    user-select: none;
  }

  .disc:hover {
    background: var(--c-hover);
    border-color: var(--blue-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(36, 95, 184, 0.14);
  }

  .disc.active {
    background: var(--c-active);
    border-color: var(--c-active);
    box-shadow: 0 4px 18px rgba(36, 95, 184, 0.35);
    transform: translateY(-1px);
  }

  .disc.prereq {
    background: var(--c-prereq);
    border-color: var(--c-prereq-border);
  }

  .disc.unlocks {
    background: var(--c-unlocks);
    border-color: var(--c-unlocks-border);
  }

  .disc.done {
    background: var(--c-done);
    border-color: var(--c-done-border);
    opacity: 0.85;
  }

  .disc.done .disc-name { text-decoration: line-through; opacity: 0.6; }

  .disc-code {
    font-family: 'Open Sans', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--blue-mid);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .disc.active .disc-code { color: rgba(255,255,255,0.65); }

  .disc-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .disc.active .disc-name { color: #fff; }

  .disc-credits {
    margin-top: 6px;
    font-size: 11px;
    color: var(--muted);
    font-family: 'Open Sans', sans-serif;
    overflow-wrap: anywhere;
  }

  .disc.active .disc-credits { color: rgba(255,255,255,0.55); }

  .disc-done-check {
    position: absolute;
    top: 7px; right: 8px;
    font-size: 11px;
    display: none;
  }

  .disc.done .disc-done-check { display: block; }

  /* ── TOOLTIP ─────────────────────────────── */
  .tooltip {
    position: fixed;
    background: var(--tooltip-bg);
    color: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 240px;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity .15s;
    box-shadow: var(--tooltip-shadow);
  }

  .tooltip.show { opacity: 1; }

  .tooltip-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
  }

  .tooltip-row {
    color: rgba(255,255,255,0.65);
    margin-top: 3px;
  }

  .tooltip-row span {
    color: #fff;
    font-weight: 500;
  }

  .tooltip-row--marking {
    margin-top: 6px;
    color: #7dd3a8;
  }

  @media (max-width: 900px) {
    .tooltip {
      display: none !important;
    }
  }

  /* ── SVG ARROWS ──────────────────────────── */
  .arrows-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 4;
  }

  .arrow-line {
    fill: none;
    stroke: rgba(0,133,202,0.18);
    stroke-width: 1.5;
    stroke-dasharray: 4 3;
    transition: stroke .15s, stroke-width .15s, opacity .15s;
  }

  .arrow-line.highlight-prereq {
    stroke: #f53500;
    stroke-width: 2;
    stroke-dasharray: none;
    opacity: 1;
  }

  .arrow-line.highlight-unlocks {
    stroke: #1A8C5B;
    stroke-width: 2;
    stroke-dasharray: none;
    opacity: 1;
  }

  .arrow-line.dimmed { opacity: 0.05; }

  /* ── BOTTOM BAR ──────────────────────────── */
  .bottom-bar {
    position: sticky;
    bottom: 0;
    z-index: 7;
    background: var(--bottom-bar-bg);
    border-top: 1px solid var(--bottom-bar-border);
    padding: 14px 44px;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    color: var(--muted);
  }

  .bottom-bar strong {
    color: var(--blue-mid);
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
  }

  .progress-bar {
    flex: 1;
    max-width: 300px;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    background: var(--blue-mid);
    border-radius: 3px;
    transition: width .3s ease;
    width: 0%;
  }

  .btn-reset {
    margin-left: auto;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
  }

  .btn-reset:hover { border-color: var(--blue-mid); color: var(--blue-mid); }

  .flow-next-step {
    padding: 28px 44px 56px;
  }

  .flow-next-step__panel {
    max-width: 980px;
    padding: 28px 30px;
    border: 1px solid var(--sidebar-panel-border);
    background: var(--sidebar-panel-bg);
    box-shadow: 0 18px 36px rgba(14, 31, 54, 0.08);
  }

  .flow-next-step__kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sidebar-label);
  }

  .flow-next-step__title {
    margin-top: 10px;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: var(--blue-dark);
  }

  .flow-next-step__text {
    margin-top: 12px;
    max-width: 760px;
    font-size: 15px;
    line-height: 1.72;
    color: var(--muted);
  }

  .flow-next-step .button-row {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .flow-next-step .button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 1px solid var(--blue-mid);
    background: var(--blue-mid);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  }

  .flow-next-step .button-primary:hover {
    transform: translateY(-1px);
  }

  @media (max-width: 1180px) {
    body.page-flow {
      --flow-sidebar-top: calc(80px + env(safe-area-inset-top));
    }

    body.page-flow.flow-embed-home .flow-header,
    body.page-flow.flow-embed-home .controls,
    body.page-flow.flow-embed-home .flow-scroll,
    body.page-flow.flow-embed-home .bottom-bar {
      padding-left: 24px;
    }

    body.page-flow.has-page-sidebar .flow-header,
    body.page-flow.has-page-sidebar .controls,
    body.page-flow.has-page-sidebar .flow-scroll,
    body.page-flow.has-page-sidebar .bottom-bar {
      padding-left: 40px;
    }

    body.page-flow.has-page-sidebar .flow-scrollbar-shell {
      padding-left: 0;
      padding-right: 0;
    }

    .page-sidebar {
      top: var(--flow-sidebar-top);
      left: 12px;
      bottom: 12px;
      width: min(340px, calc(100vw - 24px));
      transform: translateX(calc(-100% - 24px));
      transition: transform 0.24s ease;
      z-index: 140;
    }

    .page-sidebar__panel {
      height: 100%;
      max-height: none;
    }

    .page-sidebar__mobile-trigger {
      position: fixed;
      left: 16px;
      bottom: calc(22px + env(safe-area-inset-bottom));
      z-index: 145;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 46px;
      padding: 0 14px 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(0, 98, 155, 0.16);
      background: rgba(255, 255, 255, 0.94);
      color: var(--blue-dark);
      font-family: 'Open Sans', sans-serif;
      font-size: 13px;
      font-weight: 700;
      box-shadow: 0 18px 38px rgba(0, 48, 87, 0.16);
      backdrop-filter: blur(14px);
      cursor: pointer;
    }

    .page-sidebar__backdrop {
      position: fixed;
      inset: 0;
      display: block;
      opacity: 0;
      pointer-events: none;
      background: rgba(0, 26, 47, 0.36);
      transition: opacity 0.24s ease;
      z-index: 130;
    }

    body.page-flow.page-sidebar-open {
      overflow: hidden;
    }

    body.page-flow.page-sidebar-open .page-sidebar {
      transform: translateX(0);
    }

    body.page-flow.page-sidebar-open .page-sidebar__backdrop {
      opacity: 1;
      pointer-events: auto;
    }
  }

  @media (max-width: 900px) {
    .site-topbar {
      padding: 14px 18px;
      align-items: center;
      flex-direction: row;
      flex-wrap: wrap;
    }

    .topbar-nav {
      justify-content: flex-end;
    }

    .site-brand-meta {
      display: none;
    }

    .flow-header {
      padding: 24px 24px 20px;
    }

    .controls,
    .flow-scroll,
    .bottom-bar {
      padding-left: 24px;
      padding-right: 24px;
    }

    .info-bar {
      margin-left: 0;
      width: 100%;
    }

    .bottom-bar {
      flex-wrap: wrap;
    }

    .progress-bar {
      flex-basis: 100%;
      max-width: none;
    }

    .btn-reset {
      margin-left: 0;
    }
  }

  @media (max-width: 720px) {
    html {
      scroll-padding-top: 24px;
    }

    .site-topbar {
      position: static;
      padding: 10px 12px 12px;
      row-gap: 10px;
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .site-brand,
    .topbar-nav {
      grid-column: auto;
    }

    .site-brand {
      grid-row: 1;
    }

    .site-topbar__search {
      grid-column: 1 / -1;
      grid-row: 2;
    }

    .topbar-nav {
      grid-row: 1;
      width: auto;
      justify-self: end;
      align-self: start;
      gap: 0;
    }

    .topbar-link {
      display: none;
    }

    .flow-header {
      padding: 20px 16px 18px;
    }

    .flow-header h1 {
      font-size: 18px;
      line-height: 1.2;
    }

    .flow-header p {
      font-size: 12px;
      line-height: 1.5;
    }

    .legend {
      gap: 10px;
      margin-top: 14px;
      flex-wrap: nowrap;
      overflow-x: auto;
      padding-bottom: 4px;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }

    .legend::-webkit-scrollbar {
      display: none;
    }

    .legend-item {
      flex: 0 0 auto;
      white-space: nowrap;
      padding: 7px 10px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
    }

    .controls,
    .flow-scroll,
    .bottom-bar {
      padding-left: 16px;
      padding-right: 16px;
    }

    .controls {
      gap: 10px;
      padding-top: 12px;
      padding-bottom: 12px;
    }

    .controls label {
      width: 100%;
      font-size: 11px;
    }

    .flow-select {
      min-width: 0;
      width: 100%;
      padding: 10px 12px;
      font-size: 14px;
    }

    .btn-toggle,
    .btn-reset {
      min-height: 40px;
      font-size: 12px;
    }

    .btn-toggle {
      flex: 1 1 calc(50% - 6px);
      text-align: center;
    }

    #btn-arrows {
      flex-basis: 100%;
    }

    .sep {
      display: none;
    }

    .info-bar {
      order: 99;
      width: 100%;
      font-size: 11px;
      line-height: 1.5;
    }

    .flow-scroll {
      padding-top: 20px;
      padding-bottom: 24px;
      -webkit-overflow-scrolling: touch;
    }

    .flow-scrollbar-shell {
      display: none;
    }

    .flow-grid {
      grid-template-columns: repeat(var(--period-count, 10), 148px);
    }

    .period-col {
      padding: 0 6px;
    }

    .period-label {
      padding-bottom: 12px;
    }

    .disc {
      padding: 9px;
      border-radius: 10px;
    }

    .disc-name {
      font-size: 10.5px;
    }

    .bottom-bar {
      gap: 12px;
      padding-top: 10px;
      padding-bottom: calc(10px + env(safe-area-inset-bottom));
      font-size: 11px;
    }

    .progress-bar {
      order: 3;
    }

    .btn-reset {
      width: 100%;
    }
  }

  .theme-toggle {
    position: fixed;
    right: 20px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 120;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px 0 12px;
    border: 1px solid rgba(0, 98, 155, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue-dark);
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 38px rgba(0, 48, 87, 0.14);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  }

  .theme-toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 98, 155, 0.28);
    box-shadow: 0 22px 42px rgba(0, 48, 87, 0.18);
  }

  .theme-toggle:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 3px;
  }

  .theme-toggle__icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd56b 0%, #f4a617 100%);
    box-shadow: inset -3px -3px 0 rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
  }

  .theme-toggle[data-theme-current='dark'] .theme-toggle__icon {
    background: linear-gradient(135deg, #c1dbff 0%, #6aaeff 100%);
    box-shadow: inset -4px -4px 0 rgba(4, 10, 18, 0.28);
  }

  html[data-theme='dark'] body.page-flow {
    --bg: #07101a;
    --white: #0e1825;
    --text: #e8f3ff;
    --muted: #9db0c6;
    --border: rgba(97, 160, 206, 0.16);
    --c-idle: #0e1825;
    --c-idle-border: rgba(97, 160, 206, 0.22);
    --c-hover: #132437;
    --c-prereq: #312011;
    --c-prereq-border: #e7aa4b;
    --c-unlocks: #102d23;
    --c-unlocks-border: #2da56f;
    --c-done: #143121;
    --c-done-border: #66c374;
    background:
      radial-gradient(circle at top left, rgba(0, 133, 202, 0.14), transparent 24%),
      linear-gradient(180deg, #07101a 0%, #0b1521 100%);
  }

  html[data-theme='dark'] .site-topbar {
    background: rgba(6, 13, 22, 0.84);
    border-bottom-color: rgba(97, 160, 206, 0.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  }

  html[data-theme='dark'] .site-brand-text {
    color: #edf6ff;
  }

  html[data-theme='dark'] .site-brand-meta {
    color: #9db0c6;
  }

  html[data-theme='dark'] .site-brand-mark--light {
    display: none;
  }

  html[data-theme='dark'] .site-brand-mark--dark {
    display: block;
  }

  html[data-theme='dark'] .topbar-link {
    color: rgba(232, 243, 255, 0.7);
  }

  html[data-theme='dark'] .topbar-link:hover,
  html[data-theme='dark'] .topbar-link[aria-current='page'] {
    color: #edf6ff;
    background: rgba(0, 133, 202, 0.12);
    border-color: rgba(97, 160, 206, 0.16);
  }

  html[data-theme='dark'] .page-sidebar__panel {
    background: rgba(10, 20, 32, 0.9);
    border-color: rgba(97, 160, 206, 0.16);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
  }

  html[data-theme='dark'] .page-sidebar__title,
  html[data-theme='dark'] .page-sidebar__spotlight-title,
  html[data-theme='dark'] .page-sidebar__current-title,
  html[data-theme='dark'] .page-sidebar__link-title {
    color: #edf6ff;
  }

  html[data-theme='dark'] .page-sidebar__spotlight-desc,
  html[data-theme='dark'] .page-sidebar__desc,
  html[data-theme='dark'] .page-sidebar__current-meta,
  html[data-theme='dark'] .page-sidebar__link-meta {
    color: #9db0c6;
  }

  html[data-theme='dark'] .page-sidebar__eyebrow,
  html[data-theme='dark'] .page-sidebar__group-label,
  html[data-theme='dark'] .page-sidebar__spotlight-kicker,
  html[data-theme='dark'] .page-sidebar__spotlight-cta,
  html[data-theme='dark'] .page-sidebar__icon,
  html[data-theme='dark'] .page-sidebar__mobile-badge {
    color: #8fd4ff;
  }

  html[data-theme='dark'] .page-sidebar__toggle,
  html[data-theme='dark'] .page-sidebar__mobile-trigger {
    background: rgba(14, 27, 40, 0.92);
    color: #edf6ff;
    border-color: rgba(97, 160, 206, 0.2);
  }

  html[data-theme='dark'] .page-sidebar__toggle-bar {
    background: #edf6ff;
  }

  html[data-theme='dark'] .page-sidebar__spotlight,
  html[data-theme='dark'] .page-sidebar__current,
  html[data-theme='dark'] .page-sidebar__link {
    background: rgba(12, 24, 37, 0.72);
    border-color: rgba(97, 160, 206, 0.14);
  }

  html[data-theme='dark'] .page-sidebar__spotlight:hover,
  html[data-theme='dark'] .page-sidebar__link:hover,
  html[data-theme='dark'] .page-sidebar__link.current {
    background: rgba(15, 30, 46, 0.96);
    border-color: rgba(122, 191, 244, 0.24);
  }

  html[data-theme='dark'] .page-sidebar__spotlight-icon,
  html[data-theme='dark'] .page-sidebar__icon,
  html[data-theme='dark'] .page-sidebar__mobile-badge {
    background: rgba(0, 133, 202, 0.16);
    border-color: rgba(122, 191, 244, 0.2);
  }

  html[data-theme='dark'] .page-sidebar__backdrop {
    background: rgba(2, 9, 16, 0.58);
  }

  html[data-theme='dark'] .page-sidebar-tooltip {
    background: rgba(10, 20, 32, 0.96);
    border-color: rgba(97, 160, 206, 0.18);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  }

  html[data-theme='dark'] .page-sidebar-tooltip__title {
    color: #edf6ff;
  }

  html[data-theme='dark'] .page-sidebar-tooltip__meta {
    color: #9db0c6;
  }

  html[data-theme='dark'] .controls,
  html[data-theme='dark'] .bottom-bar {
    background: rgba(7, 15, 25, 0.94);
    backdrop-filter: blur(12px);
  }

  html[data-theme='dark'] .flow-next-step__panel {
    background: rgba(7, 15, 25, 0.92);
    border-color: rgba(106, 188, 243, 0.16);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  }

  html[data-theme='dark'] .flow-next-step__kicker {
    color: rgba(106, 188, 243, 0.78);
  }

  html[data-theme='dark'] .flow-next-step__title {
    color: #eef7ff;
  }

  html[data-theme='dark'] .flow-next-step__text {
    color: rgba(228, 237, 247, 0.78);
  }

  html[data-theme='dark'] .flow-next-step .button-primary {
    background: var(--blue-light);
    border-color: var(--blue-light);
    color: #031321;
  }

  html[data-theme='dark'] .flow-select,
  html[data-theme='dark'] .btn-toggle,
  html[data-theme='dark'] .btn-reset {
    background: #0f1b2a;
    color: var(--text);
    border-color: var(--border);
  }

  html[data-theme='dark'] .flow-select:focus {
    box-shadow: 0 0 0 3px rgba(0, 133, 202, 0.22);
  }

  html[data-theme='dark'] .btn-toggle.active,
  html[data-theme='dark'] .btn-toggle:hover {
    color: #fff;
  }

  html[data-theme='dark'] .legend-dot--default {
    background: var(--c-idle);
    border-color: var(--c-idle-border);
  }

  html[data-theme='dark'] .disc:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  }

  html[data-theme='dark'] .tooltip {
    background: #081623;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  }

  html[data-theme='dark'] .arrow-line {
    stroke: rgba(106, 188, 243, 0.2);
  }

  html[data-theme='dark'] .flow-scroll {
    scrollbar-color: rgba(106, 188, 243, 0.58) rgba(106, 188, 243, 0.14);
  }

  html[data-theme='dark'] .flow-scroll::-webkit-scrollbar-track {
    background: rgba(106, 188, 243, 0.14);
  }

  html[data-theme='dark'] .flow-scroll::-webkit-scrollbar-thumb {
    background: rgba(106, 188, 243, 0.58);
    border-color: rgba(7, 16, 26, 0.92);
  }

  html[data-theme='dark'] .flow-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 188, 243, 0.78);
  }

  html[data-theme='dark'] .flow-scrollbar-shell {
    background: linear-gradient(180deg, rgba(7, 16, 26, 0), rgba(7, 16, 26, 0.96) 55%);
  }

  html[data-theme='dark'] .flow-scrollbar {
    scrollbar-color: rgba(106, 188, 243, 0.58) rgba(106, 188, 243, 0.14);
  }

  html[data-theme='dark'] .flow-scrollbar::-webkit-scrollbar-track {
    background: rgba(106, 188, 243, 0.14);
  }

  html[data-theme='dark'] .flow-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(106, 188, 243, 0.58);
    border-color: rgba(7, 16, 26, 0.92);
  }

  html[data-theme='dark'] .flow-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 188, 243, 0.78);
  }

  html[data-theme='dark'] .theme-toggle {
    background: rgba(7, 15, 25, 0.9);
    color: #ecf5ff;
    border-color: rgba(95, 149, 190, 0.2);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  }

  @media (max-width: 720px) {
    .theme-toggle {
      right: 12px;
      bottom: calc(108px + env(safe-area-inset-bottom));
      min-height: 44px;
      padding: 0 12px 0 10px;
      font-size: 12px;
    }

    .theme-toggle__icon {
      width: 18px;
      height: 18px;
    }
  }

  @media (max-width: 1180px) {
    body.page-flow.has-page-sidebar .flow-next-step {
      padding-left: 40px;
    }
  }

  @media (max-width: 900px) {
    .flow-next-step {
      padding: 24px 24px 40px;
    }

    .flow-next-step__panel {
      padding: 24px;
    }

    .flow-next-step__title {
      font-size: 24px;
    }
  }

  @media (max-width: 720px) {
    .flow-next-step {
      padding: 20px 16px 28px;
    }

    .flow-next-step__panel {
      padding: 20px 18px;
    }

    .flow-next-step__kicker {
      font-size: 10px;
    }

    .flow-next-step__title {
      font-size: 20px;
    }

    .flow-next-step__text {
      font-size: 13px;
      line-height: 1.6;
    }

    .flow-next-step .button-primary {
      width: 100%;
      padding: 12px 14px;
      font-size: 12px;
    }
  }

  .topbar-nav .theme-toggle {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px 0 10px;
    border: 1px solid rgba(0, 98, 155, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue-dark);
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(14px);
    box-shadow: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  }

  .topbar-nav .theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 98, 155, 0.24);
    background: rgba(0, 98, 155, 0.05);
    box-shadow: 0 10px 22px rgba(0, 48, 87, 0.08);
  }

  .topbar-nav .theme-toggle:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 3px;
  }

  .topbar-nav .theme-toggle__icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd56b 0%, #f4a617 100%);
    box-shadow: inset -3px -3px 0 rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
  }

  .topbar-nav .theme-toggle[data-theme-current='dark'] .theme-toggle__icon {
    background: linear-gradient(135deg, #c1dbff 0%, #6aaeff 100%);
    box-shadow: inset -4px -4px 0 rgba(4, 10, 18, 0.28);
  }

  html[data-theme='dark'] .topbar-nav .theme-toggle {
    background: rgba(14, 27, 40, 0.92);
    color: #ecf5ff;
    border-color: rgba(95, 149, 190, 0.2);
    box-shadow: none;
  }

  html[data-theme='dark'] .topbar-nav .theme-toggle:hover {
    background: rgba(18, 38, 58, 0.94);
    border-color: rgba(122, 191, 244, 0.28);
  }

  html[data-theme='dark'] .topbar-sidebar-trigger {
    background: rgba(14, 27, 40, 0.92);
    color: #ecf5ff;
    border-color: rgba(95, 149, 190, 0.2);
    box-shadow: none;
  }

  html[data-theme='dark'] .topbar-sidebar-trigger:hover {
    background: rgba(18, 38, 58, 0.94);
    border-color: rgba(122, 191, 244, 0.28);
  }

  @media (max-width: 900px) {
    .topbar-nav .theme-toggle__label {
      display: none;
    }

    .topbar-nav .theme-toggle {
      min-height: 38px;
      padding: 0 10px;
    }
  }

  .flow-search {
    position: relative;
  }

  .flow-search--topbar {
    padding: 0;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .flow-search__eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
  }

  .flow-search__field {
    position: relative;
    min-width: 0;
    width: 100%;
  }

  .flow-search__icon {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 98, 155, 0.56);
    border-radius: 50%;
    transform: translateY(-58%);
    pointer-events: none;
  }

  .flow-search__icon::after {
    content: '';
    position: absolute;
    right: -5px;
    bottom: -2px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: rgba(0, 98, 155, 0.56);
    transform: rotate(45deg);
    transform-origin: center;
  }

  .flow-search__input {
    width: 100%;
    min-height: 52px;
    padding: 0 96px 0 52px;
    border-radius: 999px;
    border: 1px solid rgba(0, 98, 155, 0.14);
    background: rgba(246, 250, 254, 0.96);
    color: var(--text);
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }

  .flow-search__input::placeholder {
    color: rgba(90, 106, 133, 0.72);
  }

  .flow-search__input:focus {
    border-color: rgba(0, 133, 202, 0.42);
    box-shadow: 0 0 0 4px rgba(0, 133, 202, 0.12);
    background: var(--white);
  }

  .flow-search__clear {
    position: absolute;
    top: 50%;
    right: 12px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(0, 98, 155, 0.14);
    border-radius: 999px;
    background: var(--white);
    color: var(--blue-dark);
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transform: translateY(-50%);
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  }

  .flow-search__clear:hover {
    border-color: rgba(0, 98, 155, 0.22);
    background: rgba(0, 98, 155, 0.05);
    transform: translateY(-50%) translateY(-1px);
  }

  .flow-search-results {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 98, 155, 0.14);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 40px rgba(0, 48, 87, 0.12);
    max-height: min(56vh, 440px);
    overflow-y: auto;
  }

  .flow-search-results[hidden] {
    display: none;
  }

  .flow-search-result,
  .flow-search-results__empty {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: rgba(235, 244, 251, 0.86);
    text-align: left;
  }

  .flow-search-result {
    display: grid;
    gap: 4px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  }

  .flow-search-result:hover {
    border-color: rgba(0, 98, 155, 0.18);
    background: #ffffff;
    transform: translateY(-1px);
  }

  .flow-search-result.is-active {
    border-color: rgba(0, 98, 155, 0.22);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 10px 24px rgba(0, 48, 87, 0.08);
  }

  .flow-search-result__eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(0, 98, 155, 0.72);
  }

  .flow-search-result__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--blue-dark);
  }

  .flow-search-result__meta,
  .flow-search-results__empty {
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
  }

  .flow-search-result__snippet {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(10, 22, 40, 0.72);
  }

  .disc-search-active {
    outline: 2px solid rgba(0, 133, 202, 0.36);
    outline-offset: 4px;
    box-shadow: 0 16px 34px rgba(0, 98, 155, 0.14);
  }

  html[data-theme='dark'] .flow-search {
    background: transparent;
  }

  html[data-theme='dark'] .flow-search__input {
    background: rgba(12, 27, 43, 0.84);
    border-color: rgba(88, 153, 194, 0.18);
    color: #edf6ff;
  }

  html[data-theme='dark'] .flow-search__icon {
    border-color: rgba(143, 212, 255, 0.68);
  }

  html[data-theme='dark'] .flow-search__icon::after {
    background: rgba(143, 212, 255, 0.68);
  }

  html[data-theme='dark'] .flow-search__input::placeholder {
    color: #9eb2c8;
  }

  html[data-theme='dark'] .flow-search__input:focus {
    border-color: rgba(102, 183, 236, 0.34);
    box-shadow: 0 0 0 4px rgba(0, 133, 202, 0.16);
    background: rgba(14, 31, 49, 0.94);
  }

  html[data-theme='dark'] .flow-search__clear {
    background: rgba(7, 15, 25, 0.9);
    border-color: rgba(95, 149, 190, 0.2);
    color: #ecf5ff;
  }

  html[data-theme='dark'] .flow-search__clear:hover {
    background: rgba(14, 31, 49, 0.94);
    border-color: rgba(122, 191, 244, 0.28);
  }

  html[data-theme='dark'] .flow-search-results {
    background: rgba(8, 22, 35, 0.98);
    border-color: rgba(95, 149, 190, 0.2);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
  }

  html[data-theme='dark'] .flow-search-result,
  html[data-theme='dark'] .flow-search-results__empty {
    background: rgba(12, 27, 43, 0.78);
  }

  html[data-theme='dark'] .flow-search-result:hover {
    background: rgba(14, 31, 49, 0.94);
    border-color: rgba(102, 183, 236, 0.24);
  }

  html[data-theme='dark'] .flow-search-result.is-active {
    background: rgba(18, 38, 58, 0.98);
    border-color: rgba(122, 191, 244, 0.28);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  }

  html[data-theme='dark'] .flow-search-result__eyebrow {
    color: #8fd4ff;
  }

  html[data-theme='dark'] .flow-search-result__title {
    color: #edf6ff;
  }

  html[data-theme='dark'] .flow-search-result__meta,
  html[data-theme='dark'] .flow-search-results__empty {
    color: #9eb2c8;
  }

  html[data-theme='dark'] .flow-search-result__snippet {
    color: #c5d7ea;
  }

  html[data-theme='dark'] .disc-search-active {
    outline-color: rgba(106, 188, 243, 0.44);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  }

  @media (max-width: 900px) {
    .site-topbar {
      padding: 14px 18px;
      grid-template-columns: 1fr auto;
      row-gap: 12px;
    }

    .site-topbar__search {
      grid-column: 1 / -1;
      max-width: none;
    }
  }

  @media (max-width: 720px) {
    .site-topbar {
      grid-template-columns: minmax(0, 1fr) auto;
      column-gap: 10px;
      row-gap: 10px;
    }

    .site-brand {
      grid-column: 1;
      grid-row: 1;
      min-width: 0;
      max-width: 100%;
      padding-right: 6px;
    }

    .site-brand-lockup {
      min-width: 0;
      overflow: hidden;
    }

    .site-brand-text {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .site-brand-meta {
      display: none;
    }

    .topbar-nav {
      grid-column: 2;
      grid-row: 1;
      justify-self: end;
      align-self: start;
      gap: 0;
      flex-wrap: nowrap;
      max-width: 100%;
    }

    .topbar-nav .topbar-link,
    .topbar-nav .topbar-sidebar-trigger {
      display: none;
    }

    .site-topbar__search {
      grid-column: 1 / -1;
      grid-row: 2;
    }
  }

  @media (max-width: 640px) {
    .flow-search__input {
      min-height: 44px;
      padding-right: 82px;
    }

    .flow-search__clear {
      min-height: 32px;
      padding: 0 10px;
    }

  }

  @media (min-width: 721px) {
    html {
      scroll-padding-top: 96px;
    }

    .site-topbar {
      padding: 18px 28px;
      grid-template-columns: minmax(max-content, 1fr) minmax(360px, 700px) minmax(max-content, 1fr);
    }

    .site-brand-badge {
      width: 36px;
      height: 44px;
    }

    .site-brand-text {
      font-size: 20px;
    }

    .site-brand-meta {
      font-size: 10px;
    }

    .topbar-link {
      padding: 10px 14px;
      font-size: 12px;
    }

    .topbar-nav .theme-toggle {
      min-height: 38px;
      padding: 0 10px 0 8px;
      font-size: 12px;
    }

    .site-topbar__search {
      max-width: 580px;
    }

    .flow-search__input {
      min-height: 48px;
      padding: 0 88px 0 48px;
      font-size: 14px;
    }

    .flow-search__clear {
      min-height: 34px;
      padding: 0 12px;
      font-size: 11px;
    }

    .page-sidebar {
      width: 320px;
    }

    .page-sidebar__panel {
      padding: 20px 18px 18px;
    }

    .page-sidebar__title {
      font-size: 22px;
    }

    .flow-header {
      padding: 26px 32px 22px;
    }

    .flow-header h1 {
      font-size: 23px;
    }

    .flow-header p {
      font-size: 14px;
    }

    .legend {
      gap: 18px;
      margin-top: 16px;
    }

    .legend-item {
      font-size: 13px;
    }

    .controls {
      gap: 14px;
      padding: 14px 32px;
    }

    .controls label,
    .info-bar {
      font-size: 13px;
    }

    .flow-select {
      min-width: 220px;
      padding: 9px 12px;
      font-size: 11px;
    }

    .btn-toggle {
      padding: 7px 14px;
      font-size: 11px;
    }

    .flow-scroll,
    .bottom-bar {
      padding-left: 32px;
      padding-right: 32px;
    }

    .flow-scroll {
      padding-top: 28px;
      padding-bottom: 40px;
    }

    .flow-grid {
      grid-template-columns: repeat(var(--period-count, 10), 168px);
      min-width: var(--grid-min-width, 1720px);
    }

    .period-col {
      padding: 0 7px;
    }

    .period-label {
      font-size: 10px;
      padding-bottom: 14px;
    }

    .disc {
      padding: 10px 10px 9px;
      margin-bottom: 9px;
    }

    .disc-code {
      font-size: 9px;
    }

    .disc-name {
      font-size: 12px;
    }

    .disc-credits {
      font-size: 10px;
    }

    .bottom-bar {
      font-size: 12px;
      padding-top: 12px;
      padding-bottom: 12px;
    }

    .btn-reset {
      font-size: 12px;
    }
  }
