:root {
  color-scheme: light;
  --page: #eff7ff;
  --ink: #182940;
  --muted: #4b617c;
  --blue: #17437e;
  --blue-hover: #103362;
  --line: #cddff0;
  --white: #fff;
  --sky: #dbeeff;
  --focus: #105dc6;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.035em; }
h1 { font-size: clamp(2.1rem, 4.3vw, 3.45rem); font-weight: 750; }
h2 { font-size: 1.45rem; font-weight: 720; }
h3 { font-size: 1.25rem; }
p { color: var(--muted); }
img { display: block; max-width: 100%; height: auto; }
input, select, button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.frame { width: min(1120px, calc(100% - 2.5rem)); margin-inline: auto; }
.site-header { background: #fcfeff; border-bottom: 1px solid var(--line); }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }
.site-nav nav { display: flex; align-items: center; gap: clamp(.75rem, 4vw, 2.5rem); }
.site-nav a { text-decoration: none; font-size: .95rem; font-weight: 600; }
.site-nav nav a { color: var(--muted); padding: .4rem .15rem; }
.site-nav nav a:hover { color: var(--blue); text-decoration: underline; }
.brand { flex-shrink: 0; }
.nav-owner { display: flex; gap: .55rem; align-items: center; white-space: nowrap; }
.main { flex: 1; padding-block: clamp(2rem, 6vw, 4.25rem); }
.footer {
  border-top: 1px solid var(--line); display: flex; align-items: center; gap: 1.6rem;
  flex-wrap: wrap; padding-block: 1.3rem; color: var(--muted); font-size: .875rem;
}
.footer span { font-weight: 700; margin-right: auto; }
.skip { position: absolute; z-index: 10; top: .5rem; left: .5rem; padding: .6rem; background: var(--white); transform: translateY(-150%); }
.skip:focus { transform: none; }

.hero {
  isolation: isolate; position: relative; display: grid; grid-template-columns: 1.25fr 1fr;
  min-height: 420px; overflow: hidden; align-items: center; border: 1px solid #c7def5;
  border-radius: 28px; background: linear-gradient(132deg, #f9fdff 11%, #e4f3ff 58%, #c9e7ff 100%);
}
.hero-copy { position: relative; z-index: 1; padding: clamp(1.75rem, 5.6vw, 4.5rem); padding-right: 0; }
.hero h1 { font-size: clamp(2.7rem, 6.8vw, 5.25rem); letter-spacing: -.065em; }
.hero-copy p { max-width: 31rem; margin: 1.15rem 0 1.6rem; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero-art { position: relative; min-height: 350px; display: grid; place-items: center; pointer-events: none; }
.hero-mascot { z-index: 1; width: min(84%, 360px); filter: drop-shadow(0 17px 20px #527caa3a); }
.orbit { position: absolute; width: min(95%, 414px); height: 59%; border: 1px solid #6b9dca75; border-radius: 50%; transform: rotate(-17deg); }
.orbit-two { width: min(97%, 420px); height: 73%; transform: rotate(17deg); border-color: #fff; }
.star { position: absolute; z-index: 1; top: 15%; right: 12%; color: #17437e; font-size: 1.75rem; }
.star.small { top: auto; right: auto; bottom: 18%; left: 10%; font-size: 1.4rem; }
.compact-hero { min-height: 340px; }
.compact-hero h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
.compact-hero .hero-art { min-height: 285px; }
.home-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.home-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem; border: 1px solid var(--line); background: #fcfeff; border-radius: 16px; text-decoration: none;
}
.home-links a:hover { background: var(--sky); }
.home-links strong, .home-links small { display: block; }
.home-links small { font-size: .9rem; color: var(--muted); margin-top: .2rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.button, button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: .65rem 1rem;
  line-height: 1.3; font-weight: 650; background: var(--blue); color: var(--white);
  border: 1px solid var(--blue); border-radius: 9px; text-decoration: none; cursor: pointer;
}
.button:hover, button:hover { background: var(--blue-hover); color: var(--white); }
.button:active, button:active { transform: translateY(1px); }
.button.secondary, button.secondary { background: var(--white); color: var(--blue); border-color: #b6cde4; }
.button.secondary:hover, button.secondary:hover { background: var(--sky); }
button:disabled { border-color: #d7e3ef; background: #d7e3ef; color: #465b75; cursor: default; transform: none; }

.page-heading { margin-bottom: 1.6rem; }
.page-heading p { max-width: 47rem; margin-top: .7rem; font-size: 1.05rem; }
.page-heading .button { margin-top: 1.2rem; }
.with-action { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.page-heading > div { min-width: 0; overflow-wrap: anywhere; }
.panel {
  min-width: 0; padding: clamp(1.2rem, 3.2vw, 2.15rem); background: var(--white);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 32px #33598508;
}
.panel > :where(p, dl, form, ul, .actions, details, .section-heading, .button) + :where(p, h2, dl, form, ul, .actions, details, .button) {
  margin-top: .9rem;
}
.panel > h1 + p, .panel > h2 + p, .panel > h2 + ul { margin-top: .65rem; }
.panel > .button { margin-top: .9rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.tinted { background: #e5f2ff; }
.narrow { max-width: 620px; margin-inline: auto; }
.aside-mascot { margin: 0 0 1.1rem; }
.notice { padding: .8rem .9rem; background: #eaf4ff; border-radius: 8px; color: #294d74; margin: .9rem 0; }
.notice.error { color: #86251d; background: #fff0eb; }
label { display: block; font-weight: 650; padding-bottom: .34rem; }
input, select {
  width: 100%; min-width: 0; min-height: 46px; padding: .65rem .8rem; color: var(--ink);
  background: #f9fcff; border: 1px solid #b3c9e0; border-radius: 9px;
}
input::placeholder { color: #617891; opacity: 1; }
.field-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.form-hint { min-height: 1.45em; font-size: .9rem; }
.form { margin-top: 1.25rem; }
.form > :where(button, .actions, div, select + label) { margin-top: 1rem; }
.auth-panel .form > button { width: 100%; }
.auth-panel #otp { font-size: 1.25rem; letter-spacing: .22em; }
details { border-top: 1px solid var(--line); padding-top: .75rem; }
details p { padding-top: .45rem; }
summary { font-weight: 650; color: var(--blue); cursor: pointer; }

.auth-wrap {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: stretch;
  max-width: 800px; margin-inline: auto; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background: var(--white); box-shadow: 0 14px 35px #27548510;
}
.auth-panel { border: 0; border-radius: 0; box-shadow: none; padding: clamp(1.4rem, 5vw, 3rem); }
.auth-panel h1 { font-size: clamp(1.85rem, 4.3vw, 2.6rem); overflow-wrap: anywhere; }
.auth-panel p { overflow-wrap: anywhere; }
.auth-art { display: grid; place-items: center; background: radial-gradient(ellipse at center, #e4f5ff 0%, #cbe7ff 85%); }
.auth-mascot { width: min(74%, 224px); filter: drop-shadow(0 14px 19px #537caa3d); }
.back { display: inline-block; margin-bottom: 1rem; font-size: .9rem; font-weight: 650; }
.code-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .6rem; }
.code-actions a { font-size: .92rem; }
.text-button { padding-inline: 0; color: var(--blue); background: transparent; border: none; font-size: .92rem; text-decoration: underline; }
.text-button:hover { color: var(--blue-hover); background: transparent; }
.text-button:disabled { color: var(--muted); background: transparent; }

.section-heading { display: flex; gap: .8rem; align-items: center; justify-content: space-between; }
.empty { text-align: center; padding: 2.1rem .35rem 1.5rem; }
.empty img { margin: 0 auto .7rem; }
.empty p { margin-top: .45rem; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows li a, .rows.compact li { display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.rows li a > :last-child, .rows.compact li > :last-child { margin-left: auto; }
.rows strong, .rows small { display: block; overflow-wrap: anywhere; }
.rows small { color: var(--muted); }
.rows.compact { font-size: .92rem; }
.rows.compact li { justify-content: space-between; }
.grant-rows li form { margin-top: .7rem; }
.profile-heading { display: flex; align-items: center; gap: 1rem; }
.profile-mascot { flex-shrink: 0; max-width: 22vw; }
.facts { display: grid; gap: .65rem; margin: 0; }
.facts div { display: grid; gap: .1rem; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts code { font-size: .86rem; white-space: normal; }
.scope-list { padding-left: 1.2rem; margin-block: .4rem; color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.status { text-transform: capitalize; font-weight: 680; }

@media (max-width: 760px) {
  .wide-only { display: none; }
  .frame { width: calc(100% - 1.5rem); }
  .site-nav { flex-wrap: wrap; gap: .55rem 1rem; padding-block: .75rem .6rem; }
  .site-nav nav { flex-basis: 100%; order: 3; gap: 1.35rem; }
  .site-nav .brand img { width: 123px; }
  .site-nav .nav-owner { font-size: .86rem; }
  .hero { grid-template-columns: 1fr; min-height: initial; }
  .hero-copy { padding: 1.6rem 1.25rem .4rem; }
  .hero h1 { font-size: clamp(2.45rem, 9.2vw, 3.8rem); }
  .hero-art, .compact-hero .hero-art { min-height: 210px; }
  .hero-mascot { width: min(62%, 250px); }
  .orbit { width: 74%; }
  .orbit-two { width: 78%; }
  .star { right: 17%; }
  .star.small { left: 17%; }
  .split { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { min-height: 126px; }
  .auth-mascot { width: 126px; padding: .7rem; }
  .footer { column-gap: .85rem; row-gap: .45rem; }
}
@media (max-width: 455px) {
  .home-links { grid-template-columns: 1fr; gap: .6rem; }
  .section-heading { align-items: flex-start; }
  .section-heading .button { padding-inline: .65rem; font-size: .85rem; }
  .with-action { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .button:active, button:active { transform: none; }
}
