@import url('./tokens.css');
@import url('./native-colours.css');
@font-face {font-family: Inter; font-style:normal; font-weight:100 900; font-display:swap; src:url('./inter.woff2') format('woff2');}
body {font-family:var(--tic-font-sans);}
.academy-auth {
  background:var(--tic-bg-primary) url('./academy-background.webp') center / cover no-repeat !important;
  color:var(--tic-text-primary);
}
.academy-auth .academy-wordmark {position:relative; margin:2rem 2rem 0; width:4rem; height:1rem;}
.academy-auth-main {gap:clamp(2rem,6vw,7rem); padding:3rem 5vw;}
.academy-intro {max-width:34rem; text-shadow:0 2px 20px var(--tic-black);}
.academy-intro .academy-kicker {font-size:var(--tic-text-caption-size); letter-spacing:.2em; text-transform:uppercase; color:var(--tic-text-secondary);}
.academy-intro h1 {margin:.75rem 0 1.5rem; font-size:clamp(3.5rem,8vw,7rem); font-weight:600; line-height:1.05; letter-spacing:-.055em; color:var(--tic-text-primary);}
.academy-intro p {font-size:1.2rem; line-height:1.6; max-width:29rem; color:var(--tic-text-primary);}
.academy-auth-card {border:1px solid rgb(var(--border-light)); border-radius:1.25rem; padding:2.5rem 2rem; box-shadow:0 16px 50px color-mix(in srgb,var(--tic-black) 25%,transparent);}
.academy-auth-card h2 {font-size:1.5rem;}
.academy-brand {display:flex; align-items:center; gap:.75rem; white-space:nowrap;}
.academy-brand img {width:2.5rem; height:auto;}
.academy-brand .academy-logo-dark {display:none;}
.dark .academy-brand .academy-logo-dark {display:block;}
.dark .academy-brand .academy-logo-light {display:none;}
.academy-brand span {border-left:1px solid rgb(var(--border-light)); padding-left:.75rem; letter-spacing:-.02em;}
@media(max-width:767px) {
  .academy-auth-main {flex-direction:column; gap:2rem; padding:2rem 1rem;}
  .academy-intro {width:min(100%,26rem);}
  .academy-intro h1 {font-size:3.75rem; margin:.5rem 0 1rem;}
  .academy-intro p {font-size:1rem;}
  .academy-auth-card {width:100%; max-width:26rem; padding:1.75rem 1.25rem;}
  .academy-auth .academy-wordmark {margin:1.5rem 1rem 0;}
}
@media(prefers-reduced-motion:reduce) {.academy-auth * {animation:none !important;}}
@media(forced-colors:active) {.academy-auth {background:Canvas !important;} .academy-intro h1,.academy-intro p,.academy-intro .academy-kicker {color:CanvasText;text-shadow:none;}}

html:not(.high-contrast) .btn-primary, html:not(.high-contrast) .academy-auth a[data-testid="openid"] {background-color:var(--tic-crimson); color:var(--tic-text-primary);}
html:not(.high-contrast) .btn-primary:hover, html:not(.high-contrast) .academy-auth a[data-testid="openid"]:hover {background-color:var(--tic-crimson-hover);}
.academy-auth a[data-testid="openid"]:focus-visible {outline:2px solid var(--tic-crimson-on-dark); outline-offset:4px;}

/* Keep native task/account controls on one row, including longer Resume text. */
@media(max-width:639px) {header[aria-label="Academy workspace"] .academy-brand {display:none;}}
/* Theme controls sit on the always-dark hero, outside the theme-swapping card. */
.academy-auth > .absolute.bottom-0 {background:var(--tic-bg-secondary); border:1px solid var(--tic-border-default); border-radius:.75rem; margin:1rem; padding:.25rem;}
.academy-auth > .absolute.bottom-0 button {color:var(--tic-text-primary) !important;}
@media(forced-colors:active) {.academy-auth > .absolute.bottom-0 {background:Canvas; border-color:CanvasText;} .academy-auth > .absolute.bottom-0 button {color:ButtonText !important;}}

