:root {
  --bnl-teal: #105C78;
  --bnl-teal-dark: #06394f;
  --bnl-cerulean: #00ADDC;
  --bnl-lime: #B2D33B;
  --bnl-orange: #F68B1F;
  --bnl-goldenrod: #FFCD34;
  --bnl-crimson: #DB3526;
  --bnl-violet: #51499E;
  --bnl-cornflower: #4881C3;
  --bnl-jade: #25B574;
  --gray-90: #4C515A;
  --gray-50: #858889;
  --gray-30: #ACB2AE;
  --gray-light: #DDDCCB;
  --ink: #102631;
  --muted: #617983;
  --panel: #ffffff;
  --border: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 70px rgba(3, 22, 31, 0.34);
  --soft-shadow: 0 14px 34px rgba(4, 35, 49, 0.16);
  --header-height: 88px;
  --path-height: 92px;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 8%, rgba(0, 173, 220, 0.22), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(178, 211, 59, 0.15), transparent 26%),
    linear-gradient(145deg, #052d40 0%, #0b4a62 46%, #062a3b 100%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.42; cursor: default; }
a { color: inherit; }


.app-header {
  position: relative;
  z-index: 30;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 330px minmax(320px, 1fr) 330px;
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  color: white;
  background: rgba(1, 27, 39, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; min-width: 0; }
.eic-wordmark {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0;
  color: #effdff;
  font-size: clamp(24px, 2.05vw, 36px);
  font-weight: 760;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 6px 18px rgba(0,0,0,0.22);
}
.title-block { text-align: center; min-width: 0; }
.title-block h1 { margin: 0; font-weight: 330; font-size: clamp(24px, 2.35vw, 40px); letter-spacing: 0.025em; line-height: 1.08; }
.header-spacer { min-width: 0; }


body.home-mode .directory-only { display: none !important; }
body.directory-mode .resources-home { display: none; }
.resources-home {
  height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 38px;
  padding: 44px 30px 70px;
  overflow: auto;
}
.resources-home-copy {
  max-width: 820px;
  text-align: center;
  color: white;
}
.resources-kicker {
  display: block;
  margin-bottom: 10px;
  color: #bfeffc;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.resources-home-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 420;
  letter-spacing: 0.015em;
}
.resources-home-copy p {
  margin: 0;
  color: rgba(239, 253, 255, 0.84);
  font-size: clamp(16px, 1.5vw, 20px);
}
.resource-node-grid {
  position: relative;
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}
.resource-node-grid::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  border-top: 3px solid rgba(207, 239, 247, 0.6);
  transform: translate(-50%, -50%);
}
.resource-node {
  --resource-color: var(--bnl-cornflower);
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 13px;
  padding: 34px 40px 34px 48px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-left: 8px solid var(--resource-color);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.resource-node:hover,
.resource-node:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 30px 78px rgba(1, 20, 29, 0.46);
  background: #ffffff;
  outline: none;
}
.resource-node-directory { --resource-color: var(--bnl-cerulean); }
.resource-node-n2 { --resource-color: var(--bnl-lime); }
.resource-node-anchor {
  position: absolute;
  top: 50%;
  left: -18px;
  width: 28px;
  height: 28px;
  border: 6px solid white;
  border-radius: 50%;
  background: var(--resource-color);
  box-shadow: 0 4px 14px rgba(0,0,0,0.24);
  transform: translateY(-50%);
}
.resource-node-kind {
  color: var(--bnl-teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.resource-node strong {
  font-size: clamp(25px, 2.4vw, 36px);
  line-height: 1.1;
}
.resource-node > span:last-child {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}
.resource-status {
  min-height: 24px;
  color: #f5fdff;
  font-weight: 700;
  text-align: center;
}
.resource-status.error {
  color: #ffe1dc;
}


.toolbar-toggle {
  position: fixed;
  z-index: 95;
  top: calc(var(--header-height) + 16px);
  left: 18px;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  color: var(--bnl-teal);
  box-shadow: 0 16px 36px rgba(0,0,0,0.24);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.toolbar-toggle span { font-weight: 900; transform: rotate(90deg); display: inline-block; }
body:not(.toolbar-closed) .toolbar-toggle { opacity: 0; pointer-events: none; transform: translateX(-30px); }
.toolbar {
  position: fixed;
  z-index: 100;
  top: calc(var(--header-height) + 14px);
  left: 16px;
  bottom: 16px;
  width: min(410px, calc(100vw - 32px));
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.7);
  transform: translateX(0);
  transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
}
body.toolbar-closed .toolbar { transform: translateX(calc(-100% - 28px)); opacity: 0; visibility: hidden; }
.toolbar-header { position: sticky; top: -18px; z-index: 4; display: flex; justify-content: space-between; gap: 12px; align-items: start; margin: -18px -18px 14px; padding: 18px; background: rgba(255,255,255,0.98); border-bottom: 1px solid rgba(16,92,120,0.10); border-radius: 24px 24px 0 0; backdrop-filter: blur(10px); }
.toolbar-header h2 { margin: 0; color: var(--bnl-teal); font-size: 25px; }
.toolbar-header p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(16,92,120,0.1); color: var(--bnl-teal); font-weight: 900; line-height: 1; }
.icon-button:hover { background: rgba(16,92,120,0.18); }
.icon-button.dark { background: #102431; color: #fff; }
.control-card {
  padding: 15px;
  margin-top: 12px;
  border: 1px solid rgba(16, 92, 120, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f7fbfc);
  box-shadow: 0 8px 22px rgba(16, 92, 120, 0.07);
}
.control-card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.10em; color: var(--bnl-teal); }
.control-card label { display: grid; gap: 5px; color: var(--gray-90); font-size: 12px; font-weight: 800; }
.search-row { display: grid; grid-template-columns: 1fr 36px; gap: 8px; align-items: center; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d7e5e9;
  border-radius: 12px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--bnl-cerulean); box-shadow: 0 0 0 3px rgba(0,173,220,0.14); }
.filter-stack, .level-filter-stack { display: grid; gap: 10px; }
.primary-button, .secondary-button, .ghost-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 13px;
  font-weight: 800;
}
.primary-button { color: #fff; background: linear-gradient(135deg, var(--bnl-teal), #0b4057); box-shadow: 0 12px 24px rgba(16,92,120,0.2); }
.primary-button:hover { filter: brightness(1.04); }
.secondary-button { color: var(--bnl-teal); background: #e8f4f7; }
.secondary-button:hover { background: #d9ecf1; }
.ghost-button { color: #eafaff; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); }
.ghost-button:hover { background: rgba(255,255,255,0.22); }
.wide, .submit-change { width: 100%; margin-top: 12px; }
.toggle-line { grid-template-columns: auto 1fr !important; align-items: center; margin: 8px 0; font-size: 14px !important; }
.toggle-line input { width: auto; accent-color: var(--bnl-teal); }
.view-toggle-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: #e8f4f7;
  border: 1px solid #d7e6eb;
}
.view-toggle {
  border: 0;
  border-radius: 10px;
  padding: 9px 8px;
  color: var(--bnl-teal);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}
.view-toggle.active {
  color: #fff;
  background: linear-gradient(135deg, var(--bnl-teal), #0b4057);
  box-shadow: 0 8px 18px rgba(16,92,120,0.20);
}
.nav-buttons, .zoom-controls { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.zoom-controls input { padding: 0; accent-color: var(--bnl-teal); }
.status-summary { display: grid; gap: 8px; }
.status-item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; color: var(--gray-90); font-size: 13px; }
.status-chip { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,0.92), 0 0 0 4px rgba(16,92,120,0.12); display: inline-block; flex: 0 0 auto; }


.app-main {
  position: relative;
  z-index: 1;
  height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-rows: var(--path-height) minmax(0, 1fr);
  padding: 0 24px 24px;
}
.path-bar {
  height: var(--path-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  color: #e8fbff;
}
.path-copy { min-width: 0; padding-left: 132px; }
.location-title { font-size: 22px; font-weight: 850; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.location-subtitle { font-size: 13px; color: #bdeaf5; margin-top: 6px; }
.breadcrumb { margin-top: 8px; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; font-size: 12px; overflow: hidden; white-space: nowrap; }
.crumb-button { border: 0; border-radius: 999px; padding: 4px 8px; color: #eafaff; background: rgba(255,255,255,0.11); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-button:hover { background: rgba(255,255,255,0.2); }
.crumb-current { border-radius: 999px; padding: 4px 9px; color: #091f2c; background: var(--bnl-lime); font-weight: 850; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-sep { color: rgba(255,255,255,0.45); }
.path-actions { display: flex; gap: 10px; justify-content: flex-end; }
.workspace { min-height: 0; }
.tree-stage {
  height: 100%;
  overflow: auto;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.16);
  background:
    radial-gradient(circle at 16% 36%, rgba(0,173,220,0.12), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    rgba(4, 36, 52, 0.70);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.11), var(--shadow);
  padding: 26px 30px 32px;
  scrollbar-color: rgba(255,255,255,0.42) rgba(255,255,255,0.10);
}
.tree-stage::-webkit-scrollbar, .branch-list::-webkit-scrollbar, .toolbar::-webkit-scrollbar, .details-panel::-webkit-scrollbar { width: 10px; height: 10px; }
.tree-stage::-webkit-scrollbar-thumb, .branch-list::-webkit-scrollbar-thumb, .toolbar::-webkit-scrollbar-thumb, .details-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.36); border-radius: 999px; }
.tree-stage::-webkit-scrollbar-track, .branch-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); border-radius: 999px; }
.tree-content {
  position: relative;
  width: max-content;
  min-width: min(100%, 1120px);
  min-height: 100%;
  transform-origin: top left;
  transition: none;
}


.wishbone-board {
  --gap-width: 94px;
  position: relative;
  width: max-content;
  min-width: 1080px;
  display: grid;
  grid-template-columns: 330px minmax(560px, 820px);
  gap: var(--gap-width);
  align-items: center;
  padding: 44px 42px 44px 58px;
}
.wishbone-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.wishbone-svg path { fill: none; stroke: rgba(178,211,59,0.92); stroke-width: 2.6; stroke-linecap: round; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.28)); }
.focus-column, .branch-column { position: relative; z-index: 2; }
.focus-column { display: flex; align-items: center; min-height: min(58vh, 620px); }
.focus-node {
  position: relative;
  width: 100%;
  min-height: 168px;
  padding: 24px 24px 22px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(178,211,59,0.20), transparent 44%),
    linear-gradient(145deg, rgba(0,173,220,0.98), rgba(16,92,120,0.98));
  box-shadow: 0 24px 56px rgba(0,0,0,0.33);
  border: 1px solid rgba(255,255,255,0.24);
  overflow: visible;
}
.focus-node::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
}
.focus-hub {
  position: absolute;
  right: -17px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--bnl-lime);
  box-shadow: 0 0 0 8px rgba(178,211,59,0.18), 0 0 0 15px rgba(255,255,255,0.08), 0 10px 26px rgba(0,0,0,0.24);
  z-index: 4;
}
.node-kind { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: #e5fbff; font-weight: 900; }
.node-title { margin-top: 9px; font-size: 30px; line-height: 1.12; font-weight: 840; overflow-wrap: anywhere; }
.node-count { margin-top: 12px; color: #e5faff; }
.status-pills { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; color: #dffaff; background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.16); font-size: 12px; }
.branch-column { min-width: 0; }
.branch-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px 28px;
  color: #ddf8ff;
  font-size: 13px;
}
.branch-toolbar strong { color: #fff; }
.branch-list {
  display: grid;
  gap: 12px;
  max-height: min(61vh, 690px);
  min-height: 240px;
  overflow: auto;
  align-content: start;
  padding: 10px 14px 10px 28px;
  scroll-behavior: smooth;
}
.branch-card {
  position: relative;
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
  width: 100%;
  padding: 14px 56px 14px 20px;
  border: 1px solid rgba(16,92,120,0.11);
  border-left: 6px solid var(--node-color, var(--bnl-cornflower));
  border-radius: 20px;
  color: #12303b;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 14px 32px rgba(0,0,0,0.18);
  text-align: left;
  overflow: visible;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  content-visibility: auto;
  contain-intrinsic-size: 86px;
}
button.branch-card { appearance: none; }
.branch-card:hover { transform: translateX(5px); box-shadow: 0 20px 44px rgba(0,0,0,0.24); background: #fff; }
.branch-card:focus-visible { outline: 3px solid rgba(178,211,59,0.72); outline-offset: 2px; }
.branch-anchor {
  position: absolute;
  left: -17px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--node-color, var(--bnl-cornflower));
  box-shadow: 0 0 0 6px rgba(255,255,255,0.90), 0 8px 18px rgba(0,0,0,0.18);
  z-index: 3;
}
.branch-card::after {
  content: ">";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bnl-teal);
  font-size: 27px;
  font-weight: 300;
}
.branch-card.document::after {
  content: "i";
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f5f8;
  font-size: 16px;
  font-weight: 900;
}
.branch-kind { text-transform: uppercase; letter-spacing: 0.09em; font-size: 11px; color: var(--bnl-teal); font-weight: 900; }
.branch-title { font-size: 18px; line-height: 1.22; font-weight: 820; overflow-wrap: anywhere; }
.branch-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-link { display: inline-flex; width: max-content; padding: 6px 10px; margin-top: 5px; border-radius: 999px; background: #e8f5f8; color: var(--bnl-teal); text-decoration: none; font-size: 12px; font-weight: 850; }
.inline-link:hover { text-decoration: underline; }
.inline-link.unavailable { color: var(--gray-90); background: #eef2f4; }
.load-more-card {
  border: 1px dashed rgba(255,255,255,0.36);
  border-radius: 18px;
  padding: 14px;
  color: #eafaff;
  background: rgba(255,255,255,0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.load-more-card .secondary-button { background: rgba(255,255,255,0.18); color: #fff; }


.overview-shell {
  width: min(1180px, calc(100vw - 110px));
  min-width: 880px;
  color: #14303b;
  background: rgba(255,255,255,0.96);
  padding: 22px;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}
.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding: 6px 4px 18px;
  border-bottom: 1px solid #e0ecef;
  margin-bottom: 14px;
}
.overview-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.overview-kicker { text-transform: uppercase; letter-spacing: 0.12em; color: var(--bnl-teal); font-size: 12px; font-weight: 900; }
.overview-title { margin-top: 5px; font-size: 26px; font-weight: 850; }
.overview-subtitle { margin-top: 4px; color: var(--muted); font-size: 13px; }
.overview-list { display: grid; gap: 7px; }
.overview-node { display: grid; gap: 6px; }
.overview-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px 16px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid #dbe8eb;
  border-left: 5px solid var(--node-color, var(--bnl-teal));
  box-shadow: 0 8px 18px rgba(16,92,120,0.07);
}
.overview-toggle { width: 26px; height: 26px; border: 0; border-radius: 8px; background: #e8f4f7; color: var(--bnl-teal); font-weight: 900; }
.overview-toggle.empty { visibility: hidden; }
.overview-label { min-width: 0; display: grid; gap: 2px; }
.overview-label strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-label small { color: var(--muted); }
.overview-action { border: 0; border-radius: 999px; padding: 6px 10px; color: var(--bnl-teal); background: #e8f4f7; font-weight: 850; }
.overview-children { margin-left: 28px; padding-left: 20px; border-left: 1px solid #d5e5e9; display: grid; gap: 6px; }



.document-list-shell {
  width: min(1500px, calc(100vw - 110px));
  min-width: 980px;
  color: #14303b;
  background: rgba(255,255,255,0.97);
  padding: 22px;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}
.document-list-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding: 6px 4px 18px;
  border-bottom: 1px solid #e0ecef;
  margin-bottom: 12px;
}
.document-list-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.document-list-count { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 800; }
.document-table-wrap {
  overflow: auto;
  max-height: min(62vh, 720px);
  border: 1px solid #dbe8eb;
  border-radius: 18px;
  background: #fff;
}
.document-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.document-name-cell {
  min-width: 320px;
  width: 38%;
  max-width: 520px;
  line-height: 1.45;
}
.document-path-cell {
  min-width: 280px;
  max-width: 420px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}


.document-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 10px;
  color: #fff;
  background: var(--bnl-teal);
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.document-table td {
  padding: 10px;
  border-bottom: 1px solid #edf3f5;
  vertical-align: top;
  max-width: 360px;
  overflow-wrap: anywhere;
}
.document-table th:nth-child(5),
.document-table td:nth-child(5) {
  min-width: 180px;
  width: 180px;
}

.document-table th:nth-child(6),
.document-table td:nth-child(6) {
  min-width: 280px;
  width: 320px;
}

.document-table th:nth-child(7),
.document-table td:nth-child(7) {
  min-width: 140px;
  width: 140px;
}

.document-table th:nth-child(8),
.document-table td:nth-child(8) {
  min-width: 140px;
  width: 140px;
  text-align: center;
}

.overview-action {
  min-width: 100px;
}
.document-table tr:hover td { background: #f4fafc; }
.document-row { cursor: pointer; }
.document-row:focus-visible { outline: 3px solid rgba(178,211,59,0.7); outline-offset: -3px; }
.status-cell { display: inline-flex; align-items: center; gap: 8px; min-width: 140px; font-weight: 850; color: var(--gray-90); }
.path-cell { min-width: 230px; color: var(--muted); }
.table-link { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: var(--bnl-teal); background: #e8f4f7; font-weight: 850; text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.table-muted { color: var(--gray-50); font-weight: 800; }
.document-list-footer { padding: 14px 2px 0; color: var(--muted); font-size: 13px; }
.loading.dark, .empty-message.dark { color: var(--muted); background: #f3f8fa; border-color: #d5e2e6; }


.details-panel {
  position: fixed;
  z-index: 120;
  top: calc(var(--header-height) + 16px);
  right: 18px;
  bottom: 18px;
  width: min(455px, calc(100vw - 36px));
  overflow: auto;
  border-radius: 24px;
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.64);
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
}
.details-panel.open { transform: translateX(0); opacity: 1; visibility: visible; }
.details-header { position: sticky; top: 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 18px 20px; color: white; background: linear-gradient(135deg, var(--bnl-teal), #092e40); z-index: 1; }
.details-header span { text-transform: uppercase; letter-spacing: 0.12em; color: #cceffa; font-size: 11px; font-weight: 900; }
.details-header h2 { margin: 2px 0 0; font-size: 24px; }
.details-header .icon-button { background: rgba(255,255,255,0.17); color: #fff; }
.details-body { padding: 18px 20px; }
.detail-kv { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf3f5; }
.detail-kv strong { color: var(--gray-90); }
.detail-kv span { overflow-wrap: anywhere; }
.detail-status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 8px; box-shadow: 0 0 0 3px rgba(255,255,255,0.95), 0 0 0 4px rgba(16,92,120,0.14); vertical-align: -1px; }
.metadata-card {
  margin: 14px 0;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f5fbfd, #ffffff);
  border: 1px solid #d9ebf0;
  box-shadow: 0 12px 26px rgba(16, 92, 120, 0.08);
}
.metadata-card-title {
  margin-bottom: 10px;
  color: var(--bnl-teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.metadata-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.person-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 11px 8px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d8e8ed;
  box-shadow: 0 7px 16px rgba(16, 92, 120, 0.08);
  outline: none;
}
.person-pill:focus-within, .person-pill:hover { border-color: rgba(0, 173, 220, 0.6); box-shadow: 0 10px 24px rgba(16, 92, 120, 0.14); }
.person-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--bnl-teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
}
.person-copy { min-width: 0; display: grid; line-height: 1.05; }
.person-copy small, .metadata-badge small { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: 0.08em; }
.person-copy strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; }
.person-popover {
  position: absolute;
  z-index: 8;
  left: 8px;
  top: calc(100% + 8px);
  display: none;
  min-width: min(280px, calc(100vw - 70px));
  max-width: 320px;
  padding: 10px;
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7e6eb;
  box-shadow: 0 18px 40px rgba(5, 33, 48, 0.22);
}
.person-popover::before {
  content: "";
  position: absolute;
  left: 20px;
  top: -6px;
  width: 11px;
  height: 11px;
  background: #fff;
  border-left: 1px solid #d7e6eb;
  border-top: 1px solid #d7e6eb;
  transform: rotate(45deg);
}
.person-popover span { display: block; margin-bottom: 8px; overflow-wrap: anywhere; font-size: 13px; }
.person-pill:hover .person-popover, .person-pill:focus-within .person-popover { display: block; }
.copy-email-btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: var(--bnl-teal);
  font-size: 12px;
  font-weight: 850;
}
.copy-email-btn:disabled { color: var(--gray-50); background: #edf2f4; }
.metadata-badge {
  display: inline-grid;
  gap: 2px;
  min-height: 48px;
  align-content: center;
  padding: 7px 11px;
  border-radius: 14px;
  background: #eef7fa;
  border: 1px solid #d7e7ec;
}
.metadata-badge strong { color: var(--ink); font-size: 13px; font-weight: 850; }
.metadata-source { margin-top: 8px; color: var(--muted); font-size: 12px; }
.metadata-empty {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 15px;
  color: var(--muted);
  background: #f3f7f8;
  border: 1px dashed #d5e2e6;
}
.more-info { margin-top: 10px; }
.more-info summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--bnl-teal);
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
}
.more-info-grid { display: grid; gap: 7px; margin-top: 10px; }
.more-info-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #e8f0f3;
}
.more-info-row strong { color: var(--gray-90); font-size: 12px; }
.more-info-row span { overflow-wrap: anywhere; font-size: 12px; color: var(--ink); }
.document-link { display: inline-block; padding: 11px 14px; border-radius: 13px; text-decoration: none; color: #fff; background: var(--bnl-teal); font-weight: 850; }
.document-link.unavailable { color: var(--gray-90); background: #eef2f4; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }


.submission-dialog { width: min(900px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 22px; box-shadow: var(--shadow); }
.submission-dialog::backdrop { background: rgba(4, 28, 40, 0.66); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; color: white; background: linear-gradient(135deg, var(--bnl-teal), #092e40); }
.dialog-header h2 { margin: 0; }
.dialog-header .icon-button { color: white; background: rgba(255,255,255,0.18); }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px; }
.dialog-grid label { display: grid; gap: 6px; color: var(--gray-90); font-weight: 800; font-size: 13px; }
.span-2 { grid-column: span 2; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 16px 20px; border-top: 1px solid #e6eff2; }
#formStatus { margin-right: auto; color: var(--bnl-teal); }

.loading, .empty-message, .error-message {
  display: inline-block;
  max-width: 760px;
  padding: 18px 20px;
  border-radius: 18px;
  color: #eafaff;
  background: rgba(255,255,255,0.12);
  border: 1px dashed rgba(255,255,255,0.24);
}
.error-message { color: #ffe7e4; border-color: rgba(219,53,38,0.6); }


body.no-colors .tree-content .branch-card,
body.no-colors .tree-content .overview-row { border-left-color: #cfdce1 !important; }
body.no-colors .tree-content .status-chip,
body.no-colors .tree-content .branch-anchor,
body.no-colors .tree-content .focus-hub { background: var(--gray-50) !important; }
body.no-colors .tree-content .wishbone-svg path { stroke: #d2e0e5 !important; }

@media (max-width: 1200px) {
  :root { --header-height: 118px; --path-height: 112px; }
  .app-header { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .brand { justify-self: center; }
  .eic-wordmark { white-space: normal; justify-content: center; text-align: center; min-height: auto; }
  .header-spacer { display: none; }
  .path-copy { padding-left: 118px; }
  .wishbone-board { min-width: 900px; grid-template-columns: 285px minmax(480px, 1fr); gap: 72px; padding-left: 44px; }
  .overview-shell { min-width: 760px; }
  .document-list-shell { min-width: 820px; width: min(1280px, calc(100vw - 80px)); }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .app-main { height: auto; min-height: calc(100vh - var(--header-height)); }
  .path-bar { grid-template-columns: 1fr; height: auto; min-height: var(--path-height); padding: 12px 0; }
  .path-copy { padding-left: 0; }
  .path-actions { justify-content: start; }
  .tree-stage { min-height: 680px; }
  .dialog-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
}

@media (max-width: 900px) {
  .app-header {
    grid-template-columns: 1fr;
    height: auto;
    min-height: var(--header-height);
    text-align: center;
  }
  .brand { display: none; }
  .resource-node-grid { grid-template-columns: 1fr; max-width: 620px; }
  .resource-node-grid::before { display: none; }
  .resources-home { justify-content: flex-start; padding-top: 54px; }
}


.header-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
.header-title-link:hover,
.header-title-link:focus-visible {
  color: #d8f7ff;
  text-shadow: 0 3px 16px rgba(0, 173, 220, 0.28);
  outline: none;
}
.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}
.header-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 310px;
  padding: 8px 12px;
  border: 1px solid rgba(191, 239, 252, 0.48);
  border-radius: 8px;
  color: #effdff;
  background: rgba(16, 92, 120, 0.46);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.header-home-button:hover,
.header-home-button:focus-visible {
  color: white;
  background: rgba(0, 173, 220, 0.42);
  border-color: rgba(191, 239, 252, 0.82);
  transform: translateY(-1px);
  outline: none;
}
body.home-root-mode .header-home-button {
  visibility: hidden;
  pointer-events: none;
}
.resources-kicker {
  margin-bottom: 12px;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.1;
}
.site-credit {
    position: fixed;
    left: 33.5%;
    bottom: 10px;
    transform: translateX(-50%);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    z-index: 10;
}
.resource-node-grid::before { display: none; }
.resource-node {
  min-height: 210px;
  text-decoration: none;
}
.resource-node-collection { --resource-color: var(--bnl-cornflower); }
.resource-node-link { --resource-color: var(--bnl-cerulean); }
.resource-node.resource-node-disabled {
  opacity: 0.68;
  cursor: default;
  transform: none;
}
.resource-node.resource-node-disabled:hover { transform: none; }
body.resource-detail-mode .resources-home {
  justify-content: flex-start;
  padding-top: 54px;
}
body.resource-detail-mode .resources-home-copy {
  max-width: 980px;
}
body.resource-detail-mode .resource-node-grid {
  align-items: stretch;
}
.site-credit {
  position: fixed;
  z-index: 120;
  right: 10px;
  bottom: 7px;
  color: rgba(221, 236, 241, 0.46);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
}
.legacy-home-button[hidden] { display: none !important; }

@media (max-width: 1200px) {
  .app-header {
    grid-template-columns: 240px minmax(300px, 1fr) 300px;
    text-align: initial;
    gap: 14px;
  }
  .brand { justify-self: start; }
  .title-block { text-align: center; }
  .header-actions { display: flex; }
}

@media (max-width: 900px) {
  .app-header {
    position: relative;
    grid-template-columns: 1fr;
    min-height: 108px;
    padding: 18px 176px 18px 18px;
  }
  .brand { display: none; }
  .title-block { text-align: center; }
  .title-block h1 { font-size: clamp(21px, 4vw, 30px); }
  .header-actions {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 152px;
    transform: translateY(-50%);
  }
  .header-home-button {
    width: 100%;
    padding: 7px 8px;
    font-size: 9px;
  }
  .resource-node-grid { max-width: 720px; }
}


body.home-root-mode .resource-node-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  body.home-root-mode .resource-node-grid {
    grid-template-columns: 1fr;
  }
}
.requirements-only { display: none !important; }
body.requirements-mode .resources-home,
body.requirements-mode .directory-only { display: none !important; }
body.requirements-mode .requirements-only.toolbar-toggle { display: inline-flex !important; }
body.requirements-mode .requirements-only.toolbar { display: block !important; }
body.requirements-mode .requirements-only.app-main { display: grid !important; }
.resource-node-requirements { --resource-color: var(--bnl-orange); }
.requirements-list-shell { width: min(1320px, calc(100vw - 110px)); min-width: 820px; }
.requirements-table { min-width: 900px; }
.requirement-row td:first-child { border-left: 5px solid var(--requirement-status-color, var(--gray-50)); }
.requirements-branch-card .status-pills { margin-top: 4px; }
.requirements-branch-card .status-pill {
    color: #12333f;
    background: #eef5f7;
    border: 1px solid #cbdde3;
    font-weight: 700;
}
@media (max-width: 900px) {
  .requirements-list-shell { min-width: 760px; }

}

/* Merged EIC Requirements resource card */
body.home-root-mode .resource-node-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.resource-node-link { color: inherit; text-decoration: none; cursor: pointer; }
.resource-node-requirements { --resource-color: var(--bnl-orange); }
@media (max-width: 1100px) {
  body.home-root-mode .resource-node-grid { grid-template-columns: 1fr; max-width: 720px; }
  .resource-node-grid::before { display: none; }
}
.resource-node-grid::before { display: none; }

.resource-node-atlas { --resource-color: var(--bnl-teal); }
