:root {
  --ink: #121826;
  --muted: #5b667a;
  --line: #d9e2ef;
  --soft: #f5f7fb;
  --panel: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --teal: #0f766e;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --shadow: 0 18px 48px rgba(18, 24, 38, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 226, 239, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1160px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.nav-links,
.nav-actions,
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.tabs a {
  border-radius: 6px;
  padding: 9px 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a:hover,
.tabs a:hover,
.nav-links a.active,
.tabs a.active {
  background: #eaf2ff;
  color: var(--blue-dark);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 760;
  text-align: center;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

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

.button.ghost {
  background: transparent;
}

.page {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 70px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 44px;
  align-items: center;
  padding: 44px 0 38px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 6vw, 78px);
}

h2 {
  font-size: 34px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0;
}

.lede {
  max-width: 650px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 19px;
}

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

.service-card,
.panel,
.auth-card,
.console-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service-card {
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #121826;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
}

.terminal-bar span:nth-child(2) {
  background: #f59e0b;
}

.terminal-bar span:nth-child(3) {
  background: #22c55e;
}

.endpoint-preview {
  padding: 22px;
}

.code-line {
  overflow-wrap: anywhere;
  border-radius: 6px;
  padding: 13px 14px;
  background: #0f172a;
  color: #dbeafe;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.metric,
.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.metric strong,
.stat strong {
  display: block;
  font-size: 24px;
}

.metric span,
.stat span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 44px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head p {
  max-width: 620px;
  color: var(--muted);
}

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

.panel {
  padding: 22px;
  box-shadow: none;
}

.panel p,
.doc-list p,
.bucket-row p {
  margin-top: 9px;
  color: var(--muted);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--blue-dark);
  font-weight: 900;
}

.split {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.sidebar a,
.sidebar button {
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.sidebar a.active,
.sidebar a:hover,
.sidebar button:hover {
  background: #eaf2ff;
  color: var(--blue-dark);
}

.console-panel {
  padding: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
}

.input,
select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.input {
  min-width: min(340px, 100%);
}

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

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  color: #475569;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef5ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.ok {
  background: #dcfce7;
  color: var(--green);
}

.status-pill.watch {
  background: #fef3c7;
  color: var(--amber);
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 72px);
  padding: 36px 20px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.auth-card .brand {
  margin-bottom: 24px;
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 750;
}

.form-note,
.message {
  color: var(--muted);
  font-size: 14px;
}

.message {
  min-height: 24px;
}

.message.error {
  color: var(--red);
}

.message.success {
  color: var(--green);
}

.doc-list,
.bucket-list,
.status-list {
  display: grid;
  gap: 14px;
}

.doc-list a,
.bucket-row,
.status-row {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.bucket-row,
.status-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 2px dashed #b9c7da;
  border-radius: 8px;
  padding: 24px;
  background: #fbfdff;
  text-align: center;
}

.progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width 0.2s ease;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links,
  .nav-actions {
    flex-wrap: wrap;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

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

  .grid,
  .stats,
  .metrics {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  .section-head,
  .bucket-row,
  .status-row {
    display: grid;
    align-items: start;
  }
}
