/* /data — public data catalog: datasets × desks matrix. Scoped to .dcat. */

/* ---------- hero ---------- */
.dcat-hero { padding-bottom: var(--sp-8); }
.dcat-hero h1 { margin: var(--sp-4) 0; max-width: 18ch; }
.dcat-hero__lede { color: var(--text-soft); max-width: 60ch; font-size: var(--step-1); }
.dcat-figs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6);
  margin-top: var(--sp-8); padding-top: var(--sp-6);
  border-top: 2px solid var(--text-heading);
}
.dcat-fig b {
  display: block; font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1; color: var(--text-heading);
}
.dcat-fig span { font-size: var(--step--1); color: var(--text-soft); }
@media (max-width: 720px) { .dcat-figs { grid-template-columns: 1fr 1fr; } }

/* ---------- filter bar ---------- */
.dcat-matrix-sec { padding-top: 0; }
.dcat-bar { margin-bottom: var(--sp-5); }
.dcat-bar__label {
  display: block; font-family: var(--font-mono); font-size: var(--step-label);
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
  margin-bottom: var(--sp-2);
}
.dcat-bar__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.dcat-chip {
  font: inherit; font-size: var(--step--1); font-weight: 600; cursor: pointer;
  padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: background .15s, border-color .15s, color .15s;
}
.dcat-chip:hover { border-color: var(--brand-600); }
.dcat-chip.is-on { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.dcat-bar__status { margin-top: var(--sp-3); font-size: var(--step--1); color: var(--text-soft); }
.dcat-bar__status [data-dcat-count] { font-weight: 700; color: var(--text); }
.dcat-bar__seat { margin-left: var(--sp-3); font-weight: 650; color: var(--action); }

/* ---------- matrix ---------- */
.dcat-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.dcat-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.dcat-table th, .dcat-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }

.dcat-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface);
  border-bottom: 2px solid var(--text-heading); vertical-align: bottom;
}
.dcat-th--name {
  text-align: left; font-family: var(--font-mono); font-size: var(--step-label);
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
  font-weight: 600; width: 34%;
}
.dcat-th { text-align: center; width: 9.4%; }
.dcat-th button {
  font: inherit; font-family: var(--font-mono); font-size: 11px; line-height: 1.25;
  font-weight: 600; letter-spacing: .02em; color: var(--brand-700);
  background: none; border: 0; padding: 4px 2px; cursor: pointer; border-radius: var(--radius-sm);
}
.dcat-th button:hover { color: var(--action); }
.dcat-th button.is-on { color: var(--action); }

/* sticky dataset-name column so the matrix still reads when scrolled sideways */
.dcat-ds th {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
  text-align: left; font-weight: 500; font-size: var(--step--1); color: var(--text);
}
.dcat-ds td { text-align: center; }
.dcat-ds:hover th, .dcat-ds:hover td { background: var(--surface-tint); }

.dcat-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand-600);
}

/* family header rows */
.dcat-fam__row th {
  text-align: left; background: var(--brand-100); border-bottom: 1px solid var(--line);
  padding: 10px 10px;
}
.dcat-fam__name {
  font-family: var(--font-display); font-weight: 700; font-size: var(--step--1);
  letter-spacing: .06em; text-transform: uppercase; color: var(--brand-800);
}
.dcat-fam__n {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: var(--surface); color: var(--brand-700);
}
.dcat-fam__blurb {
  display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--text-soft);
}

/* ---------- desk filter state ----------
   The table carries data-desk="<key>": dim rows that don't serve that desk and
   tint its column. One rule pair per desk — keys come from content/data.yml. */
