@font-face {
  font-family: Inter; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/inter-latin-700-normal.woff2") format("woff2");
}

:root {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ui-ink);
  background: var(--ui-canvas);
}
* { box-sizing: border-box; }
body, h1, p { margin: 0; }
[hidden] { display: none !important; }
body {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 48px);
  background: radial-gradient(ellipse at 50% 38%, var(--ui-tint), transparent 65%);
}
.sign-in-layout {
  --gutter: clamp(22px, 5vw, 36px);
  display: grid;
  gap: 14px;
  width: min(100%, 592px);
  min-width: 0;
  margin: auto;
}
.sign-in-cover {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 202px;
  padding: 26px var(--gutter);
  border-radius: 16px;
  background: linear-gradient(110deg, var(--ui-nav-end), var(--ui-nav) 72%);
  color: #fff;
  box-shadow: 0 2px 6px #22162715;
}
.sign-in-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: auto;
  max-width: 51%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  mask-image: linear-gradient(to right, transparent, #000 44%);
  pointer-events: none;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #faf6fa;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
}
.book-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 34px;
  border: 1px solid #f2dcc660;
  border-radius: 8px;
  background: #ffffff0b;
  box-shadow: inset 0 1px 0 #ffffff14;
}
.book-mark::after {
  content: "";
  width: 20px;
  height: 20px;
  background: #f4dfc7;
  mask: url("/assets/class-book.svg") center / contain no-repeat;
}
h1 {
  max-width: 100%;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.045em;
}
.intro {
  max-width: 65%;
  margin-top: 7px;
  color: #f0e9f1;
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}

.sign-in-panel {
  min-width: 0;
  padding: 28px var(--gutter);
  border: 1px solid var(--ui-rule);
  border-radius: 14px;
  background: var(--ui-surface);
  box-shadow: 0 2px 5px #21152808;
}
label {
  display: block;
  margin-bottom: 6px;
  color: var(--ui-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
input + label { margin-top: 17px; }
input, button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
}
input {
  display: block;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--ui-rule) 80%, var(--ui-muted));
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-size: 16px;
}
input:hover { border-color: var(--ui-muted); }
:is(input, button):focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.primary-action {
  background: var(--ui-accent);
  color: var(--ui-on-accent, white);
  box-shadow: 0 1px 3px #21152814;
}
.primary-action:hover:enabled { background: color-mix(in srgb, var(--ui-accent) 90%, var(--ui-ink)); }
form .primary-action { margin-top: 22px; }
.actions { display: grid; gap: 10px; }
#enroll { border-color: var(--ui-rule); background: var(--ui-surface); color: var(--ui-accent); }
#enroll:hover:enabled { background: var(--ui-tint); }
button:disabled { opacity: .65; cursor: wait; }
svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.window-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 16px;
  margin-top: 18px;
  border-top: 1px solid var(--ui-rule);
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.55;
}
.window-hint svg { width: 16px; height: 16px; margin-top: 2px; color: var(--ui-accent); }
.notice {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid var(--ui-rule);
  border-radius: 8px;
  background: var(--ui-tint);
  color: var(--ui-ink);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.notice strong, .notice span, .notice code { display: block; }
.notice span:empty, .notice code:empty { display: none; }
.notice span { margin-top: 2px; }
.notice code { margin-top: 6px; font: 12px/1.5 ui-monospace, monospace; user-select: all; }
.notice.error { background: light-dark(#fbf0f1, #392a30); color: light-dark(#853b48, #f6bdc7); border-color: light-dark(#e7c8cb, #70434e); }
.notice[data-offline] { background: light-dark(#fcf5e9, #392f23); color: light-dark(#785327, #f5d4a7); border-color: light-dark(#e8d4b8, #715740); }

@media (max-width: 600px) {
  .sign-in-cover { min-height: 172px; }
  .wordmark { margin-bottom: 16px; font-size: 18px; }
  h1 { font-size: 28px; }
  .intro { max-width: 72%; }
}
@media (max-width: 400px) {
  .sign-in-art { opacity: .3; mask-image: linear-gradient(to right, transparent, #000 72%); }
  .intro { max-width: 85%; }
}
@media (max-height: 540px) {
  body { padding: 10px; }
  .sign-in-layout { gap: 10px; }
  .sign-in-cover { min-height: 0; padding-block: 14px; }
  .wordmark { margin-bottom: 8px; font-size: 17px; }
  .book-mark { width: 26px; height: 27px; }
  .book-mark::after { width: 17px; height: 17px; }
  h1 { font-size: 28px; }
  .intro { margin-top: 4px; }
  .sign-in-panel { padding-block: 16px; }
  form .primary-action, input + label { margin-top: 12px; }
}
@media (forced-colors: active) {
  .sign-in-art { display: none; }
  .sign-in-cover, button { border: 1px solid ButtonText; }
  .book-mark::after { background: CanvasText; forced-color-adjust: none; }
}

a.wordmark { text-decoration: none; }
.account-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.account-links a, .account-link { color: var(--ui-accent); font-size: 14px; font-weight: 600; text-underline-offset: 3px; }
.account-links a:focus-visible, a.wordmark:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.account-help { font-size: 14px; line-height: 1.5; color: var(--ui-muted); margin: 5px 0; }
@media (max-height: 540px) {
  html:has(.sign-in-layout) { scrollbar-width: none; }
  .account-links { margin-top: 6px; }
}

@media (min-width: 480px) and (max-height: 540px) {
  .sign-in-layout:has(form[action="/v1/auth/login"]) {
    grid-template-columns: minmax(136px, .68fr) minmax(242px, 1.32fr);
    align-items: stretch;
  }
  .sign-in-layout:has(form[action="/v1/auth/login"]) .sign-in-cover {
    justify-content: flex-start;
    padding: 18px 14px;
  }
  .sign-in-layout:has(form[action="/v1/auth/login"]) .sign-in-art {
    opacity: .24;
    max-width: 100%;
  }
  .sign-in-layout:has(form[action="/v1/auth/login"]) .intro { max-width: 100%; }
  .sign-in-layout:has(form[action="/v1/auth/login"]) .sign-in-panel { padding: 16px; }
}
