:root {
  --ink: #13211f;
  --muted: #59706b;
  --line: #d8e2de;
  --surface: #ffffff;
  --wash: #f3f8f6;
  --green: #0d6b4e;
  --green-dark: #064a35;
  --lime: #c5f28a;
  --amber: #fff0bd;
  --amber-ink: #725100;
  --shadow: 0 18px 45px rgba(25, 66, 55, 0.09);
}

* { box-sizing: border-box; }

html { background: var(--wash); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

body { min-width: 0; margin: 0; overflow-x: hidden; }

.shell { width: 100%; max-width: 1420px; min-width: 0; margin: 0 auto; padding: 42px 20px 48px; }

.hero { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(32px, 6vw, 80px); color: #fff; background: radial-gradient(circle at 87% 16%, #3aa67b 0, rgba(58, 166, 123, 0) 30%), linear-gradient(130deg, #06382b, #0f7152); box-shadow: var(--shadow); }

.hero::after { content: ""; position: absolute; width: 320px; height: 320px; right: -135px; bottom: -195px; border: 1px solid rgba(255,255,255,.23); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.05), 0 0 0 85px rgba(255,255,255,.04); }

h1, h2, p { margin-top: 0; }
h1 { position: relative; z-index: 1; margin-bottom: 13px; max-width: 790px; font-size: clamp(2.55rem, 6vw, 5.4rem); line-height: .93; letter-spacing: -.06em; }
h2 { margin-bottom: 0; font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -.035em; }
.eyebrow { margin-bottom: 10px; color: var(--green); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { color: var(--lime); }
.lede { position: relative; z-index: 1; max-width: 730px; margin-bottom: 28px; color: rgba(255,255,255,.82); font-size: clamp(1rem, 1.8vw, 1.25rem); line-height: 1.6; }
.hero-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 14px 24px; color: rgba(255,255,255,.78); font-size: .88rem; }
.hero a { color: #fff; font-weight: 700; text-underline-offset: 4px; }
code { padding: .12em .35em; border-radius: 4px; background: rgba(20, 61, 49, .08); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.hero code { background: rgba(255,255,255,.13); }

section { margin-top: 58px; }
.source-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 22px; border: 1px solid #d5e7df; border-radius: 18px; background: #e9f7ef; }
.source-note h2 { margin-bottom: 6px; font-size: 1.05rem; }
.source-note p, .outcome p { margin-bottom: 0; color: #35594e; line-height: 1.6; }
.source-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-weight: 900; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; min-width: 0; margin-bottom: 20px; }
.section-heading > * { min-width: 0; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-caption, .filter-state { max-width: 420px; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; text-align: right; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi { min-height: 126px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 21px rgba(31, 71, 59, .04); }
.kpi strong { display: block; margin-bottom: 7px; font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.055em; }
.kpi span { color: var(--muted); font-size: .82rem; font-weight: 650; }

.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.model-card { display: flex; min-height: 184px; flex-direction: column; justify-content: space-between; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.model-card[data-published="true"] { border-top: 5px solid var(--green); }
.model-card[data-published="false"] { border-top: 5px solid #d7a822; background: #fffdf6; }
.model-name { margin-bottom: 4px; font-size: 1.12rem; font-weight: 800; letter-spacing: -.025em; }
.model-provider { color: var(--muted); font-size: .83rem; }
.model-stat { display: flex; align-items: baseline; gap: 7px; margin-top: 18px; }
.model-stat strong { font-size: 2rem; letter-spacing: -.06em; }
.model-stat span, .model-note { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.model-row { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 15px; color: #456058; font-size: .75rem; }

.outcome { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 1.25fr); gap: 36px; padding: 30px; border-radius: 18px; background: #d9f4e6; }
.outcome p { font-size: 1rem; }

.catalog-heading { align-items: center; }
.controls { display: flex; min-width: 0; gap: 10px; }
select, input { min-height: 42px; border: 1px solid #b8cbc4; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; }
select { min-width: 185px; padding: 0 12px; }
.search { display: flex; align-items: center; min-width: 0; gap: 7px; padding: 0 10px; border: 1px solid #b8cbc4; border-radius: 10px; background: #fff; color: var(--muted); }
.search input { width: 170px; min-width: 0; min-height: 40px; padding: 0; border: 0; outline: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 1050px; font-size: .86rem; }
th { padding: 14px 15px; border-bottom: 1px solid var(--line); color: #557168; background: #f7faf9; font-size: .7rem; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
td { padding: 14px 15px; border-bottom: 1px solid #e9efed; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f4faf7; }
.measure { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; }
.model-tag, .gate { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; font-size: .74rem; font-weight: 750; white-space: nowrap; }
.model-tag { color: var(--green-dark); background: #e5f4ec; }
.gate { gap: 5px; color: #116448; background: #e5f5ed; }
.gate::before { content: "●"; font-size: .62em; }
.artifact { display: inline-flex; padding: 7px 10px; border: 1px solid #9fc9b7; border-radius: 8px; color: var(--green-dark); font-size: .76rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.artifact:hover { color: #fff; background: var(--green); }
.artifact:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid rgba(13, 107, 78, .34); outline-offset: 2px; }
.source-sheet { max-width: 290px; color: #446258; font-size: .76rem; line-height: 1.38; overflow-wrap: anywhere; }
.empty { padding: 30px; color: var(--muted); text-align: center; }
footer { margin-top: 36px; color: var(--muted); font-size: .78rem; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .shell { padding: 12px 12px 32px; }
  .hero { padding: 32px 20px; border-radius: 20px; }
  .hero::after { display: none; }
  h1 { font-size: clamp(2.6rem, 14vw, 4rem); letter-spacing: -.07em; }
  .hero-meta { gap: 10px 16px; }
  section { margin-top: 40px; }
  .source-note { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
  .source-icon { width: 28px; height: 28px; }
  .section-heading, .catalog-heading { align-items: start; flex-direction: column; gap: 12px; }
  .section-caption, .filter-state { text-align: left; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 112px; padding: 16px; border-radius: 15px; }
  .kpi:last-child { grid-column: 1 / -1; }
  .model-grid { grid-template-columns: 1fr; gap: 10px; }
  .model-card { min-height: 156px; padding: 18px; border-radius: 15px; }
  .outcome { grid-template-columns: 1fr; gap: 16px; padding: 22px 18px; border-radius: 16px; }
  .controls { width: 100%; flex-direction: column; }
  .controls label, select, .search, .search input { width: 100%; }
  select, .search { min-height: 46px; }
  .search input { min-height: 44px; }

  .table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  table, thead, tbody, tr, td { display: block; width: 100%; min-width: 0; }
  table { min-width: 0; font-size: .86rem; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; }
  tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 21px rgba(31, 71, 59, .04); }
  tbody tr:hover { background: var(--surface); }
  td { min-width: 0; padding: 8px 0; border: 0; overflow-wrap: anywhere; }
  td::before { display: block; margin-bottom: 3px; color: var(--muted); content: attr(data-label); font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  tbody tr td:nth-child(1), tbody tr td:nth-child(2), tbody tr td:nth-child(3) { grid-column: 1 / -1; }
  tbody tr td:nth-child(1) { padding-top: 0; font-size: 1rem; }
  tbody tr td:nth-child(10) { align-self: end; }
  tbody tr td:nth-child(10)::before { content: "Artefakt"; }
  .source-sheet { max-width: none; font-size: .8rem; }
  .artifact { min-height: 42px; align-items: center; padding: 8px 12px; font-size: .82rem; }
  .empty { grid-column: 1 / -1; padding: 24px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
  .empty::before { display: none; }
  footer { margin-top: 28px; }
}
