:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f7fb;
  color: #162033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #d9e1ef;
  background: rgba(245, 247, 251, 0.94);
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
  backdrop-filter: blur(12px);
}

.brand {
  color: #162033;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  min-height: 36px;
  border-radius: 8px;
  color: #40506a;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  text-decoration: none;
  font-weight: 700;
}

nav a.active {
  background: #e8eef7;
  color: #162033;
}

nav a.nav-action,
.button {
  background: #175cd3;
  color: #ffffff;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace {
  display: grid;
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 124px);
  padding: 28px 0;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-copy h1,
.doc-hero h1 {
  max-width: 820px;
}

.hero-copy p,
.doc-hero p,
.section-head p,
.split p {
  max-width: 720px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  border: 1px solid #cbd6e6;
  background: #ffffff;
  color: #162033;
}

.model-visual {
  display: grid;
  gap: 16px;
  border: 1px solid #d7dfec;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92)),
    #ffffff;
  padding: 18px;
  min-height: 360px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.signal-grid span {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #dbe7f7;
}

.signal-grid span:nth-child(3n) {
  background: #bbf7d0;
}

.signal-grid span:nth-child(4n) {
  background: #fde68a;
}

.signal-grid span:nth-child(5n) {
  background: #bfdbfe;
}

.visual-readout {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.visual-readout strong,
.visual-readout span {
  overflow-wrap: anywhere;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d9e1ef;
  padding-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 2rem);
  letter-spacing: 0;
}

p {
  margin-top: 8px;
  color: #58677e;
}

.status,
.result-head span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #cbd6e6;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #40506a;
  white-space: nowrap;
}

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

.section,
.doc-section {
  display: grid;
  gap: 18px;
  border-top: 1px solid #d9e1ef;
  padding: 28px 0;
}

.section-head,
.doc-hero {
  display: grid;
  gap: 8px;
}

.doc-layout {
  max-width: 920px;
}

.doc-hero {
  padding: 36px 0 16px;
}

.split {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  align-items: start;
}

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

.feature-list li {
  border-left: 4px solid #16a34a;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  color: #34435b;
  font-weight: 700;
}

.comparison-wrap {
  overflow-x: auto;
  border: 1px solid #d7dfec;
  border-radius: 8px;
  background: #ffffff;
}

.comparison-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid #e4eaf4;
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: #eef4fb;
  color: #26364d;
  font-size: 0.9rem;
  font-weight: 800;
}

.comparison-table td {
  color: #34435b;
}

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

.comparison-table .highlight-row td {
  background: #f0fdf4;
  color: #163a24;
}

.comparison-table td:last-child {
  font-weight: 750;
}

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

.release-strip a,
.model-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  background: #175cd3;
  color: #ffffff;
  padding: 0 14px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.endpoint {
  display: grid;
  gap: 6px;
}

code {
  border-radius: 6px;
  background: #eef2f8;
  padding: 2px 5px;
  color: #26364d;
}

.model-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border: 1px solid #d7dfec;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #637189;
  font-size: 0.85rem;
  font-weight: 750;
  text-transform: uppercase;
}

.model-panel h2 {
  overflow-wrap: anywhere;
}

.model-panel dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.model-panel dl > div {
  padding: 10px;
}

.model-panel dd {
  font-size: 1rem;
}

.field,
.upload {
  display: grid;
  gap: 8px;
  color: #34435b;
  font-weight: 650;
}

.field input,
.upload input {
  width: 100%;
  border: 1px solid #c9d4e5;
  border-radius: 8px;
  background: #ffffff;
  color: #162033;
  padding: 12px;
  min-height: 46px;
}

.field-wide {
  max-width: 720px;
}

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

.upload {
  border: 1px solid #d7dfec;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.upload img {
  display: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f2;
  background: #eef2f8;
}

.upload.has-preview img {
  display: block;
}

button {
  justify-self: start;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: #175cd3;
  color: #ffffff;
  padding: 0 18px;
  font-weight: 750;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  background: #9aacca;
}

.result {
  display: grid;
  gap: 16px;
  border-top: 1px solid #d9e1ef;
  padding-top: 22px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-head .match {
  border-color: #9fd4b4;
  background: #ecf9f0;
  color: #146c36;
}

.result-head .no-match {
  border-color: #f0b7b7;
  background: #fff0f0;
  color: #a51f1f;
}

dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

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

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

dl > div {
  border: 1px solid #d7dfec;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

dt {
  color: #637189;
  font-size: 0.9rem;
  font-weight: 650;
}

dd {
  margin: 6px 0 0;
  font-size: 1.2rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  overflow: auto;
  max-height: 240px;
  border: 1px solid #d7dfec;
  border-radius: 8px;
  background: #111827;
  color: #dbeafe;
  padding: 14px;
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 20px, 1120px);
    padding: 20px 0;
  }

  .topbar,
  .site-header,
  .result-head {
    align-items: start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .split,
  .release-strip {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .upload-grid,
  .stat-grid,
  .stat-grid.compact,
  .model-panel dl,
  dl {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