.dcat-table[data-desk] .dcat-ds { opacity: .28; transition: opacity .15s; }
.dcat-table[data-desk] .dcat-dot { background: var(--ink-300); }
.dcat-table[data-desk="hf"] .dcat-ds.d-hf,
.dcat-table[data-desk="pe"] .dcat-ds.d-pe,
.dcat-table[data-desk="cr"] .dcat-ds.d-cr,
.dcat-table[data-desk="ib"] .dcat-ds.d-ib,
.dcat-table[data-desk="aw"] .dcat-ds.d-aw,
.dcat-table[data-desk="pr"] .dcat-ds.d-pr,
.dcat-table[data-desk="cl"] .dcat-ds.d-cl { opacity: 1; }
.dcat-table[data-desk="hf"] .c-hf,
.dcat-table[data-desk="pe"] .c-pe,
.dcat-table[data-desk="cr"] .c-cr,
.dcat-table[data-desk="ib"] .c-ib,
.dcat-table[data-desk="aw"] .c-aw,
.dcat-table[data-desk="pr"] .c-pr,
.dcat-table[data-desk="cl"] .c-cl { background: var(--act-050); }
.dcat-table[data-desk="hf"] .c-hf .dcat-dot,
.dcat-table[data-desk="pe"] .c-pe .dcat-dot,
.dcat-table[data-desk="cr"] .c-cr .dcat-dot,
.dcat-table[data-desk="ib"] .c-ib .dcat-dot,
.dcat-table[data-desk="aw"] .c-aw .dcat-dot,
.dcat-table[data-desk="pr"] .c-pr .dcat-dot,
.dcat-table[data-desk="cl"] .c-cl .dcat-dot { background: var(--action); width: 11px; height: 11px; }

/* ---------- principles + delivery ---------- */
.dcat-principles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6);
  border-top: 2px solid var(--text-heading); padding-top: var(--sp-5);
}
.dcat-pr h3 { font-size: var(--step-1); margin: 0; }
.dcat-pr__tag {
  display: block; font-family: var(--font-mono); font-size: 12px; color: var(--act-700);
  margin: 2px 0 var(--sp-2);
}
.dcat-pr p { color: var(--text-soft); font-size: var(--step--1); margin: 0; }
.dcat-delivery { margin-top: var(--sp-10); }
.dcat-delivery h2 { font-size: var(--step-2); margin-bottom: var(--sp-5); }
.dcat-delivery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.dcat-dl {
  border: 1px solid var(--line); border-top: 3px solid var(--brand-600);
  border-radius: var(--radius); padding: var(--sp-5); background: var(--surface);
}
.dcat-dl b { font-family: var(--font-display); font-size: var(--step-1); color: var(--text-heading); }
.dcat-dl p { margin: var(--sp-2) 0 0; color: var(--text-soft); font-size: var(--step--1); }
@media (max-width: 820px) {
  .dcat-principles, .dcat-delivery__grid { grid-template-columns: 1fr; }
}

