@font-face{font-family:'Andika';src:url('/assets/brand/fonts/andika/andika_regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Andika';src:url('/assets/brand/fonts/andika/andika_700_latin.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Andika';src:url('/assets/brand/fonts/andika/andika_700_latin_ext.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
:root {
  color-scheme: light;
  --navy: #142b49;
  --navy-hover: #203d61;
  --red: #c82032;
  --red-hover: #a81729;
  --muted: #56667d;
  --line: #d6dfeb;
  --canvas: #f3f6fa;
  --field: #e9eff7;
  --field-border: #66758a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
  color: var(--navy);
  background: var(--canvas);
  font: 16px/1.55 "Andika";
  padding: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) var(--safe-area-inset-right, env(safe-area-inset-right, 0px)) var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
}
body > header, body > main, body > footer, .auth-card, .auth-card > * { min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
button:disabled { cursor: default; opacity: .55; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 22px max(32px, calc((100vw - 1280px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
header .brand { display: inline-flex; flex: 0 1 240px; align-items: center; min-width: 0; }
header img { display: block; width: 240px; max-width: 100%; height: auto; }
.header-actions { display: flex; align-items: center; gap: 24px; flex: none; }
.home-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.home-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header-package { min-height: 44px; padding: 10px 22px; border: 1px solid var(--navy); border-radius: 9px; background: var(--navy); color: #fff; font-size: 15px; font-weight: 600; }
.header-package:hover { background: var(--navy-hover); }
main.auth-page { width: 100%; margin: 0; display: grid; place-items: center; padding: 52px 24px; }
.auth-card {
  width: min(540px, 100%);
  padding: 32px 40px 34px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 12px #142b4909, 0 20px 45px #142b4905;
}
.login { text-align: center; }
.login h1, .login h2, .email-heading h1, .email-heading h2, .auth-error-card h1, .auth-error-card h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.7px;
}
.login h1::after, .login h2::after { content: ""; display: block; width: 72px; height: 3px; margin: 16px auto 18px; border-radius: 2px; background: var(--red); }
.description { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.6; }
#authProviders { display: grid; gap: 10px; }
.action {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid #a7b8ce;
  border-radius: 9px;
  color: var(--navy);
  background: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  appearance: none;
}
.action:hover { border-color: var(--field-border); background: #f6f8fb; }
.action.primary { border-color: var(--navy); background: var(--navy); color: #fff; }
.action.primary:hover { border-color: var(--navy-hover); background: var(--navy-hover); }
.action:disabled { cursor: default; opacity: .55; }
.provider { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; gap: 10px; }
.provider-icon { display: grid; place-items: center; }
.provider-label { grid-column: 2; }
.provider svg { width: 22px; height: 22px; }
.provider .mail { fill: none; stroke: currentColor; stroke-width: 1.7; }
.provider-divider { display: flex; align-items: center; gap: 16px; margin: 5px 0; color: var(--muted); font-size: 13px; }
.provider-divider::before, .provider-divider::after { content: ""; height: 1px; background: #a7b8ce; flex: 1; }
.email-heading { margin: 0 0 22px; }
.email-heading h1, .email-heading h2 { margin-top: 14px; font-size: 27px; }
.email-heading p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.back-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; text-align: left; }
.back-link:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.field-label { display: block; margin: 0 0 8px; color: var(--navy); font-size: 16px; font-weight: 600; }
#authEmail {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 2px solid var(--field-border);
  border-radius: 9px;
  background: var(--field);
  color: var(--navy);
  font-size: 16px;
  line-height: 1.5;
}
#authEmail:hover { border-color: var(--navy); }
#authEmail:focus-visible { border-color: var(--navy); outline-color: #c1d1e6; outline-offset: 2px; }
#authEmailContinue { margin-top: 20px; }
#authNotice { margin-top: 24px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.auth-notice-row { display: flex; align-items: flex-start; gap: 12px; }
#authNoticeRead { appearance: auto; width: 18px; height: 18px; flex: 0 0 18px; margin: 3px 0 0; accent-color: var(--navy); }
.auth-notice-link { margin: 6px 0 0 30px; }
.auth-notice-button { display: inline; padding: 0; border: 0; background: none; color: var(--red); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-notice-button:hover { color: var(--red-hover); }
.auth-feedback { min-height: 94px; margin-top: 16px; }
.auth-feedback p, .auth-error-card #authStatus { min-height: 42px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.auth-feedback[data-error=true] p, .auth-error-card #authStatus { color: var(--red-hover); }
.auth-secondary { display: flex; min-height: 44px; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; margin-top: 8px; }
.auth-secondary button, .auth-secondary a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 5px 0; border: 0; background: none; color: var(--red); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-secondary button:hover, .auth-secondary a:hover { color: var(--red-hover); }
.auth-recovery { margin: 8px 0 0; text-align: right; }
.auth-recovery button { min-height: 44px; padding: 4px 0; border: 0; background: none; color: var(--red); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.auth-card-links { display: flex; justify-content: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-card-links a { color: var(--red); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
footer { width: min(1280px, calc(100% - 64px)); margin: 0 auto; padding: 18px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; }
footer div { display: flex; flex-wrap: wrap; gap: 20px; }
footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.help { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; }
.auth-error-card h1, .auth-error-card h2 { font-size: 27px; margin-bottom: 16px; }
.auth-error-card #authProviders { margin-top: 18px; }
.auth-error-card .auth-secondary { justify-content: flex-start; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#authNoticeDialog { width: min(800px, calc(100vw - 32px)); height: min(800px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); padding: 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--navy); background: #fff; }
#authNoticeDialog::backdrop { background: #142b4970; }
#authNoticeClose { display: block; width: auto; min-height: 44px; margin: 0 0 12px auto; padding: 8px 18px; border: 1px solid #a7b8ce; border-radius: 8px; background: #fff; color: var(--navy); }
#authNoticeFrame { display: block; width: 100%; height: calc(100% - 56px); border: 0; }
#authPackageRequired { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: #142b494d; backdrop-filter: blur(5px); }
.package-dialog { width: min(560px, 100%); padding: 28px; border: 1px solid #fff; border-radius: 16px; background: #fff; box-shadow: 0 20px 70px #142b4929; text-align: center; }
.package-info { width: 56px; height: 56px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: #e4eefb; color: var(--navy); }
.package-info svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#authPackageTitle { margin: 0 0 14px; font-size: 25px; font-weight: 600; line-height: 1.35; letter-spacing: -.4px; }
#authPackageDescription { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.package-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.package-actions .primary { grid-column: 1 / -1; }
#authPackageStatus { margin: 12px 0 0; min-height: 1.5em; color: var(--red-hover); font-size: 13px; }
body[data-package-required=true] { overflow: hidden; }
@media (max-width: 680px) {
  header { flex-wrap: wrap; gap: 14px; padding: 16px 20px; }
  header .brand { flex-basis: 200px; }
  header img { width: 200px; }
  .header-actions { gap: 15px; }
  .home-link { font-size: 14px; }
  .header-package { padding: 10px 14px; font-size: 14px; }
  main.auth-page { padding: 30px 18px; }
  .auth-card { padding: 28px 26px; }
  .login h1, .login h2 { font-size: 28px; }
  footer { width: calc(100% - 40px); padding-block: 16px; }
}
@media (max-width: 460px) {
  header .brand { flex-basis: 176px; }
  header img { width: 176px; }
  .header-actions { width: 100%; justify-content: space-between; gap: 12px; }
  body[data-auth-mode=login] .header-actions { width: auto; }
  main.auth-page { padding: 24px 16px; }
  .auth-card { padding: 25px 22px; border-radius: 12px; }
  .login h1, .login h2 { font-size: 26px; }
  .description { font-size: 14px; margin-bottom: 22px; }
  .action { padding-inline: 12px; font-size: 15px; }
  #authNotice { font-size: 11px; }
  .email-heading h1, .email-heading h2 { font-size: 24px; }
  footer { flex-wrap: wrap; gap: 6px; font-size: 10px; }
  #authPackageRequired { padding: 16px; }
  .package-dialog { padding: 24px 20px; }
  #authPackageTitle { font-size: 23px; }
  #authPackageDescription { font-size: 14px; }
  .package-actions { gap: 10px; }
}
@media (max-height: 600px) { main.auth-page { padding-block: 24px; } header { padding-block: 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

.auth-error-message { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.auth-error-message, .auth-error-card #authStatus { min-height: 6.6em; }
.auth-reference { min-height: 1.6em; margin: 14px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.auth-error-card .account-return { display: flex; min-height: 44px; align-items: center; color: var(--red); font-size: 13px; }
@media (max-width: 460px) { .auth-error-message, .auth-error-card #authStatus { min-height: 9.9em; } }
