:root {
  color-scheme: light;
  --bg: #f5f7f3;
  --ink: #17201b;
  --muted: #5f6a63;
  --panel: #ffffff;
  --line: #d8ded7;
  --accent: #287a5b;
  --accent-2: #d6aa38;
  --accent-3: #436f9e;
  --warn: #9a5b26;
  --blocked: #7b3f43;
  --shadow: 0 18px 45px rgba(32, 41, 34, .11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(67, 111, 158, .09), transparent 360px),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button { font: inherit; }

.topbar,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.9rem);
  line-height: .96;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}

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

.status-pill,
.tag,
.source-type,
.score-badge,
.cell-source {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intro,
.priority-panel,
.methods-section,
.matrix-section,
.audit-section {
  margin: 18px 0;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr);
  gap: 20px;
}

.intro p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.legend,
.audit-grid {
  display: grid;
  gap: 8px;
}

.audit-grid {
  gap: 14px;
}

.legend-row,
.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.legend-row:last-child,
.audit-row:last-child { border-bottom: 0; }

.legend-row strong,
.audit-row strong {
  color: var(--ink);
  font-size: .86rem;
}

.legend-row span,
.audit-row span {
  color: var(--muted);
  text-align: right;
  font-size: .86rem;
}

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

.priority-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.priority-btn {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 760;
}

.priority-btn.is-active {
  border-color: var(--accent);
  background: #e5f3ec;
  color: #103d2c;
}

.fit-note {
  margin: 12px 0 0;
  color: var(--muted);
}

.scroll-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.method-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(312px, 390px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding: 4px 2px 14px;
}

.method-card {
  display: flex;
  flex-direction: column;
  min-height: 760px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.method-card.is-fit {
  outline: 3px solid rgba(40, 122, 91, .26);
  border-color: rgba(40, 122, 91, .55);
}

.method-card.status-not-available { border-color: rgba(123, 63, 67, .44); }
.method-card.status-planned,
.method-card.status-not-tested { border-color: rgba(154, 91, 38, .38); }
.method-card.status-available-not-tested { border-color: rgba(67, 111, 158, .42); }
.method-card.status-tested { border-color: rgba(40, 122, 91, .48); }

.preview {
  position: relative;
  min-height: 248px;
  overflow: hidden;
  background: #121716;
}

.preview img {
  width: 100%;
  height: 100%;
  min-height: 248px;
  object-fit: cover;
  display: block;
}

.software-preview {
  min-height: 248px;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 22px;
  color: #eaf0ed;
  background:
    linear-gradient(90deg, rgba(214, 170, 56, .24), transparent 60%),
    linear-gradient(145deg, #1f2d28, #08100d);
}

.software-preview .car-line {
  height: 72px;
  border: 1px solid rgba(234, 240, 237, .25);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent, rgba(214, 170, 56, .6), transparent),
    linear-gradient(135deg, #111917, #45584e);
  animation: sweep 4s ease-in-out infinite;
}

.blocked-note {
  padding: 12px;
  border: 1px solid rgba(123, 63, 67, .24);
  border-radius: 7px;
  background: #fffaf0;
  color: #60461b;
  font-size: .88rem;
  line-height: 1.4;
}

.card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.method-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.metric {
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbf8;
}

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

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.02rem;
}

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

.criteria-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #edf0ec;
  color: var(--muted);
  font-size: .88rem;
}

.criteria-list strong {
  color: var(--ink);
  text-align: right;
}

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

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

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

th {
  position: sticky;
  top: 0;
  background: #f6f8f4;
  z-index: 1;
  font-size: .78rem;
  text-transform: uppercase;
}

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

.group-row td {
  background: #edf3ee;
  color: #1d4d39;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cell-value {
  display: block;
  margin-bottom: 6px;
  font-weight: 760;
}

.cell-source {
  min-height: 22px;
  padding: 3px 6px;
  font-size: .66rem;
}

.cell-source.fact { color: #13462f; background: #e5f3ec; }
.cell-source.measured { color: #1e4d77; background: #e9f1fa; }
.cell-source.estimate { color: #694510; background: #fff4d8; }
.cell-source.subjective { color: #643f73; background: #f6eafa; }

.audit-summary,
.tool-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.audit-summary strong,
.tool-grid strong {
  color: var(--ink);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.audit-summary span,
.tool-grid span {
  color: var(--muted);
  line-height: 1.4;
}

.tool-card {
  display: grid;
  gap: 12px;
}

.tool-card h3 {
  font-size: 1rem;
}

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

.tool-grid div {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #edf0ec;
}

@keyframes sweep {
  0%, 100% { filter: brightness(.88); transform: translateY(0); }
  50% { filter: brightness(1.22); transform: translateY(-5px); }
}

@media (max-width: 780px) {
  .topbar,
  .section-head,
  .intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .topbar,
  .section-head {
    flex-direction: column;
  }

  .status-pill { align-self: flex-start; }
  .method-strip { grid-auto-columns: minmax(286px, 86vw); }
  .method-card { min-height: auto; }
  .scroll-actions { display: none; }
  .tool-grid,
  .audit-summary { grid-template-columns: 1fr; }
  .audit-summary { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
