.gr-page {
  --gr-ink: #1b1446;
  --gr-muted: #5d6185;
  max-width: 1320px;
  margin: 0 auto;
  padding: .75rem 1.25rem 2rem;
  color: var(--gr-ink);
}
.gr-page > section { padding: 0; }
.gr-page [id] { scroll-margin-top: 6rem; }
.gr-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: radial-gradient(circle at 90% 10%, #6a4cff66, transparent 50%), linear-gradient(135deg, #0f1035, #2a1f7a);
  color: #fff;
  box-shadow: 0 12px 32px #1b14461a;
}
.gr-kicker { margin: 0 0 .3rem; color: #ffcf3f; font-weight: 800; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.gr-hero h1 { margin: 0 0 .35rem; font-size: clamp(1.25rem, 2.3vw, 1.8rem); font-weight: 900; line-height: 1.15; }
.gr-lead { margin: 0; color: #e5e1ff; }
.gr-actions { display: flex; flex-wrap: wrap; gap: .6rem; flex-shrink: 0; }
.gr-button { padding: .5rem .75rem; border-radius: 8px; font-size: .85rem; font-weight: 800; text-decoration: none; }
.gr-button-primary, .gr-button-primary:hover { background: #ffcf3f; color: #1b1446; }
.gr-button-secondary, .gr-button-secondary:hover { border: 1px solid #ffffff66; background: #ffffff14; color: #fff; }
.gr-selection { padding: 1.5rem 0; }
.gr-page h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 .8rem; }
.gr-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.gr-tab { padding: .6rem .9rem; border: 1px solid #dfdcf4; border-radius: 12px; background: #fff; color: #4b3fd6; font-size: .9rem; font-weight: 700; text-decoration: none; }
.gr-tab:hover { background: #efebff; color: #3525aa; }
.gr-tab[aria-current="page"] { background: #6a4cff; border-color: #6a4cff; color: #fff; box-shadow: 0 4px 12px #6a4cff33; }
.gr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .75rem; }
.gr-stats > div { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .8rem; border: 1px solid #e5e2f4; border-top: 3px solid #6a4cff; border-radius: 10px; background: #fff; }
.gr-stats > div:nth-child(2) { border-top-color: #17b37a; }
.gr-stats > div:nth-child(3) { border-top-color: #f26b1d; }
.gr-stats span { font-weight: 700; }
.gr-stats strong { font-size: 1.4rem; line-height: 1.2; }
.gr-stats small, .gr-hints { color: var(--gr-muted); }
.gr-guidance { padding: .65rem .85rem; margin-bottom: .75rem; border: 1px solid #e1dcff; border-radius: 10px; background: #eeebff; }
.gr-guidance summary { font-weight: 700; cursor: pointer; }
.gr-guidance[open] summary { margin-bottom: .5rem; }
.gr-guidance p { margin: 0 0 .5rem; font-size: .9rem; }
.gr-guidance p:last-child { margin: 0; }
.gr-results { background: #fff; border: 1px solid #e5e2f4; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px #1b14460a; }
.gr-results-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .75rem 1rem; }
.gr-results-heading h2 { margin: 0; }
.gr-results-heading span { font-size: .85rem; color: var(--gr-muted); }
.gr-table-scroll { overflow: auto; max-height: 60vh; }
.gr-table { width: 100%; min-width: 960px; border-collapse: collapse; font-size: .9rem; }
.gr-table caption { padding: .5rem 1rem; color: var(--gr-muted); font-size: .8rem; }
.gr-table th, .gr-table td { padding: .6rem .75rem; border-bottom: 1px solid #eceaf6; vertical-align: top; }
.gr-table thead { background: #f0effa; }
.gr-table thead th { position: sticky; top: 0; z-index: 1; background: #f0effa; }
.gr-table thead th { font-size: .8rem; }
.gr-table tbody tr:nth-child(even) { background: #fafaff; }
.gr-table tbody tr:hover { background: #f1efff; }
.gr-table th[scope="row"] { overflow-wrap: anywhere; max-width: 180px; }
.gr-mode, .gr-score, .gr-hints { display: block; }
.gr-score { white-space: nowrap; font-weight: 700; }
.gr-status { display: inline-block; margin-top: .4rem; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.gr-status-completed { background: #dff7eb; color: #096044; }
.gr-status-active { background: #fff1d5; color: #895000; }
.gr-progress { display: block; width: 100%; height: 7px; margin-top: .6rem; accent-color: #6a4cff; border: 0; border-radius: 999px; overflow: hidden; }
.gr-progress::-webkit-progress-bar { background: #e9e5fa; }
.gr-progress::-webkit-progress-value { background: #6a4cff; }
.gr-progress::-moz-progress-bar { background: #6a4cff; }
.gr-table details { margin-top: .6rem; font-size: .85rem; }
.gr-table summary { color: #4b3fd6; font-weight: 700; cursor: pointer; }
.gr-table details p { margin: .5rem 0 0; max-width: 28rem; overflow-wrap: anywhere; }
.gr-empty { padding: 2.5rem 1.5rem; text-align: center; background: #fafaff; }
.gr-empty h3 { font-size: 1.25rem; font-weight: 800; }
.gr-empty p { margin: 0; color: var(--gr-muted); }
.gr-page a:focus-visible, .gr-table-scroll:focus-visible, .gr-table summary:focus-visible { outline: 3px solid #f26b1d; outline-offset: 3px; }
.gr-dashboard-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .65rem; }
.gr-dashboard-nav a, .gr-class-index a { display: inline-block; padding: .45rem .7rem; border: 1px solid #dfdcf4; border-radius: 8px; background: #fff; color: #3525aa; text-decoration: none; font-weight: 700; font-size: .85rem; }
.gr-dashboard-nav a[aria-current="page"] { color: #fff; background: #4b3fd6; }
.gr-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; padding: .75rem 0; }
.gr-toolbar > div { flex: 1 1 220px; min-width: 0; }
.gr-toolbar label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .2rem; }
.gr-toolbar a { padding: .5rem 0; }
.gr-ranking-table { min-width: 0; table-layout: fixed; }
.gr-ranking-table th, .gr-ranking-table td { overflow-wrap: anywhere; }
.gr-ranking-table th:first-child { width: 15%; }
.gr-ranking-table .gr-score { white-space: normal; }
.gr-class-create { margin-top: .75rem; }
.gr-inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gr-inline-form .form-control { flex: 1 1 180px; width: auto; min-width: 0; }
.gr-class-index { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.gr-classroom { scroll-margin-top: 5rem; }
.gr-classroom > summary { cursor: pointer; list-style: none; }
.gr-classroom > summary::before { content: "+"; font-size: 1.2rem; font-weight: bold; }
.gr-classroom[open] > summary::before { content: "-"; }
.gr-classroom .gr-class-title { flex: 1; color: var(--gr-ink); font-size: 1rem; font-weight: 800; overflow-wrap: anywhere; }
.gr-class-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .5rem 1rem; font-size: .85rem; background: #f0effa; }
.gr-roster { max-height: 45vh; overflow-y: auto; }
.gr-roster strong { overflow-wrap: anywhere; min-width: 0; }
.gr-roster .gr-status { margin-top: 0; }
.gr-page :is(a, button, input, select, summary):focus-visible { outline: 3px solid #f26b1d; outline-offset: 2px; }
@media (max-width: 900px) {
  .gr-hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 576px) {
  .gr-page { padding: 1rem .75rem 2rem; }
  .gr-hero { padding: 1rem; }
  .gr-hero .gr-kicker, .gr-hero .gr-lead { display: none; }
  .gr-hero { gap: .5rem; }
  .gr-hero h1 { margin: 0; }
  .gr-actions { flex-shrink: 1; }
  .gr-dashboard-nav { gap: .25rem; }
  .gr-dashboard-nav a { padding: .4rem .45rem; font-size: .75rem; }
  .gr-stats { gap: .35rem; }
  .gr-stats > div { padding: .5rem; }
  .gr-stats span { font-size: .75rem; }
  .gr-stats small { display: none; }
  .gr-ranking-table { font-size: .8rem; }
  .gr-ranking-table th, .gr-ranking-table td { padding: .5rem .35rem; }
}