.academy-auth-logo-hc {display:none;}
html.high-contrast:not(.dark) .academy-auth-logo {display:none;}
html.high-contrast:not(.dark) .academy-auth-logo-hc {display:block; width:4rem; height:1rem;}
html.high-contrast .academy-auth {background:rgb(var(--surface-primary)) !important; color:rgb(var(--text-primary));}
html.high-contrast .academy-intro,
html.high-contrast .academy-intro h1,
html.high-contrast .academy-intro p,
html.high-contrast .academy-intro .academy-kicker {color:rgb(var(--text-primary)); text-shadow:none;}
html.high-contrast .academy-auth > .absolute.bottom-0 {background:rgb(var(--surface-primary)); border-color:rgb(var(--border-light));}
html.high-contrast .academy-auth > .absolute.bottom-0 button {color:rgb(var(--text-primary)) !important;}
@media(forced-colors:active) {
  .academy-auth {background:Canvas !important;}
  .academy-intro h1,.academy-intro p,.academy-intro .academy-kicker {color:CanvasText !important; text-shadow:none;}
  .academy-auth > .absolute.bottom-0 {background:Canvas !important; border-color:CanvasText !important;}
  .academy-auth > .absolute.bottom-0 button {color:ButtonText !important;}
}

/* Login palette changes are atomic: native control fades otherwise leave old
   text/borders against the new canvas for 150–200ms. Scope to auth, not chat. */
.academy-auth, .academy-auth *, .academy-auth *::before, .academy-auth *::after {
  transition: none !important;
}
/* ThemeSelector has its own positioned row and themed outer surface. Flatten
   those inside the auth-owned shell so spacing/colours do not jump by mode. */
.academy-auth > .absolute.bottom-0 > div {background:transparent; padding:0;}
.academy-auth > .absolute.bottom-0 > div > .absolute {position:static; margin:0;}
.academy-auth > .absolute.bottom-0 button {min-width:44px; min-height:44px;}
html:not(.high-contrast) .academy-auth > .absolute.bottom-0 button:hover {
  background:var(--tic-bg-elevated);
}
html:not(.high-contrast) .academy-auth > .absolute.bottom-0 button:focus-visible {
  outline:2px solid var(--tic-text-primary); outline-offset:2px; box-shadow:none;
}
@media(forced-colors:active) {
  html:not(.high-contrast) .academy-auth > .absolute.bottom-0 button:hover {
    background:Highlight; color:HighlightText !important;
  }
  html:not(.high-contrast) .academy-auth > .absolute.bottom-0 button:focus-visible {
    outline-color:ButtonText;
  }
}

/* Companion artwork is normal light mode only. High contrast stays image-free. */
html:not(.dark):not(.high-contrast) .academy-auth {
  background: #FAFAFC url('./academy-background-light.webp') center / cover no-repeat !important;
  color: rgb(var(--text-primary));
}
html:not(.dark):not(.high-contrast) .academy-intro,
html:not(.dark):not(.high-contrast) .academy-intro h1,
html:not(.dark):not(.high-contrast) .academy-intro p {
  color: rgb(var(--text-primary)); text-shadow:none;
}
html:not(.dark):not(.high-contrast) .academy-intro .academy-kicker {
  color:rgb(var(--text-secondary)); text-shadow:none;
}
html:not(.dark):not(.high-contrast) .academy-auth-logo {display:none;}
html:not(.dark):not(.high-contrast) .academy-auth-logo-hc {display:block; width:4rem; height:1rem;}
html:not(.dark):not(.high-contrast) .academy-auth > .absolute.bottom-0 {
  background:rgb(var(--surface-primary)); border-color:rgb(var(--border-light));
}
html:not(.dark):not(.high-contrast) .academy-auth > .absolute.bottom-0 button {
  color:rgb(var(--text-primary)) !important;
}
html:not(.dark):not(.high-contrast) .academy-auth > .absolute.bottom-0 button:hover {
  background:rgb(var(--surface-hover));
}
html:not(.dark):not(.high-contrast) .academy-auth > .absolute.bottom-0 button:focus-visible {
  outline-color:rgb(var(--text-primary));
}
/* Keep system colour authority after the more specific light selectors. */
@media(forced-colors:active) {
  html:not(.dark):not(.high-contrast) .academy-auth {background:Canvas !important; color:CanvasText;}
  html:not(.dark):not(.high-contrast) .academy-intro,
  html:not(.dark):not(.high-contrast) .academy-intro h1,
  html:not(.dark):not(.high-contrast) .academy-intro p,
  html:not(.dark):not(.high-contrast) .academy-intro .academy-kicker {color:CanvasText !important;}
  html:not(.dark):not(.high-contrast) .academy-auth > .absolute.bottom-0 {background:Canvas !important; border-color:CanvasText;}
  html:not(.dark):not(.high-contrast) .academy-auth > .absolute.bottom-0 button {color:ButtonText !important;}
  html:not(.dark):not(.high-contrast) .academy-auth > .absolute.bottom-0 button:hover {background:Highlight; color:HighlightText !important;}
  html:not(.dark):not(.high-contrast) .academy-auth > .absolute.bottom-0 button:focus-visible {outline-color:ButtonText;}
}
