:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #171717;
  --muted: #69645d;
  --line: #e8e1d7;
  --line-dark: #d3cabd;
  --green: #15803d;
  --green-bg: #e9f7ed;
  --amber: #986200;
  --amber-bg: #fff2d5;
  --blue: #1d4ed8;
  --blue-bg: #eaf0ff;
  --rose: #be123c;
  --rose-bg: #fff0f3;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: 100%;
  padding-right: 28px;
  padding-left: 28px;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.topbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 780;
}

.brand-mark,
.logo {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  font-weight: 820;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-color: #171717;
  background: #171717;
  color: #fff;
  font-size: 12px;
}

.logo {
  width: 38px;
  height: 38px;
  background: #f4f0e8;
  color: #24211d;
  font-size: 12px;
  flex: 0 0 auto;
}

.logo.green {
  background: var(--green-bg);
  color: var(--green);
}

.logo.blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.logo.amber {
  background: var(--amber-bg);
  color: var(--amber);
}

.logo.brand-logo {
  width: 112px;
  height: 38px;
  padding: 6px 10px;
  justify-content: center;
  background: #fff;
}

.logo.brand-logo.logo-wordmark {
  width: 112px;
  height: 38px;
  padding: 6px 10px;
}

.logo.brand-logo.logo-dark {
  background: #111827;
}

.brand-logo img {
  display: block;
  max-width: 100%;
  max-height: 26px;
  object-fit: contain;
}

.logo-wordmark img {
  max-height: 26px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: #383530;
  font-size: 13px;
}

.nav a {
  white-space: nowrap;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  padding: 34px 0 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: var(--green);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.pulse {
  display: none;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  background: var(--panel);
  color: #1f1f1f;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.btn.primary {
  border-color: #171717;
  background: #171717;
  color: #fff;
}

.table-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.metrics,
.card-grid,
.two-col,
.three-col {
  display: grid;
  gap: 12px;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

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

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

.two-col {
  grid-template-columns: 0.95fr 1.35fr;
  align-items: start;
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section,
.metric,
.card,
.tool {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.metric,
.card,
.tool {
  padding: 14px;
}

.flow-card {
  display: flex;
  min-height: 124px;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-card:hover {
  text-decoration: none;
  background: #fffdf7;
}

.flow-card strong {
  display: block;
  font-size: 14px;
}

.flow-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.flow-card em {
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.metric-label,
.muted,
.small {
  color: var(--muted);
}

.metric-label,
.small {
  font-size: 12px;
  font-weight: 680;
}

.metric-value {
  margin-top: 7px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.metric-value.compact {
  font-size: 18px;
}

.metric small {
  display: block;
  margin-top: 7px;
  color: var(--green);
  font-weight: 680;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

h2 {
  font-size: 15px;
}

h3 {
  font-size: 14px;
}

.view-all {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}

.row-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.row-card:last-child {
  border-bottom: 0;
}

.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 760;
}

.row-title span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.price {
  text-align: right;
  white-space: nowrap;
}

.price strong {
  display: block;
  font-size: 14px;
}

.price span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 10px;
  font-weight: 820;
  white-space: nowrap;
}

.tag.live {
  background: var(--green-bg);
  color: var(--green);
}

.tag.blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.tag.rose {
  background: var(--rose-bg);
  color: var(--rose);
}

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

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

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

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

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

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #fffdf7;
}

.model-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 270px;
}

.brand-table-link,
.code-preview-link {
  text-decoration: none;
}

.brand-table-link:hover .model-name,
.code-preview-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.model-name {
  font-weight: 780;
}

.desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.money,
.score {
  font-weight: 800;
  white-space: nowrap;
}

.score {
  color: var(--green);
}

.score.warn {
  color: var(--amber);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.brand-strip .brand-logo {
  width: 86px;
  height: 30px;
}

.brand-strip .brand-logo img {
  max-height: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #3b3732;
  font-size: 12px;
  font-weight: 680;
}

.crumb {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.brand-page-head {
  align-items: center;
}

.brand-hero-logo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  gap: 10px;
}

.brand-hero-logo .brand-logo {
  width: 168px;
  height: 58px;
  padding: 10px 16px;
}

.brand-hero-logo .brand-logo img {
  max-height: 38px;
}

.brand-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.model-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 14px;
}

.model-code-card {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.model-list-section {
  margin-top: 12px;
}

.empty-state {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

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

.field {
  display: grid;
  gap: 5px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
}

.field input,
.field select {
  height: 38px;
  padding: 0 10px;
}

.field textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.field.full {
  grid-column: 1 / -1;
}

.note {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--muted);
  font-size: 13px;
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.check {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  flex: 0 0 auto;
}

.faq-item {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item h3 {
  margin-bottom: 6px;
}

.footer {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 24px;
  padding: 28px 28px 34px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer h3 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 13px;
}

.footer a {
  display: block;
  margin: 7px 0;
  font-size: 13px;
}

@media (max-width: 980px) {
  .page-head,
  .two-col,
  .footer {
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: flex-start;
  }

  .metrics,
  .card-grid,
  .flow-grid,
  .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
  }

  .topbar .shell {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 11px 0;
  }

  .nav,
  .actions {
    justify-content: flex-start;
  }

  .page-head {
    padding-top: 24px;
  }

  .metrics,
  .card-grid,
  .flow-grid,
  .three-col,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .row-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .footer {
    padding-right: 10px;
    padding-left: 10px;
  }

  .price {
    grid-column: 2;
    text-align: left;
  }
}
