:root {
  --ink: #1f2933;
  --muted: #66717f;
  --line: #e2e7ee;
  --surface: #ffffff;
  --bg: #f7f8fa;
  --green: #2f6f58;
  --blue: #2f5f95;
  --amber: #8a6428;
  --red: #8f3f38;
  --teal: #4b7f79;
}

* {
  box-sizing: border-box;
}

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.45;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 22px 40px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 600;
}

h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.site-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-meta span,
.site-meta a,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.site-meta a {
  color: var(--ink);
  font-weight: 500;
}

.site-meta a:hover {
  color: var(--blue);
}

code {
  padding: 1px 3px;
  background: #f4f6f8;
  border: 1px solid #e5eaf0;
  border-radius: 3px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 36px 44px;
}

.status-band,
.layout,
.grid {
  display: grid;
  gap: 16px;
}

.status-band {
  grid-template-columns: minmax(360px, 1fr) minmax(600px, 1.6fr);
  margin-bottom: 16px;
}

.layout {
  grid-template-columns: minmax(320px, 0.8fr) minmax(700px, 1.2fr);
  margin-bottom: 16px;
}

.grid {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
}

main > .panel {
  margin-bottom: 16px;
}

.summary,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}

.summary p,
.section-head p,
.readiness p,
.question p,
.muted {
  color: var(--muted);
  margin-bottom: 0;
}

.muted {
  margin-bottom: 12px;
  font-size: 13px;
}

.recommendation {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}

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

.metric {
  min-height: 78px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
}

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

.readiness-item {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  min-height: 128px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.readiness-item:last-child {
  border-right: 0;
}

.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.workflow {
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.workflow li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid #edf1f5;
}

.workflow li:last-child {
  border-bottom: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

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

.dot.active,
.dot.next {
  background: var(--amber);
}

.status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

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

.full-table-wrap {
  max-height: 70vh;
  overflow: auto;
}

.table-page-panel {
  padding: 14px;
}

.model-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.model-flow span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 500;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}

.compact-list {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

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

.data-table {
  min-width: 1900px;
}

.wide-business-table {
  min-width: 2100px;
  table-layout: fixed;
}

.wide-business-table th,
.wide-business-table td {
  border: 1px solid #c8cfd8;
  padding: 5px 7px;
  text-align: center;
  font-size: 12px;
  line-height: 1.25;
}

.wide-business-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f3f5f7;
  color: var(--ink);
}

.wide-business-table thead tr:nth-child(2) th {
  top: 29px;
  z-index: 4;
}

.wide-business-table td {
  background: #fff;
}

.wide-business-table .col-category {
  width: 130px;
}

.wide-business-table .col-name {
  width: 160px;
}

.wide-business-table .col-item {
  width: 220px;
}

.wide-business-table .col-standard {
  width: 160px;
}

.wide-business-table .batch-col {
  width: 110px;
}

.wide-business-table .sticky-left,
.wide-business-table .sticky-left-2,
.wide-business-table .sticky-left-3,
.wide-business-table .sticky-left-4 {
  position: sticky;
  z-index: 3;
}

.wide-business-table th.sticky-left,
.wide-business-table th.sticky-left-2,
.wide-business-table th.sticky-left-3,
.wide-business-table th.sticky-left-4 {
  z-index: 5;
}

.wide-business-table .sticky-left {
  left: 0;
}

.wide-business-table .sticky-left-2 {
  left: 130px;
}

.wide-business-table .sticky-left-3 {
  left: 290px;
}

.wide-business-table .sticky-left-4 {
  left: 510px;
}

.wide-business-table td.sticky-left,
.wide-business-table td.sticky-left-2,
.wide-business-table td.sticky-left-3,
.wide-business-table td.sticky-left-4 {
  background: #fff;
}

.wide-business-table tr.highlight td,
.wide-business-table tr.highlight td.sticky-left,
.wide-business-table tr.highlight td.sticky-left-2,
.wide-business-table tr.highlight td.sticky-left-3,
.wide-business-table tr.highlight td.sticky-left-4,
.wide-business-table tr.meta td,
.wide-business-table tr.meta td.sticky-left,
.wide-business-table tr.meta td.sticky-left-2,
.wide-business-table tr.meta td.sticky-left-3,
.wide-business-table tr.meta td.sticky-left-4 {
  background: #fff56b;
}

.wide-business-table .subhead {
  font-weight: 500;
}

.schema-reference table {
  min-width: 1100px;
}

th,
td {
  padding: 9px 11px;
  text-align: left;
  border-bottom: 1px solid #edf1f5;
  font-size: 13px;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-weight: 600;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table td {
  white-space: nowrap;
  font-size: 12px;
}

.data-table td:nth-child(10),
.data-table td:nth-child(11) {
  white-space: normal;
  min-width: 150px;
}

.bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 2fr) 54px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.bar-shell {
  height: 10px;
  background: #edf1f5;
  border-radius: 999px;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: #6f8f8a;
}

.decisions {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.questions {
  display: grid;
  gap: 12px;
}

.question {
  padding-top: 12px;
  border-top: 1px solid #edf1f5;
}

.question:first-child {
  padding-top: 0;
  border-top: 0;
}

.notice {
  padding: 12px 16px;
  border: 1px solid #ead7b7;
  background: #fffaf2;
  color: #51463a;
  border-radius: 6px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .topbar,
  .section-head {
    display: block;
  }

  .site-meta {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .status-band,
  .layout,
  .grid {
    grid-template-columns: 1fr;
  }

  .readiness {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .readiness-item {
    min-height: 0;
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
