:root {
  color-scheme: light;
  --ink: #101a31;
  --muted: #59667c;
  --blue: #1670d2;
  --green: #147f70;
  --paper: #fbfcff;
  --line: #e3e9f0;
  --danger: #c93643;
  --soft-danger: #fdf5f5;
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
code { font-size: inherit; }
[hidden] { display: none !important; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 58%, transparent);
  outline-offset: 3px;
}

.auth-layout { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-story {
  min-width: 0;
  padding: 38px 46px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  background: linear-gradient(160deg, #f2f4ff 0%, #eaf3ff 52%, #e9f6f2 100%);
}
.auth-wordmark { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; border-radius: 8px; }
.auth-wordmark .auth-mark { width: 34px; height: 24px; }
.auth-wordmark .auth-name { width: 112px; height: 26px; }
.auth-story-copy { max-width: 520px; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.auth-story h1 { margin: 0 0 14px; font-size: clamp(34px, 3.1vw, 46px); line-height: 1.12; letter-spacing: -.02em; }
.auth-story h1 em { font-style: normal; color: var(--blue); background: linear-gradient(90deg, var(--blue), var(--green)); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-story-copy > p:last-child { max-width: 34ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.auth-foot { margin: 0; color: #727f93; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.auth-form-side { min-width: 0; display: flex; align-items: center; justify-content: center; padding: 38px 48px; background: #fff; }
.auth-form-wrap { width: min(100%, 420px); }
.return-chip { width: max-content; max-width: 100%; min-height: 40px; margin-bottom: 22px; padding: 6px 15px 6px 7px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; }
.return-chip svg { flex: none; width: 26px; height: 26px; border-radius: 8px; }
.return-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.return-chip em { color: var(--muted); font-style: normal; font-weight: 500; }
.auth-form-wrap h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; }
.form-subtitle { margin: 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.field input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; transition: border-color 150ms ease, background 150ms ease; }
.field input:hover { border-color: #aeb9c8; }
.field input:focus-visible { border-color: var(--blue); }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.field-error input { border-color: var(--danger); background: var(--soft-danger); }
.form-error { display: flex; align-items: flex-start; gap: 8px; margin: -1px 0 16px; color: #ad2432; font-size: 14px; font-weight: 600; line-height: 1.45; }
.form-error svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 15.5px; font-weight: 650; transition: transform 140ms var(--ease-out), background 150ms ease, border-color 150ms ease; }
.button:active { transform: scale(.98); }
.button:disabled { cursor: wait; opacity: .56; }
.button-primary { width: 100%; border: 1px solid var(--ink); background: var(--ink); color: #fff; }
.button-primary:hover { background: #1d2b4a; }
.button-quiet { padding: 0 28px; border: 1px solid #cbd5e1; background: transparent; color: var(--ink); }
.button-quiet:hover { background: #edf1f6; }
.form-hint { margin: 16px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.outage-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 40px 24px; background: #f5f6fa; text-align: center; }
.outage-card { width: min(100%, 460px); }
.outage-sign { width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 20px; background: #fdecec; color: var(--danger); }
.outage-sign svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.outage-card h1 { margin: 0 0 10px; font-size: 25px; line-height: 1.22; }
.outage-card p { margin: 0 0 10px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.outage-card .outage-small { color: #727f93; font-size: 13.5px; }
.outage-card form { margin-top: 22px; }

.skip-link { position: fixed; top: -100px; left: 20px; z-index: 1000; padding: 11px 16px; border-radius: 0 0 10px 10px; background: var(--ink); color: #fff; text-decoration: none; }
.skip-link:focus { top: 0; }
.account-page { min-height: 100vh; min-height: 100dvh; background: #f5f6fa; }
.account-header { position: sticky; top: 0; z-index: 40; min-height: 64px; padding: 10px var(--mentio-gutter); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
.account-brand { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; border-radius: 10px; text-decoration: none; }
.account-brand img:first-child { width: 34px; height: auto; }
.account-brand img:last-child { width: 112px; height: auto; }
.account-main { width: min(100% - 40px, 620px); margin: 0 auto; padding: 34px 0 48px; }
.account-main > h1 { margin: 0 0 6px; font-size: 28px; }
.account-intro { margin: 0 0 26px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.account-panel { margin-bottom: 18px; padding: 24px 24px 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.account-panel h2 { margin: 0 0 4px; font-size: 17px; }
.panel-subtitle { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.panel-copy { margin-bottom: 0; }
.account-submit { width: auto; padding-inline: 26px; }
.account-panel .form-error { margin-top: 0; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-story { padding: 22px; gap: 16px; }
  .auth-story-copy { margin-top: 2px; }
  .auth-story h1 { margin: 0; font-size: 25px; line-height: 1.15; }
  .auth-story .eyebrow, .auth-story-copy > p:last-child, .auth-foot { display: none; }
  .auth-form-side { align-items: flex-start; padding: 26px 22px 30px; }
}

@media (max-width: 600px) {
  .account-header { min-height: 64px; padding: 8px 16px; }
  .account-brand img:last-child { display: none; }
  .account-main { width: min(100% - 32px, 620px); padding-top: 24px; }
  .account-panel { padding: 20px 18px; }
  .account-submit { width: 100%; }
}

@media (max-height: 700px) and (max-width: 900px) {
  .auth-story { padding-block: 16px; }
  .auth-story h1 { font-size: 22px; }
  .auth-form-side { padding-block: 20px 24px; }
  .return-chip { margin-bottom: 16px; }
  .form-subtitle { margin-bottom: 16px; }
}

@media (hover: hover) and (pointer: fine) {
  .button:hover { text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .auth-story h1 em { background: none; -webkit-text-fill-color: currentColor; }
  .button, .return-chip, .account-panel { border: 1px solid currentColor; }
}
