/* Match the deck builder: Segoe UI for forms, Beleren for headings and tabs. */
@font-face {
  font-family: "Beleren";
  src: url("../fonts/Beleren.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --panel: #f4f6f8;
  --ink: #17202a;
  --muted: #687583;
  --line: #cfd6de;
  --accent: #2f6fed;
  --account-blue: var(--accent);
  --account-border: var(--line);
}

* { box-sizing: border-box; }

.account-page {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  min-height: 100svh;
  color: var(--ink);
  background: var(--panel);
  font: 14px/1.5 "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

.account-visual {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
  background: #e9f1ff;
}
.account-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-header {
  padding: clamp(28px, 4vw, 64px);
  border: 0;
  background: transparent;
}

.account-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  letter-spacing: normal;
}

.account-brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid rgb(47 111 237 / 38%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(47 111 237 / 19%), transparent 62%);
  box-shadow: inset 0 0 20px rgb(47 111 237 / 8%);
}

.account-brand-mark::before,
.account-brand-mark::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgb(47 111 237 / 52%);
  border-radius: 50%;
  content: "";
}

.account-brand-mark::after {
  inset: 15px;
  background: var(--accent);
  box-shadow: 0 0 14px rgb(47 111 237 / 45%);
}

.account-brand-copy { display: grid; gap: 2px; }
.account-brand-kicker {
  color: var(--accent);
  font: 700 10px/1.3 "Segoe UI", system-ui, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.account-brand-title { font: 400 23px/1 "Beleren", Georgia, serif; }

.account-visual-copy {
  padding: clamp(28px, 4vw, 64px);
  padding-bottom: clamp(48px, 7vh, 88px);
  color: #193a6c;
}
.account-visual-kicker {
  margin: 0 0 20px;
  color: #365c94;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.account-visual-copy h2 {
  margin: 0;
  font: 400 clamp(44px, 5vw, 80px)/1.08 "Beleren", Georgia, serif;
  letter-spacing: -.025em;
}

.account-main.auth {
  display: grid;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 100svh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 64px clamp(32px, 4vw, 80px);
  border-left: 1px solid rgb(47 111 237 / 8%);
}

.account-card {
  width: 100%;
  max-width: 380px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.account-card h1 { margin-bottom: 12px; font: 400 32px/1.2 "Beleren", Georgia, serif; }
.account-card p { color: var(--muted); }
.account-card > p:first-of-type { margin: 0 0 32px; }

.account-tabs {
  position: relative;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.account-tabs button {
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: 600 14px/1.4 "Beleren", Georgia, serif;
  transition: color 260ms ease;
}
.account-tabs button:hover { color: var(--accent); }
.account-tabs [aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}
.account-tabs.has-indicator [aria-selected="true"] { border-bottom-color: transparent; }
.account-tabs-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  pointer-events: none;
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1), width 260ms cubic-bezier(.22, 1, .36, 1);
}
.account-panels {
  /* Leave room for focus rings while clipping the moving form. */
  margin: -4px;
  padding: 4px;
}
.account-panels.is-animating { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .account-tabs button,
  .account-tabs-indicator { transition: none; }
}

.account-form { gap: 20px; }
.account-form label {
  color: var(--muted);
  font: 600 12px/1.5 "Segoe UI", system-ui, sans-serif;
  gap: 7px;
}
.account-form input:not([type="checkbox"]) {
  -webkit-user-select: text;
  user-select: text;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  border-color: var(--line);
  border-radius: 8px;
  font: 400 14px/1.5 "Segoe UI", system-ui, sans-serif;
}
.account-form input:focus {
  outline: 0;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(47 111 237 / 13%);
}
.account-form input[aria-invalid="true"] { border-color: #c25462; }
.account-form input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgb(194 84 98 / 13%);
}
.account-field { display: grid; gap: 7px; }
.account-field-error {
  padding: 8px 10px;
  border: 1px solid #e9c9cf;
  border-left: 3px solid #c25462;
  border-radius: 6px;
  background: #fff1f3;
  color: #9b3544;
  font: 400 12px/1.5 "Segoe UI", system-ui, sans-serif;
}
.account-form input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.account-form .check { gap: 10px; color: var(--muted); font-size: 13px; font-weight: 400; }
.account-form button { min-height: 44px; }
.account-form > p { margin: 0; }
.account-status { margin: 16px 0 0; font-size: 13px; }
.account-page :is(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

@media (max-width: 900px) {
  .account-page { grid-template-columns: minmax(0, 1fr); }
  .account-visual { position: relative; height: 240px; min-height: 0; }
  .account-art { object-position: center 42%; }
  .account-header { padding: 24px 32px; }
  .account-visual-copy { padding: 0 32px 28px; }
  .account-visual-kicker { display: none; }
  .account-visual-copy h2 { font-size: 36px; }
  .account-visual-copy h2 br { display: none; }
  .account-main.auth { min-height: calc(100svh - 240px); padding: 40px 32px; border-left: 0; }
}

@media (max-width: 480px) {
  .account-visual { height: 190px; }
  .account-header { padding: 24px; }
  .account-brand-title { font-size: 20px; }
  .account-brand-kicker { font-size: 9px; }
  .account-visual-copy { padding: 0 24px 24px; }
  .account-visual-copy h2 { font-size: 30px; }
  .account-main.auth { min-height: calc(100svh - 190px); padding: 36px 24px; }
  .account-card h1 { font-size: 28px; }
  .account-tabs { gap: 20px; }
  .account-form input:not([type="checkbox"]) { font-size: 16px; }
}
