/* Hallmark v2.0.0 | full redesign | scope: app | genre: atmospheric | theme: Learnova Premium | signature: an open book in a luminous orbit | routes: login, register */
/* Critique: a single illustration carries the brand; the form stays quiet and directly actionable. */
/* Reference: user supplied split-screen login; preserve Learnova typography and existing form wiring. */
/* Hallmark · waive 39b · User reference requires full-width sign-in inputs and actions with accessible hit targets · Preserve this authentication form and its accessible controls while reducing the desktop composition to the requested 80 percent. */
/* Hallmark · finish-review: subagent · 2 findings resolved: 320px heading decoration and lower violet wave. */
:root {
  --auth-paper: #f3f1f8;
  --auth-surface: #fefcff;
  --auth-disabled: #e9e1f6;
  --auth-disabled-ink: #53456c;
  --auth-ink: var(--ink);
  --auth-muted: var(--muted);
  --auth-border: #ddd7e7;
  --auth-field-border: #8f829f;
  --auth-input: #fbfaff;
  --auth-primary: #6d28e8;
  --auth-hover: #452ba8;
  --auth-active: #392287;
  --auth-focus: #7554dc;
  --auth-focus-shadow: rgb(117 84 220 / 15%);
  --auth-midnight: #140d29;
  --auth-night-tint: rgb(20 13 41 / 78%);
  --auth-hero-text: #fff8ff;
  --auth-hero-muted: #ddd1ef;
  --auth-glow: rgb(153 99 255 / 32%);
  --auth-cyan: #abf3ff;
  --auth-shadow: rgb(47 30 76 / 14%);
  --auth-overlay: rgb(20 13 41 / 58%);
  --auth-danger: #a22047;
  --auth-danger-bg: #fff2f5;
  --auth-amber: #9a5611;
  --auth-good: #207452;
  --auth-transparent: transparent;
  --auth-body: var(--font-body);
  --auth-display: var(--font-heading);
  --auth-page-glow: #e5d6ff;
  --auth-wave: #dbccff;
  --auth-primary-end: #4520a7;
  --auth-white-line: #ffffff;
  --auth-form-ink: #160a38;
  --auth-wave-dark: #39217f;
  --auth-wave-deep: #251452;
}

html:has(.auth-page), body:has(.auth-page) { overflow-x: clip; }

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 3vw, 48px);
  background: var(--auth-paper);
  color: var(--auth-ink);
  font-family: var(--auth-body);
  caret-color: var(--auth-primary);
}

.auth-page ::selection { background: var(--auth-focus-shadow); color: var(--auth-ink); }
.auth-page :is(a, button, input):focus-visible { outline: 2px solid var(--auth-focus); outline-offset: 3px; }
.auth-page [hidden] { display: none; }

.auth-shell {
  width: min(100%, 1192px);
  min-height: min(690px, calc(100dvh - 80px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-radius: 26px;
  background: var(--auth-surface);
  box-shadow: 0 20px 60px var(--auth-shadow);
}

.auth-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: space-between;
  gap: 288px;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 26px 0 0 26px;
  overflow: clip;
  color: var(--auth-hero-text);
  background: var(--auth-midnight);
}

.auth-art, .auth-glow, .auth-hero::after { position: absolute; inset: 0; pointer-events: none; }
.auth-art { z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: center 76%; }
.auth-hero::after {
  content: '';
  z-index: -1;
  background: linear-gradient(180deg, var(--auth-night-tint), var(--auth-transparent) 22% 62%, var(--auth-midnight) 98%);
}

.auth-glow {
  z-index: -2;
  background: radial-gradient(ellipse at 37% 43%, var(--auth-glow), var(--auth-transparent) 60%);
  animation: auth-glow 4800ms ease-in-out both;
}

.auth-spark {
  position: absolute;
  z-index: -1;
  inset: 28% auto auto 74%;
  width: 9px;
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--auth-cyan);
  box-shadow: 0 0 20px var(--auth-cyan);
  animation: auth-float 4600ms ease-in-out both;
}

