:root {
  color: #f6f1e8;
  background: #07110f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(67, 151, 121, 0.2), transparent 34rem),
    linear-gradient(145deg, #07110f, #0b1815 55%, #101b18);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.15;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.page-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100% - 40px, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 0 28px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(181, 231, 209, 0.42);
  border-radius: 12px;
  color: #d9f7ea;
  background: rgba(98, 190, 151, 0.1);
  font-family: Georgia, serif;
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
}

.brand small {
  margin-top: 2px;
  color: #8aa99c;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card {
  align-self: center;
  width: min(100%, 660px);
  margin: 70px 0;
  padding: clamp(28px, 6vw, 62px);
  border: 1px solid rgba(189, 219, 206, 0.18);
  border-radius: 28px;
  background: rgba(12, 27, 23, 0.82);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.eyebrow {
  margin: 0 0 14px;
  color: #79caa9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 46px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 8px;
  font-size: 19px;
}

.state-copy p,
.state-row p {
  max-width: 48ch;
  color: #9db3aa;
  line-height: 1.6;
}

.state-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.spinner {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 2px solid rgba(121, 202, 169, 0.25);
  border-top-color: #79caa9;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.status-pill {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signed-out { color: #d7b979; }
.signed-in { color: #79caa9; }
.unavailable { color: #df9b8b; }

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 0 20px;
  border: 1px solid #79caa9;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  color: #07110f;
  background: #9ce0c4;
}

.secondary-action {
  color: #bce8d5;
  background: transparent;
}

.primary-action:hover,
.secondary-action:hover {
  filter: brightness(1.08);
}

.primary-action:focus-visible,
.secondary-action:focus-visible {
  outline: 3px solid rgba(156, 224, 196, 0.35);
  outline-offset: 3px;
}

.session-details {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.session-details div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
}

.session-details dt {
  color: #789187;
}

.session-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #dce9e3;
}

footer,
.noscript {
  color: #6f897e;
  font-size: 12px;
}

.privacy-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #65bd98;
  box-shadow: 0 0 14px rgba(101, 189, 152, 0.65);
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  margin: 0;
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 28px, 1080px);
    padding-top: 24px;
  }

  .auth-card {
    margin: 40px 0;
    border-radius: 20px;
  }

  h1 {
    margin-bottom: 36px;
  }

  .session-details div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
