:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5d6874;
  --soft: #7b8390;
  --paper: #f4f2ed;
  --surface: #fffdf8;
  --surface-2: #edf3f1;
  --line: #d9d6c9;
  --line-dark: #303940;
  --coal: #171d21;
  --coal-2: #222b31;
  --white: #ffffff;
  --teal: #0f766e;
  --teal-dark: #0a544f;
  --gold: #b78234;
  --rust: #954d3d;
  --blue: #31517d;
  --shadow: 0 18px 44px rgb(23 32 38 / 12%);
  --shadow-strong: 0 24px 70px rgb(23 32 38 / 22%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(15 118 110 / 34%);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
li,
td,
th,
code {
  overflow-wrap: anywhere;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(46px, 9vw, 116px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
}

p {
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  background: rgb(23 29 33 / 92%);
  color: var(--white);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  font-weight: 780;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgb(255 255 255 / 34%);
  border-radius: 8px;
  background: linear-gradient(135deg, rgb(15 118 110 / 90%), rgb(181 124 47 / 82%));
  color: var(--white);
  font-size: 18px;
  line-height: 1;
}

.brand-text {
  white-space: nowrap;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 2vw, 28px);
  color: rgb(255 255 255 / 76%);
  font-size: 14px;
}

.topnav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a[aria-current="page"] {
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  gap: 4px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 8px;
  background: rgb(255 255 255 / 9%);
  color: var(--white);
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.shell {
  display: grid;
  grid-template-columns: minmax(210px, 248px) minmax(0, 1fr);
  min-height: calc(100svh - 68px);
}

.page-shell {
  background:
    linear-gradient(90deg, var(--surface-2) 0, var(--surface-2) 248px, transparent 248px),
    var(--paper);
}

.sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: calc(100svh - 68px);
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a:focus-visible {
  background: rgb(15 118 110 / 10%);
  color: var(--teal-dark);
}

.sidebar a[aria-current="page"] {
  background: var(--coal);
  color: var(--white);
}

.sidebar-page-link {
  color: var(--ink);
}

.sidebar-divider {
  display: block;
  height: 1px;
  margin: 8px 0;
  background: var(--line);
}

.sidebar-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgb(15 118 110 / 20%);
  border-radius: 8px;
  background: rgb(255 255 255 / 64%);
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgb(15 118 110 / 12%);
}

.status-dot-muted {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgb(183 130 52 / 14%);
}

.content {
  min-width: 0;
}

.content-page {
  padding: clamp(28px, 5vw, 64px);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(740px, 76svh);
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(18 24 28 / 94%) 0%, rgb(18 24 28 / 76%) 43%, rgb(18 24 28 / 22%) 82%),
    linear-gradient(0deg, rgb(18 24 28 / 18%), rgb(18 24 28 / 10%));
}

.hero-content {
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 96px);
  padding: 72px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgb(255 255 255 / 86%);
  font-size: clamp(17px, 2vw, 23px);
}

.page-copy {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  max-width: 100%;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 740;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: var(--white);
  background: var(--teal);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--teal-dark);
}

.button-secondary {
  color: var(--white);
  border-color: rgb(255 255 255 / 42%);
  background: rgb(255 255 255 / 12%);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgb(255 255 255 / 18%);
}

.section {
  padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 56px);
}

.section-light {
  background: var(--paper);
}

.section-accent {
  color: var(--white);
  background:
    linear-gradient(135deg, rgb(15 118 110 / 16%), transparent 34%),
    var(--coal);
}

.section-console {
  color: var(--white);
  background: var(--coal-2);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.two-column,
.console-layout,
.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.copy-stack {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 18px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 26px;
}

.section-copy {
  max-width: 520px;
  margin-top: 18px;
  color: rgb(255 255 255 / 72%);
  font-size: 18px;
}

.feature-grid,
.split-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.panel-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-card:nth-child(2),
.panel-card:nth-child(2) {
  border-top-color: var(--teal);
}

.feature-card:nth-child(3),
.panel-card:nth-child(3) {
  border-top-color: var(--rust);
}

.feature-card p,
.panel-card p {
  color: var(--muted);
}

.pipeline-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 8px;
  background: rgb(255 255 255 / 7%);
  box-shadow: var(--shadow-strong);
}

.pipeline-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0 14px;
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 8px;
  background: rgb(255 255 255 / 8%);
}

.pipeline-step span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--coal);
  font-weight: 800;
}

.pipeline-step strong {
  color: var(--white);
  font-size: 18px;
}

.pipeline-step p {
  color: rgb(255 255 255 / 68%);
}

.pipeline-step.is-muted span {
  background: rgb(255 255 255 / 20%);
  color: var(--white);
}

.status-list,
.status-board {
  display: grid;
  gap: 10px;
}

.status-list div,
.status-board div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 8px;
}

.status-list div {
  border: 1px solid rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 7%);
}

