:root {
  color-scheme: dark;
  background: #0d0e0d;
  color: #f1f3f0;
  --font: Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  font: 1rem/1.5 var(--font);
  --accent: #5B83C6;
  --muted: #aeb3ae;
  --edge: #282d29;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  display: grid;
  align-items: center;
  min-height: 100svh;
  margin: 0;
  padding: clamp(.75rem, 3vw, 3.2rem);
}

button, input { font: inherit; }
a { color: inherit; }
::selection { color: #16231a; background: #c9efe1; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.account {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(.75rem, 2.5vw, 2rem);
  width: min(100%, 78rem);
  min-height: min(46rem, calc(100svh - 6rem));
  padding: .65rem;
  margin-inline: auto;
  border: 1px solid #202320;
  border-radius: 1.2rem;
  background: #0a0b0a;
}

.showcase {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 31rem;
  padding: clamp(1.05rem, 3vw, 2.3rem);
  overflow: hidden;
  border-radius: .85rem;
  background: #090f1c;
}

.brand {
  display: inline-flex;
  gap: .7rem;
  min-height: 2.65rem;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 2rem;
  height: auto;
}

.brand-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* The ".re" ending: a blue gradient that keeps flowing, with a soft glow. */
.tld {
  background: linear-gradient(100deg, #5b8dff 0%, #8fd0ff 25%, #ffffff 50%, #8fd0ff 75%, #5b8dff 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 .45rem #6f9bff70);
}

@media (prefers-reduced-motion: no-preference) {
  .tld { animation: tld-flow 3.6s linear infinite; }
}

@keyframes tld-flow {
  to { background-position: 200% 0; }
}

.lightfield, .lightfield span {
  position: absolute;
  pointer-events: none;
}

.lightfield {
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 52% -17%, #7291c8 0%, #426096 18%, #24395f 36%, transparent 66%),
    linear-gradient(175deg, #1a2c51 8%, #101d35 49%, #090f1c 76%);
}

.lightfield::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle, #a1baea38 .6px, transparent 1.15px) 0 0 / 4px 5px;
  mask-image: linear-gradient(#000, #0005 57%, transparent);
  opacity: .24;
}

.lightfield::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse 42% 31% at 8% 6%, #090f1cc0, transparent);
}

.lightfield span {
  top: -18%;
  left: -18%;
  width: 135%;
  height: 65%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 45% 0%, #6686bf 3%, #375b9e8c 39%, transparent 73%);
  opacity: .7;
  filter: blur(1.2rem);
  transform: rotate(-10deg);
}

.lightfield span:last-child {
  left: 7%;
  background: radial-gradient(ellipse at 60% 0%, #4c6da8 8%, #29417f65 44%, transparent 74%);
  transform: rotate(12deg);
}


.form-area {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.65rem);
}

.form-panel { width: min(100%, 22.3rem); }

.form-panel h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.62rem, 2.15vw, 1.85rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -.027em;
}

.form-intro {
  margin: .48rem 0 clamp(1rem, 3.25vh, 1.85rem);
  color: var(--muted);
  text-align: center;
  font-size: .89rem;
}

.providers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.provider {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .53rem;
  min-height: 2.75rem;
  padding: .38rem .5rem;
  border: 1px solid #363b36;
  border-radius: .5rem;
  background: #101210;
  color: #f4f6f4;
  font-size: .86rem;
  font-weight: 650;
  cursor: pointer;
}

.provider:hover { background: #191f1a; border-color: #6c8a71; }
.provider:disabled { opacity: .65; cursor: default; }
.provider img { display: block; object-fit: contain; flex-shrink: 0; }
.provider[aria-busy="true"] { opacity: .9; cursor: progress; }
.provider[aria-busy="true"] img { display: none; }
.provider[aria-busy="true"]::before {
  content: ""; width: .9rem; height: .9rem; flex: 0 0 auto;
  border: 1.5px solid #ffffff30; border-top-color: #d9e4f7; border-radius: 50%;
  animation: provider-spin .75s linear infinite;
}
@keyframes provider-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .provider[aria-busy="true"]::before { animation: none; } }

.divider {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 1.08rem 0;
  color: #a2aaa2;
  text-align: center;
  font-size: .79rem;
}

.divider::before, .divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: var(--edge);
}

.account-form, .field { display: grid; min-width: 0; }
.account-form { gap: .84rem; }

.field {
  gap: .3rem;
  color: #ecefec;
  font-size: .86rem;
  font-weight: 600;
}

.field input {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: .53rem .68rem;
  border: 1px solid var(--edge);
  border-radius: .48rem;
  outline: none;
  background: #191b19;
  color: #f4f7f4;
  font-size: .94rem;
  font-weight: 400;
}

