@font-face { font-family: "Student Display"; src: url("assets/display.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
:root {
  --ground: #0a0118; --surface: #160936; --surface-raised: #24104d; --ink: #ffffff;
  --muted: #c6b6da; --line: #927dac; --divider: #3e2465; --accent: #ffa9e5;
  --accent-hover: #ffcff1; --error: #ffb3ac; --ease: cubic-bezier(.16, 1, .3, 1);
  color: var(--ink); background: var(--ground); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark; font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; scrollbar-color: var(--line) var(--ground); }
body { margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; text-underline-offset: 4px; }
a, button { touch-action: manipulation; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--ground); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset: 12px auto auto 12px; z-index: 20; transform: translateY(-170%); padding: 12px 16px; color: var(--ground); background: var(--accent); }
.skip-link:focus { transform: none; }
.container { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--divider); }
.header-inner { min-height: 80px; display: flex; align-items: center; gap: 40px; }
.brand { font-family: "Student Display", sans-serif; font-weight: 700; font-size: 2rem; line-height: 1; letter-spacing: -.025em; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.brand-accent { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 32px; margin-inline-start: auto; }
.main-nav a, .back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; }
.main-nav a:hover, .back-link:hover { color: var(--accent); }
.button, .submit { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: var(--ground); padding: 12px 24px; font-size: .9375rem; line-height: 1.5; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color 180ms var(--ease), transform 120ms var(--ease); }
.button:hover, .submit:hover:not(:disabled) { background: var(--accent-hover); }
.button:active, .submit:active:not(:disabled) { transform: translateY(1px); }
.button-small { min-height: 44px; padding: 9px 20px; }
.hero { position: relative; isolation: isolate; min-height: 430px; margin-top: 24px; display: flex; align-items: center; overflow: hidden; border-radius: 6px; background: #071810; }
.hero-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 24, 16, .72), rgba(7, 24, 16, .15) 67%, transparent); }
.hero-copy { padding: 48px; max-width: 66%; }
h1, h2, h3 { margin-top: 0; }
h1, h2 { font-family: "Student Display", sans-serif; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
h1 { font-size: clamp(2.75rem, 5vw, 4rem); margin-bottom: 20px; }
.hero-copy p { max-width: 40ch; margin: 0 0 28px; color: #d1e2d8; }
h2 { font-size: clamp(2rem, 3vw, 2.625rem); margin-bottom: 12px; }
.content-section { padding-top: 64px; scroll-margin-top: 24px; }
.section-heading { margin-bottom: 24px; }
.section-heading p, .guide-heading p { color: var(--muted); margin: 0; max-width: 65ch; }
.table-scroll { overflow-x: auto; border: 1px solid var(--divider); border-radius: 6px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: start; font-size: .875rem; font-variant-numeric: tabular-nums; }
.teams-table { min-width: 720px; }
.rankings-table { min-width: 480px; }
th { background: var(--surface-raised); font-size: .8125rem; padding: 16px 24px; color: #d1e2d8; white-space: nowrap; text-align: start; }
th:last-child { text-align: end; }
.empty-cell { padding: 0; }
.empty-state { padding: 48px 24px; text-align: center; }
.empty-state h3 { font-size: 1rem; margin-bottom: 8px; font-weight: 600; }
.empty-state p { margin: 0 auto; color: var(--muted); max-width: 60ch; font-size: .875rem; }
.guide-section { display: grid; grid-template-columns: 1fr 1.5fr; gap: 72px; padding-block: 80px; scroll-margin-top: 24px; }
.guide-details { border-top: 1px solid var(--divider); }
details { border-bottom: 1px solid var(--divider); }
summary { padding: 20px 8px; font-weight: 600; cursor: pointer; }
summary::marker { color: var(--accent); }
details p { color: var(--muted); margin: 0; padding: 0 8px 24px; font-size: .9375rem; max-width: 65ch; }
.site-footer { border-top: 1px solid var(--divider); color: var(--muted); }
.footer-inner { display: flex; align-items: center; gap: 24px; padding-block: 24px; }
.footer-inner .brand { color: var(--ink); font-size: 1.625rem; }
.footer-inner p { margin: 0 auto 0 0; font-size: .875rem; }
.footer-inner > a:last-child { font-size: .875rem; min-height: 44px; display: inline-flex; align-items: center; }

/* Account access stays a separate page; the authentication destination remains explicit. */
.login-page .header-inner { justify-content: space-between; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100svh - 81px); padding-block: 40px; gap: 64px; }
.login-intro { position: relative; isolation: isolate; min-width: 0; overflow: hidden; border-radius: 6px; background: #071810; display: flex; align-items: flex-end; }
.login-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 73% center; z-index: -2; }
.login-intro::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #071810 5%, rgba(7, 24, 16, .8) 28%, rgba(7, 24, 16, .1) 65%); }
.login-intro-copy { padding: 40px; }
.login-intro p { color: #d1e2d8; margin-bottom: 0; }
.login-intro .intro-title { font-family: "Student Display", sans-serif; font-weight: 700; font-size: clamp(2.5rem, 3.5vw, 3.5rem); line-height: 1.1; color: var(--ink); margin: 0 0 20px; }
.login-panel { display: flex; align-items: center; min-width: 0; }
.form-wrap { max-width: 420px; width: 100%; margin-inline: auto; padding-block: 16px; }
.login-panel h1, .login-panel h2 { font-size: 2.5rem; }
.subtitle { margin: 0 0 24px; color: var(--muted); }
.security-note { font-size: .875rem; line-height: 1.6; color: #d1e2d8; background: var(--surface); border: 1px solid var(--divider); padding: 16px; border-radius: 4px; margin: 0 0 24px; }
.security-note > strong:first-child { display: block; color: var(--accent); margin-bottom: 6px; }
.field { margin-bottom: 20px; }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 8px; }
input { caret-color: var(--accent); }
input:not([type="checkbox"]) { width: 100%; min-height: 48px; padding: 10px 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; transition: border-color 180ms var(--ease); }
input::placeholder { color: var(--muted); opacity: 1; }
input:hover, input:focus-visible { border-color: var(--accent); }
input:focus-visible { outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--error); }
.password-wrap { position: relative; }
.password-wrap input { padding-inline-end: 60px; }
.password-toggle { position: absolute; inset-block: 2px; inset-inline-end: 2px; width: 44px; min-height: 44px; display: grid; place-items: center; border: 0; border-radius: 2px; background: transparent; color: var(--muted); }
.password-toggle:hover { color: var(--accent); background: var(--surface-raised); }
.password-toggle svg { width: 24px; height: 24px; }
.password-toggle[aria-pressed="false"] .eye-slash { display: none; }
.field-error { color: var(--error); font-size: .875rem; margin: 6px 0 0; }
.field-error:empty { display: none; }
.caps-warning { color: #f4d18e; font-size: .875rem; margin: 8px 0 0; }
.remember-label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; margin-bottom: 0; }
.remember-label input { width: 20px; height: 20px; flex-shrink: 0; margin: 0; accent-color: var(--accent); }
.hint { margin: 4px 0 20px; color: var(--muted); font-size: .875rem; }
.submit { width: 100%; }
.submit:disabled { background: #bac8b5; border-color: #bac8b5; cursor: not-allowed; }
.form-status { min-height: 1.6em; margin: 12px 0 0; color: var(--muted); font-size: .875rem; text-align: center; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-label { color: var(--accent); font-weight: 600; margin: 0 0 16px; }
.account-details { padding-block: 16px; margin-block: 24px; border-block: 1px solid var(--divider); }
.account-details dt { color: var(--muted); font-size: .875rem; }
.account-details dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.success-back { display: flex; justify-content: center; margin-top: 16px; }
.login-footer { color: var(--muted); font-size: .8125rem; text-align: center; margin-top: 24px; }
.toast-region { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; width: min(420px, calc(100% - 40px)); z-index: 10; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; padding: 16px; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(3, 14, 8, .3); pointer-events: auto; animation: toast-in 240ms var(--ease); }
.toast-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast strong { display: block; color: var(--accent); }
.toast[data-type="error"] strong { color: var(--error); }
.toast p { margin: 4px 0 0; font-size: .875rem; }
.toast-close { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface); }
.toast-close:hover { color: var(--accent); }
.toast-close svg { width: 20px; height: 20px; vertical-align: middle; }
@keyframes toast-in { from { transform: translateY(8px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (max-width: 1023px) {
  .header-inner { gap: 24px; }
  .main-nav { gap: 20px; }
  .hero-copy { padding: 36px; max-width: 70%; }
  .hero { min-height: 390px; }
  .guide-section { gap: 40px; }
  .login-layout { gap: 32px; }
  .login-intro-copy { padding: 28px; }
}
@media (max-width: 767px) {
  .container { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; gap: 8px 16px; min-height: 72px; padding-block: 12px; }
  .brand { font-size: 1.75rem; }
  .header-inner > .button { margin-inline-start: auto; }
  .main-nav { order: 3; width: 100%; margin: 0; gap: 24px; }
  .main-nav a { min-height: 40px; }
  .hero { margin-top: 16px; min-height: 390px; align-items: flex-end; }
  .hero-image { object-position: 66% center; }
  .hero::before { background: linear-gradient(0deg, rgba(7, 24, 16, .94), rgba(7, 24, 16, .8) 48%, rgba(7, 24, 16, .22)); }
  .hero-copy { padding: 28px 24px; max-width: 100%; }
  h1 { font-size: clamp(2.25rem, 9.5vw, 3rem); }
  .hero-copy p { max-width: 30ch; }
  .content-section { padding-top: 44px; }
  .section-heading p { font-size: .9375rem; }
  .empty-state { width: min(100%, 320px); text-align: start; padding: 32px 20px; }
  .empty-state p { margin-inline: 0; }
  th { padding: 14px 20px; }
  .guide-section { grid-template-columns: 1fr; gap: 24px; padding-block: 56px; }
  .footer-inner { flex-wrap: wrap; gap: 8px 20px; }
  .footer-inner .brand { width: 100%; }
  .login-layout { display: block; min-height: calc(100svh - 81px); padding-block: 32px; }
  .login-intro { display: none; }
  .form-wrap { padding: 0; }
  .login-page .header-inner { flex-wrap: nowrap; gap: 12px; }
  .login-page .back-link { font-size: .8125rem; }
  .login-panel h1, .login-panel h2 { font-size: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .button:active, .submit:active:not(:disabled) { transform: none; } }
@media (forced-colors: active) { .button, .submit, .toast-close { border: 1px solid ButtonText; } input[aria-invalid="true"] { border: 2px dashed CanvasText; } .toast { border: 2px solid CanvasText; } .hero::before, .login-intro::before { background: Canvas; } }
