:root {
  --paper: #f7f0df;
  --paper-light: #fffbf2;
  --paper-deep: #eadcc0;
  --ink: #092f59;
  --ink-deep: #051f3d;
  --text: #293944;
  --muted: #6f746f;
  --gold: #b9842d;
  --gold-light: #e2bd73;
  --line: #dbc8a4;
  --line-soft: rgba(151, 119, 65, .2);
  --green: #197454;
  --orange: #ca6419;
  --red: #8c2632;
  --shadow-sm: 0 7px 22px rgba(40, 37, 29, .08);
  --shadow-md: 0 22px 60px rgba(34, 31, 24, .14);
  --shadow-lg: 0 34px 90px rgba(8, 30, 49, .23);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 13% 0%, rgba(185, 132, 45, .16), transparent 32rem),
    radial-gradient(circle at 93% 32%, rgba(8, 96, 119, .09), transparent 30rem),
    linear-gradient(135deg, #e9dcc0, #f8f1e3 46%, #ebdfca);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

body.is-dialog-open,
body.is-drawer-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  width: min(1600px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  border: 1px solid rgba(176, 126, 43, .58);
  outline: 4px double rgba(176, 126, 43, .4);
  background:
    linear-gradient(rgba(255, 251, 242, .94), rgba(247, 240, 223, .96)),
    repeating-linear-gradient(0deg, transparent, transparent 5px, rgba(95, 71, 31, .018) 6px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(238px, 1fr) auto minmax(205px, .65fr) auto;
  align-items: center;
  gap: 24px;
  padding: 10px 26px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .045), transparent 25%),
    var(--ink-deep);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 8px 30px rgba(5, 31, 61, .2);
}

.brand,
.profile-button,
.round-button,
.nav-link {
  border: 0;
  color: inherit;
  background: transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(226, 189, 115, .09);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold-light);
  transform: rotate(45deg);
}

.brand-mark::before {
  left: -4px;
}

.brand-mark::after {
  right: -4px;
}

.brand-mark i {
  color: var(--gold-light);
  font: normal 700 27px Georgia, "Times New Roman", serif;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font: 700 23px Georgia, "Times New Roman", serif;
  letter-spacing: .02em;
}

.brand-copy small {
  margin-top: 1px;
  color: #bed0df;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.primary-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 3px;
}

.nav-link {
  position: relative;
  padding: 0 14px;
  color: #c2d0dc;
  font-size: 13px;
  font-weight: 700;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-light);
  transform: scaleX(0);
  transition: transform .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 12px;
  color: var(--ink-deep);
  background: var(--gold-light);
  font-size: 10px;
}

.header-progress {
  min-width: 160px;
}

.header-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #b9cad9;
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.header-progress strong {
  color: #fff;
}

.progress-line {
  display: block;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, .15);
}

.progress-line i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width .35s ease;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  color: #c8d6e1;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.sync-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7adb2;
  box-shadow: 0 0 0 3px rgba(167, 173, 178, .13);
}

.sync-indicator[data-state="syncing"] i,
.sync-indicator[data-state="connecting"] i {
  background: var(--gold-light);
  animation: syncPulse 1s ease-in-out infinite;
}

.sync-indicator[data-state="synced"] i {
  background: #63c49f;
  box-shadow: 0 0 0 3px rgba(99, 196, 159, .13);
}

.sync-indicator[data-state="error"] i {
  background: #ee7b79;
  box-shadow: 0 0 0 3px rgba(238, 123, 121, .13);
}

.teacher-entry {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(226, 189, 115, .42);
  border-radius: 8px;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.teacher-entry:hover {
  color: var(--ink-deep);
  background: var(--gold-light);
}

@keyframes syncPulse {
  50% { opacity: .45; transform: scale(.82); }
}

.round-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
  color: #d7e2eb;
  font-size: 11px;
  font-weight: 800;
}