/* ---------- CTA ---------- */
.dcat-cta__card {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6);
  flex-wrap: wrap; padding: var(--sp-8); border-radius: var(--radius-lg);
  background: var(--brand-900); color: #fff; border-top: 3px solid var(--action);
}
.dcat-cta__card h2 { color: #fff; font-size: var(--step-3); margin: 0 0 var(--sp-2); }
.dcat-cta__card p { color: rgba(255,255,255,.78); margin: 0; max-width: 52ch; }
.dcat-cta__btns { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.dcat-cta__card .btn:not(.btn--action) { color: #fff; border-color: rgba(255,255,255,.4); }

/* ---------- the Console showcase ---------- */
.dcat-console{background:linear-gradient(155deg,#0e1633 0%,#1c1f4a 55%,#2a1c57 100%);color:#fff}
.dcat-console__head{max-width:62ch;margin-bottom:var(--sp-8)}
.dcat-console__head h2{color:#fff;margin:var(--sp-3) 0}
.dcat-console__head p{color:rgba(255,255,255,.76);font-size:var(--step-1);margin:0}
.dcat-console__grid{display:grid;grid-template-columns:230px minmax(0,1fr);gap:var(--sp-6);align-items:start}
@media(max-width:900px){.dcat-console__grid{grid-template-columns:1fr}}
.dcat-console__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--sp-2)}
@media(max-width:900px){.dcat-console__list{flex-direction:row;overflow-x:auto;padding-bottom:var(--sp-2)}}
.dcat-console__tab{width:100%;text-align:left;font:inherit;cursor:pointer;display:flex;flex-direction:column;gap:2px;
  padding:var(--sp-3) var(--sp-4);border-radius:var(--radius);border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);color:#fff;transition:background .15s,border-color .15s}
@media(max-width:900px){.dcat-console__tab{min-width:200px}}
.dcat-console__tab b{font-size:var(--step-0)}
.dcat-console__tab span{font-size:var(--step--1);color:rgba(255,255,255,.65)}
.dcat-console__tab:hover{border-color:rgba(255,255,255,.3)}
.dcat-console__tab.is-on{background:#fff;border-color:#fff;color:#182230;box-shadow:inset 3px 0 0 var(--action)}
.dcat-console__tab.is-on span{color:#4a5566}
.dcat-console__frame .pshot__img img{max-height:none}
.dcat-console__note{margin:var(--sp-4) 0 0;font-size:var(--step--2);color:rgba(255,255,255,.55)}
.dcat-console .sec-pill{background:rgba(255,255,255,.12);color:#fff}

/* ---------- ten-family summary (replaces the public dataset table) ---------- */
.dcat-fams__head{max-width:62ch;margin-bottom:var(--sp-8)}
.dcat-fams__head h2{margin:var(--sp-3) 0}
.dcat-fams__head p{color:var(--text-soft);font-size:var(--step-1);margin:0}
.dcat-fams__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:var(--sp-4)}
.dcat-famcard{background:var(--surface);border:var(--border) solid var(--line);border-top:3px solid var(--brand-600);
  border-radius:var(--radius);padding:var(--sp-5);display:flex;flex-direction:column;gap:var(--sp-3)}
.dcat-famcard__top{display:flex;justify-content:space-between;align-items:baseline;gap:var(--sp-3)}
.dcat-famcard h3{margin:0;font-size:var(--step-1);color:var(--text-heading)}
.dcat-famcard__n{flex:none;font-size:var(--step--2);font-weight:650;color:var(--action);white-space:nowrap}
.dcat-famcard p{margin:0;color:var(--text-soft);font-size:var(--step--1)}
.dcat-famcard__desks{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto}
.dcat-famcard__desks a,.dcat-famcard__desks span{font-size:var(--step--2);padding:2px 10px;border-radius:var(--radius-pill);
  border:1px solid var(--line-strong);color:var(--text-soft);background:var(--surface-tint)}
.dcat-famcard__desks a:hover{border-color:var(--brand-600);color:var(--brand-700);text-decoration:none}
.dcat-fams__gate{margin-top:var(--sp-8);display:flex;align-items:center;justify-content:space-between;gap:var(--sp-5);
  flex-wrap:wrap;padding:var(--sp-5) var(--sp-6);border:1px dashed var(--line-strong);border-radius:var(--radius-lg)}
.dcat-fams__gate p{margin:0;max-width:60ch;color:var(--text-soft)}
/* the gate fills the last row beside the 10th card (3-col grid) */
.dcat-fams__grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.dcat-fams__gate{margin-top:0;grid-column:span 2;flex-direction:column;align-items:flex-start;justify-content:center;
  background:var(--surface-tint)}
@media(max-width:1000px){.dcat-fams__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dcat-fams__gate{grid-column:span 2}}
@media(max-width:640px){.dcat-fams__grid{grid-template-columns:1fr}.dcat-fams__gate{grid-column:auto}}
.dcat-beta{display:inline-block;margin-left:var(--sp-2);padding:3px 10px;border-radius:var(--radius-pill);background:var(--action);color:#fff;font-size:var(--step--2);font-weight:700;letter-spacing:.08em;text-transform:uppercase;vertical-align:middle}
