:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5f6b76;
  --line: #d8e0e7;
  --panel: #ffffff;
  --bg: #eef3f6;
  --blue: #1f6feb;
  --green: #137333;
  --amber: #9a5b00;
  --red: #b42318;
}

* {
  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;
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px clamp(16px, 4vw, 40px);
  background: #172026;
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: clamp(54px, 8vw, 76px);
  height: clamp(54px, 8vw, 76px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: #9fb4c5;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

h3 {
  margin: 0 0 8px;
}

.status-pill {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 9px 13px;
  color: #d7f8df;
  background: rgba(19, 115, 51, 0.24);
  font-weight: 800;
  white-space: nowrap;
}

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.boundary-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid #f0c36a;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff8e8;
  color: #352205;
}

.boundary-strip strong {
  color: var(--amber);
}

.boundary-strip span {
  line-height: 1.35;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(23, 32, 38, 0.08);
}

.muted {
  color: var(--muted);
}

.section-head {
  display: grid;
  gap: 4px;
}

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

.import-panel {
  display: grid;
  gap: 18px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.field-help {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.3;
}

.import-status {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: #f8fbfd;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.import-status.pass {
  border-color: #a8d7b7;
  color: var(--green);
  background: #edf8f0;
}

.import-status.medium {
  border-color: #edc984;
  color: var(--amber);
  background: #fff8e8;
}

.import-status.high {
  border-color: #f1aaa4;
  color: var(--red);
  background: #fff0ef;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fbfdff;
}

.actions,
.tabs,
.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-row {
  align-items: center;
}

.action-row a,
.action-row span {
  display: inline-flex;
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: #0b58b4;
  font-weight: 850;
  text-decoration: none;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 13px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
  cursor: pointer;
}

button.secondary {
  color: var(--ink);
  background: #e5ebf0;
}

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

.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.metric strong {
  font-size: 1.55rem;
}

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

.mode-list {
  display: grid;
  gap: 8px;
}

.mode-button {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #f8fbfd;
  text-align: left;
}

.mode-button.active {
  border-color: var(--blue);
  background: #eaf2ff;
}

.mode-button span {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.tab {
  color: var(--ink);
  background: #e7edf3;
}

.tab.active {
  color: #fff;
  background: var(--ink);
}

.tab-page {
  display: none;
  padding-top: 18px;
}

.tab-page.active {
  display: block;
}

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

.flag {
  border-left: 5px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #f8fbfd;
}

.flag p {
  margin: 5px 0 0;
  color: var(--muted);
}

.flag.pass {
  border-left-color: var(--green);
}

.flag.info {
  border-left-color: var(--blue);
}

.flag.medium {
  border-left-color: var(--amber);
}

.flag.high {
  border-left-color: var(--red);
}

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

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

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

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.check-list {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
  padding-left: 22px;
}

.hardware-grid,
.feature-grid,
.lesson-grid,
.kit-grid,
.rankin-grid,
.service-section-grid,
.package-grid,
.operations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.hardware-card,
.feature-card,
.kit-box,
.rankin-hero,
.service-section,
.package-card,
.operations-card,
.sales-copy,
.summary-card,
.report-box,
.boundary-card,
.score-card,
.graph-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfd;
}

.score-card {
  margin-bottom: 14px;
  border-color: #a8d7b7;
  background: #f3fbf5;
}

.score-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-card strong {
  display: block;
  margin: 5px 0;
  font-size: 1.8rem;
}

.graph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.graph-card svg {
  display: block;
  width: 100%;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wizard-checks {
  display: grid;
  gap: 8px;
}

.wizard-checks div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.wizard-checks .done strong {
  color: var(--green);
}

.wizard-checks .todo strong {
  color: var(--amber);
}

.hardware-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.rankin-hero {
  margin-bottom: 14px;
  border-color: #aac7e8;
  background: #eef6ff;
}

.rankin-hero h3 {
  font-size: 1.35rem;
}

.rankin-hero p {
  color: #294458;
  line-height: 1.45;
}

.rankin-hero a {
  color: #0b58b4;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.service-section h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.service-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.package-card h4 {
  margin: 12px 0 6px;
  font-size: 0.86rem;
  text-transform: uppercase;
  color: var(--muted);
}

.package-card p {
  line-height: 1.42;
}

.package-card ul,
.operations-card ol,
.operations-card ul,
.feature-card ol {
  margin: 8px 0 0;
  padding-left: 19px;
}

.package-card li,
.operations-card li,
.feature-card li {
  margin: 6px 0;
}

.tag-cloud {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-cloud span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.82rem;
}

.ladder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.ladder span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  line-height: 1.35;
}

.hardware-card ul,
.feature-card ul,
.kit-box ul {
  margin: 10px 0 0;
  padding-left: 19px;
}

.hardware-card li,
.feature-card li,
.kit-box li {
  margin: 6px 0;
}

.hardware-card code {
  display: block;
  margin-top: 12px;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  background: #172026;
  color: #eaf7ff;
}

.badge {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  color: #0b3b75;
  background: #dcecff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.warning {
  background: #fff8e8;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.3;
}

.report-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.customer-report-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.customer-report-card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.customer-report-card h3 {
  font-size: 0.98rem;
}

.customer-report-card p {
  margin-bottom: 9px;
  color: var(--muted);
  line-height: 1.35;
}

.customer-report-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.customer-report-card li {
  line-height: 1.35;
}

.customer-report-card.pass {
  border-top-color: var(--green);
  background: #f3fbf5;
}

.customer-report-card.info {
  border-top-color: var(--blue);
  background: #f4f9ff;
}

.customer-report-card.medium {
  border-top-color: var(--amber);
  background: #fffaf0;
}

.customer-report-card.high {
  border-top-color: var(--red);
  background: #fff5f4;
}

.report-box p {
  margin-bottom: 12px;
}

.compact-flags {
  display: grid;
  gap: 8px;
}

.compact-flag {
  display: grid;
  gap: 3px;
  border-left: 4px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.compact-flag span {
  color: var(--muted);
  line-height: 1.35;
}

.compact-flag.pass {
  border-left-color: var(--green);
}

.compact-flag.info {
  border-left-color: var(--blue);
}

.compact-flag.medium {
  border-left-color: var(--amber);
}

.compact-flag.high {
  border-left-color: var(--red);
}

.boundary-card {
  margin-bottom: 14px;
  border-color: #edc984;
  background: #fff8e8;
}

.boundary-card p {
  margin: 0 0 8px;
  color: #4c330c;
}

.boundary-card p:last-child {
  margin-bottom: 0;
}

.subhead {
  margin-top: 12px;
}

.report-preview {
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #101820;
  color: #eef6ff;
  white-space: pre-wrap;
}

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

@media (max-width: 860px) {
  .topbar,
  .workspace,
  .form-grid,
  .metric-grid,
  .boundary-strip,
  .split-head,
  .report-grid,
  .customer-report-panel,
  .report-columns {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .import-status {
    justify-self: start;
    white-space: normal;
  }

  .shell {
    width: min(100% - 20px, 1220px);
    margin-top: 10px;
  }
}