.auth-hero-brand .logo { color: var(--auth-hero-text); }
.auth-hero-copy h2, .auth-panel h1, .auth-dialog h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: break-word;
  font-family: var(--auth-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.auth-hero-copy h2 { color: var(--auth-hero-text); font-size: clamp(36px, 4.4vw, 65px); }
.auth-hero-copy p { margin: 16px 0 0; color: var(--auth-hero-muted); font-size: 16px; text-wrap: pretty; }

.auth-side {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 24px clamp(24px, 4.5vw, 64px) 32px;
}

.auth-nav { display: flex; align-items: center; justify-content: flex-end; min-height: 36px; }
.auth-mobile-brand { display: none; }
.auth-nav a:not(.logo), .auth-link, .auth-switch a {
  color: var(--auth-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.auth-nav a:not(.logo) { display: inline-flex; align-items: center; min-height: 36px; font-size: 14px; }
.auth-nav a:hover, .auth-link:hover, .auth-switch a:hover { color: var(--auth-hover); }
.auth-panel {
  width: min(100%, 408px);
  margin: auto;
  padding-block: 20px 0;
  animation: auth-enter 420ms ease-out both;
}

.auth-panel h1 { font-size: clamp(29px, 3.15vw, 44px); }
.auth-intro { margin: 8px 0 20px; color: var(--auth-muted); font-size: 16px; line-height: 1.45; text-wrap: pretty; }
.auth-panel form { display: grid; gap: 12px; }
.auth-field { display: grid; gap: 4px; min-width: 0; }
.auth-field > label { font-size: 14px; font-weight: 700; }
.auth-input { position: relative; min-width: 0; }

.auth-input input {
  width: 100%;
  min-height: 46px;
  padding: 12px;
  border: 1px solid var(--auth-field-border);
  border-radius: 11px;
  background: var(--auth-input);
  color: var(--auth-ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 160ms, box-shadow 160ms;
}

.auth-input input:hover { border-color: var(--auth-muted); }
.auth-input input:focus { box-shadow: 0 0 0 4px var(--auth-focus-shadow); }
.auth-input input[aria-invalid="true"] { border-color: var(--auth-danger); }
.auth-input-password input { padding-inline-end: 70px; }
.auth-toggle {
  position: absolute;
  inset: 3px 5px 3px auto;
  min-width: 54px;
  border: 0;
  border-radius: 7px;
  color: var(--auth-primary);
  background: var(--auth-transparent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.auth-toggle:hover { background: var(--auth-focus-shadow); }
.auth-field-error { color: var(--auth-danger); font-size: 13px; line-height: 1.4; }
.auth-strength { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.auth-strength small { color: var(--auth-muted); font-size: 12px; min-height: 1lh; }
.auth-strength-bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.auth-strength-bars span { height: 3px; border-radius: 4px; background: var(--auth-border); }
.auth-strength-bars[data-strength="1"] span:first-child { background: var(--auth-danger); }
.auth-strength-bars[data-strength="2"] span:nth-child(-n+2) { background: var(--auth-amber); }
.auth-strength-bars[data-strength="3"] span:nth-child(-n+3),
.auth-strength-bars[data-strength="4"] span { background: var(--auth-good); }

.auth-options { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.auth-consent { justify-content: flex-start; column-gap: 4px; }
.auth-consent .auth-field-error { flex-basis: 100%; }
.auth-checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; cursor: pointer; }
.auth-checkbox input { width: 17px; height: 17px; margin: 0; accent-color: var(--auth-primary); }
.auth-link { min-height: 36px; padding: 0; border: 0; background: var(--auth-transparent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.auth-message {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--auth-danger-bg);
  color: var(--auth-danger);
  font-size: 14px;
  line-height: 1.4;
}

.auth-submit {
  position: relative;
  width: 100%;
  min-height: 47px;
  padding: 12px 16px;
  border: 0;
  border-radius: 11px;
  background: var(--auth-primary);
  color: var(--auth-surface);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 170ms, transform 170ms;
}

.auth-submit:hover:not(:disabled) { background: var(--auth-hover); transform: translateY(-1px); }
.auth-submit:active:not(:disabled) { background: var(--auth-active); transform: translateY(0); }
.auth-submit:disabled { background: var(--auth-disabled); color: var(--auth-disabled-ink); cursor: wait; }
.auth-spinner {
  display: none;
  position: absolute;
  inset: calc(50% - 7px) auto auto 14px;
  width: 14px;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  border-inline-end-color: var(--auth-transparent);
  border-radius: 50%;
  animation: auth-spin 700ms linear 3;
}
.auth-submit[aria-busy="true"] .auth-spinner { display: block; }
.auth-switch { margin: 16px 0 0; color: var(--auth-muted); font-size: 14px; line-height: 1.5; }
.auth-switch a { display: inline-block; padding-block: 4px; }
.auth-dialog {
  width: min(440px, calc(100% - 32px));
  margin: auto;
  padding: 24px;
  border: 1px solid var(--auth-border);
  border-radius: 18px;
  background: var(--auth-surface);
  color: var(--auth-ink);
  font-family: var(--auth-body);
}
.auth-dialog::backdrop { background: var(--auth-overlay); }
.auth-dialog p { color: var(--auth-muted); line-height: 1.55; }

@keyframes auth-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-glow { to { transform: translate(7%, 4%) scale(1.11); opacity: .6; } }
@keyframes auth-float { from { transform: translateY(-5px) rotate(27deg); } to { transform: translateY(12px) rotate(50deg); } }
@keyframes auth-spin { to { transform: rotate(1turn); } }

.account-email { max-width: 220px; overflow: clip; text-overflow: ellipsis; white-space: nowrap; }
.account-logout { white-space: nowrap; }

@media (761px <= width <= 900px) {
  .auth-art { object-fit: contain; object-position: center 45%; }
}

@media (max-width: 760px) {
  .auth-page { display: block; padding: 0; background: var(--auth-surface); }
  .auth-shell { display: block; min-height: 100dvh; border-radius: 0; box-shadow: none; }
  .auth-hero { display: none; }
  .auth-side { padding: 16px clamp(16px, 5vw, 40px) 32px; }
  .auth-nav { justify-content: space-between; gap: 8px; }
  .auth-mobile-brand { display: block; }
  .auth-panel { padding-block: clamp(24px, 5vh, 40px) 0; }
  .topbar:has(.account-email) .searchbox { display: none; }
  .user-right:has(.account-email) { min-width: 0; gap: 8px; }
  .account-email { min-width: 0; max-width: 28vw; }
  .account-logout { padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::before, .auth-page *::after { animation: none; transition: none; }
  .auth-submit:hover:not(:disabled) { transform: none; }
}

/* Reference layout: book artwork and a quiet, full-width authentication form. */
.auth-page { position: relative; isolation: isolate; padding: clamp(20px,4vw,64px); background: radial-gradient(ellipse at 15% 28%,var(--auth-page-glow),var(--auth-transparent) 52%),var(--auth-paper); }
.auth-page::before,.auth-page::after { content: ''; position: fixed; z-index: -1; pointer-events: none; width: 68%; height: 48%; border-radius: 50%; background: var(--auth-wave); opacity: .55; transform: rotate(-27deg); }
.auth-page::before { inset: -30% auto auto -21%; }
.auth-page::after { inset: auto -27% -31% auto; }
.auth-shell { width: min(100%,1480px); min-height: min(810px,calc(100dvh - 100px)); border: 1px solid var(--auth-white-line); border-radius: 34px; overflow: clip; }
.auth-hero { border-radius: 33px 0 0 33px; padding: clamp(40px,4.5vw,76px); gap: 300px; }
.auth-art { object-position: center 64%; }
.auth-hero-brand .logo { font-size: 34px; }
.auth-hero-copy h2 { font-size: clamp(42px,4.5vw,72px); line-height: 1.08; text-wrap: initial; }
.auth-hero-copy h2::after { content: ''; display: block; width: 118px; height: 6px; margin: 12px 0 20px 48px; border-radius: 50%; background: var(--auth-focus); transform: rotate(-5deg); }
.auth-hero-copy p { color: var(--auth-hero-text); font-size: clamp(16px,1.45vw,22px); margin-top: 16px; }
.auth-side { padding: 28px clamp(32px,5vw,84px) 32px; }
.auth-nav a:not(.logo) { gap: 12px; font-size: 16px; min-height: 44px; }
.auth-icon { width: 24px; height: 24px; flex: none; }
.auth-panel { width: min(100%,580px); padding-block: 32px 0; animation: none; color: var(--auth-form-ink); }
.auth-panel h1 { position: relative; color: var(--auth-form-ink); font-size: clamp(30px,3.3vw,52px); line-height: 1.18; text-wrap: initial; }
.auth-panel h1 > svg { display: inline-block; vertical-align: top; width: 30px; height: 34px; margin-inline-start: 7px; color: var(--auth-primary); }
.auth-intro { font-size: clamp(16px,1.3vw,20px); margin-block: 12px 24px; }
.auth-panel form { gap: 16px; }
.auth-field { gap: 8px; }
.auth-field > label { font-size: 16px; font-weight: 600; }
.auth-input input { min-height: 54px; padding-inline: 52px 16px; font-size: 18px; border-radius: 13px; }
.auth-input-password input { padding-inline-end: 80px; }
.auth-input-icon { position: absolute; inset: 0 auto 0 20px; display: flex; align-items: center; color: var(--auth-muted); pointer-events: none; }
.auth-toggle { font-size: 16px; }
.auth-options { margin-block: 0 4px; }
.auth-checkbox,.auth-link { font-size: 16px; min-height: 44px; }
.auth-checkbox input { width: 21px; height: 21px; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 58px; border-radius: 15px; background: linear-gradient(115deg,var(--auth-primary),var(--auth-primary-end)); font: 600 20px/1.4 var(--auth-display); letter-spacing: -.02em; box-shadow: 0 10px 22px var(--auth-focus-shadow); }
.auth-divider { display: flex; align-items: center; gap: 20px; color: var(--auth-muted); margin-block: 24px; }
.auth-divider::before,.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-border); }
.auth-google { width: 100%; display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 56px; padding: 12px 20px; border: 1px solid var(--auth-field-border); border-radius: 13px; background: var(--auth-surface); color: var(--auth-form-ink); font: 600 18px/1.4 var(--auth-body); cursor: pointer; transition: background-color 160ms,transform 160ms; }
.auth-google img { width: 26px; height: 26px; object-fit: contain; }
.auth-google:active:not(:disabled) { transform: translateY(1px); }
.auth-google:disabled { opacity: .55; cursor: not-allowed; }
.auth-google-status { margin: 8px 0 0; font-size: 14px; color: var(--auth-muted); }
.auth-google-status:empty { display: none; }
.auth-switch { margin-top: 20px; text-align: center; font-size: 16px; }
@media (hover:hover) { .auth-google:hover:not(:disabled) { background: var(--auth-input); } }
@media (min-width:1100px) and (max-height:850px) { .auth-page { padding: 28px; }.auth-shell { min-height: 720px; }.auth-hero { gap: 272px; padding: 44px; }.auth-side { padding: 20px 48px 28px; }.auth-panel { padding-top: 24px; }.auth-panel h1 { font-size: 40px; }.auth-intro { margin-bottom: 20px; }.auth-divider { margin-block: 20px; } }
@media (761px <= width <= 1000px) { .auth-page { padding: 20px; }.auth-hero { padding: 32px; }.auth-side { padding-inline: 28px; }.auth-art { object-fit: cover; }.auth-panel h1 { font-size: 30px; }.auth-options { align-items: start; }.auth-google { font-size: 16px; } }
@media (max-width:760px) { .auth-page { padding: 0; }.auth-page::before,.auth-page::after { display: none; }.auth-shell { border: 0; border-radius: 0; }.auth-side { padding: 20px 20px 32px; }.auth-panel { padding-top: 36px; }.auth-panel h1 { font-size: 32px; }.auth-panel h1 > svg { width: 24px; }.auth-mobile-brand .logo { font-size: 21px; }.auth-nav a:not(.logo) { font-size: 14px; gap: 8px; }.auth-input input { font-size: 16px; }.auth-options { gap: 4px; }.auth-checkbox,.auth-link { font-size: 14px; }.auth-submit { font-size: 18px; }.auth-google { font-size: 16px; }.auth-hero-copy h2 { font-size: 42px; } }
@media (prefers-reduced-motion:reduce) { .auth-google { transition: none; } }

.auth-art { inset: clamp(-200px,calc(240px - 25vw),0px) 5% auto; width: 90%; height: auto; object-fit: contain; }
.auth-spark { display: none; }
.auth-hero-brand .logo-mark { width: 56px; height: 56px; border-radius: 16px; }
.auth-hero-brand .logo-mark svg { width: 30px; height: 30px; }
.auth-hero::before { content: ''; position: absolute; z-index: -1; inset: auto -24% -22% auto; width: 140%; height: 42%; border-radius: 65% 35% 0 0; background: linear-gradient(135deg,var(--auth-wave-dark),var(--auth-wave-deep)); transform: rotate(-13deg); pointer-events: none; }
@media (max-width:360px) { .auth-panel h1 > svg { display: none; } }

/* Desktop reference at 80 percent: resize layout rather than browser zoom or a scaled hit area. */
@media (min-width: 1001px) {
  .auth-page { padding: clamp(24px, 3.2vw, 52px); }
  .auth-page .auth-shell { width: min(100%, 1184px); min-height: min(648px, calc(100dvh - 80px)); border-radius: 28px; }
  .auth-page .auth-hero { padding: clamp(32px, 3.6vw, 60px); gap: 240px; border-radius: 27px 0 0 27px; }
  .auth-page .auth-art { inset-block-start: clamp(-160px, calc(192px - 20vw), 0px); }
  .auth-page .auth-hero-brand .logo { font-size: 27px; }
  .auth-page .auth-hero-brand .logo-mark { width: 45px; height: 45px; border-radius: 13px; }
  .auth-page .auth-hero-brand .logo-mark svg { width: 24px; height: 24px; }
  .auth-page .auth-hero-copy h2 { font-size: clamp(34px, 3.6vw, 58px); }
  .auth-page .auth-hero-copy h2::after { width: 94px; height: 5px; margin: 8px 0 16px 40px; }
  .auth-page .auth-hero-copy p { font-size: clamp(16px, 1.16vw, 18px); margin-top: 12px; }
  .auth-page .auth-side { padding: 24px clamp(24px, 4vw, 68px) 24px; }
  .auth-page .auth-nav a:not(.logo) { gap: 8px; }
  .auth-page .auth-panel { width: min(100%, 464px); padding-top: 24px; }
  .auth-page .auth-panel h1 { font-size: clamp(30px, 2.64vw, 42px); }
  .auth-page .auth-panel h1 > svg { width: 24px; height: 27px; margin-inline-start: 6px; }
  .auth-page .auth-intro { font-size: 16px; margin-block: 8px 20px; }
  .auth-page .auth-panel form { gap: 12px; }
  .auth-page .auth-field { gap: 8px; }
  .auth-page .auth-field > label { font-size: 14px; }
  .auth-page .auth-input input { min-height: 44px; padding-block: 8px; padding-inline-start: 40px; font-size: 16px; border-radius: 11px; }
  .auth-page .auth-input-icon { inset-inline-start: 16px; }
  .auth-page .auth-input-icon .auth-icon { width: 20px; height: 20px; }
  .auth-page .auth-options { margin-block: 0 4px; }
  .auth-page .auth-checkbox, .auth-page .auth-link { font-size: 14px; }
  .auth-page .auth-checkbox input { width: 17px; height: 17px; }
  .auth-page .auth-submit { gap: 12px; min-height: 47px; padding-block: 8px; border-radius: 12px; font-size: 16px; }
  .auth-page .auth-divider { gap: 16px; margin-block: 20px; }
  .auth-page .auth-google { gap: 12px; min-height: 45px; padding: 8px 16px; border-radius: 11px; font-size: 16px; }
  .auth-page .auth-google img { width: 21px; height: 21px; }
  .auth-page .auth-switch { margin-top: 16px; font-size: 14px; }
}

@media (min-width: 1001px) and (max-height: 850px) {
  .auth-page { padding: 24px; }
  .auth-page .auth-shell { min-height: 576px; }
  .auth-page .auth-hero { gap: 216px; padding: 36px; }
  .auth-page .auth-art { inset-block-start: clamp(-200px, calc(112px - 20vw), -144px); }
  .auth-page .auth-side { padding: 16px 40px 24px; }
  .auth-page .auth-panel { padding-top: 20px; }
  .auth-page .auth-panel h1 { font-size: 32px; }
  .auth-page .auth-intro { margin-bottom: 16px; }
  .auth-page .auth-divider { margin-block: 16px; }
}
