:root, html[data-theme="night"] {
  --ink: #0c100e;
  --deep: #121a16;
  --panel: #1a241c;
  --line: rgba(212, 175, 90, 0.28);
  --gold: #d4af5a;
  --gold-2: #f0d48a;
  --cream: #f3ead4;
  --muted: #b7c0ae;
  --ok: #3d6b4f;
  --top: rgba(12, 16, 14, 0.92);
}
html[data-theme="ivory"] {
  --ink: #f3ead4;
  --deep: #efe4c8;
  --panel: #fff8ea;
  --line: rgba(90, 70, 30, 0.28);
  --gold: #8a6a22;
  --gold-2: #6b4e16;
  --cream: #1a1408;
  --muted: #5c5346;
  --ok: #2f6b45;
  --top: rgba(243, 234, 212, 0.94);
}
html[data-theme="royal"] {
  --ink: #0b1020;
  --deep: #12182c;
  --panel: #1a2340;
  --line: rgba(212, 175, 90, 0.32);
  --gold: #e0c36a;
  --gold-2: #f4e2a4;
  --cream: #eef0f8;
  --muted: #a8b0c8;
  --ok: #3d6b8a;
  --top: rgba(11, 16, 32, 0.94);
}
html[data-theme="kemet"] {
  --ink: #1a1008;
  --deep: #24160c;
  --panel: #2c1c10;
  --line: rgba(212, 160, 70, 0.35);
  --gold: #e0a84a;
  --gold-2: #f0d48a;
  --cream: #f6e6c8;
  --muted: #c4a882;
  --ok: #4a7a4a;
  --top: rgba(26, 16, 8, 0.94);
}
html[data-theme="cedar"] {
  --ink: #0c1410;
  --deep: #132018;
  --panel: #1a2c22;
  --line: rgba(180, 90, 60, 0.35);
  --gold: #d4784a;
  --gold-2: #f0b090;
  --cream: #f0e6d8;
  --muted: #b8c4b0;
  --ok: #3d6b4f;
  --top: rgba(12, 20, 16, 0.94);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Source Serif 4", Georgia, serif;
  background: var(--ink);
  color: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--top);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.prefs-bar {
  border-bottom: 1px solid var(--line);
  background: var(--deep);
  padding: 0.45rem 0;
}
.prefs-inner {
  display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center;
  font-size: 0.86rem; color: var(--muted);
}
.prefs-inner label { display: flex; align-items: center; gap: 0.45rem; }
.prefs-inner select {
  width: auto; padding: 0.3rem 0.5rem; font-size: 0.86rem;
}
.top-inner { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--cream); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold); }
.brand strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 1.05rem; font-weight: 600; line-height: 1.15; }
.brand span { display: block; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
nav { margin-left: auto; display: flex; gap: 0.12rem; flex-wrap: nowrap; }
nav a {
  color: var(--muted); padding: 0.4rem 0.55rem; border-radius: 8px; font-size: 0.86rem;
  white-space: nowrap;
}
.brand span { white-space: nowrap; }
nav a:hover, nav a.active { color: var(--cream); background: rgba(255,255,255,0.06); text-decoration: none; }
.speak-btn {
  margin-left: 0.35rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold-2);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.speak-btn:hover { background: rgba(255,255,255,0.06); }
.speak-btn.is-on { background: var(--gold); color: #1a1408; border-color: var(--gold); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border-radius: 10px; padding: 0.8rem 1.2rem; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; font-family: inherit; font-size: 1rem; color: var(--cream);
}
.btn-gold { background: var(--gold); color: #1a1408; }
.btn-gold:hover { background: var(--gold-2); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--cream); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: flex-end;
  padding: 3rem 0 4rem; overflow: hidden;
}
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .shade { position: absolute; inset: 0; background: linear-gradient(to top, #0c100e 8%, rgba(12,16,14,0.55) 50%, rgba(12,16,14,0.2)); }
.hero .wrap { position: relative; z-index: 1; }
.kicker { letter-spacing: 0.28em; text-transform: uppercase; font-size: 0.72rem; color: var(--gold); margin-bottom: 0.8rem; }
h1, h2, h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 0.98; max-width: 14ch; }
.lede { margin-top: 1rem; max-width: 38rem; font-size: 1.2rem; color: #d8dece; }
.office-line {
  margin-top: 0.7rem; color: var(--gold-2); letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 0.82rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
section { padding: 4.2rem 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: center; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem;
}
.card h3 { font-size: 1.55rem; margin: 0.3rem 0 0.4rem; }
.price { color: var(--gold); font-family: "Cormorant Garamond", serif; font-size: 2rem; }
.muted { color: var(--muted); }
.program img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; margin-bottom: 0.8rem; }
form { display: grid; gap: 0.8rem; }
label { font-size: 0.82rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }
input, select, textarea {
  width: 100%; padding: 0.75rem 0.85rem; border-radius: 10px;
  border: 1px solid var(--line); background: #101610; color: var(--cream); font: inherit;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.8rem; }
.cards { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.badge {
  border: 1px solid var(--line); border-radius: 6px; padding: 0.2rem 0.45rem;
  font-size: 0.75rem; letter-spacing: 0.06em; color: var(--gold-2);
}
.notice { background: #162019; border-left: 3px solid var(--gold); padding: 0.9rem 1rem; border-radius: 8px; }
footer { border-top: 1px solid var(--line); padding: 2.2rem 0 3rem; color: var(--muted); font-size: 0.92rem; }
.seal { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); margin: 0 auto 1rem; }
.center { text-align: center; }
.error { color: #e8a0a0; font-size: 0.92rem; }
.ok { color: #9dcea8; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.6rem 0; border-bottom: 1px solid rgba(243,234,212,0.08); }
.annote {
  margin: 0.75rem 0 1.5rem;
  padding: 0.9rem 1.05rem;
  border-left: 3px solid var(--gold);
  background: rgba(212, 175, 90, 0.08);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
}
.annote strong { color: var(--gold-2); letter-spacing: 0.06em; font-size: 0.78rem; text-transform: uppercase; display: block; margin-bottom: 0.35rem; }
.article-block { margin: 2.2rem 0; }
.article-block h3 { font-size: 1.7rem; color: var(--gold-2); margin-bottom: 0.6rem; }
.toc a { display: inline-block; margin: 0.2rem 0.55rem 0.2rem 0; }
.progress {
  height: 7px; background: #101610; border-radius: 99px; overflow: hidden;
  margin: 0.75rem 0 0.4rem; border: 1px solid var(--line);
}
.progress span { display: block; height: 100%; background: var(--gold); }
.class-list { list-style: none; margin-top: 0.4rem; }
.class-list li {
  display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.7rem; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px solid rgba(243,234,212,0.08);
}
.class-n {
  width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; color: var(--gold);
}
.class-list li.done .class-n { background: var(--ok); border-color: var(--ok); color: #f3ead4; }
.class-title { color: var(--cream); }
.class-list li.done .class-title { color: var(--muted); }
.class-acts { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.class-acts .btn { padding: 0.4rem 0.7rem; font-size: 0.86rem; }
.diploma-sheet {
  position: relative;
  overflow: hidden;
  padding: 2.4rem 2.2rem 2rem;
  border: 10px double var(--gold);
  background: #f3ead4;
  color: #1a1408;
  text-align: center;
  border-radius: 4px;
}
.diploma-sheet h1 { color: #1a1408; max-width: none; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.diploma-sheet .seal { margin-bottom: 0.8rem; }
.diploma-name {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0 1rem 0.25rem;
  border-bottom: 1px solid #1a1408;
}
.diploma-degree {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 600;
  color: #6b4e16;
  margin-top: 0.7rem;
}
.diploma-letters { letter-spacing: 0.22em; text-transform: uppercase; color: #6b4e16; margin-top: 0.35rem; font-size: 0.95rem; }
.signs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-top: 2.2rem; color: #3d3424; font-size: 0.88rem; }
.sign-line { border-top: 1px solid #1a1408; padding-top: 0.45rem; margin-bottom: 0.25rem; font-weight: 600; }
.diploma-sheet.specimen::after {
  content: "SPECIMEN";
  position: absolute;
  inset: 28% 0 auto;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 10vw, 6rem);
  letter-spacing: 0.18em;
  color: #6b4e16;
  opacity: 0.12;
  transform: rotate(-16deg);
  pointer-events: none;
}
@media print {
  body { background: #fff; }
  .no-print, header, footer, .speak-btn { display: none !important; }
  section { padding: 0; }
  .diploma-sheet { border-width: 8px; }
}
@media (max-width: 860px) {
  .grid-3, .grid-2, .row-2, .row-3 { grid-template-columns: 1fr; }
  nav { display: none; }
  h1 { max-width: none; }
  .hero { min-height: 78vh; }
  .brand span { white-space: normal; letter-spacing: 0.1em; max-width: 14rem; }
  .kicker { letter-spacing: 0.16em; }
  .speak-btn { margin-left: auto; }
  .class-list li { grid-template-columns: 2rem 1fr; }
  .class-acts { grid-column: 1 / -1; justify-content: flex-start; }
}
