/* LungMAP Data Browser — the modern interior.
 *
 * Loads after vendor/bootstrap-5.3.3.min.css and css/lungmap-theme.css.
 * The theme file owns the identity: the header stripe, the nav, the footer,
 * the #005295 / #198cea palette and Roboto. This file owns everything inside
 * the page: the facet rail, the result table, the cards and the chips.
 *
 * The token names follow
 * /Users/saljh8/Dropbox/LungMAP/refactored_website_archive/v0.1/app/lungmap/static/css/lungmap.css
 * with the values re-pointed at the served LungMAP palette. That archive file
 * is referenced by no template in either tree, so it is a starting point and
 * not a schema of record.
 */

:root {
  /* Identity, read off theme/css/page.css lines 10367-10639. */
  --lm-blue-700: #005295;   /* secondary: body text, nav, footer */
  --lm-blue-500: #198cea;   /* primary: links, accents */
  --lm-gray-500: #707070;   /* .text-dark-gray */
  --lm-gray-300: #adadad;   /* .text-light-gray */

  /* Derived steps. Interpolated from the two blues above. */
  --lm-blue-900: #00365f;
  --lm-blue-300: #6ab6f2;
  --lm-blue-100: #e3f0fc;
  --lm-blue-050: #f2f8fe;

  --lm-gray-150: #e2e5e9;
  --lm-gray-100: #eceff2;
  --lm-gray-050: #f5f7f9;

  --ink: #1f2933;
  --ink-muted: var(--lm-gray-500);
  --line: var(--lm-gray-150);
  --bg: #ffffff;
  --bg-sunken: var(--lm-gray-050);

  --radius: 8px;
  --radius-sm: 5px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .045);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .07), 0 12px 28px rgba(0, 0, 0, .08);

  --rail-width: 292px;

  --font-sans: Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, monospace;
}

/* The theme paints every body glyph #005295, which suits a prose page and
   not a dense table. Headings keep the blue; running text turns to ink. */
body {
  color: var(--ink);
  font-family: var(--font-sans);
  background: var(--bg-sunken);
}

h1, h2, h3, h4, h5 { color: var(--lm-blue-700); }

:focus-visible {
  outline: 3px solid var(--lm-blue-500);
  outline-offset: 2px;
  border-radius: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--lm-blue-700); color: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 0; }

/* --- Header ---------------------------------------------------------- */

/* `.header` is the theme's. These rules add only what a browser needs that a
   content page does not: the product wordmark and a sticky position.
   The header and the command bar stick as one block. Sticking them separately
   needs the header's exact height as a constant, and that constant goes stale
   the moment the wordmark wraps or the nav grows a line. */

.sticky-stack { position: sticky; top: 0; z-index: 1200; }

.product-name {
  color: var(--lm-blue-700);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -.01em;
  border-left: 1px solid var(--lm-gray-300);
  margin-left: 18px;
  padding-left: 18px;
  line-height: 60px;
  white-space: nowrap;
}

.header__nav a { cursor: pointer; }

/* --- The command bar ------------------------------------------------- */

.command-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
}

.command-bar-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 56px;
  flex-wrap: wrap;
}

