:root {
  --surface: #f7f9fb;
  --surface-lowest: rgba(255, 255, 255, 0.74);
  --surface-low: rgba(242, 244, 246, 0.64);
  --surface-high: #e6e8ea;
  --surface-highest: #e0e3e5;
  --ink: #191c1e;
  --muted: #414754;
  --outline: rgba(193, 198, 215, 0.2);
  --outline-strong: rgba(113, 119, 134, 0.2);
  --primary: #004be4;
  --primary-deep: #0039b3;
  --primary-fixed: #dce1ff;
  --primary-fixed-dim: #b6c4ff;
  --secondary-fixed: #cae6ff;
  --tertiary-fixed: #d2e6ef;
  --danger: #ba1a1a;
  --danger-soft: #ffdad6;
  --shadow: 0 24px 64px rgba(25, 28, 30, 0.07);
  --soft-shadow: 0 10px 40px rgba(25, 28, 30, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--surface);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

body::before,
body::after {
  position: fixed;
  z-index: -2;
  border-radius: 999px;
  content: "";
  pointer-events: none;
  filter: blur(110px);
}

body::before {
  top: -20vw;
  left: -14vw;
  width: min(70vw, 900px);
  height: min(70vw, 900px);
  background: rgba(220, 225, 255, 0.55);
}

body::after {
  right: -12vw;
  bottom: -24vw;
  width: min(62vw, 860px);
  height: min(62vw, 860px);
  background: rgba(202, 230, 255, 0.44);
}

a {
  color: inherit;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.ambient-orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(86px);
}

.ambient-orb--one {
  top: 24%;
  right: 10%;
  width: min(38vw, 520px);
  height: min(38vw, 520px);
  background: rgba(210, 230, 239, 0.34);
}

.ambient-orb--two {
  left: 35%;
  bottom: -18%;
  width: min(46vw, 620px);
  height: min(46vw, 620px);
  background: rgba(255, 255, 255, 0.8);
}

.glass,
.chip,
.status-card,
.legal-topbar,
.toc-card,
.legal-card,
.legal-footer,
.legal-hero {
  border: 1px solid var(--outline);
  background: var(--surface-lowest);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.button {
  display: inline-flex;
  min-height: 58px;
  min-width: 210px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  padding: 16px 28px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 75, 228, 0.2);
}

.button--primary:hover {
  background: var(--primary-deep);
}

.button--glass {
  border: 1px solid rgba(0, 75, 228, 0.1);
  background: rgba(220, 225, 255, 0.42);
  color: var(--primary);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.button--danger {
  border: 1px solid rgba(186, 26, 26, 0.15);
  background: rgba(255, 218, 214, 0.5);
  color: #93000a;
}

.status-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(24px, 4vw, 72px);
}

.status-card {
  position: relative;
  width: min(100%, 940px);
  overflow: hidden;
  border-radius: 34px;
  padding: clamp(36px, 8vw, 86px);
  text-align: center;
}

.status-card::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.75), transparent 32%),
    linear-gradient(135deg, rgba(220, 225, 255, 0.16), transparent 58%);
  content: "";
  pointer-events: none;
}

.status-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.status-icon {
  position: relative;
  display: grid;
  width: clamp(112px, 20vw, 210px);
  height: clamp(112px, 20vw, 210px);
  margin-bottom: clamp(24px, 5vw, 52px);
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
}