.round-button:hover {
  color: var(--ink-deep);
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.profile-button {
  min-width: 148px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 7px;
  border-radius: 12px;
  text-align: left;
}

.profile-button:hover {
  background: rgba(255, 255, 255, .08);
}

.avatar {
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-deep);
  background: linear-gradient(145deg, #f0d08c, var(--gold));
  font-weight: 800;
}

.profile-button small,
.profile-button strong {
  display: block;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-button small {
  color: #aebfce;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.profile-button strong {
  margin-top: 1px;
  color: #fff;
  font-size: 12px;
}

.view {
  min-height: calc(100vh - 110px);
}

.hero {
  position: relative;
  min-height: 232px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 25px;
  padding: 38px clamp(24px, 4vw, 64px) 30px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 250, 240, .18)),
    radial-gradient(circle at 50% -70%, rgba(185, 132, 45, .14), transparent 58%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 13px;
  width: 64px;
  height: 14px;
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  opacity: .65;
}

.hero::before {
  left: 20px;
}

.hero::after {
  right: 20px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1120px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1110px;
  margin: 8px 0 10px;
  color: var(--ink);
  font: 700 clamp(30px, 3.3vw, 54px)/1.07 Georgia, "Times New Roman", serif;
  letter-spacing: -.028em;
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  font: italic 17px Georgia, "Times New Roman", serif;
}

.hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 215px;
}

.primary-button,
.dark-button,
.ghost-button {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-button,
.dark-button {
  border: 1px solid var(--ink);
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(9, 47, 89, .17);
}

.primary-button:hover,
.dark-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 24px rgba(9, 47, 89, .23);
}

.primary-button span,
.dark-button span {
  float: right;
  margin-left: 16px;
}

.primary-button.compact {
  padding: 10px 14px;
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, .48);
}

.ghost-button:hover {
  background: #fff;
  border-color: var(--gold);
}

.music-staff {
  position: absolute;
  color: rgba(185, 132, 45, .22);
  pointer-events: none;
}

.music-staff-left {
  right: 7%;
  top: 28px;
  width: 240px;
  height: 94px;
  border-block: 1px solid rgba(185, 132, 45, .18);
}

.music-staff-left::before,
.music-staff-left::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  border-top: 1px solid rgba(185, 132, 45, .18);
}

.music-staff-left::before {
  top: 31px;
}

.music-staff-left::after {
  top: 62px;
}

.music-staff i {
  position: absolute;
  left: 5px;
  top: -18px;
  font: normal 72px Georgia, serif;
}

.music-staff span,
.music-staff b {
  position: absolute;
  font: normal 28px Georgia, serif;
}

.music-staff span {
  left: 110px;
  top: 11px;
}

.music-staff b {
  right: 12px;
  top: 40px;
}

.route-overview {
  padding: 28px clamp(18px, 3.1vw, 46px) 10px;
}

.section-heading,
.panel-heading,
.subpage-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2,
.panel-heading h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font: 700 clamp(24px, 2vw, 34px)/1.12 Georgia, "Times New Roman", serif;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.available {
  border: 2px solid var(--ink);
  background: #fff;
}

.legend-dot.current {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(185, 132, 45, .16);
}

.legend-dot.complete {
  background: var(--green);
}

.legend-dot.locked {
  background: #a9ada9;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 18px;
  margin-top: 20px;
}

.blocks-map {
  display: grid;
  gap: 10px;
}

.block-row {
  --accent: #0d477e;
  --accent-soft: #e5eff7;
  --accent-deep: #062d55;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 11px;
}

.block-banner {
  position: relative;
  min-height: 106px;
  display: grid;
  grid-template-columns: 48px 42px 1fr;
  align-items: center;
  gap: 8px;
  padding: 14px 22px 14px 13px;
  border-radius: 11px 2px 2px 11px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .12), transparent 48%),
    var(--accent);
  box-shadow: 0 9px 20px rgba(18, 43, 55, .12);
}

.block-banner::after {
  content: "";
  position: absolute;
  right: -17px;
  border-top: 53px solid transparent;
  border-bottom: 53px solid transparent;
  border-left: 17px solid var(--accent);
}

.block-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  color: var(--accent);
  background: #fff;
  font: 700 21px Georgia, serif;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .45);
}

.block-index {
  font: 700 40px Georgia, "Times New Roman", serif;
  line-height: 1;
}

.block-name strong,
.block-name small {
  display: block;
}

.block-name strong {
  font: 700 16px/1.12 Georgia, "Times New Roman", serif;
}

.block-name small {
  margin-top: 7px;
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
  line-height: 1.15;
}

.module-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding-left: 11px;
}

.module-card {
  position: relative;
  min-width: 0;
  min-height: 106px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 12px 11px;
  overflow: hidden;
  border: 1px solid rgba(8, 47, 79, .16);
  border-top-color: var(--accent);
  border-radius: 10px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(255, 252, 245, .66));
  box-shadow: 0 4px 13px rgba(34, 38, 34, .055);
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.module-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.module-card:not(.is-locked):hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(30, 39, 40, .12);
}

