/* Nebula's screen. Built on the app's colour tokens (styles.css), so every
   look applies; the apple look's version is in looks/apple.css. */
body.nb { margin: 0; background: var(--plane); color: var(--text-primary);
  font-family: "DM Sans", system-ui, sans-serif; font-size: 14px; }
.nb-loading, .nb-empty { color: var(--text-muted); padding: 24px; }

.nb-head { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: 12px 20px; background: var(--surface-1); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 2; }
.nb-brand { display: flex; align-items: baseline; gap: 8px; }
.nb-brand strong { font-size: 18px; }
.nb-mark { color: var(--series-1); }
.nb-sub { color: var(--text-muted); font-size: 12px; }
.nb-meter { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  font-size: 12px; color: var(--text-secondary); max-width: 560px; justify-self: center; width: 100%; }
.nb-bar { height: 8px; border-radius: 4px; background: var(--ghost); overflow: hidden;
  border: 1px solid var(--border); }
.nb-fill { display: block; height: 100%; background: var(--series-1); }
.nb-fill.hot { background: var(--serious); }
.nb-user { display: flex; gap: 12px; align-items: center; }
.nb-who { color: var(--text-secondary); }
.nb-link { background: none; border: 0; color: var(--series-1); cursor: pointer; font: inherit; padding: 0; }
.nb-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.nb-seg button { background: none; border: 0; padding: 4px 10px; font: inherit; font-size: 12px;
  color: var(--text-secondary); cursor: pointer; }
.nb-seg button.active { background: var(--series-1-soft); color: var(--text-primary); }

.nb-body { display: grid; grid-template-columns: 260px minmax(0, 1fr) 320px;
  min-height: calc(100vh - 58px); }
.nb-body.nb-v-people, .nb-body.nb-v-policy { grid-template-columns: 260px minmax(0, 1fr); }
.nb-side { border-right: 1px solid var(--border); background: var(--surface-1); padding: 12px 0;
  overflow-y: auto; max-height: calc(100vh - 58px); position: sticky; top: 58px; }
.nb-views { display: flex; flex-direction: column; padding: 0 8px 12px; border-bottom: 1px solid var(--grid); }
.nb-view, .nb-course { text-align: left; background: none; border: 0; border-radius: 6px; padding: 7px 12px;
  font: inherit; color: var(--text-primary); cursor: pointer; }
.nb-view:hover, .nb-course:hover { background: var(--ghost); }
.nb-view.active, .nb-course.active { background: var(--series-1-soft); }
.nb-school { padding: 12px 8px 0; }
.nb-school h3 { margin: 0 12px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); }
.nb-course { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.nb-cname { font-weight: 500; }
.nb-cmeta { color: var(--text-muted); font-size: 12px; }

.nb-main { padding: 20px 24px; min-width: 0; }
.nb-main h2 { margin: 0; font-size: 20px; }
.nb-ctop { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.nb-lead { color: var(--text-secondary); max-width: 70ch; }
.nb-sources, .nb-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.nb-chip { border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 12px;
  color: var(--text-secondary); background: var(--surface-1); }
.nb-gchip { border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font: inherit;
  font-size: 12px; background: var(--surface-1); color: var(--text-primary); cursor: pointer; }
.nb-gchip.active { background: var(--series-1); border-color: var(--series-1); color: #fff; }
.nb-search { margin-left: auto; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface-1); color: var(--text-primary); font: inherit; min-width: 180px; }
.nb-count { color: var(--text-muted); font-size: 12px; margin: 14px 0 6px; }

.nb-table { width: 100%; border-collapse: collapse; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.nb-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-muted);
  padding: 8px 10px; border-bottom: 1px solid var(--grid); }
.nb-table td { padding: 6px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
.nb-row { cursor: pointer; }
.nb-row:hover { background: var(--ghost); }
.nb-row.active { background: var(--series-1-soft); }
.nb-row:focus-visible { outline: 2px solid var(--series-1); outline-offset: -2px; }
.nb-folder td { background: var(--plane); color: var(--text-secondary); font-size: 12px; font-weight: 500;
  padding: 6px 10px; }
.nb-name { word-break: break-word; }
.nb-size, .nb-group { white-space: nowrap; color: var(--text-secondary); }
.nb-holders { color: var(--text-secondary); font-size: 12px; }
.nb-marks { white-space: nowrap; text-align: right; }
.nb-badge { display: inline-block; border-radius: 4px; padding: 1px 6px; font-size: 11px;
  background: var(--ghost); color: var(--text-secondary); margin-left: 4px; }
.nb-badge.warn { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--text-primary); }
.nb-badge.good { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--text-primary); }

.nb-inspect { border-left: 1px solid var(--border); background: var(--surface-1); padding: 20px;
  overflow-y: auto; max-height: calc(100vh - 58px); position: sticky; top: 58px; }
.nb-inspect h3 { margin: 0 0 12px; font-size: 15px; word-break: break-word; }
.nb-inspect h4 { margin: 18px 0 6px; font-size: 12px; color: var(--text-muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: .05em; }
.nb-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.nb-facts dt { color: var(--text-muted); }
.nb-facts dd { margin: 0; word-break: break-all; }
.nb-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.nb-list li { display: flex; flex-direction: column; gap: 2px; }
.nb-path { color: var(--text-muted); font-size: 12px; word-break: break-word; }
.nb-why { color: var(--text-secondary); font-size: 13px; }
.nb-note { font-size: 13px; padding: 8px 10px; border-radius: 6px; background: var(--ghost); }
.nb-note.warn { background: color-mix(in srgb, var(--warning) 16%, transparent); }
.nb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.nb-actions button { font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary); }
.nb-actions button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 1100px) {
  .nb-body { grid-template-columns: 220px minmax(0, 1fr); }
  .nb-inspect { grid-column: 1 / -1; position: static; max-height: none; border-left: 0;
    border-top: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .nb-head { grid-template-columns: 1fr; gap: 10px; }
  .nb-sub { display: none; }
  .nb-body, .nb-body.nb-v-people, .nb-body.nb-v-policy { grid-template-columns: 1fr; }
  .nb-side { position: static; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--border); }
  .nb-main { padding: 16px; }
  .nb-holders, .nb-table th:nth-child(4) { display: none; }
}

/* On its Planetarium page, a slim design header sits above the screen. */
.nb-pl { padding: 10px 20px; margin: 0; background: var(--surface-1); border-bottom: 1px solid var(--border); }
.nb-pl h1 { font-size: 16px; margin: 0; }
.nb-pl ~ .nb-app .nb-head { top: 0; }
.nb-pl ~ .nb-app .nb-user { margin-right: 290px; }
@media (max-width: 720px) {
  .nb-pl ~ .nb-app .nb-user { margin-right: 0; }
  .nb-group, .nb-table th:nth-child(2) { display: none; }
  .nb-name { word-break: normal; overflow-wrap: anywhere; }
}
