:root {
  color-scheme: light;
  --bg: #f5f7f2;
  --surface: #ffffff;
  --surface-2: #edf2ee;
  --ink: #111714;
  --muted: #66736d;
  --line: #d7ded7;
  --green: #0d7c62;
  --blue: #315f8d;
  --amber: #9a6a12;
  --dark: #101816;
  --shadow: 0 18px 46px rgba(21, 31, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
  background: rgba(245, 247, 242, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, transparent 42%, rgba(255, 255, 255, 0.92) 43% 56%, transparent 57%),
    linear-gradient(135deg, var(--green), var(--blue));
}

.nav {
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav a:hover,
.text-link:hover {
  color: var(--ink);
}

.top-action,
.primary-btn,
.secondary-btn,
.text-link {
  font-weight: 740;
}

.top-action,
.primary-btn {
  border-radius: 8px;
  background: var(--dark);
  color: #fff;
}

.top-action {
  padding: 10px 14px;
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(430px, 1.05fr);
  gap: 48px;
  align-items: center;
  max-width: 1240px;
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 58px 32px 34px;
}

.hero-copy {
  max-width: 640px;
}

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

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

h1 {
  margin-bottom: 22px;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
}

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

h3 {
  margin-bottom: 10px;
  font-size: 19px;
  line-height: 1.2;
}

.lead,
.section p,
.workbench-copy p,
.report-card p {
  color: var(--muted);
  font-size: 17px;
}

.lead {
  max-width: 580px;
  margin-bottom: 30px;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
}

.secondary-btn {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.hero-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dfe6e1;
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.04);
}

.analysis-panel {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(330px, calc(100% - 44px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(16, 24, 22, 0.86);
  color: #fff;
  backdrop-filter: blur(14px);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head span,
.analysis-panel p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.panel-head strong {
  font-size: 30px;
  line-height: 1;
}

.confidence-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 7px;
  height: 92px;
  margin-bottom: 14px;
}

.confidence-bars span {
  display: block;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #7fe3c2, #2f7fa0);
}

.metric-strip,
.section,
.footer {
  max-width: 1240px;
  margin: 0 auto;
  padding-right: 32px;
  padding-left: 32px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding-bottom: 46px;
}

.metric-strip article {
  min-height: 132px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.metric-strip article:first-child {
  border-radius: 8px 0 0 8px;
}

.metric-strip article:last-child {
  border-radius: 0 8px 8px 0;
}

.metric-strip span,
.report-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  text-transform: uppercase;
}

.metric-strip strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.two-column,
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(430px, 1.15fr);
  gap: 48px;
  align-items: center;
}

.endpoint-card,
.workspace-panel,
.table-shell,
.report-card,
.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.endpoint-card {
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.code-head span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #e7f4ee;
  color: var(--green);
  font-size: 12px;
  font-weight: 820;
}

.code-head code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.code-head button {
  margin-left: auto;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--dark);
  color: #fff;
  font-weight: 720;
}

pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #dcece6;
  background: #101816;
  font-size: 14px;
  line-height: 1.65;
}

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

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented-control button,
.toolbar button {
  min-width: 58px;
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

.segmented-control button.is-active,
.toolbar button.is-active {
  background: var(--dark);
  color: #fff;
}

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

.module-card {
  min-height: 230px;
  padding: 24px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.module-card.is-hidden {
  display: none;
}

.module-card:hover {
  transform: translateY(-3px);
}

.module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 28px;
  border-radius: 8px;
  background: #e7f4ee;
  color: var(--green);
  font-weight: 820;
}

.workbench {
  align-items: start;
}

.workbench-copy {
  position: sticky;
  top: 96px;
}

.workspace-panel {
  padding: 18px;
}

.toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.query-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.query-row span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.timeline {
  position: relative;
  height: 220px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 24% / 100% 25%,
    linear-gradient(90deg, rgba(13, 124, 98, 0.12), rgba(49, 95, 141, 0.18));
}

.timeline span {
  position: absolute;
  bottom: 0;
  width: 18px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #31a987, #315f8d);
}

.finding-list {
  display: grid;
  gap: 10px;
}

.finding-list article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.finding-list strong,
.finding-list span {
  display: block;
}

.finding-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.table-shell {
  overflow-x: auto;
}

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

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

td {
  font-weight: 650;
}

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

.status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 820;
}

.status.good {
  background: #e7f4ee;
  color: var(--green);
}

.status.warn {
  background: #fff5de;
  color: var(--amber);
}

.report-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 16px;
  padding-bottom: 96px;
}

.report-card {
  min-height: 260px;
  padding: 24px;
}

.report-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.1;
}

.report-card.is-dark {
  background: var(--dark);
  color: #fff;
}

.report-card.is-dark .eyebrow,
.report-card.is-dark p {
  color: rgba(255, 255, 255, 0.7);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer span:first-child {
  color: var(--ink);
  font-weight: 760;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--dark);
  color: #fff;
  font-weight: 740;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .topbar {
    padding: 0 18px;
  }

  .nav {
    display: none;
  }

  .hero,
  .two-column,
  .workbench {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    min-height: auto;
    padding: 42px 18px 28px;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 380px;
  }

  .metric-strip,
  .module-grid,
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-strip,
  .section,
  .footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .workbench-copy {
    position: static;
  }
}

@media (max-width: 640px) {
  .top-action {
    display: none;
  }

  h1 {
    font-size: 46px;
  }

  .hero-actions,
  .section-head,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .analysis-panel {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }

  .metric-strip,
  .module-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip article,
  .metric-strip article:first-child,
  .metric-strip article:last-child {
    border-radius: 8px;
  }

  .segmented-control {
    width: 100%;
    overflow-x: auto;
  }

  .segmented-control button {
    flex: 1 0 76px;
  }
}