.module-card:not(.is-locked):hover::after,
.module-card.is-current::after,
.module-card.is-complete::after {
  transform: scaleX(1);
}

.module-card.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.module-card.is-complete {
  background: linear-gradient(135deg, #fff, #eef7f2);
}

.module-card.is-locked {
  cursor: not-allowed;
  filter: grayscale(.65);
  opacity: .55;
}

.module-card.is-difficult::before {
  content: "!";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.module-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  background: #fff;
  font: 700 20px Georgia, "Times New Roman", serif;
}

.module-card.is-complete .module-icon {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.module-copy {
  min-width: 0;
}

.module-copy small,
.module-copy strong,
.module-copy em {
  display: block;
}

.module-copy small {
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.module-copy strong {
  min-height: 35px;
  margin-top: 3px;
  color: var(--ink);
  font: 700 14px/1.16 Georgia, "Times New Roman", serif;
  overflow-wrap: anywhere;
}

.module-copy em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.module-copy em.status-complete {
  color: var(--green);
  font-weight: 800;
}

.module-copy em.status-current {
  color: var(--accent);
  font-weight: 800;
}

.lock-mini {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 14px;
  height: 11px;
  border-radius: 2px;
  background: #888f8d;
}

.lock-mini::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -7px;
  width: 6px;
  height: 8px;
  border: 2px solid #888f8d;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.route-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.portfolio-spotlight {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 412px;
  padding: 22px 18px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 42%, rgba(185, 132, 45, .14), transparent 11rem),
    linear-gradient(180deg, #fffef9, #f1e4ca);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.portfolio-spotlight::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(185, 132, 45, .3);
  border-radius: 11px;
  pointer-events: none;
}

.spotlight-label {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.briefcase {
  position: relative;
  width: 138px;
  height: 94px;
  margin: 30px 0 15px;
  border: 3px solid #1a2025;
  border-radius: 9px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, .06) 48%, rgba(255, 255, 255, .06) 52%, transparent 53%),
    linear-gradient(150deg, #424b52, #13181c 58%, #222a30);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .05),
    0 21px 28px rgba(25, 28, 29, .27);
}

.briefcase::before {
  content: "";
  position: absolute;
  left: -19px;
  right: -19px;
  bottom: -25px;
  height: 17px;
  border-radius: 50%;
  background: rgba(95, 70, 31, .15);
  filter: blur(2px);
}

.briefcase i {
  position: absolute;
  left: 42px;
  top: -23px;
  width: 50px;
  height: 25px;
  border: 6px solid #20262a;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.briefcase b {
  position: absolute;
  left: 0;
  right: 0;
  top: 43px;
  height: 3px;
  background: #9f722f;
}

.briefcase span {
  position: absolute;
  left: 57px;
  top: 34px;
  width: 20px;
  height: 27px;
  border: 2px solid #e3bf71;
  border-radius: 3px;
  background: linear-gradient(#d5a64d, #9c691d);
}

.briefcase em {
  position: absolute;
  left: 64px;
  top: 43px;
  width: 6px;
  height: 7px;
  border-radius: 50% 50% 2px 2px;
  background: #3c2b19;
}

.portfolio-counter {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 2px;
}

.portfolio-counter strong {
  color: var(--gold);
  font: 700 30px Georgia, serif;
}

.portfolio-counter span {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-spotlight h3 {
  margin: 5px 0 8px;
  color: var(--ink);
  font: 700 21px/1.08 Georgia, "Times New Roman", serif;
}

.portfolio-spotlight > p:not(.spotlight-label) {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
}

.portfolio-spotlight .dark-button {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: auto;
}

.reference-teaser {
  display: grid;
  grid-template-columns: 38px 1fr 30px;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(9, 47, 89, .17);
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
}

.reference-glyph {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.reference-teaser p,
.reference-teaser h3 {
  margin: 0;
}

.reference-teaser p {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.reference-teaser h3 {
  margin-top: 2px;
  color: var(--ink);
  font: 700 12px/1.13 Georgia, serif;
}

.reference-teaser button {
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
}

.principles-section,
.journey-section {
  padding: 24px clamp(18px, 3.1vw, 46px) 8px;
}

.ornament-heading {
  display: grid;
  grid-template-columns: minmax(30px, 1fr) auto minmax(30px, 1fr);
  align-items: center;
  gap: 16px;
}

.ornament-heading span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament-heading span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.ornament-heading h2 {
  margin: 0;
  color: var(--ink);
  font: 700 16px Georgia, serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 18px;
  border-block: 1px solid var(--line);
}

.principles-grid article {
  position: relative;
  min-height: 105px;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-right: 1px solid var(--line);
}

.principles-grid article:last-child {
  border-right: 0;
}

.principle-number {
  position: absolute;
  right: 8px;
  top: 6px;
  color: rgba(185, 132, 45, .19);
  font: 700 24px Georgia, serif;
}

.principle-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font: 700 25px Georgia, serif;
}

.principles-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.34;
}

.principles-grid strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font: 700 12px Georgia, serif;
}

.journey-section {
  padding-bottom: 34px;
}

.journey-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin-top: 22px;
  padding-top: 1px;
}

.journey-line::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--ink), var(--gold));
}

