:root {
  color-scheme: light;
  --ink: #13213d;
  --muted: #5d6880;
  --blue: #377df6;
  --purple: #7652dc;
  --soft-blue: #eef6ff;
  --line: rgba(67, 89, 132, 0.16);
  --surface: rgba(255, 255, 255, 0.88);
  --shadow: 0 24px 64px rgba(48, 69, 118, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 2%, rgba(78, 156, 255, 0.23), transparent 31rem),
    radial-gradient(circle at 95% 5%, rgba(127, 83, 225, 0.19), transparent 34rem),
    #f7faff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #315fc5;
  text-underline-offset: 3px;
}

a:hover {
  color: #603fc3;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(55, 125, 246, 0.42);
  outline-offset: 4px;
  border-radius: 8px;
}

.site-header {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.link-mark {
  position: relative;
  width: 38px;
  height: 25px;
  display: inline-block;
}

.link-mark::before,
.link-mark::after {
  position: absolute;
  top: 4px;
  width: 20px;
  height: 13px;
  border: 4px solid;
  border-radius: 999px;
  content: "";
  transform: rotate(-20deg);
}

.link-mark::before {
  left: 0;
  border-color: var(--blue);
}

.link-mark::after {
  right: 0;
  border-color: var(--purple);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
  font-size: 14px;
  font-weight: 650;
}

.top-nav a {
  color: #53617b;
  text-decoration: none;
}

.top-nav a[aria-current="page"] {
  color: var(--purple);
}

.hero {
  width: min(1120px, calc(100% - 36px));
  margin: 42px auto 34px;
  padding: 74px clamp(26px, 7vw, 78px);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 240, 255, 0.82));
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  width: 300px;
  height: 300px;
  right: -95px;
  bottom: -140px;
  border: 54px solid rgba(94, 113, 230, 0.11);
  border-radius: 50%;
  content: "";
}

.eyebrow {
  margin: 0 0 12px;
  color: #684ac8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.16;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 74px);
  letter-spacing: -0.045em;
}

.gradient-text {
  background: linear-gradient(100deg, var(--blue), var(--purple));
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-copy {
  max-width: 670px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.5vw, 22px);
}

.actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(105deg, var(--blue), var(--purple));
  box-shadow: 0 10px 26px rgba(85, 88, 213, 0.25);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  color: #384761;
}

.cards {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  min-height: 198px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(50, 73, 123, 0.08);
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(50, 73, 123, 0.13);
}

.card-kicker {
  color: #6551bd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card h2 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.document-shell {
  width: min(900px, calc(100% - 30px));
  margin: 42px auto 72px;
  padding: clamp(30px, 6vw, 70px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
}

.document-shell h1 {
  max-width: none;
  font-size: clamp(38px, 6vw, 58px);
}

.lede {
  margin: 18px 0 36px;
  color: var(--muted);
  font-size: 19px;
}

.meta {
  display: inline-block;
  margin-top: 20px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: #48607d;
  font-size: 13px;
  font-weight: 700;
}

.document-shell h2 {
  margin: 42px 0 12px;
  padding-top: 8px;
  color: #253a63;
  font-size: 25px;
  letter-spacing: -0.015em;
}

.document-shell h3 {
  margin: 28px 0 8px;
  font-size: 19px;
}

.document-shell p,
.document-shell li {
  color: #43506a;
}

.document-shell li + li {
  margin-top: 8px;
}

.callout {
  margin: 32px 0;
  padding: 21px 23px;
  border-left: 4px solid var(--blue);
  border-radius: 0 16px 16px 0;
  background: var(--soft-blue);
  color: #334b6b;
}

.contact-box {
  margin-top: 42px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, #f1f7ff, #f6f1ff);
}

.contact-box h2 {
  margin-top: 0;
}

.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #68748a;
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.footer-links a {
  color: #596780;
  text-decoration: none;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.auth-page .site-header {
  justify-content: center;
}

.auth-main {
  width: min(540px, calc(100% - 30px));
  margin: 32px auto 54px;
  display: grid;
  align-items: center;
}

.auth-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 8vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-panel::before {
  position: absolute;
  width: 210px;
  height: 210px;
  top: -135px;
  right: -80px;
  border: 38px solid rgba(103, 103, 225, 0.1);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.auth-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(55, 125, 246, 0.13), rgba(118, 82, 220, 0.16));
  color: #5a52ce;
  font-size: 27px;
  font-weight: 800;
}

.auth-panel h1 {
  max-width: 410px;
  margin: 0;
  font-size: clamp(34px, 8vw, 48px);
  letter-spacing: -0.04em;
}

.auth-intro {
  margin: 15px 0 30px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: #35445f;
  font-size: 14px;
  font-weight: 750;
}

.password-control {
  position: relative;
}

.password-control input {
  width: 100%;
  min-height: 54px;
  padding: 13px 54px 13px 16px;
  border: 1px solid rgba(58, 78, 119, 0.22);
  border-radius: 16px;
  background: #f8faff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.password-control input:focus {
  border-color: rgba(77, 105, 222, 0.72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(77, 105, 222, 0.12);
}

.password-control button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #596983;
  cursor: pointer;
  font-size: 19px;
  transform: translateY(-50%);
}

.password-control button:hover {
  background: rgba(71, 94, 142, 0.08);
}

.field-hint {
  margin: 0;
  color: #6d7890;
  font-size: 13px;
}

.auth-submit,
.auth-link-button {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(105deg, var(--blue), var(--purple));
  box-shadow: 0 10px 26px rgba(85, 88, 213, 0.24);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 780;
  text-align: center;
  text-decoration: none;
}

.auth-submit:hover,
.auth-link-button:hover {
  color: #fff;
  filter: brightness(1.04);
}

.auth-submit:disabled {
  cursor: wait;
  filter: grayscale(0.2);
  opacity: 0.62;
}

.auth-message {
  margin: 2px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(195, 70, 70, 0.18);
  border-radius: 14px;
  background: #fff4f4;
  color: #8c3030;
  font-size: 14px;
}

.auth-result {
  display: grid;
  gap: 16px;
}

.auth-result .auth-link-button {
  margin-top: 8px;
}

.auth-secondary-link {
  color: #53617b;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.auth-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.auth-spinner {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border: 3px solid rgba(86, 102, 145, 0.18);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: auth-spin 800ms linear infinite;
}

.auth-page .site-footer {
  justify-content: center;
}

.auth-page [hidden] {
  display: none !important;
}

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

@media (max-width: 850px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero {
    margin-top: 24px;
    padding-top: 48px;
    padding-bottom: 52px;
    border-radius: 26px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 0;
  }

  .document-shell {
    margin-top: 24px;
    border-radius: 24px;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .auth-main {
    margin-top: 18px;
    align-items: start;
  }

  .auth-panel {
    border-radius: 26px;
  }

  .auth-page .site-footer {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card {
    transition: none;
  }

  .auth-spinner {
    animation: none;
  }
}
