:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #5e6a62;
  --line: #d9e0d8;
  --paper: #fbfcf8;
  --band: #f0f4ee;
  --panel: #ffffff;
  --green: #2f7d4d;
  --green-dark: #205a39;
  --blue: #2d5f9a;
  --amber: #a96016;
  --red: #a23a33;
  --shadow: 0 18px 44px rgba(25, 38, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  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;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(23, 32, 27, 0.1);
  background: rgba(251, 252, 248, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  overflow-wrap: anywhere;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

nav a {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #354139;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  border-color: var(--line);
  background: #ffffff;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  gap: 24px;
  padding: clamp(36px, 7vw, 82px) clamp(18px, 5vw, 64px) 32px;
}

.hero-copy {
  align-self: center;
  max-width: 880px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 720px;
  color: #425047;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.button-link.secondary {
  background: #ffffff;
  color: var(--green-dark);
}

.live-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.live-card {
  align-self: stretch;
  min-height: 330px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.live-card h2 {
  font-size: 1.45rem;
}

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

.live-card dl,
.detail-list,
.mini-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.live-card dl div,
.detail-list div,
.mini-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid #ecf0eb;
}

dt {
  color: var(--muted);
  font-size: 0.88rem;
}

dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.metric-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.metric-card {
  min-height: 170px;
  padding: 18px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--blue);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric-card.success strong {
  color: var(--green);
}

.metric-card.attention strong {
  color: var(--amber);
}

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

.band {
  padding: clamp(34px, 6vw, 68px) clamp(18px, 5vw, 64px);
}

.band.muted {
  background: var(--band);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  max-width: 1260px;
  margin: 0 auto 22px;
}

.status-chip {
  flex: 0 0 auto;
  max-width: 260px;
  padding: 8px 12px;
  border: 1px solid #b6c6bb;
  border-radius: 8px;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.status-chip.pass {
  border-color: #8eb69c;
  background: #edf8f0;
}

.status-chip.fail {
  border-color: #d7aaa5;
  background: #fff1ef;
  color: var(--red);
}

.two-column,
.three-column,
.trust-grid {
  display: grid;
  max-width: 1260px;
  margin: 0 auto;
  gap: 16px;
}

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

.three-column {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.trust-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.builder-layout {
  display: grid;
  max-width: 1260px;
  margin: 0 auto;
  gap: 16px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.secondary-layout {
  margin-top: 16px;
}

.panel {
  min-width: 0;
  min-height: 250px;
  padding: 22px;
}

.panel.compact {
  min-height: 280px;
}

.trust-card {
  min-height: 190px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h3 {
  margin: 0;
}

.panel-title span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff5f0;
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.lead {
  min-height: 62px;
  font-size: 1.18rem;
}

.lead.small {
  min-height: 0;
  margin-bottom: 18px;
  font-size: 0.98rem;
}

.text-link {
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

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

.empty-state {
  margin: 0;
  color: var(--muted);
}

.endpoint-card,
.question-proof {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e3e9e1;
  border-radius: 8px;
  background: #fbfdf9;
}

.endpoint-header,
.convergence-summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.endpoint-header h3,
.endpoint-header p,
.convergence-summary p {
  margin: 0;
}

.endpoint-header p,
.question-text,
.hash-line {
  color: var(--muted);
  font-size: 0.9rem;
}

.state-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #bcc8c0;
  border-radius: 999px;
  background: #eef3ef;
  color: var(--green-dark);
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.state-pill.ok {
  border-color: #8eb69c;
  background: #edf8f0;
}

.state-pill.error {
  border-color: #d7aaa5;
  background: #fff1ef;
  color: var(--red);
}

.code-sample,
.endpoint-path,
.response-shape {
  max-width: 100%;
  margin: 12px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid #dce5db;
  border-radius: 8px;
  background: #17201b;
  color: #ecf5ee;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.code-sample {
  min-height: 250px;
  padding: 16px;
}

.endpoint-path {
  padding: 10px;
  background: #24312a;
}

.response-shape {
  max-height: 260px;
  padding: 10px;
}

.source-list a {
  color: var(--green-dark);
  text-decoration: none;
}

.source-list a:hover {
  text-decoration: underline;
}

.proof-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.proof-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid #ecf0eb;
}

.question-proof summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 900;
}

.method-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.method-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e3e9e1;
  border-radius: 8px;
  background: #ffffff;
}

.method-card h4,
.method-card p {
  margin: 0;
}

.method-card h4 {
  font-size: 0.82rem;
}

.method-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.bar {
  position: relative;
  height: 12px;
  margin: 20px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe5;
}

.bar span {
  position: absolute;
  inset: 0 auto 0 0;
  max-width: 100%;
  border-radius: inherit;
  background: var(--green);
}

.icon-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--blue);
}

.icon-dot.mastery {
  background: var(--green);
}

.icon-dot.course {
  background: var(--amber);
}

.icon-dot.accuracy {
  background: var(--blue);
}

.mini-list {
  margin-top: 22px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 980px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .metric-grid,
  .two-column,
  .three-column,
  .trust-grid,
  .builder-layout,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-chip {
    width: 100%;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .topbar,
  .hero,
  .band,
  footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  h1 {
    font-size: 2.55rem;
  }

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

  .button-link,
  nav a {
    flex: 1 1 auto;
  }

  .live-card,
  .panel,
  .metric-card {
    padding: 18px;
  }

  .live-card dl div,
  .detail-list div,
  .mini-list div,
  .proof-list div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  dd {
    text-align: left;
  }
}