.journey-step {
  --accent: var(--ink);
  position: relative;
  z-index: 1;
  text-align: center;
}

.journey-step button {
  width: 48px;
  height: 48px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  font: 700 19px Georgia, serif;
}

.journey-step.is-locked button {
  filter: grayscale(.85);
  opacity: .6;
}

.journey-step strong,
.journey-step small {
  display: block;
}

.journey-step strong {
  margin-top: 9px;
  color: var(--ink);
  font: 700 12px/1.15 Georgia, serif;
}

.journey-step small {
  max-width: 130px;
  margin: 3px auto 0;
  color: var(--muted);
  font-size: 9px;
}

.subpage-hero {
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 32px;
  padding: 42px clamp(22px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(226, 189, 115, .2), transparent 18rem),
    linear-gradient(130deg, var(--ink-deep), #0a4770);
}

.subpage-hero h1 {
  margin: 8px 0 10px;
  font: 700 clamp(34px, 4vw, 58px)/1.04 Georgia, serif;
}

.subpage-hero > div:first-child > p:last-child {
  max-width: 760px;
  margin: 0;
  color: #c8d8e4;
}

.subpage-stat {
  position: relative;
  min-height: 140px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(226, 189, 115, .55);
  border-radius: 50%;
  text-align: center;
}

.subpage-stat::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(226, 189, 115, .3);
  border-radius: 50%;
}

.subpage-stat strong,
.subpage-stat span {
  position: relative;
  z-index: 1;
  display: block;
}

.subpage-stat strong {
  color: var(--gold-light);
  font: 700 50px Georgia, serif;
  line-height: 1;
}

.subpage-stat span {
  max-width: 90px;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.2;
}

.subpage-toolbar {
  padding: 20px clamp(20px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
}

.subpage-toolbar > div:last-child {
  display: flex;
  gap: 8px;
}

.portfolio-progress {
  width: min(440px, 50%);
}

.portfolio-progress span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.portfolio-progress i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: #e4d9c4;
}

.portfolio-progress b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  padding: 28px clamp(20px, 4vw, 58px) 52px;
}

.portfolio-item {
  --accent: var(--ink);
  min-height: 210px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .66);
  box-shadow: var(--shadow-sm);
}

.portfolio-item.is-locked {
  box-shadow: none;
  filter: grayscale(.6);
  opacity: .62;
}

.portfolio-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.portfolio-item-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font: 700 15px Georgia, serif;
}

.portfolio-status {
  padding: 4px 7px;
  border-radius: 12px;
  color: var(--muted);
  background: #ebe4d5;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.portfolio-item.is-ready .portfolio-status {
  color: var(--green);
  background: #e3f2eb;
}

.portfolio-item h3 {
  margin: 14px 0 6px;
  color: var(--ink);
  font: 700 18px/1.12 Georgia, serif;
}

.portfolio-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.portfolio-item button {
  justify-self: start;
  margin-top: 14px;
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-size: 10px;
  font-weight: 900;
}

.results-hero {
  grid-template-columns: minmax(0, 1fr) auto;
}

.teacher-badge {
  padding: 15px 20px;
  border: 1px solid rgba(226, 189, 115, .55);
  border-radius: 14px;
  text-align: center;
}

.teacher-badge span,
.teacher-badge strong {
  display: block;
}

.teacher-badge span {
  color: #bfd0dd;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.teacher-badge strong {
  margin-top: 3px;
  color: var(--gold-light);
  font: 700 18px Georgia, serif;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 28px clamp(20px, 4vw, 58px) 0;
}