.status-list span {
  color: rgb(255 255 255 / 68%);
}

.status-list strong {
  color: var(--white);
  text-align: right;
}

.status-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-board div {
  border: 1px solid var(--line);
  background: var(--surface);
}

.status-board span {
  color: var(--muted);
}

.status-board strong {
  color: var(--teal-dark);
  text-align: right;
}

.page-hero {
  width: min(980px, 100%);
  margin: 0 auto clamp(36px, 6vw, 70px);
  padding: clamp(34px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(15 118 110 / 12%), rgb(183 130 52 / 10) 42%, transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}

.page-hero.compact h1 {
  max-width: 880px;
  font-size: clamp(38px, 6vw, 72px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.doc-section {
  width: min(980px, 100%);
  margin: 0 auto clamp(32px, 5vw, 58px);
}

.doc-section > h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 4vw, 44px);
}

.doc-section > p {
  color: var(--muted);
  font-size: 18px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.doc-grid article,
.endpoint-list article,
.auth-context {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.doc-grid p,
.endpoint-list p,
.auth-context p,
.auth-context li {
  color: var(--muted);
}

.principle-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principle-list li {
  padding: 18px 20px;
  border-left: 4px solid var(--teal);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow);
}

.principle-list strong {
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  font-size: 13px;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 2px 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timeline span {
  grid-row: span 2;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
}

.timeline strong {
  font-size: 18px;
}

.timeline p {
  color: var(--muted);
}

.endpoint-list {
  display: grid;
  gap: 12px;
}

.endpoint-list code {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
}

.inline-note {
  margin-top: 16px;
  color: var(--muted);
}

.inline-note a {
  color: var(--teal-dark);
  font-weight: 760;
}

.code-panel {
  overflow-x: auto;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--coal);
  box-shadow: var(--shadow-strong);
}

.code-panel pre {
  margin: 0;
  padding: 22px;
}

.code-panel code {
  color: rgb(255 255 255 / 84%);
  font-size: 14px;
  line-height: 1.6;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.8fr);
  gap: clamp(18px, 4vw, 42px);
  width: min(980px, 100%);
  margin: 0 auto clamp(36px, 6vw, 70px);
  align-items: start;
}

.auth-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.auth-card h2,
.auth-context h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgb(183 130 52 / 14%);
  color: #7a531f;
  font-size: 12px;
  font-weight: 800;
}

.provider-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.provider-button {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.provider-button:hover,
.provider-button:focus-visible {
  border-color: rgb(15 118 110 / 42%);
  background: rgb(15 118 110 / 7%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--teal-dark);
  box-shadow: 0 2px 10px rgb(23 32 38 / 9%);
}

.auth-form {
  display: none;
  gap: 10px;
}

.auth-form.is-active {
  display: grid;
}

.auth-form label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.auth-form input::placeholder {
  color: var(--soft);
}

.auth-form .button {
  width: 100%;
  margin-top: 6px;
}

.auth-message {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgb(183 130 52 / 28%);
  border-radius: 8px;
  background: rgb(183 130 52 / 10%);
  color: #6e4a1d;
  font-size: 14px;
}

.auth-context ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 22px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.site-footer a {
  color: var(--teal-dark);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

.error-page {
  display: grid;
  min-height: 100svh;
  align-items: center;
}

@media (max-width: 1000px) {
  .topnav {
    gap: 14px;
  }

  .shell,
  .page-shell {
    grid-template-columns: 1fr;
    background: var(--paper);
  }

  .menu-toggle {
    display: inline-grid;
  }

  .topnav {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    z-index: 35;
    min-height: 0;
    max-height: calc(100svh - 92px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-strong);
    opacity: 1;
    pointer-events: none;
    transform: translateY(-10px);
    visibility: hidden;
    transition: transform 160ms ease, visibility 0ms linear 160ms;
  }

  .sidebar.is-open {
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
    transition: transform 160ms ease;
  }

  .content-page {
    padding: clamp(22px, 5vw, 42px);
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 72svh;
  }

  .hero-content {
    width: min(680px, calc(100% - 36px));
    margin: 0 auto;
    padding: 52px 0;
  }

  .hero-shade {
    background: linear-gradient(90deg, rgb(18 24 28 / 92%) 0%, rgb(18 24 28 / 62%) 100%);
  }

  .two-column,
  .console-layout,
  .access-layout,
  .feature-grid,
  .split-cards,
  .doc-grid,
  .status-board,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .panel-card {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 64px;
    gap: 12px;
  }

  .brand-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: 70svh;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .page-hero,
  .auth-card,
  .auth-context {
    padding: 20px;
  }

  .provider-row {
    grid-template-columns: 1fr;
  }

  .status-list div,
  .status-board div,
  .site-footer,
  .timeline div {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline div {
    display: flex;
  }

  .status-list strong,
  .status-board strong {
    text-align: left;
  }
}
