:root {
  color-scheme: light;
  --page: #ffffff;
  --surface: #ffffff;
  --ink: #17365f;
  --ink-strong: #0d2b50;
  --muted: #5d7795;
  --line: #b8d3f6;
  --line-strong: #91b9ec;
  --blue: #2874f0;
  --blue-strong: #1464dc;
  --blue-soft: #eaf3ff;
  --green: #087a43;
  --green-soft: #e9f8f0;
  --red: #b42318;
  --red-soft: #fff1f0;
  --amber: #8a5a00;
  --amber-soft: #fff8e7;
  --shadow: 0 22px 70px rgba(23, 54, 95, .1), 0 2px 8px rgba(23, 54, 95, .04);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; }

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--blue); }
h1, p { margin: 0; }

button:focus-visible,
input:focus-visible,
a:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid rgba(40, 116, 240, .25);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header,
.account-main,
.site-footer {
  width: min(720px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-strong);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.035em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  background: var(--blue);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: #ffffff;
}

.header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.account-main {
  min-height: calc(100dvh - 132px);
  display: grid;
  align-items: center;
  padding: 24px 0 48px;
}

.account-card {
  width: min(540px, 100%);
  margin-inline: auto;
  padding: 25px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow);
}

.loading-card {
  min-height: 340px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #d9e6f7;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 830;
  letter-spacing: .085em;
  text-transform: uppercase;
}

.account-card h1 {
  margin-top: 8px;
  font-size: clamp(34px, 10vw, 48px);
  line-height: 1.02;
  letter-spacing: -.048em;
  font-weight: 560;
}

.account-card .lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.sign-in-form {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}

.sign-in-form > label:not(.show-password) {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 740;
}

.sign-in-form input[type="email"],
.sign-in-form input[type="password"],
.sign-in-form input[type="text"] {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fbfcfd;
  color: var(--ink);
}

.sign-in-form input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(40, 116, 240, .09);
  outline: 0;
}

.sign-in-form input[aria-invalid="true"] { border-color: var(--red); }

.show-password {
  width: fit-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3d495b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
}

.show-password input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 790;
}

.primary-button {
  border: 0;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(40, 116, 240, .2);
}

a.primary-button { text-decoration: none; }
.primary-button:hover:not(:disabled) { background: var(--blue-strong); }
.primary-button:disabled, .secondary-button:disabled { opacity: .55; cursor: not-allowed; }
.button-progress { display: none; }
[data-loading="true"] .button-label { display: none; }
[data-loading="true"] .button-progress { display: inline; }

.secondary-button {
  margin-top: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #334155;
}

.new-participant {
  margin-top: 23px;
  padding: 15px;
  border-radius: 14px;
  background: #f3f6fa;
}

.new-participant strong { font-size: 13px; }
.new-participant p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.new-participant a { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 760; }

.form-error {
  padding: 11px 12px;
  border: 1px solid #efbbb6;
  border-radius: 11px;
  background: var(--red-soft);
  color: #7a271a;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
}

.status-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-badge {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
  font-weight: 780;
}

.status-badge[data-tone="approved"],
.status-badge[data-tone="ready"] { background: var(--green-soft); color: var(--green); }
.status-badge[data-tone="closed"] { background: var(--red-soft); color: var(--red); }

.account-summary {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.account-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #fff;
}

.account-summary span { color: var(--muted); font-size: 11px; }
.account-summary strong { overflow-wrap: anywhere; font-size: 14px; }
.workspace-button { margin-top: 20px; }
.workspace-help { margin-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
#accountError { margin-top: 15px; }

.site-footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

@media (min-width: 600px) {
  .account-card { padding: 34px; }
  .account-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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