.view-tabs { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.view-tab {
  border: none;
  background: none;
  padding: .95rem .35rem;
  margin: 0 .6rem;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.view-tab:hover { color: var(--lm-blue-700); }
.view-tab[aria-selected="true"] {
  color: var(--lm-blue-700);
  border-bottom-color: var(--lm-blue-500);
  font-weight: 600;
}
.view-tab[disabled] { opacity: .38; cursor: not-allowed; }

.summary-strip {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13.5px;
  color: var(--ink-muted);
}
.summary-stat { white-space: nowrap; }
.summary-stat + .summary-stat::before {
  content: "•";
  margin: 0 .6rem;
  color: var(--lm-gray-300);
}
.summary-stat .stat {
  font-weight: 600;
  color: var(--lm-blue-700);
  font-variant-numeric: tabular-nums;
}
.summary-stat .label { margin-left: .3rem; }

/* --- Layout ---------------------------------------------------------- */

.browser-layout {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  align-items: start;
  gap: 0;
}

.facet-rail {
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 1.1rem 1rem 3rem;
  /* --stack-h is measured and written by js/browser-index.js. */
  position: sticky;
  top: var(--stack-h, 190px);
  max-height: calc(100vh - var(--stack-h, 190px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.results-pane {
  padding: 1.25rem 1.5rem 3rem;
  min-width: 0;
}

/* --- Facet rail ------------------------------------------------------ */

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}
.rail-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--lm-blue-700);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0;
}
.rail-clear {
  border: none; background: none; padding: 0;
  color: var(--lm-blue-500); font-size: 13px; font-weight: 600; cursor: pointer;
}
.rail-clear:hover { text-decoration: underline; }
.rail-clear[disabled] { color: var(--lm-gray-300); cursor: default; text-decoration: none; }

.facet-search { position: relative; margin-bottom: 1.1rem; }
.facet-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .5rem .6rem .5rem 2rem;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
}
.facet-search input:focus {
  border-color: var(--lm-blue-500);
  box-shadow: 0 0 0 3px var(--lm-blue-100);
  outline: none;
}
.facet-search .fa-magnifying-glass {
  position: absolute; left: .65rem; top: 50%; transform: translateY(-50%);
  color: var(--lm-gray-300); font-size: 13px; pointer-events: none;
}

/* Pills for the values in force. The prototype gave no way to see or drop a
   single active filter; the site's own browse page draws them like this. */
.active-filters { margin-bottom: 1rem; }
.active-filters:empty { display: none; }
.filter-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--lm-blue-100); color: var(--lm-blue-900);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: .2rem .5rem .2rem .7rem;
  font-size: 12.5px; margin: 0 .3rem .35rem 0;
  max-width: 100%;
}
.filter-pill span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px;
}
.filter-pill button {
  border: none; background: none; padding: 0; line-height: 1;
  color: var(--lm-blue-700); cursor: pointer; font-size: 12px;
}
.filter-pill button:hover { color: #b3261e; }

.facet-group { border-top: 1px solid var(--line); padding: .1rem 0; }
.facet-group:first-of-type { border-top: none; }

.facet-group-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--lm-gray-500);
  margin: 1rem 0 .35rem;
}

.facet {
  border-bottom: 1px solid transparent;
}