.metric-card {
  min-height: 126px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .63);
}

.metric-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--ink);
  font: 700 34px Georgia, serif;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.results-panel,
.improvement-panel {
  margin: 18px clamp(20px, 4vw, 58px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .66);
  box-shadow: var(--shadow-sm);
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.export-actions .ghost-button {
  padding: 9px 12px;
}

.danger-button {
  color: var(--red);
}

.table-wrap {
  margin-top: 18px;
  overflow: auto;
}

.results-table {
  width: 100%;
  min-width: 870px;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.results-table th {
  color: var(--muted);
  background: #f3ead8;
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.results-table td {
  color: #4c5558;
  font-size: 10px;
}

.results-table td:first-child {
  color: var(--ink);
  font-weight: 800;
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9fa6a4;
}

.table-status.complete::before {
  background: var(--green);
}

.table-status.started::before {
  background: var(--gold);
}

.improvement-panel {
  margin-bottom: 48px;
  border-left: 5px solid var(--orange);
}

.improvement-panel > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.improvement-mark,
.warning-mark {
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font: 700 22px Georgia, serif;
}

.improvement-panel h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font: 700 22px Georgia, serif;
}

.improvement-panel > p {
  margin: 14px 0 0 58px;
  color: var(--muted);
  font-size: 12px;
}

dialog {
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

dialog::backdrop {
  background: rgba(3, 20, 37, .7);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  right: 14px;
  top: 12px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(9, 47, 89, .18);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  font-size: 22px;
  line-height: 1;
}

.identity-dialog {
  width: min(620px, calc(100% - 24px));
}

.identity-dialog form,
.help-dialog article,
.confirm-dialog article {
  position: relative;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-light);
  box-shadow: var(--shadow-lg);
}

.identity-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  color: var(--gold-light);
  background: var(--ink);
  font: 700 30px Georgia, serif;
}

.identity-dialog h2,
.help-dialog h2,
.confirm-dialog h2 {
  margin: 5px 0 9px;
  color: var(--ink);
  font: 700 30px/1.1 Georgia, serif;
}

.identity-dialog form > p:not(.section-kicker),
.confirm-dialog p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.identity-dialog .identity-status {
  min-height: 18px;
  margin: 12px 0 0 !important;
  color: var(--green) !important;
  font-weight: 700;
}

.identity-dialog .identity-status.is-error {
  color: var(--red) !important;
}

.turnstile-wrap {
  min-height: 65px;
  margin-top: 16px;
}

.identity-dialog label {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.identity-dialog label > span {
  color: var(--red);
}

.identity-dialog input[type="text"],
.identity-dialog input:not([type]) {
  width: 100%;
  margin-top: 6px;
  padding: 12px 13px;
  border: 1px solid #b9b5aa;
  border-radius: 9px;
  color: var(--text);
  background: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 13px;
}

.mode-switch {
  position: relative;
  display: grid !important;
  grid-template-columns: 43px 1fr;
  column-gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3ead8;
  cursor: pointer;
}

.mode-switch input {
  position: absolute;
  opacity: 0;
}

.mode-switch > span {
  position: relative;
  grid-row: 1 / span 2;
  width: 42px;
  height: 22px;
  border-radius: 20px;
  background: #a9aaa4;
  transition: background .2s ease;
}

.mode-switch > span::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}

.mode-switch input:checked + span {
  background: var(--ink);
}

.mode-switch input:checked + span::after {
  transform: translateX(20px);
}

.mode-switch strong {
  font-size: 11px;
}

.mode-switch small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.dialog-actions.split {
  justify-content: space-between;
  gap: 9px;
}

.module-dialog {
  width: min(920px, calc(100% - 28px));
  max-height: calc(100vh - 30px);
}

.module-dialog > article {
  position: relative;
  max-height: calc(100vh - 30px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper-light);
  box-shadow: var(--shadow-lg);
}

.module-dialog-header {
  --accent: var(--ink);
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 145px;
  padding: 25px 60px 25px 28px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .1), transparent 45%),
    var(--accent);
}

.module-number-large {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  font: 700 34px Georgia, serif;
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, .08);
}

.module-dialog-header p,
.module-dialog-header h2,
.module-dialog-header span {
  margin: 0;
}

