:root {
  color-scheme: light;

  --font-body: "Atkinson Hyperlegible",
    system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  --font-ui: "Lexend",
    system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;

  /* neutrals */
  --page: #F4F7F8;
  --page-accent: #E6EDF0;
  --surface: #FFFFFF;
  --surface-alt: #F0F5F6;
  --surface-strong: #D8E3E6;

  --text: #20272A;
  --muted: #69757B;
  --border: #C4D0D5;

  /* main / primary */
  --primary: #10B3BB;
  --primary-hover: #0E9BA2;
  --on-primary: #FDFEFE;

  /* secondary / structure */
  --secondary: #D8F2F3;
  --secondary-hover: #C7E6E8;
  --on-secondary: #1E2528;

  /* accents */
  --accent-1: #0C8E95;
  --accent-2: #73D3D8;
  --accent-3: #7BA38C;

  /* status */
  --success: #2F9B5C;
  --danger: #E51A22;
  --danger-soft: #FCE6E7;

  /* focus & shadows */
  --focus: rgba(16, 179, 187, 0.35);
  --shadow-lg: 0 28px 70px rgba(8, 40, 46, 0.22);
  --shadow-sm: 0 10px 24px rgba(8, 40, 46, 0.12);

  --radius-sm: 0.55rem;
  --radius-md: 0.9rem;
  --radius-lg: 1.5rem;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --page: #050708;
  --page-accent: #0A1114;
  --surface: #10171A;
  --surface-alt: #182126;
  --surface-strong: #223238;

  --text: #F4F7F8;
  --muted: #B0BEC5;
  --border: #3A4A52;

  --primary: #10B3BB;
  --primary-hover: #0C8E95;
  --on-primary: #031416;

  --secondary: #13333A;
  --secondary-hover: #18434C;
  --on-secondary: #F4F7F8;

  --accent-1: #26C5CD;
  --accent-2: #0A7177;
  --accent-3: #66C49E;

  --success: #40B879;
  --danger: #E51A22;
  --danger-soft: #3E1416;

  --focus: rgba(16, 179, 187, 0.55);
  --shadow-lg: 0 38px 96px rgba(0, 0, 0, 0.58);
  --shadow-sm: 0 16px 38px rgba(0, 0, 0, 0.42);
}

/* reset / base */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(circle at top left,
    var(--page-accent), var(--page));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

button,
input {
  font: inherit;
}

a {
  color: var(--primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* layout */

.shell {
  max-width: 1080px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.24),
    rgba(255,255,255,0));
  backdrop-filter: blur(20px);
  padding: 32px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.28);
}

@media (max-width: 880px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px;
    gap: 24px;
  }
}

/* brand column */

.brand {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-sigil {
  width: 32px;
  height: 32px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 0%,
    var(--primary), var(--accent-2));
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.45),
    0 16px 32px rgba(8, 40, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.brand-sigil::after {
  content: "";
  position: absolute;
  inset: 8px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  opacity: 0.9;
}

.brand-sigil span {
  width: 14px;
  height: 14px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.75);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.brand-name {
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--muted);
}

.brand-system {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.headline {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(32px, 3.2vw, 40px);
  letter-spacing: -0.03em;
}

.headline span {
  color: var(--primary);
}

.lede {
  margin-top: 8px;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.9);
  font-size: 13px;
  color: var(--muted);
  backdrop-filter: blur(10px);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.points {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  padding: 0;
}

.points li {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.points li span {
  margin-top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.9);
  background: linear-gradient(135deg,
    var(--secondary), var(--primary));
}

.notice {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.notice strong {
  color: var(--accent-1);
  font-weight: 500;
}

/* form column */

.form-card {
  background: radial-gradient(circle at 0% 0%,
    rgba(255,255,255,0.2), rgba(255,255,255,0));
  border-radius: 24px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(16, 179, 187, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
}

.form-card:focus-within::before {
  opacity: 1;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.form-title {
  font-family: var(--font-ui);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.form-subtitle {
  font-size: 13px;
  color: var(--muted);
}

.state-pill {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.85);
  background: linear-gradient(135deg,
    rgba(255,255,255,0.95),
    rgba(255,255,255,0.8));
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 4px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-label {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.input-shell {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(196, 208, 213, 0.9);
  padding: 7px 12px;
  gap: 8px;
}

.input-shell:focus-within {
  border-color: var(--primary);
  box-shadow:
    0 0 0 1px var(--primary),
    0 0 0 4px var(--focus);
}

.input-icon {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: linear-gradient(135deg,
    var(--secondary), var(--primary));
  opacity: 0.85;
}

input[type="email"],
input[type="password"] {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  color: var(--text);
  width: 100%;
}

input::placeholder {
  color: rgba(105,117,123,0.8);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
}

.helper-message {
  display: none;
  margin: 6px 0 0;
  padding: 6px 10px;
  color: var(--danger);
  background: var(--danger-soft);
  border-left: 3px solid var(--danger);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
}

.helper-message.visible {
  display: block;
}

.actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.primary-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: radial-gradient(circle at 0% 0%,
    #E8FBFC, var(--primary));
  color: var(--on-primary);
  box-shadow: 0 14px 28px rgba(8, 40, 46, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out,
    background 120ms ease-out;
}

.primary-btn span:first-child {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.85);
  background: linear-gradient(135deg,
    rgba(255,255,255,0.95),
    rgba(255,255,255,0.7));
}

.primary-btn:hover {
  background: radial-gradient(circle at 0% 0%,
    #DFF7F8, var(--primary-hover));
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(8, 40, 46, 0.7);
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(8, 40, 46, 0.7);
}

.ghost-link {
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.meta-row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

/* theme toggle */

.toggle-row {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.theme-toggle {
  border-radius: 999px;
  padding: 4px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.9);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.theme-button {
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-button[data-active="true"] {
  background: var(--secondary);
  color: var(--on-secondary);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}