.facet-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: .5rem;
  border: none; background: none; text-align: left;
  padding: .45rem .3rem; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink); cursor: pointer;
}
.facet-toggle:hover { background: var(--bg-sunken); }
.facet-toggle .facet-name { font-weight: 500; }
.facet-toggle .facet-count { color: var(--ink-muted); font-size: 12.5px; }
.facet-toggle .fa-chevron-down {
  font-size: 11px; color: var(--lm-gray-300); transition: transform .15s ease;
}
.facet-toggle[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.facet-toggle .badge-active {
  background: var(--lm-blue-500); color: #fff;
  border-radius: var(--radius-pill); font-size: 11px;
  padding: .05rem .4rem; font-weight: 700;
}

.facet-values { padding: .1rem 0 .6rem .3rem; }
.facet-values[hidden] { display: none; }

.facet-value {
  display: flex; align-items: baseline; gap: .5rem;
  padding: .22rem .3rem; border-radius: var(--radius-sm);
  font-size: 13.5px; cursor: pointer;
}
.facet-value:hover { background: var(--lm-blue-050); }
.facet-value input { margin: 0; flex-shrink: 0; position: relative; top: 2px; }
.facet-value .value-label {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.facet-value .value-count {
  color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
/* A value no result carries stays readable but reads as unavailable. */
.facet-value.is-empty { opacity: .42; }

.facet-more {
  border: none; background: none; padding: .2rem .3rem;
  color: var(--lm-blue-500); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.facet-more:hover { text-decoration: underline; }

.facet-filter-box {
  width: 100%; margin: .2rem 0 .4rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .3rem .45rem; font-size: 12.5px;
}

/* --- Results toolbar ------------------------------------------------- */

.results-toolbar {
  display: flex; align-items: center; gap: .75rem;
  flex-wrap: wrap; margin-bottom: .9rem;
}

.seg {
  display: inline-flex; border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden; background: var(--bg);
}
.seg button {
  border: none; background: var(--bg); color: var(--ink-muted);
  padding: .4rem 1.1rem; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--lm-blue-700); color: #fff; }

.result-count { color: var(--ink-muted); font-size: 13.5px; }
.toolbar-spacer { margin-left: auto; }

.btn-lm {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: var(--radius-sm); padding: .4rem .85rem;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.btn-lm:hover { border-color: var(--lm-blue-500); color: var(--lm-blue-700); }
.btn-lm-primary {
  background: var(--lm-blue-700); border-color: var(--lm-blue-700); color: #fff;
}
.btn-lm-primary:hover { background: var(--lm-blue-500); border-color: var(--lm-blue-500); color: #fff; }

/* --- Result table ---------------------------------------------------- */

.result-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

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

table.lm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  margin: 0;
}
table.lm-table thead th {
  background: var(--bg-sunken);
  color: var(--lm-gray-500);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  padding: .8rem .85rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
table.lm-table tbody td {
  padding: .8rem .85rem;
  border-bottom: 1px solid var(--lm-gray-100);
  vertical-align: top;
  color: var(--ink);
}
table.lm-table tbody tr:last-child td { border-bottom: none; }
table.lm-table tbody tr:hover { background: var(--lm-blue-050); }

/* Only the dataset list needs a wide first column; scoping it stops the
   rule reaching the file table's checkbox column. */
#data-table td:first-child, #data-table th:first-child {
  min-width: 22rem;
}
#file-table td:first-child, #file-table th:first-child { width: 3.2rem; }

.cell-title a {
  color: var(--lm-blue-500);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(25, 140, 234, .35);
  text-underline-offset: 2px;
}
.cell-title a:hover { text-decoration-color: var(--lm-blue-500); }
.cell-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* A cell holding many values shows a count chip and reveals the list on
   demand. The full text stays in the DOM so the table search still finds it. */
.chip {
  display: inline-block;
  background: var(--lm-gray-100);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: .12rem .6rem;
  font-size: 12px;
  white-space: nowrap;
  cursor: default;
}
.chip-more { cursor: pointer; border: 1px solid transparent; }
.chip-more:hover { border-color: var(--lm-blue-300); background: var(--lm-blue-100); }
.hidden-data { display: none; }

.species-name { font-style: italic; }

/* DataTables' own furniture, restyled to match. */
.dt-container .dt-search input,
.dt-container .dt-length select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .3rem .5rem;
  font-size: 13.5px;
}
.dt-container .dt-paging .dt-paging-button {
  border-radius: var(--radius-sm) !important;
  font-size: 13.5px;
}
.dt-container .dt-paging .dt-paging-button.current {
  background: var(--lm-blue-700) !important;
  border-color: var(--lm-blue-700) !important;
  color: #fff !important;
}
.dt-container .dt-info { color: var(--ink-muted); font-size: 13px; }
table.lm-table thead th.dt-orderable-asc,
table.lm-table thead th.dt-orderable-desc { cursor: pointer; }

.empty-state {
  padding: 3.5rem 1rem;
  text-align: center;
  color: var(--ink-muted);
}
.empty-state i { font-size: 30px; color: var(--lm-gray-300); display: block; margin-bottom: .6rem; }

/* --- Project page ---------------------------------------------------- */

.crumb { font-size: 13px; color: var(--ink-muted); margin: 0 0 .4rem; }
.crumb a { color: var(--lm-blue-500); }

.project-head { padding: 1.6rem 0 0; }
.project-title {
  font-size: 30px; font-weight: 400; line-height: 1.22;
  color: var(--lm-blue-700); margin: 0 0 .35rem; max-width: 62ch;
}
.project-updated { color: var(--ink-muted); font-size: 13.5px; margin: 0; }

.tab-strip {
  display: flex; gap: 0; border-bottom: 1px solid var(--line);
  margin: 1.4rem 0 1.6rem; list-style: none; padding: 0;
}
.tab-strip .tab {
  border: none; background: none;
  padding: .75rem .2rem; margin-right: 1.9rem;
  font-size: 15px; font-weight: 500; color: var(--ink-muted);
  border-bottom: 3px solid transparent; cursor: pointer;
}
.tab-strip .tab:hover { color: var(--lm-blue-700); }
.tab-strip .tab.active {
  color: var(--lm-blue-700); border-bottom-color: var(--lm-blue-500); font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  align-items: start;
}

.panel {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: 1.4rem 1.5rem;
}
.panel + .panel { margin-top: 1.25rem; }
.panel h3 {
  font-size: 17px; font-weight: 600; color: var(--lm-blue-700);
  margin: 0 0 .8rem;
}
.panel p { color: var(--ink); }
.panel .lead-text { line-height: 1.65; }

.detail-list dt {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--lm-blue-500); font-weight: 600; margin-top: 1rem;
}
.detail-list dt:first-child { margin-top: 0; }
.detail-list dd { margin: .2rem 0 0; font-size: 14px; color: var(--ink); }

.portal-list { list-style: none; padding: 0; margin: 0; }
.portal-list li { margin-bottom: .7rem; }
.portal-list a {
  display: flex; align-items: center; gap: .65rem;
  color: var(--ink); font-size: 14px;
}
.portal-list a:hover { color: var(--lm-blue-500); }
.portal-list img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.tag {
  background: var(--lm-blue-100); color: var(--lm-blue-900);
  border-radius: var(--radius-pill); padding: .2rem .7rem; font-size: 12.5px;
}

.contact-block { margin-bottom: 1rem; font-size: 14px; }
.contact-block .contact-name { font-weight: 600; color: var(--ink); }
.contact-block .contact-org { color: var(--ink-muted); }

/* --- Footer ---------------------------------------------------------- */

/* `footer` is the theme's: #005295, white text. Only the width is set here. */
footer .container-fluid { max-width: 1600px; }

/* --- Loading --------------------------------------------------------- */

.loading-row { padding: 2.5rem; text-align: center; color: var(--ink-muted); }
.spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 2.5px solid var(--lm-gray-150); border-top-color: var(--lm-blue-500);
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -5px;
  margin-right: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Small screens --------------------------------------------------- */

@media (max-width: 1100px) {
  .browser-layout { grid-template-columns: 1fr; }
  .facet-rail {
    position: static; max-height: none; border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .product-name { display: none; }
  .summary-strip { margin-left: 0; width: 100%; padding-bottom: .6rem; }
  .results-pane { padding: 1rem .9rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .facet-rail, .command-bar, .header__nav, footer { display: none !important; }
  .browser-layout { grid-template-columns: 1fr; }
}

/* --- Overview panes --------------------------------------------------- */

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}
.overview-grid .panel { margin-top: 0; }

.bar-list { display: flex; flex-direction: column; gap: .45rem; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 11rem) 1fr 2.6rem;
  align-items: center;
  gap: .7rem;
  font-size: 13px;
}
.bar-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink);
}
.bar-track {
  background: var(--lm-gray-100);
  border-radius: var(--radius-pill);
  height: 9px;
  overflow: hidden;
}
.bar-fill {
  display: block; height: 100%;
  background: var(--lm-blue-500);
  border-radius: var(--radius-pill);
}
.bar-value {
  text-align: right; color: var(--ink-muted);
  font-variant-numeric: tabular-nums; font-size: 12.5px;
}

/* A tooltip carrying a value list needs more room than Bootstrap's default. */
.tooltip-wide .tooltip-inner { max-width: 380px; text-align: left; }

/* --- DataTables furniture --------------------------------------------- */

/* The length menu and the search sit on one row above the table, inside the
   card, and read as part of it rather than as library chrome. */
.result-card .dt-layout-row:first-child {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .75rem .85rem; border-bottom: 1px solid var(--line);
  background: var(--bg);
  margin: 0;
}
.result-card .dt-layout-row:first-child .dt-layout-cell { padding: 0; }
.result-card .dt-layout-row:first-child .dt-layout-end { margin-left: auto; }
.result-card .dt-layout-row:last-child {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
  padding: .7rem .85rem; border-top: 1px solid var(--line);
  margin: 0;
}
.dt-container .dt-length, .dt-container .dt-search {
  display: flex; align-items: center; gap: .45rem;
  font-size: 13px; color: var(--ink-muted);
}
.dt-container .dt-search input { min-width: 15rem; margin: 0; }
.dt-container .dt-length select { width: auto; }
.dt-container .dt-layout-table { margin: 0; }
.result-card .table-scroll { border: none; }

/* --- Project page ------------------------------------------------------ */

.project-page {
  max-width: 1500px;
  margin-inline: auto;
  padding: 0 1.75rem 3rem;
}

.project-title a, .product-name a { color: inherit; text-decoration: none; }

.pub-item { padding: .8rem 0; border-bottom: 1px solid var(--lm-gray-100); }
.pub-item:last-child { border-bottom: none; padding-bottom: 0; }
.pub-item:first-child { padding-top: 0; }
.pub-title { font-weight: 500; color: var(--ink); margin-bottom: .2rem; }
.pub-meta { font-size: 13.5px; color: var(--ink-muted); }
.pub-journal { font-style: italic; }
.pub-links { font-size: 13px; margin-top: .3rem; }

.contributor-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.contributor {
  display: inline-flex; align-items: baseline; gap: .3rem;
  background: var(--bg-sunken); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: .25rem .8rem; font-size: 13.5px;
}
.contributor.is-corresponding {
  background: var(--lm-blue-100); border-color: transparent; color: var(--lm-blue-900);
}
.contributor-role { color: var(--ink-muted); font-size: 12px; }
.contributor sup { color: var(--lm-blue-500); font-weight: 600; }
.contributor a { color: inherit; }
.orcid-link img { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

.institution-list { margin: 0; padding-left: 1.2rem; font-size: 14px; }
.institution-list li { margin-bottom: .25rem; }

.tag-link { text-decoration: none; }
.tag-link:hover { background: var(--lm-blue-300); color: #fff; }

.file-info-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.file-info-table th {
  text-align: left; font-weight: 600; color: var(--lm-blue-700);
  padding: .28rem .5rem .28rem 0; font-family: var(--font-mono); font-size: 12px;
}
.file-info-table td {
  padding: .28rem .5rem .28rem 0; color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.file-info-table td:last-child { text-align: right; }

.detail-list .value-count { color: var(--ink-muted); font-size: 12px; }

.protocol-detail {
  background: var(--bg-sunken); padding: 1rem 1.1rem;
  border-left: 3px solid var(--lm-blue-500); font-size: 13.5px;
}
.protocol-detail p { margin: 0 0 .6rem; }
.protocol-description { max-width: 46rem; }
.more-hint { color: var(--lm-blue-500); font-size: 12px; }
td.dt-control { cursor: pointer; width: 1.6rem; }
td.dt-control::before {
  content: "\f0da"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  color: var(--lm-blue-500);
}
tr.dt-hasChild td.dt-control::before { content: "\f0d7"; }

.select-cell { width: 3.2rem; white-space: nowrap; }
.managed-lock { color: var(--lm-gray-500); }
.drs-link {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--lm-blue-100); color: var(--lm-blue-900);
  border-radius: var(--radius-sm); padding: .05rem .3rem; text-decoration: none;
}

.mono { font-family: var(--font-mono); font-size: .9em; }

/* The project page has no facet rail, so its tables carry the card frame
   themselves rather than inheriting the results-pane grid. */
#files .result-card .dt-layout-row:first-child { border-bottom: 1px solid var(--line); }
#metadata .table-scroll, #protocols .table-scroll { margin-top: .5rem; }

/* --- Provenance graph -------------------------------------------------- */

.graph-page { overflow: hidden; background: var(--bg); }
.graph-header { position: static; }
.graph-header .logo { height: 44px; margin: 8px 0; }
.graph-header .product-name { font-size: 20px; line-height: 44px; }
.graph-page svg#graph { display: block; }

.graph-legend {
  position: absolute;
  z-index: 10;
  top: calc(var(--stack-h, 76px) + 14px);
  left: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: .9rem 1rem;
  font-size: 13px;
}
.graph-legend h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--lm-gray-500); margin: 0 0 .55rem;
}
.graph-legend .legend-color { border-radius: 3px; margin-right: .45rem; vertical-align: -2px; }
.graph-legend > div { margin-bottom: .22rem; }

/* --- Provenance graph header ------------------------------------------- */

.graph-title {
  color: var(--lm-blue-700, #005295);
  font-size: 20px; font-weight: 300;
  border-left: 1px solid #adadad;
  margin-left: 18px; padding-left: 18px; white-space: nowrap;
}
.graph-actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }

/* --- Overview bars are filter controls -------------------------------- */

/* Each bar is a button now: selecting it filters the table to that value. */
.bar-row {
  width: 100%;
  border: 1px solid transparent;
  background: none;
  font: inherit;
  text-align: left;
  padding: .25rem .35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.bar-row:hover { background: var(--lm-blue-050); border-color: var(--lm-blue-100); }
.bar-row:hover .bar-fill { background: var(--lm-blue-700); }
.bar-row.is-on {
  background: var(--lm-blue-100);
  border-color: var(--lm-blue-300);
}
.bar-row.is-on .bar-label { font-weight: 600; color: var(--lm-blue-900); }
.bar-row.is-on .bar-fill { background: var(--lm-blue-700); }