.module-dialog-header p {
  color: rgba(255, 255, 255, .73);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.module-dialog-header h2 {
  margin-top: 4px;
  font: 700 clamp(28px, 3.4vw, 42px)/1.05 Georgia, serif;
}

.module-dialog-header span {
  display: inline-block;
  margin-top: 9px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  font-size: 9px;
}

.module-dialog-body {
  padding: 24px 28px 12px;
  overflow: auto;
}

.passport-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.passport-heading i {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.passport-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.passport-grid section {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .64);
}

.passport-grid small {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.passport-grid p {
  margin: 5px 0 0;
  color: #455156;
  font-size: 11px;
  line-height: 1.37;
}

.passport-grid .passport-result {
  background: #f1e7d3;
}

.formula-card {
  --accent: var(--ink);
  margin-top: 11px;
  padding: 14px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #f2eadb;
}

.formula-card > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.formula-card > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.formula-card b {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
}

.formula-card i {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.situation-card {
  margin-top: 11px;
  padding: 13px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.situation-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.situation-label > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
}

.situation-label small,
.situation-label strong {
  display: block;
}

.situation-label small {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.situation-label strong {
  margin-top: 2px;
  color: var(--ink);
  font: 700 14px Georgia, serif;
}

.situation-card > p {
  margin: 9px 0 0 42px;
  color: var(--muted);
  font-size: 10px;
}

.module-method {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 15px;
  margin-top: 11px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}

.module-method > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-method strong {
  color: var(--gold-light);
  font: 700 28px Georgia, serif;
}

.module-method span {
  color: #c4d3df;
  font-size: 8px;
  line-height: 1.15;
  text-transform: uppercase;
}

.module-method p {
  margin: 0;
  color: #d4e0e9;
  font-size: 9px;
}

.module-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 28px 20px;
  background: var(--paper-light);
}

.player-dialog {
  width: 100vw;
  height: 100vh;
}

.player-dialog::backdrop {
  background: var(--ink-deep);
}

.player-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) auto;
  background: #eaf0f3;
}

.player-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 8px 16px;
  color: #fff;
  background: var(--ink-deep);
  border-bottom: 2px solid var(--gold);
}

.player-back {
  border: 0;
  color: #d1dee7;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.player-title {
  min-width: 0;
}

.player-title span,
.player-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-title span {
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.player-title strong {
  font: 700 15px Georgia, serif;
}

.player-chips {
  display: flex;
  align-items: center;
  gap: 7px;
}

.player-chips span,
.player-chips button {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  padding: 4px 9px;
  color: #c6d5e0;
  background: rgba(255, 255, 255, .06);
  font-size: 8px;
  font-weight: 800;
}

.player-frame-wrap {
  min-height: 0;
  background: #eaf0f3;
}

#moduleFrame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #fff;
}

.answer-dialog {
  width: min(1180px, calc(100% - 32px));
  height: min(86vh, 900px);
}

.answer-dialog::backdrop {
  background: rgba(3, 20, 37, .78);
  backdrop-filter: blur(5px);
}

.answer-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.answer-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 14px 9px 18px;
  color: #fff;
  background: var(--ink-deep);
}

.answer-shell header span,
.answer-shell header strong {
  display: block;
}

.answer-shell header div > span {
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.answer-shell header strong {
  margin-top: 2px;
  font: 700 16px Georgia, serif;
}

.answer-shell header button {
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 9px;
  padding: 9px 12px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 9px;
  font-weight: 900;
}

#answerFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.player-footer {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 9px 16px;
  border-top: 1px solid #c6d2d9;
  background: #f8fbfc;
  box-shadow: 0 -8px 24px rgba(13, 43, 62, .08);
}

.monitor-state {
  display: flex;
  align-items: center;
  gap: 9px;
}

.monitor-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(25, 116, 84, .12);
}

.monitor-state small,
.monitor-state strong {
  display: block;
}

.monitor-state small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.monitor-state strong {
  color: var(--ink);
  font-size: 9px;
}

.player-feedback {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  color: #754212;
  background: #fff0d9;
}