.status-icon::before {
  position: absolute;
  inset: -14%;
  z-index: -1;
  border-radius: inherit;
  background: rgba(242, 244, 246, 0.52);
  content: "";
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.status-icon .material-symbols-outlined {
  color: var(--primary);
  font-size: clamp(58px, 10vw, 100px);
}

.status-code {
  margin: 0 0 14px;
  color: transparent;
  background: linear-gradient(180deg, rgba(0, 75, 228, 0.8), rgba(182, 196, 255, 0.95));
  -webkit-background-clip: text;
  background-clip: text;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4.25rem, 16vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.88;
  text-shadow: 0 18px 38px rgba(0, 75, 228, 0.16);
}

.status-500 .status-code {
  background: linear-gradient(135deg, rgba(0, 75, 228, 0.12), rgba(0, 75, 228, 0.78), rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  background-clip: text;
}

.status-kicker,
.legal-kicker {
  margin: 0 0 16px;
  color: var(--primary);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.status-title {
  max-width: 760px;
  margin: 0 auto 22px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.status-copy {
  max-width: 720px;
  margin: 0 auto clamp(32px, 5vw, 52px);
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.7;
}

.status-ref {
  display: flex;
  width: 100%;
  max-width: 660px;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(34px, 6vw, 62px);
  padding-top: 24px;
  color: rgba(65, 71, 84, 0.62);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 56px);
  border-width: 0 0 1px;
  border-radius: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.legal-nav a {
  text-decoration: none;
}

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

.legal-page {
  min-height: 100vh;
}

.legal-hero {
  width: min(100% - 40px, 1180px);
  margin: clamp(36px, 7vw, 92px) auto 42px;
  border-radius: 34px;
  padding: clamp(34px, 7vw, 78px);
  background:
    linear-gradient(135deg, rgba(220, 225, 255, 0.18), rgba(255, 255, 255, 0.7) 48%, rgba(202, 230, 255, 0.16)),
    rgba(255, 255, 255, 0.7);
}

.legal-hero h1 {
  max-width: 920px;
  margin: 0 0 22px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.legal-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.8;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  width: min(100% - 40px, 1360px);
  margin: 0 auto clamp(60px, 8vw, 120px);
  align-items: start;
}

.toc-card {
  position: sticky;
  top: 112px;
  border-radius: 24px;
  padding: 24px;
}

.toc-card h2 {
  margin: 0 0 18px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc-card nav {
  display: grid;
  gap: 7px;
}

.toc-card a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.toc-card a:hover,
.toc-card a.is-active {
  background: rgba(0, 75, 228, 0.08);
  color: var(--primary);
}

.legal-stack {
  display: grid;
  gap: 24px;
}

.legal-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(26px, 5vw, 48px);
}

.legal-card:nth-child(even) {
  background: var(--surface-low);
}

.legal-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(220, 225, 255, 0.11), transparent 58%);
  content: "";
  pointer-events: none;
}

.legal-card > * {
  position: relative;
  z-index: 1;
}

.legal-card h2 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 18px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-index {
  color: var(--primary);
  font-weight: 500;
  opacity: 0.55;
}

.legal-card h3 {
  margin: 22px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.76;
}

.legal-card p {
  margin: 0 0 14px;
}

.legal-card ul {
  display: grid;
  gap: 9px;
  margin: 12px 0 20px;
  padding-left: 22px;
}

.legal-note {
  margin-top: 18px;
  border-radius: 18px;
  padding: 18px;
  background: rgba(242, 244, 246, 0.8);
  color: var(--muted);
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(20px, 5vw, 56px);
  border-width: 1px 0 0;
  border-radius: 0;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.legal-footer a {
  text-decoration: none;
}

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

.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 16px;
  background: rgba(220, 225, 255, 0.56);
  color: var(--primary);
  box-shadow: var(--soft-shadow);
  text-decoration: none;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

@media (max-width: 960px) {
  .legal-nav {
    display: none;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .toc-card {
    position: static;
  }

  .toc-card nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 680px) {
  .status-page {
    padding: 20px;
  }

  .status-card {
    border-radius: 26px;
    padding: 34px 22px;
  }

  .action-row,
  .button {
    width: 100%;
  }

  .status-ref {
    flex-direction: column;
    align-items: center;
  }

  .legal-topbar {
    padding: 14px 18px;
  }

  .brand-name {
    font-size: 17px;
  }

  .legal-hero {
    width: min(100% - 24px, 1180px);
    border-radius: 26px;
    padding: 34px 22px;
  }

  .legal-layout {
    width: min(100% - 24px, 1360px);
  }

  .legal-card {
    border-radius: 22px;
    padding: 24px 20px;
  }

  .legal-card h2 {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-height: 820px) and (min-width: 681px) {
  .status-page {
    padding: 18px;
  }

  .status-card {
    padding: 28px 54px;
  }

  .status-icon {
    width: 132px;
    height: 132px;
    margin-bottom: 20px;
  }

  .status-icon .material-symbols-outlined {
    font-size: 66px;
  }

  .status-code {
    font-size: clamp(4rem, 12vw, 8.5rem);
  }

  .status-title {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4.2vw, 3.25rem);
  }

  .status-copy {
    margin-bottom: 24px;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .button {
    min-height: 52px;
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .status-ref {
    margin-top: 28px;
    padding-top: 18px;
  }
}