.field input::placeholder { color: #a3a9a3; opacity: 1; }
.field input:hover { border-color: #4b534c; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #3b65b42e; }
.field input:user-invalid { border-color: #e89690; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 3rem; }

.password-toggle {
  position: absolute;
  inset: .23rem .29rem .23rem auto;
  display: grid;
  place-items: center;
  width: 2.3rem;
  padding: 0;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: #9aa4b6;
  cursor: pointer;
}

.password-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle:hover { color: #fff; background: #ffffff12; }
.password-toggle[aria-pressed="true"] { color: #9fbaf0; }

.field-hint, .form-note, .switch-route {
  margin: 0;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 400;
}

.account-form[hidden] { display: none; }

.method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .3rem;
  margin-bottom: .95rem;
  padding: .25rem;
  border: 1px solid var(--edge);
  border-radius: .6rem;
  background: #101210;
}

.method {
  min-height: 2.3rem;
  padding: .3rem .5rem;
  border: 0;
  border-radius: .45rem;
  background: transparent;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 650;
  cursor: pointer;
}

.method:hover { color: #f4f7f4; }
.method[aria-pressed="true"] { background: #262c27; color: #f4f7f4; }

.check {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  color: #c4cad6;
  font-size: .86rem;
  cursor: pointer;
  user-select: none;
}

/* A custom box in the same dark blue as the main button. The tick is drawn with borders, no image needed. */
.check input {
  appearance: none;
  display: grid;
  flex: none;
  place-content: center;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  border: 1px solid #3a4658;
  border-radius: .35rem;
  background: #101315;
  cursor: pointer;
  transition: background 160ms, border-color 160ms, box-shadow 160ms;
}

.check input::after {
  width: .3rem;
  height: .6rem;
  margin-top: -.08rem;
  content: "";
  border: solid #fff;
  border-width: 0 .16rem .16rem 0;
  border-radius: .03rem;
  opacity: 0;
  transform: rotate(45deg) scale(.4);
  transition: opacity 140ms, transform 160ms cubic-bezier(.2, .9, .3, 1.3);
}

.check:hover input { border-color: #6b8fcf; }

.check input:checked {
  border-color: #5578b8;
  background: linear-gradient(180deg, #3f64a8 0%, #2a4780 100%);
  box-shadow: 0 4px 12px -6px #2a4780;
}

.check input:checked::after { opacity: 1; transform: rotate(45deg) scale(1); }
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .check input, .check input::after { transition: none; }
}
.optional { margin-left: .3rem; color: var(--muted); font-size: .76rem; font-weight: 400; }

/* Same dark blue as the glow on the left panel. */
.primary {
  min-height: 2.85rem;
  margin-top: .25rem;
  padding: .52rem .7rem;
  border: 1px solid #5578b8;
  border-radius: .48rem;
  background: linear-gradient(180deg, #3f64a8 0%, #2a4780 100%);
  box-shadow: inset 0 1px 0 #ffffff2e, 0 8px 20px -10px #2a4780;
  color: #fff;
  font-size: .92rem;
  font-weight: 650;
  cursor: pointer;
}

.primary:hover { border-color: #6b8fcf; background: linear-gradient(180deg, #4a72ba 0%, #31528f 100%); }
.primary:active { background: linear-gradient(180deg, #2a4780 0%, #223a6b 100%); }
.primary:disabled { opacity: .6; cursor: default; }
.primary:disabled:hover { border-color: #5578b8; background: linear-gradient(180deg, #3f64a8 0%, #2a4780 100%); }

/* A short red error on the field's own label row, with a red edge on the field. */
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }

.field-error {
  color: #ff8d8d;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .01em;
  text-align: right;
}

.field-error:empty { display: none; }

.field[data-invalid] input { border-color: #e5736f; box-shadow: 0 0 0 2px #e5736f26; }
.field[data-invalid] input:focus { border-color: #ef8a86; box-shadow: 0 0 0 3px #e5736f38; }

.switch-route { margin-top: 1.1rem; text-align: center; }
.switch-route a { color: #f2f6f0; font-weight: 650; text-underline-offset: .2rem; }
.switch-route a:hover { color: #d4f7c6; }
.form-note { margin-top: .48rem; text-align: center; font-size: .74rem; }

.provider-feedback, .feedback {
  margin: .55rem 0 0; padding: 0; border: 0; background: transparent;
  color: #a9b2c1; font: 400 .875rem/1.5 var(--font); letter-spacing: 0;
  overflow-wrap: anywhere;
}
.provider-feedback:empty, .feedback:empty { display: none; }
.feedback[data-tone="bad"], .provider-feedback[data-tone="bad"] { color: #f1a6ad; }
.feedback[data-tone="ok"] { color: #a7d7bf; }
.feedback a, .feedback-retry { text-underline-offset: .2em; }
.feedback-retry {
  margin-left: .3rem; padding: .2rem 0; border: 0; background: transparent;
  color: #d7e3f8; font: 500 .875rem/1.5 var(--font); text-decoration: underline; cursor: pointer;
}
.feedback-retry:disabled { opacity: .5; cursor: progress; }
.auth-toast {
  position: fixed; z-index: 100; right: 1.25rem; bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: .75rem; width: min(25rem, calc(100vw - 2.5rem));
  box-sizing: border-box; padding: .75rem .75rem .75rem 1rem;
  border: 1px solid #343b46; border-radius: .8rem; background: #14181f;
  box-shadow: 0 12px 36px -12px #000a; color: #e5e9f0;
  font: 400 .875rem/1.5 var(--font); letter-spacing: 0;
}
.auth-toast__icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; color: #efa2ab; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-toast__message { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.auth-toast__close { display: grid; place-items: center; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: .5rem; background: transparent; color: #a5afbf; cursor: pointer; }
.auth-toast__close:hover { color: #fff; background: #ffffff0a; }
.auth-toast__close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (max-width: 42rem) { .auth-toast { right: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); width: calc(100vw - 1.5rem); } }
input[aria-invalid="true"], .check[data-invalid] input {
  border-color: #ed858e;
  box-shadow: 0 0 0 2px #ed858e29;
}
.check[data-invalid] { color: #ffc1c4; }
#captcha-panel { position: relative; margin: 0 0 1rem; min-width: 0; }
.account-form #captcha-panel { margin: .25rem 0 .1rem; }
#captcha-widget { min-height: 65px; }
#captcha-status { margin: .4rem 0 0; color: #b9c8e6; font-size: .8rem; line-height: 1.5; }
#captcha-status:empty { display: none; }
#captcha-status:not([data-tone="bad"]) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
#captcha-status[data-tone="bad"] { color: #ffc1c4; }
#captcha-panel[data-invalid="true"] #captcha-widget { outline: 1px solid #ed858e; outline-offset: 3px; border-radius: .4rem; }

.dashboard-page {
  display: block;
  padding: 0;
  color-scheme: light;
  background: #fff;
  color: #181d25;
}

.dashboard-header {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem clamp(1.25rem, 5vw, 5rem);
  border-bottom: 1px solid #e5e8ed;
}

.dashboard-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  font-size: 1.06rem;
  font-weight: 700;
}

.dashboard-logout {
  padding: .45rem .85rem;
  border: 1px solid #d8dde5;
  border-radius: .45rem;
  background: #fff;
  color: #181d25;
  cursor: pointer;
}

.dashboard-logout:hover { background: #f4f6f9; }
.dashboard-logout:disabled { opacity: .65; cursor: wait; }

.dashboard-main {
  max-width: 68rem;
  margin-inline: auto;
  padding: clamp(3rem, 12vh, 7.5rem) clamp(1.25rem, 5vw, 5rem) 2rem;
  overflow-wrap: anywhere;
}

.dashboard-main h1 {
  margin: 0 0 .45rem;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.18;
  letter-spacing: -.035em;
}

.dashboard-main p { margin: 0 0 .85rem; color: #515c6d; }

@media (max-width: 48rem) {
  .form-area { padding-inline: 1rem; }
}

@media (min-width: 42.01rem) and (max-height: 44rem) {
  body { padding-block: .75rem; }
  .account { min-height: calc(100svh - 1.5rem); }
  .showcase { min-height: 27rem; }
  .form-area { padding-block: .63rem; }
  .form-intro { margin-bottom: .95rem; }
  .divider { margin-block: .65rem; }
  .account-form { gap: .6rem; }
}

@media (max-width: 42rem) {
  body { align-items: start; }
  .account { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .showcase { min-height: 0; padding: .8rem .95rem; }
  .form-area { padding: 1.6rem .45rem 1.15rem; }
  .form-intro { margin-bottom: 1.05rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .form-panel { animation: form-in 570ms cubic-bezier(.16, 1, .3, 1) both; }
  .lightfield span { animation: green-shift 4.5s ease-in-out both; }
  .lightfield span:last-child { animation-direction: reverse; }
  .field input, .provider, .primary { transition: background-color 180ms, border-color 180ms, box-shadow 180ms; }
}

@keyframes form-in {
  from { opacity: .46; transform: translateY(.65rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes green-shift {
  from { transform: translateX(-10%) rotate(-11deg); }
  to { transform: translate(7%, 13%) rotate(9deg) scale(1.1); }
}