.player-feedback > span {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.player-feedback p {
  min-width: 0;
  margin: 0;
  font-size: 9px;
}

.player-feedback button {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-size: 9px;
  font-weight: 900;
  text-decoration: underline;
}

.player-actions {
  display: flex;
  gap: 7px;
}

.player-actions button {
  white-space: nowrap;
}

.primary-button:disabled {
  cursor: not-allowed;
  color: #e1e5e4;
  background: #a5adaa;
  border-color: #a5adaa;
  box-shadow: none;
  transform: none;
}

.reference-drawer {
  position: fixed;
  z-index: 90;
  right: 0;
  top: 0;
  left: auto;
  bottom: auto;
  margin: 0;
  width: min(430px, 92vw);
  height: 100vh;
  padding: 24px;
  border: 0;
  overflow: auto;
  color: var(--text);
  background: var(--paper-light);
  box-shadow: -18px 0 60px rgba(5, 31, 61, .25);
  transform: translateX(105%);
  transition: transform .28s ease;
}

.reference-drawer::backdrop {
  background: rgba(3, 20, 37, .66);
  backdrop-filter: blur(3px);
}

.reference-drawer.is-open {
  transform: translateX(0);
}

.reference-drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.reference-drawer header p {
  margin: 0;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.reference-drawer h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font: 700 25px/1.06 Georgia, serif;
}

.reference-drawer header button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  font-size: 20px;
}

.reference-list {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.reference-list article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
}

.reference-list article > b {
  width: 52px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font: 700 11px Georgia, serif;
  text-align: center;
}

.reference-list strong {
  color: var(--ink);
  font: 700 13px Georgia, serif;
}

.reference-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.reference-note {
  margin: 16px 0 0;
  padding: 12px;
  border-left: 4px solid var(--gold);
  color: var(--muted);
  background: #f2e8d5;
  font-size: 9px;
}

.drawer-scrim {
  position: fixed;
  z-index: 80;
  inset: 0;
  border: 0;
  background: rgba(3, 20, 37, .66);
  backdrop-filter: blur(3px);
}

.help-dialog {
  width: min(610px, calc(100% - 24px));
}

.help-dialog ol {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.help-dialog li {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.help-dialog li > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font: 700 14px Georgia, serif;
}

.help-dialog li p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.help-dialog li strong {
  display: block;
  color: var(--ink);
  font: 700 13px Georgia, serif;
}

.shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 9px;
}

kbd {
  display: inline-grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  margin-right: 4px;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
}

.confirm-dialog {
  width: min(470px, calc(100% - 24px));
  text-align: center;
}

.confirm-dialog .warning-mark {
  margin: 0 auto 14px;
}

.danger-fill {
  background: var(--red);
  border-color: var(--red);
}

.toast {
  position: fixed;
  z-index: 130;
  left: 50%;
  bottom: 24px;
  max-width: min(540px, calc(100% - 24px));
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  color: #fff;
  background: var(--ink-deep);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.presentation-mode .app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 0;
  outline: 0;
}

body.presentation-mode .topbar {
  position: fixed;
  left: 0;
  right: 0;
  transform: translateY(-62px);
  transition: transform .2s ease;
}

body.presentation-mode .topbar:hover,
body.presentation-mode .topbar:focus-within {
  transform: translateY(0);
}

body.presentation-mode main {
  padding-top: 0;
}

