@font-face {
  font-family: "Tilda Sans";
  src: url("./pupil-auth.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
:root {
  --ink: #152c3b;
  --muted: #647782;
  --bg: #f4f7ff;
  --accent: #327bff;
  --line: #dfe6f3;
  font: 400 16px/1.5 "Tilda Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: #2163da; text-underline-offset: 3px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4vw;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.auth-header > span { color: var(--muted); }
.auth-brand { display: block; line-height: 0; flex: none; }
.auth-brand img { display: block; width: 210px; max-width: 100%; height: 66px; object-fit: contain; object-position: center; border-radius: 14px; }
.auth-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.auth-card {
  max-width: 480px;
  margin: clamp(28px, 7vh, 70px) auto;
  padding: 36px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 55px #163e8210;
}
.auth-card-logo { display: block; width: 100%; height: 122px; object-fit: contain; object-position: center; border-radius: 18px; margin-bottom: 24px; }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: 2px; color: var(--accent); }
h1 { margin: 12px 0 15px; font-size: 34px; letter-spacing: -.7px; line-height: 1.15; }
.auth-intro { margin: 0 0 26px; color: var(--muted); font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
.auth-form { display: grid; gap: 17px; }
.auth-form > label { display: grid; gap: 7px; font-size: 16px; font-weight: 600; }
.auth-form input:not([type="checkbox"]):not([type="hidden"]) {
  min-width: 0; width: 100%; min-height: 49px; padding: 11px 13px;
  background: #fff; color: var(--ink); border: 1px solid #c6d2e8; border-radius: 8px; font-weight: 400;
}
a:focus-visible, button:focus-visible { outline: 3px solid #8bb3ff; outline-offset: 3px; }
.auth-form input:not([type="checkbox"]):not([type="hidden"]):not([autocomplete="one-time-code"]):focus {
  border: 1px solid var(--accent); outline: none; box-shadow: none;
}
.auth-forgot { justify-self: end; margin-top: -6px; font-size: 15px; text-decoration: none; }
.auth-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px;
  padding: 12px 24px; border: 0; border-radius: 999px; background: var(--accent);
  font-weight: 650; font-size: 18px; color: #fff; text-align: center; text-decoration: none; cursor: pointer;
}
.auth-primary:hover { background: #2163da; }
.auth-block { width: 100%; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: 14px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.auth-google { min-height: 40px; display: flex; align-items: center; justify-content: center; }
.auth-google > div { flex: none; width: 100%; }
.auth-google [role="button"] { box-sizing: border-box; width: 100% !important; max-width: none !important; min-width: 0 !important; height: var(--google-button-height, 40px) !important; border-radius: 999px !important; overflow: hidden; }
.auth-google-placeholder {
  display: flex; width: 100%; min-height: 46px; justify-content: center; align-items: center; gap: 13px;
  border: 1px solid #d8dce1; border-radius: 24px; background: #fff; color: #3c4043;
}
.auth-google-placeholder > span { font: 700 20px Arial, sans-serif; color: #4285f4; }
.auth-google-error, .auth-notice { padding: 13px 16px; border: 1px solid #bfd2f0; border-radius: 10px; background: #edf4ff; color: var(--ink); }
.auth-notice { max-width: 480px; margin: 22px auto 0; }
.auth-hint { margin: -8px 0 0; color: var(--muted); font-size: 14px; }
.auth-form > .auth-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 400; line-height: 1.4; }
.auth-consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.auth-switch { margin: 24px 0 0; text-align: center; color: var(--muted); }
.auth-switch a { font-weight: 600; text-decoration: none; }
.auth-terms { font-size: 12px; line-height: 1.4; text-align: center; color: var(--muted); margin: 20px 0 0; }
.auth-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; padding: 22px 16px 28px; font-size: 13px; }
.auth-footer a { color: var(--muted); }
.auth-login .auth-header { padding-block: 10px; }
.auth-login .auth-brand img { width: 180px; height: 44px; }
.auth-login .auth-main { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; }
.auth-login .auth-card { width: 100%; max-width: 430px; margin: 14px auto; padding: 24px; }
.auth-login .auth-card-logo { display: block; width: 100%; height: 72px; margin-bottom: 12px; }
.auth-login .eyebrow { display: block; }
.auth-login .auth-intro { display: none; }
.auth-login h1 { margin: 8px 0 20px; font-size: 30px; }
.auth-login .auth-form { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 8px; }
.auth-login .auth-form > * { grid-column: 1 / -1; }
.auth-login .auth-form > label { gap: 5px; font-size: 14px; line-height: 1.4; }
.auth-login .auth-form > label:has([name="password"]) { grid-row: 2; }
.auth-login .auth-form input:not([type="hidden"]) { min-height: 42px; padding: 8px 12px; font-size: 16px; }
.auth-login .auth-forgot { grid-row: 2; grid-column: 2; align-self: start; margin: 0; font-size: 14px; line-height: 1.4; }
.auth-login .auth-primary { min-height: 40px; height: 40px; padding: 8px 16px; font-size: 16px; line-height: 24px; }
.auth-login .auth-divider { margin: 12px 0; }
.auth-login .auth-google { min-height: 40px; }
.auth-login .auth-switch { margin-top: 14px; font-size: 15px; }
.auth-login .auth-terms { margin-top: 12px; }
.auth-login .auth-footer { gap: 6px 16px; padding: 12px 16px 16px; }
@media (max-width: 700px) {
  .auth-header { padding: 14px 20px; }
  .auth-header > span { display: none; }
  .auth-brand img { width: 170px; height: 54px; }
  .auth-main { padding: 0 14px; }
  .auth-card { padding: 26px 24px; margin-block: 26px; }
  .auth-card-logo { height: 105px; margin-bottom: 20px; }
  h1 { font-size: 30px; }
  .auth-intro { font-size: 17px; }
}
@media (max-width: 360px) {
  .auth-card { padding: 22px 18px; }
  h1 { font-size: 28px; }
}
@media (max-height: 700px) {
  .auth-login .auth-header { padding-block: 8px; }
  .auth-login .auth-brand img { width: 145px; height: 28px; }
  .auth-login .auth-card { padding: 16px; margin-block: 4px; }
  .auth-login .auth-card-logo { height: 54px; margin-bottom: 8px; }
  .auth-login h1 { margin-bottom: 12px; font-size: 28px; }
  .auth-login .auth-form { row-gap: 8px; }
  .auth-login .auth-form > label { gap: 4px; }
  .auth-login .auth-form input:not([type="hidden"]) { min-height: 40px; padding-block: 7px; }
  .auth-login .auth-divider { margin-block: 6px; font-size: 12px; }
  .auth-login .auth-switch { margin-top: 8px; font-size: 14px; }
  .auth-login .auth-terms { margin-top: 8px; font-size: 12px; line-height: 1.35; }
  .auth-login .auth-footer { display: none; }
}
.auth-code { position: relative; min-width: 0; }
.auth-code-boxes { display: none; }
.auth-code-enhanced .auth-code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; pointer-events: none; }
.auth-code-boxes span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; max-height: 62px; border: 1px solid #c6d2e8; border-radius: 10px; background: #fff; font-size: 30px; font-weight: 650; }
.auth-form .auth-code-enhanced input:not([type="checkbox"]):not([type="hidden"]) { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 1; color: transparent; -webkit-text-fill-color: transparent; caret-color: transparent; background: transparent; border: 0; padding: 0; font-size: 30px; outline: none; box-shadow: none; }
.auth-code-enhanced:focus-within .is-current { border: 1px solid #8b96a5; background: #fff; }
.auth-code-enhanced:focus-within .auth-code-boxes { outline: none; box-shadow: none; }
.auth-resend { margin-top: 20px; text-align: center; }
.auth-text-button { padding: 5px; border: 0; background: none; color: #2163da; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.auth-text-button:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.auth-code-intro strong { overflow-wrap: anywhere; }
.auth-verification .auth-card { max-width: 480px; padding: 28px; margin-block: 20px; }
.auth-verification .auth-card-logo { height: 64px; margin-bottom: 14px; }
.auth-verification h1 { font-size: 30px; }
@media (max-width: 400px) {
  .auth-verification .auth-card { padding: 20px 16px; }
  .auth-verification h1 { font-size: 28px; }
  .auth-code-enhanced .auth-code-boxes { gap: 5px; }
  .auth-code-boxes span { font-size: 26px; border-radius: 8px; }
}

.auth-existing-intro strong { color:var(--ink); overflow-wrap:anywhere; }
.auth-existing-help { margin:0 0 22px; color:var(--muted); font-size:18px; line-height:1.5; }
.auth-existing-draft { margin:0 0 24px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; font-size:16px; line-height:1.45; }
.auth-existing-actions { display:grid; gap:12px; }
.auth-secondary { display:inline-flex; align-items:center; justify-content:center; min-height:51px; padding:12px 24px; border:1px solid #c6d2e8; border-radius:999px; color:var(--ink); background:#fff; font-size:18px; font-weight:650; text-align:center; text-decoration:none; }
.auth-secondary:hover { background:#f4f7ff; }