@media (max-width: 1260px) {
  .topbar {
    grid-template-columns: minmax(220px, 1fr) auto auto;
  }

  .header-progress {
    display: none;
  }

  .sync-indicator span {
    display: none;
  }

  .sync-indicator {
    width: 30px;
    justify-content: center;
    padding: 0;
  }

  .map-layout {
    grid-template-columns: minmax(0, 1fr) 235px;
  }

  .block-row {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .block-banner {
    grid-template-columns: 42px 34px 1fr;
  }

  .block-icon {
    width: 40px;
    height: 40px;
  }

  .block-index {
    font-size: 34px;
  }

  .module-copy strong {
    font-size: 12px;
  }
}

@media (max-width: 1040px) {
  .primary-nav {
    order: 4;
    grid-column: 1 / -1;
    min-height: 40px;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 7px 15px;
    padding-bottom: 0;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .route-sidebar {
    grid-template-columns: 1fr 1fr;
  }

  .portfolio-spotlight {
    position: relative;
    top: auto;
    min-height: 270px;
    display: grid;
    grid-template-columns: 145px 1fr;
    column-gap: 15px;
    align-content: center;
    text-align: left;
  }

  .portfolio-spotlight > * {
    grid-column: 2;
  }

  .portfolio-spotlight .briefcase {
    grid-column: 1;
    grid-row: 1 / span 6;
  }

  .portfolio-counter {
    justify-content: flex-start;
  }

  .principles-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .principles-grid article:nth-child(3) {
    border-right: 0;
  }

  .principles-grid article:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    outline: 0;
  }

  .topbar {
    position: relative;
    padding: 9px 13px 0;
  }

  .brand-copy small,
  .profile-button > span:last-child,
  .round-button:first-child {
    display: none;
  }

  .teacher-entry {
    width: 32px;
    overflow: hidden;
    padding: 0;
    color: transparent;
  }

  .teacher-entry::before {
    content: "П";
    width: 100%;
    color: var(--gold-light);
    text-align: center;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .profile-button {
    min-width: 0;
    padding: 0;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .primary-nav {
    width: 100%;
    overflow: auto;
    justify-content: flex-start;
  }

  .nav-link {
    min-height: 39px;
    white-space: nowrap;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 30px 17px 22px;
  }

  .hero h1 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .hero h1 br {
    display: none;
  }

  .hero-actions {
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .music-staff {
    display: none;
  }

  .route-overview {
    padding: 24px 13px 8px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .legend {
    justify-content: flex-start;
  }

  .block-row {
    grid-template-columns: 1fr;
  }

  .block-banner {
    min-height: 83px;
    border-radius: 11px;
  }

  .block-banner::after {
    display: none;
  }

  .module-row {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .module-card {
    min-height: 82px;
  }

  .module-copy strong {
    min-height: 0;
    font-size: 14px;
  }

  .route-sidebar {
    grid-template-columns: 1fr;
  }

  .portfolio-spotlight {
    display: flex;
    text-align: center;
  }

  .portfolio-spotlight > * {
    grid-column: auto;
  }

  .portfolio-spotlight .briefcase {
    grid-column: auto;
    grid-row: auto;
  }

  .portfolio-counter {
    justify-content: center;
  }

  .principles-section,
  .journey-section {
    padding-inline: 13px;
  }

  .ornament-heading {
    grid-template-columns: 20px 1fr 20px;
    gap: 8px;
    text-align: center;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .principles-grid article,
  .principles-grid article:nth-child(3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-top: 0;
  }

  .principles-grid article:last-child {
    border-bottom: 0;
  }

  .journey-line {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .journey-line::before {
    left: 23px;
    right: auto;
    top: 20px;
    bottom: 20px;
    width: 2px;
    height: auto;
  }

  .journey-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 13px;
    text-align: left;
  }

  .journey-step strong,
  .journey-step small {
    margin-inline: 0;
    max-width: none;
  }

  .journey-step strong {
    align-self: end;
  }

  .journey-step small {
    grid-column: 2;
  }

  .subpage-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 34px 20px;
  }

  .subpage-stat {
    width: 140px;
    min-height: 140px;
  }

  .subpage-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .portfolio-progress {
    width: 100%;
  }

  .subpage-toolbar > div:last-child {
    flex-wrap: wrap;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    padding: 20px 14px 40px;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    padding-inline: 14px;
  }

  .results-panel,
  .improvement-panel {
    margin-inline: 14px;
    padding: 16px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .improvement-panel > p {
    margin-left: 0;
  }

  .identity-dialog form,
  .help-dialog article,
  .confirm-dialog article {
    padding: 27px 20px 22px;
  }

  .form-row,
  .passport-grid {
    grid-template-columns: 1fr;
  }

  .module-dialog-header {
    grid-template-columns: 62px 1fr;
    min-height: 122px;
    padding: 20px 48px 20px 18px;
  }

  .module-number-large {
    width: 58px;
    height: 58px;
    font-size: 23px;
  }

  .module-dialog-body {
    padding: 18px;
  }

  .module-method {
    grid-template-columns: 1fr;
  }

  .module-dialog-actions {
    padding: 12px 18px 16px;
    flex-wrap: wrap;
  }

  .player-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .player-toolbar {
    grid-template-columns: auto 1fr;
    gap: 9px;
    padding: 8px 10px;
  }

  .player-chips {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .player-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 9px 10px;
  }

  .player-actions {
    justify-content: flex-end;
  }

  .monitor-state {
    display: none;
  }
}

@media (max-width: 430px) {
  .hero-actions button,
  .module-dialog-actions button,
  .player-actions button {
    width: 100%;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .player-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
  }

  .topbar,
  .hero-actions,
  .route-sidebar,
  .subpage-toolbar,
  .export-actions,
  dialog,
  .reference-drawer,
  .drawer-scrim,
  .toast {
    display: none !important;
  }

  .view {
    display: block !important;
    min-height: 0;
  }

  .block-row,
  .portfolio-item,
  .results-panel {
    break-inside: avoid;
  }
}
