/* =========================================================
   ZOMNIVERSE PRIVATE DATASETS
   LIGHT SCIENTIFIC WORKSPACE

   Preserves:
   - dialog dimensions
   - scrolling
   - dynamic dataset rendering
   - download/delete actions
   - mobile stacking
========================================================= */

/* Governed artifact workspace v1 */
.zom-datasets-dialog { width:min(1180px,calc(100vw - 28px)); height:min(860px,calc(100vh - 28px)); overflow:hidden; }
.zom-datasets-card { height:100%; padding:22px; overflow:auto; scrollbar-width:thin; scrollbar-color:#7890bd rgba(218,226,244,.65); }
.zom-datasets-card::-webkit-scrollbar,.zom-workspace-body::-webkit-scrollbar{width:9px;height:9px}.zom-datasets-card::-webkit-scrollbar-track,.zom-workspace-body::-webkit-scrollbar-track{background:rgba(218,226,244,.65)}.zom-datasets-card::-webkit-scrollbar-thumb,.zom-workspace-body::-webkit-scrollbar-thumb{background:#7890bd;border:2px solid transparent;border-radius:9px;background-clip:padding-box}.zom-datasets-card::-webkit-scrollbar-thumb:hover,.zom-workspace-body::-webkit-scrollbar-thumb:hover{background:#526fa8;background-clip:padding-box}
.zom-datasets-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:10px;margin:18px 0}.zom-datasets-toolbar label{display:flex;align-items:center;gap:7px;font-size:.78rem;font-weight:700;color:#526783}.zom-datasets-toolbar input,.zom-datasets-toolbar select{min-height:40px;border:1px solid #c1cde3;border-radius:10px;background:#f9fbff;color:#17243b;padding:0 12px}.zom-datasets-toolbar input{width:100%}
.zom-datasets-list{display:block}.zom-dataset-table{overflow:hidden;border:1px solid #c9d4e8;border-radius:14px;background:rgba(255,255,255,.72)}.zom-dataset-row{display:grid;grid-template-columns:minmax(190px,1.7fr) minmax(150px,.7fr) minmax(86px,auto) minmax(190px,.9fr);align-items:center;gap:14px;width:100%;padding:13px 16px;border:0;border-bottom:1px solid #dbe3f1;background:transparent;color:#17243b;text-align:left;cursor:default}.zom-dataset-row:last-child{border-bottom:0}.zom-dataset-row:not(.zom-dataset-row--head):hover,.zom-dataset-row:not(.zom-dataset-row--head):focus-visible{background:#eef5ff;outline:2px solid transparent}.zom-dataset-row--head{font-size:.72rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;cursor:default;background:#e8eef9}.zom-dataset-row strong,.zom-dataset-row small{display:block}.zom-dataset-row small{margin-top:4px;color:#6d7f9d}.zom-status{font-weight:700;color:#315f55}.is-warning{color:#8c6724!important}.is-critical,.is-expired{color:#b43d55!important;font-weight:800}
.zom-dataset-workspace{position:relative;margin-top:18px;border:1px solid #b9c8e1;border-radius:18px;background:rgba(248,251,255,.98);box-shadow:0 16px 38px rgba(30,48,84,.15);overflow:hidden}.zom-dataset-workspace.is-maximized{position:fixed;inset:14px;z-index:10001;margin:0}.zom-dataset-workspace>header{display:flex;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid #d1dced;background:#edf4fb}.zom-dataset-workspace h3{margin:4px 0;color:#17243b}.zom-dataset-workspace header p{margin:5px 0 0;color:#62738f}.zom-window-actions{display:flex;gap:7px}.zom-window-actions button{width:38px;height:34px;border:1px solid #becbe0;border-radius:9px;background:#fff;color:#243654;cursor:pointer}.zom-verdicts{display:flex;gap:8px;padding:10px 20px}.zom-verdicts span{padding:5px 9px;border:1px solid #b9dfd2;border-radius:999px;background:#e8f7f1;color:#276b58;font-size:.78rem;font-weight:800}.zom-tabs{display:flex;gap:3px;padding:0 20px;border-bottom:1px solid #d5dfef;overflow-x:auto}.zom-tabs button{padding:10px 12px;border:0;border-bottom:3px solid transparent;background:transparent;color:#536987;font-weight:700;cursor:pointer;white-space:nowrap}.zom-tabs button.is-active{border-color:#486fae;color:#17243b}.zom-workspace-body{max-height:480px;padding:18px 20px;overflow:auto;overscroll-behavior:contain}.is-maximized .zom-workspace-body{max-height:calc(100vh - 190px)}
.zom-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.zom-overview div,.zom-artifact{padding:13px;border:1px solid #d3ddec;border-radius:11px;background:#fff}.zom-overview dt,.zom-artifact dt{font-size:.72rem;font-weight:800;text-transform:uppercase;color:#617699}.zom-overview dd,.zom-artifact dd{margin:4px 0 0;overflow-wrap:anywhere}.zom-compact-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.zom-compact-actions button,.zom-compact-actions a,.zom-notes button,[data-note-form] button,.zom-dataset-action button{padding:7px 10px;border:1px solid #bdcbe2;border-radius:8px;background:#f7faff;color:#284267;text-decoration:none;font-weight:700;cursor:pointer}.zom-compact-actions .danger{color:#a9344c;border-color:#e5b6c1}.zom-lineage{list-style:none;margin:0;padding:0 0 0 22px;border-left:2px solid #bdd0e8}.zom-lineage>li{position:relative;margin:0 0 12px}.zom-lineage>li:before{content:"";position:absolute;left:-30px;top:20px;width:15px;border-top:2px solid #bdd0e8}.zom-artifact>div:first-child{display:grid;gap:4px}.zom-artifact span{color:#677a98;font-size:.86rem}.zom-artifact details{margin-top:10px}.zom-artifact-details dl,.zom-artifact details dl{display:grid;grid-template-columns:150px 1fr;gap:6px;margin:10px 0 0}.zom-artifact-details dd,.zom-artifact details dd{margin:0;overflow-wrap:anywhere}.zom-artifacts{display:grid;gap:10px}.zom-notes{display:grid;gap:9px;margin-top:14px}.zom-notes article{padding:12px;border:1px solid #d5deed;border-radius:10px;background:#fff}.zom-notes time{font-size:.78rem;color:#6b7f9d}
/* PATCH: Notes body scrollbar — thin + hover-reveal (base)  ·  2026-09-06 16:59
   The note <p> clamps at 120px and scrolls, but showed a chunky always-on
   native scrollbar. Keep the clamp + pre-wrap; add Firefox thin + transparent
   so the WebKit rules in the scrollbars section can reveal it only on hover. */
.zom-notes p{
  white-space:pre-wrap;max-height:120px;overflow:auto;
  scrollbar-width:thin;scrollbar-color:transparent transparent
}
.zom-notes article>div{display:flex;gap:6px}[data-note-form]{display:grid;gap:7px}[data-note-form] textarea{min-height:90px;resize:vertical;border:1px solid #bdcae0;border-radius:9px;padding:10px}.zom-activity p{display:grid;grid-template-columns:190px 1fr;gap:12px;padding:9px;border-bottom:1px solid #dce4f0;margin:0}.zom-activity time{color:#677a98}
@media(max-width:760px){.zom-datasets-dialog{width:calc(100vw - 12px);height:calc(100vh - 12px)}.zom-datasets-card{padding:14px}.zom-datasets-toolbar{grid-template-columns:1fr}.zom-datasets-toolbar label{justify-content:space-between}.zom-dataset-row{grid-template-columns:1fr;gap:6px}.zom-dataset-row--head{display:none}.zom-dataset-workspace.is-maximized{inset:6px}.zom-overview{grid-template-columns:1fr}.zom-artifact-details dl,.zom-artifact details dl{grid-template-columns:1fr}.zom-activity p{grid-template-columns:1fr}.zom-verdicts{flex-wrap:wrap}}

/* =========================================================
   DIALOG
========================================================= */

.zom-datasets-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);

  padding: 0;

  border: 1px solid rgba(72, 94, 157, 0.30);
  border-radius: 28px;

  background:
    linear-gradient(
      rgba(77, 101, 166, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(77, 101, 166, 0.04) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 12% 0%,
      rgba(143, 212, 189, 0.11),
      transparent 40%
    ),
    radial-gradient(
      circle at 88% 0%,
      rgba(127, 181, 255, 0.10),
      transparent 42%
    ),
    linear-gradient(
      155deg,
      rgba(250, 252, 255, 0.99),
      rgba(225, 232, 248, 0.98)
    );

  background-size:
    24px 24px,
    24px 24px,
    auto,
    auto,
    auto;

  color: #18213a;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(49, 66, 112, 0.10),
    0 0 0 1px rgba(7, 13, 30, 0.10);
}

.zom-datasets-dialog::backdrop {
  background: rgba(12, 18, 31, 0.52);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* =========================================================
   MAIN CARD
========================================================= */

.zom-datasets-card {
  padding: 28px;
}

/* =========================================================
   HEADER
========================================================= */

.zom-datasets-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.zom-datasets-card h2 {
  margin: 5px 0 0;

  color: #18213a;

  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.zom-datasets-kicker {
  color: #55729f;

  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* =========================================================
   CLOSE BUTTON
========================================================= */

.zom-datasets-card header button {
  width: 42px;
  height: 42px;

  padding: 0;

  border: 1px solid rgba(72, 94, 157, 0.24);
  border-radius: 14px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(218, 226, 244, 0.94)
    );

  color: rgba(61, 76, 116, 0.72);

  font-size: 1.5rem;
  line-height: 1;

  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.zom-datasets-card header button:hover {
  border-color: rgba(72, 94, 157, 0.44);
  color: #28375f;
}

/* =========================================================
   PRIVACY NOTICE
========================================================= */

.zom-datasets-privacy {
  display: flex;
  gap: 12px;

  margin: 24px 0;
  padding: 15px;

  border: 1px solid rgba(84, 180, 151, 0.22);
  border-radius: 16px;

  background:
    linear-gradient(
      180deg,
      rgba(236, 250, 245, 0.96),
      rgba(216, 239, 230, 0.94)
    );

  color: rgba(49, 79, 70, 0.82);

  line-height: 1.5;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.zom-datasets-privacy i {
  margin-top: 4px;

  color: #427966;
}

/* =========================================================
   DATASET LIST
========================================================= */

.zom-datasets-list {
  display: grid;
  gap: 12px;
}

.zom-datasets-status,
.zom-datasets-empty {
  padding: 32px;

  color: rgba(67, 80, 113, 0.64);

  text-align: center;
}

.zom-datasets-status--error {
  color: #b74662;
}

/* =========================================================
   EMPTY STATE
========================================================= */

.zom-datasets-empty {
  display: grid;
  justify-items: center;
  gap: 8px;

  border: 1px dashed rgba(72, 94, 157, 0.30);
  border-radius: 18px;

  background:
    rgba(239, 243, 252, 0.62);
}

.zom-datasets-empty i {
  color: #427966;
  font-size: 1.7rem;
}

.zom-datasets-empty strong {
  color: #18213a;
}

/* =========================================================
   DATASET ROW
========================================================= */

.zom-dataset-row {
  display: grid;
  align-items: stretch;
  justify-content: stretch;
  gap: 14px;

  padding: 16px;

  border: 1px solid rgba(72, 94, 157, 0.18);

  background:
    linear-gradient(
      rgba(77, 101, 166, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(77, 101, 166, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      180deg,
      rgba(248, 250, 255, 0.98),
      rgba(228, 235, 248, 0.96)
    );

  background-size:
    22px 22px,
    22px 22px,
    auto;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.zom-dataset-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.zom-dataset-main > div:first-child,
.zom-dataset-row > div:first-child {
  display: grid;
  gap: 5px;

  min-width: 0;
}

.zom-dataset-row strong {
  overflow: hidden;

  color: #18213a;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.zom-dataset-row span {
  color: rgba(67, 80, 113, 0.68);

  font-size: 0.82rem;
}

/* =========================================================
   ACTIONS
========================================================= */

.zom-dataset-actions {
  display: flex;
  gap: 8px;
}

.zom-dataset-actions button {
  padding: 9px 12px;

  border: 1px solid rgba(72, 94, 157, 0.26);
  border-radius: 10px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(211, 221, 244, 0.94)
    );

  color: #33436f;

  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.zom-dataset-actions button:hover {
  border-color: rgba(72, 94, 157, 0.48);
}

/* destructive action */
.zom-dataset-actions .danger {
  border-color: rgba(201, 73, 101, 0.28);

  background:
    linear-gradient(
      180deg,
      rgba(255, 242, 245, 0.98),
      rgba(244, 215, 222, 0.95)
    );

  color: #a53e58;
}

.zom-dataset-actions .danger:hover {
  border-color: rgba(201, 73, 101, 0.52);
  color: #8e2e47;
}

/* =========================================================
   SAVED ARTIFACTS
========================================================= */

.zom-dataset-artifacts {
  display: grid;
  gap: 8px;

  margin: 0;
  padding: 12px 0 0;

  border-top: 1px solid rgba(72, 94, 157, 0.12);

  list-style: none;
}

.zom-dataset-artifacts li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zom-dataset-artifacts i {
  color: #427966;
}

.zom-dataset-artifacts li span {
  display: grid;
  gap: 2px;
}

.zom-dataset-artifacts li strong {
  color: #43527d;

  font-size: 0.82rem;
}

.zom-dataset-artifacts small,
.zom-dataset-no-artifacts {
  color: rgba(67, 80, 113, 0.58);

  font-size: 0.78rem;
}

.zom-dataset-no-artifacts {
  margin: 0;
  padding-top: 12px;

  border-top: 1px solid rgba(72, 94, 157, 0.12);
}

/* =========================================================
   FUTURE FUNCTIONS NOTICE
========================================================= */

.zom-datasets-coming {
  display: grid;
  gap: 6px;

  margin-top: 20px;
  padding: 17px;

  border: 1px solid rgba(72, 94, 157, 0.16);
  border-radius: 16px;

  background:
    linear-gradient(
      180deg,
      rgba(239, 244, 254, 0.96),
      rgba(220, 228, 246, 0.94)
    );

  color: rgba(67, 80, 113, 0.64);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.zom-datasets-coming strong {
  color: #43527d;
}

/* =========================================================
   FOCUS
========================================================= */

.zom-datasets-dialog button:focus-visible {
  outline: 2px solid rgba(91, 112, 179, 0.68);
  outline-offset: 2px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
  .zom-datasets-card {
    padding: 20px;
  }

  .zom-dataset-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .zom-dataset-actions {
    width: 100%;
  }

  .zom-dataset-actions button {
    flex: 1;
  }

  .zom-datasets-privacy {
    font-size: 0.88rem;
  }
}
/* =========================================================
   PRIVATE DATASETS — COMPACT DESKTOP WORKSPACE

   - Uses more of the desktop viewport
   - Displays datasets in multiple columns
   - Reduces excessive vertical height
   - Keeps the existing mobile layout unchanged
========================================================= */

@media (min-width: 901px) {
  /* =======================================================
     LARGE WORKSPACE DIALOG
  ======================================================= */

  .zom-datasets-dialog {
    width: min(1180px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);

    border-radius: 26px;
  }

  .zom-datasets-card {
    padding: 22px 24px 24px;
  }

  /* =======================================================
     COMPACT HEADER
  ======================================================= */

  .zom-datasets-card header {
    align-items: center;
  }

  .zom-datasets-card h2 {
    margin-top: 3px;

    font-size: 1.65rem;
  }

  .zom-datasets-card header button {
    width: 38px;
    height: 38px;

    border-radius: 12px;

    font-size: 1.3rem;
  }

  /* =======================================================
     PRIVACY NOTICE
  ======================================================= */

  .zom-datasets-privacy {
    align-items: center;

    margin: 18px 0;
    padding: 11px 14px;

    border-radius: 14px;

    font-size: 0.84rem;
    line-height: 1.45;
  }

  .zom-datasets-privacy i {
    margin-top: 0;
  }

  /* =======================================================
     MULTI-COLUMN DATASET GRID
  ======================================================= */

  .zom-datasets-list {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 12px;
  }

  /* Status and empty messages occupy the full row */
  .zom-datasets-status,
  .zom-datasets-empty {
    grid-column: 1 / -1;
  }

  /* =======================================================
     COMPACT DATASET CARDS
  ======================================================= */

  .zom-dataset-row {
    align-content: start;

    gap: 11px;
    min-width: 0;
    padding: 14px;
  }

  .zom-dataset-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .zom-dataset-row strong {
    width: 100%;

    font-size: 0.9rem;
  }

  .zom-dataset-row span {
    font-size: 0.76rem;
  }

  /* =======================================================
     COMPACT ACTIONS
  ======================================================= */

  .zom-dataset-actions {
    width: 100%;
    gap: 7px;
  }

  .zom-dataset-actions button {
    flex: 1;

    min-height: 35px;
    padding: 7px 10px;

    font-size: 0.78rem;
  }

  /* =======================================================
     ARTIFACTS
  ======================================================= */

  .zom-dataset-artifacts {
    gap: 6px;
    padding-top: 10px;
  }

  .zom-dataset-artifacts li {
    align-items: flex-start;
    gap: 8px;
  }

  .zom-dataset-artifacts li strong {
    font-size: 0.76rem;
  }

  .zom-dataset-artifacts small,
  .zom-dataset-no-artifacts {
    font-size: 0.7rem;
  }

  /* =======================================================
     FUTURE FUNCTIONS NOTICE
  ======================================================= */

  .zom-datasets-coming {
    margin-top: 16px;
    padding: 13px 15px;

    border-radius: 14px;

    font-size: 0.78rem;
  }
}

/* =========================================================
   EXTRA-WIDE DESKTOP — THREE COLUMNS
========================================================= */

@media (min-width: 1320px) {
  .zom-datasets-dialog {
    width: min(1440px, calc(100vw - 64px));
  }

  .zom-datasets-list {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

/* v1 layout authority: retained at EOF to supersede the retired card rules above. */
.zom-datasets-dialog.zom-datasets-dialog {
    width: min(1800px, calc(100dvw - 28px));
    height: min(1080px, calc(100dvh - 28px));
    box-sizing: border-box;
    overflow: hidden;
}
.zom-datasets-card.zom-datasets-card {
    height: 100%;
    padding: 22px;
    overflow: auto;
    box-sizing: border-box;
}

/* Keep the scrollbar clear of the dialog's rounded corners */
@media (min-width: 761px) {
  .zom-datasets-card.zom-datasets-card {
      width: calc(100% - 10px);
      height: calc(100% - 20px);
      margin: 12px;
      padding: 12px;
  }
}
.zom-datasets-list.zom-datasets-list { display:block; }
.zom-datasets-toolbar.zom-datasets-toolbar { display:grid; }
.zom-dataset-workspace.zom-dataset-workspace { display:block; }
.zom-dataset-workspace.zom-dataset-workspace[hidden] { display:none; }
@media(max-width:760px){.zom-datasets-dialog.zom-datasets-dialog{width:calc(100vw - 12px);height:calc(100vh - 12px)}.zom-datasets-card.zom-datasets-card{padding:14px}}

/* Workspace window lifecycle refinement v1. */
.zom-datasets-dialog.zom-datasets-dialog { position:relative; }
.zom-dataset-row.is-selected { background:#e7f3ef; box-shadow:inset 3px 0 #55b79a; }
.zom-dataset-workspace-layer {
  position:absolute;
  inset:0;
  z-index:20;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(224,232,247,.74);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.zom-dataset-workspace-layer[hidden] { display:none; }
.zom-dataset-workspace.zom-dataset-workspace {
  position:relative;
  inset:auto;
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
  width:min(920px,100%);
  max-height:min(720px,calc(100% - 16px));
  margin:0;
  overflow:hidden;
  border:1px solid #b4c4df;
  border-radius:20px;
  background:#f8fbff;
  box-shadow:0 24px 70px rgba(24,39,70,.25);
  transition:width .18s ease,max-height .18s ease,border-radius .18s ease;
}
.zom-dataset-workspace.zom-dataset-workspace.is-maximized {
  position:relative;
  inset:auto;
  width:100%;
  max-height:100%;
  height:100%;
  border-radius:16px;
}
.zom-workspace-header { display:flex; justify-content:space-between; gap:18px; min-width:0; padding:16px 18px; border-bottom:1px solid #d1dced; background:#edf4fb; }
.zom-workspace-header>div:first-child { min-width:0; }
.zom-workspace-header h3,.zom-workspace-header p { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.zom-workspace-body.zom-workspace-body { min-height:0; max-height:none; padding:15px 18px; overflow:auto; }
.zom-dataset-workspace.is-maximized .zom-workspace-body { max-height:none; }
.zom-window-actions { flex:0 0 auto; }
.zom-window-actions button:hover,.zom-window-actions button:focus-visible { border-color:#5577ae; background:#eaf2ff; outline:none; }
.zom-lineage { padding-left:0; border:0; }
.zom-lineage-row {
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto auto;
  align-items:center;
  gap:10px;
  min-height:54px;
  margin:0!important;
  padding:8px 10px;
  border-bottom:1px solid #dce4f0;
}
.zom-lineage-row:before { display:none; }
.zom-lineage-row>div:nth-child(2) { display:grid; min-width:0; gap:2px; }
.zom-lineage-row>div:nth-child(2)>span { overflow:hidden; color:#6b7e9b; font-size:.76rem; text-overflow:ellipsis; white-space:nowrap; }
.zom-lineage-index { display:grid; place-items:center; width:25px; height:25px; border-radius:50%; background:#dce8f7; color:#355784; font-size:.74rem; font-weight:800; }
.zom-lineage-row .zom-compact-actions { margin:0; }
.zom-artifact { padding:0; overflow:hidden; }
.zom-artifact-summary { display:flex!important; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; }
.zom-artifact-summary>div:first-child { display:grid; min-width:0; gap:2px; }
.zom-artifact-summary .zom-compact-actions { flex:0 0 auto; margin:0; }
.zom-artifact-details { padding:11px 12px; border-top:1px solid #d7e1ef; background:#f5f8fd; }
.zom-artifact-details dl { margin:0; }
.zom-artifact-details dd button { margin-left:6px; padding:2px 7px; border:1px solid #becbe0; border-radius:6px; background:#fff; color:#36577f; cursor:pointer; }
.zom-annotations { max-height:180px; margin-top:10px; overflow:auto; border-top:1px solid #d7e1ef; }
.zom-notes-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.zom-notes-toolbar p { margin:0; color:#647894; }
.zom-notes-toolbar button,.zom-note-editor button { padding:7px 10px; border:1px solid #bdcbe2; border-radius:8px; background:#f7faff; color:#284267; font-weight:700; cursor:pointer; }
.zom-note-editor { max-width:680px; margin-top:12px; padding:12px; border:1px solid #cfdaeb; border-radius:11px; background:#fff; }
.zom-note-editor textarea { width:100%; min-height:76px; }
.zom-note-editor>div { display:flex; justify-content:flex-end; gap:7px; }
.zom-activity p { grid-template-columns:minmax(155px,190px) minmax(0,1fr) auto; align-items:center; }
.zom-activity strong { padding:3px 7px; border-radius:999px; background:#dce9f5; color:#31547e; font-size:.75rem; }
.zom-workspace-confirm {
  position:absolute;
  inset:0;
  z-index:30;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(20,31,53,.38);
}
.zom-workspace-confirm[hidden] { display:none; }
.zom-confirm-card { width:min(430px,100%); padding:22px; border:1px solid #bdcbe1; border-radius:16px; background:#fbfdff; box-shadow:0 24px 70px rgba(16,28,50,.3); color:#17243b; }
.zom-confirm-card h4 { margin:7px 0; font-size:1.2rem; }
.zom-confirm-card p { color:#5b6f8e; line-height:1.5; }
.zom-confirm-card>div { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.zom-confirm-card button { padding:8px 12px; border:1px solid #bdcbe1; border-radius:9px; background:#f6f9fe; color:#284267; font-weight:700; cursor:pointer; }
.zom-confirm-card button.danger { border-color:#e2aeb9; background:#fff1f4; color:#a52f49; }
@media(max-width:760px){
  .zom-dataset-workspace-layer{padding:7px}
  .zom-dataset-workspace.zom-dataset-workspace{width:100%;max-height:100%;height:100%;border-radius:14px}
  .zom-lineage-row{grid-template-columns:26px minmax(0,1fr) auto}.zom-lineage-row>.zom-status{display:none}.zom-lineage-row .zom-compact-actions button:not(:first-child){display:none}
  .zom-artifact-summary{align-items:flex-start;flex-direction:column}.zom-artifact-summary .zom-compact-actions{width:100%}
  .zom-activity p{grid-template-columns:1fr auto}.zom-activity time{grid-column:1/-1}
}

/* Controls and notes refinement: shared SVG icons and vertical maximize. */
.zom-workspace-icon-sprite { position:absolute; width:0; height:0; overflow:hidden; pointer-events:none; }
.zom-icon { width:17px; height:17px; display:block; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.zom-window-actions button { display:grid; place-items:center; width:34px; height:32px; padding:0; }
.zom-window-actions button:focus-visible,.zom-icon-button:focus-visible { outline:2px solid #5279b5; outline-offset:2px; }
.zom-dataset-workspace-layer[data-window-mode="maximized"] {
  position:fixed;
  z-index:10002;
  padding:0;
  min-height:calc(100vh - 28px);
  min-height:calc(100dvh - 28px);
}
.zom-dataset-workspace.zom-dataset-workspace.is-maximized {
    width: min(1200px,100%);
    max-width: 1200px;
    height: calc(100vh - 28px);
    height: calc(100dvh - 28px);
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    margin-inline: auto;
    border-radius: 16px;
}
.zom-notes-toolbar button,.zom-note-editor button { display:inline-flex; align-items:center; gap:6px; }
.zom-note-entry { position:relative; padding:10px 12px!important; border-radius:8px!important; box-shadow:none; }
.zom-note-entry p { margin:7px 0; }
.zom-note-entry-actions,.zom-note-edit-actions { display:flex; gap:5px; }
.zom-icon-button { display:grid!important; place-items:center; width:30px; height:30px; padding:0!important; border:1px solid #c4d0e3!important; border-radius:8px!important; background:#f8fbff!important; color:#34547d!important; cursor:pointer; }
.zom-icon-button:hover { border-color:#6d88b5!important; background:#eaf2fd!important; }
.zom-icon-button.danger { color:#a43b50!important; }
.zom-icon-button:disabled { cursor:not-allowed; opacity:.5; }
.zom-note-entry form { display:grid; gap:7px; margin-top:7px; }
.zom-note-entry textarea { width:100%; min-height:82px; padding:9px 10px; resize:vertical; border:1px solid #aebfda; border-radius:8px; background:#fff; color:#17243b; font:inherit; line-height:1.45; }
.zom-note-entry textarea:focus { border-color:#577ab2; outline:2px solid rgba(87,122,178,.18); }
.zom-note-error { margin:8px 0!important; padding:8px 10px; border:1px solid #e4b6c0; border-radius:8px; background:#fff2f4; color:#9b3048; font-size:.82rem; }
@media(max-width:760px){
  .zom-dataset-workspace-layer[data-window-mode="maximized"]{inset:6px;min-height:calc(100vh - 12px);min-height:calc(100dvh - 12px)}
  .zom-dataset-workspace.zom-dataset-workspace.is-maximized{width:100%;max-width:none;height:calc(100vh - 12px);height:calc(100dvh - 12px);max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px)}
}

/* Native top-layer confirmation portal and explicit Lineage navigation. */
.zom-workspace-confirm.zom-workspace-confirm {
  position:fixed;
  inset:0;
  width:min(430px,calc(100vw - 32px));
  max-width:430px;
  height:max-content;
  max-height:calc(100dvh - 32px);
  margin:auto;
  padding:0;
  border:0;
  background:transparent;
  overflow:visible;
}
.zom-workspace-confirm.zom-workspace-confirm[open] { display:block; }
.zom-workspace-confirm.zom-workspace-confirm:not([open]) { display:none; }
.zom-workspace-confirm.zom-workspace-confirm::backdrop {
  background:rgba(18,28,48,.52);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}
.zom-workspace-confirm .zom-confirm-card { width:100%; }
.zom-inspect-action { display:inline-flex; align-items:center; gap:5px; }
.zom-inspect-action .zom-icon { width:15px; height:15px; }
.zom-artifact[tabindex="-1"]:focus { outline:2px solid #557bb4; outline-offset:2px; }

/* =========================================================
   ZAR AI — GRAPHITE THEME RE-SKIN  (visual layer only)

   Appended, self-contained override block. It changes only
   colour / background / border / shadow / scrollbar values
   for selectors that already exist above. No layout, grid,
   positioning, display, dimensions, hooks, data-* attributes
   or JS-facing behaviour is touched. Delete this block to
   restore the light scientific workspace.

   Palette: Styles/modes/tokens/tokens.css — the graphite /
   neutral-dark system used by ZAR AI research + GB modules.
     surface      #181923 / #1b1e24 / #1e222b / #20242e
     text         #e6e8eb / #b7bcc5 / #7d828c   (eye-safe)
     borders      rgba(255,255,255,.05 / .08 / .16)  (neutral)
     mint  #339482 (action)   sky #6bbcff (structure/focus)
     focus #a6b1ff            shadow 0 24px 64px rgba(0,0,0,.7)
========================================================= */

/* ---- shell + backdrop ---- */
.zom-datasets-dialog {
  border-color: rgba(255, 255, 255, 0.16);
  color: #e6e8eb;

  background:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(51, 148, 130, 0.10), transparent 40%),
    radial-gradient(circle at 88% 0%, rgba(107, 188, 255, 0.08), transparent 42%),
    #181923;
  background-size: 24px 24px, 24px 24px, auto, auto, auto;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 24px 64px rgba(0, 0, 0, 0.70);
}
.zom-datasets-dialog::backdrop {
  background: rgba(4, 6, 10, 0.62);
}

/* ---- scrollbars (VS Code-like, from tokens.css) ---- */
.zom-datasets-card {
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.05);
}
.zom-datasets-card::-webkit-scrollbar-track,
.zom-workspace-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.zom-datasets-card::-webkit-scrollbar-thumb,
.zom-workspace-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}
.zom-datasets-card::-webkit-scrollbar-thumb:hover,
.zom-workspace-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* PATCH: Notes body scrollbar — thin, theme-matched, hover-only  ·  2026-09-06 16:59
   Reason: the clamped note text (.zom-notes p) rendered the OS default bar,
   always visible and out of place in the dark workspace. This makes it an
   8px bar that matches the dialog's other scrollbars (white @ 0.22/0.34) and
   only paints while the pointer/focus is on that note; hidden otherwise. */
.zom-notes p::-webkit-scrollbar { width: 8px; }
.zom-notes p::-webkit-scrollbar-track { background: transparent; }
.zom-notes p::-webkit-scrollbar-thumb {
  background-color: transparent;            /* hidden until the note is hovered */
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
  transition: background-color 0.16s ease;
}
.zom-note-entry:hover p::-webkit-scrollbar-thumb,
.zom-note-entry:focus-within p::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.22);
}
.zom-note-entry:hover p::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.34);
}
/* Firefox: same reveal, no thumb-level :hover step */
.zom-note-entry:hover p,
.zom-note-entry:focus-within p {
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}
@media (prefers-reduced-motion: reduce) {
  .zom-notes p::-webkit-scrollbar-thumb { transition: none; }
}

/* PATCH: Notes body scrollbar — thin, theme-matched, hover-only  ·  2026-09-06 16:59
   Reason: the clamped note text (.zom-notes p) rendered the OS default bar,
   always visible and out of place in the dark workspace. This makes it an
   8px bar that matches the dialog's other scrollbars (white @ 0.22/0.34) and
   only paints while the pointer/focus is on that note; hidden otherwise. */
.zom-notes p::-webkit-scrollbar { width: 8px; }
.zom-notes p::-webkit-scrollbar-track { background: transparent; }
.zom-notes p::-webkit-scrollbar-thumb {
  background-color: transparent;            /* hidden until the note is hovered */
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
  transition: background-color 0.16s ease;
}
.zom-note-entry:hover p::-webkit-scrollbar-thumb,
.zom-note-entry:focus-within p::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.22);
}
.zom-note-entry:hover p::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.34);
}
/* Firefox: same reveal, no thumb-level :hover step */
.zom-note-entry:hover p,
.zom-note-entry:focus-within p {
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}
@media (prefers-reduced-motion: reduce) {
  .zom-notes p::-webkit-scrollbar-thumb { transition: none; }
}

/* ---- header ---- */
.zom-datasets-card h2,
.zom-datasets-heading h2 { color: #e6e8eb; }
.zom-datasets-kicker { color: #74d0bd; }
.zom-datasets-card header button,
.zom-datasets-close {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
  color: #969ba5;
  box-shadow: none;
}
.zom-datasets-card header button:hover,
.zom-datasets-close:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #222631;
  color: #e6e8eb;
}

/* ---- privacy notice ---- */
.zom-datasets-privacy {
  border-color: rgba(255, 255, 255, 0.08);
  border-left: 2px solid #339482;
  background: rgba(51, 148, 130, 0.12);
  color: #b7bcc5;
  box-shadow: none;
}
.zom-datasets-privacy i { color: #74d0bd; }

/* ---- toolbar ---- */
.zom-datasets-toolbar label { color: #7d828c; }
.zom-datasets-toolbar input,
.zom-datasets-toolbar select {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1b1e24;
  color: #e6e8eb;
}
.zom-datasets-toolbar input:focus,
.zom-datasets-toolbar select:focus {
  outline: none;
  border-color: #6bbcff;
  box-shadow: 0 0 0 3px rgba(107, 188, 255, 0.16);
}

/* ---- catalogue table + rows ---- */
.zom-dataset-table {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1b1e24;
}
.zom-dataset-row {
  border-color: rgba(255, 255, 255, 0.05);
  background: transparent;
  color: #e6e8eb;
  box-shadow: none;
}
.zom-dataset-row:not(.zom-dataset-row--head):hover,
.zom-dataset-row:not(.zom-dataset-row--head):focus-visible {
  background: #22262f;
}
.zom-dataset-row--head {
  background: rgba(255, 255, 255, 0.022);
  color: #7d828c;
}
.zom-dataset-row strong { color: #e6e8eb; }
.zom-dataset-row small,
.zom-dataset-row span { color: #7d828c; }
.zom-dataset-row.is-selected {
  background: rgba(51, 148, 130, 0.12);
  box-shadow: inset 3px 0 #6bbcff;
}

/* ---- status + expiry semantics ---- */
.zom-status { color: #74d0bd; }
.is-warning { color: #e4b667 !important; }
.is-critical,
.is-expired { color: #ef929b !important; }

/* ---- list status / empty ---- */
.zom-datasets-status,
.zom-datasets-empty { color: #7d828c; }
.zom-datasets-status--error { color: #ef929b; }
.zom-datasets-empty {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
}
.zom-datasets-empty strong { color: #e6e8eb; }
.zom-datasets-empty i { color: #74d0bd; }

/* ---- future-functions notice ---- */
.zom-datasets-coming {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: #7d828c;
  box-shadow: none;
}
.zom-datasets-coming strong { color: #969ba5; }

/* ---- workspace overlay + panel ---- */
.zom-dataset-workspace-layer { background: rgba(8, 10, 14, 0.62); }
.zom-dataset-workspace,
.zom-dataset-workspace.zom-dataset-workspace {
  border-color: rgba(255, 255, 255, 0.16);
  background: #1e222b;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.70);
}
.zom-dataset-workspace > header,
.zom-workspace-header {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1b1e24;
}
.zom-dataset-workspace h3,
.zom-workspace-header h3 { color: #e6e8eb; }
.zom-dataset-workspace header p,
.zom-workspace-header p { color: #7d828c; }
.zom-window-actions button {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
  color: #969ba5;
}
.zom-window-actions button:hover,
.zom-window-actions button:focus-visible {
  border-color: rgba(255, 255, 255, 0.16);
  background: #222631;
  color: #e6e8eb;
}

/* ---- verdict chips ---- */
.zom-verdicts span {
  border-color: rgba(51, 148, 130, 0.32);
  background: rgba(51, 148, 130, 0.12);
  color: #74d0bd;
}

/* ---- tabs ---- */
.zom-tabs { border-color: rgba(255, 255, 255, 0.08); }
.zom-tabs button { color: #7d828c; }
.zom-tabs button:hover { color: #b7bcc5; }
.zom-tabs button.is-active { border-color: #6bbcff; color: #e6e8eb; }

/* ---- overview + generic cards ---- */
.zom-overview div,
.zom-artifact {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
}
.zom-overview dt,
.zom-artifact dt { color: #7d828c; }
.zom-overview dd,
.zom-artifact dd { color: #b7bcc5; }

/* ---- compact actions ---- */
.zom-compact-actions button,
.zom-compact-actions a,
.zom-notes button,
[data-note-form] button,
.zom-dataset-action button {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
  color: #b7bcc5;
}
.zom-compact-actions button:hover,
.zom-compact-actions a:hover,
.zom-dataset-action button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #222631;
  color: #e6e8eb;
}
.zom-compact-actions .danger {
  border-color: rgba(224, 116, 128, 0.34);
  background: rgba(224, 116, 128, 0.08);
  color: #ef929b;
}
.zom-compact-actions .danger:hover {
  border-color: rgba(224, 116, 128, 0.50);
  color: #f2a7ae;
}

/* ---- lineage ---- */
.zom-lineage-row { border-color: rgba(255, 255, 255, 0.05); }
.zom-lineage-row > div:nth-child(2) > span { color: #7d828c; }
.zom-lineage-index { background: #222631; color: #74d0bd; }

/* ---- artifact cards ---- */
.zom-artifact span { color: #7d828c; }
.zom-artifact-details {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1b1e24;
}
.zom-artifact-details dd { color: #b7bcc5; }
.zom-artifact-details dd button {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
  color: #b7bcc5;
}
.zom-annotations { border-color: rgba(255, 255, 255, 0.08); }

/* ---- notes ---- */
.zom-notes article,
.zom-note-entry {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
}
.zom-notes time,
.zom-note-entry time { color: #7d828c; }
.zom-notes p { color: #b7bcc5; }
.zom-notes-toolbar p { color: #7d828c; }
.zom-notes-toolbar button,
.zom-note-editor button {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
  color: #b7bcc5;
}
.zom-note-editor {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1b1e24;
}
.zom-note-editor textarea,
.zom-note-entry textarea {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1b1e24;
  color: #e6e8eb;
}
.zom-note-entry textarea:focus {
  border-color: #6bbcff;
  outline: 2px solid rgba(107, 188, 255, 0.18);
}
.zom-icon-button {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #20242e !important;
  color: #b7bcc5 !important;
}
.zom-icon-button:hover {
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: #222631 !important;
}
.zom-icon-button.danger { color: #ef929b !important; }
.zom-note-error {
  border-color: rgba(224, 116, 128, 0.34);
  background: rgba(224, 116, 128, 0.10);
  color: #ef929b;
}

/* ---- activity ---- */
.zom-activity p { border-color: rgba(255, 255, 255, 0.05); }
.zom-activity time { color: #7d828c; }
.zom-activity strong { background: #222631; color: #969ba5; }

/* ---- confirmation portal ---- */
.zom-workspace-confirm.zom-workspace-confirm::backdrop {
  background: rgba(4, 6, 10, 0.60);
}
.zom-confirm-card {
  border-color: rgba(255, 255, 255, 0.16);
  background: #1e222b;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.70);
  color: #e6e8eb;
}
.zom-confirm-card h4 { color: #e6e8eb; }
.zom-confirm-card p { color: #7d828c; }
.zom-confirm-card button {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
  color: #b7bcc5;
}
.zom-confirm-card button.danger {
  border-color: rgba(224, 116, 128, 0.34);
  background: rgba(224, 116, 128, 0.10);
  color: #ef929b;
}

/* ---- focus rings ---- */
.zom-datasets-dialog button:focus-visible { outline-color: #a6b1ff; }
.zom-window-actions button:focus-visible,
.zom-icon-button:focus-visible { outline-color: #6bbcff; }
.zom-artifact[tabindex="-1"]:focus { outline-color: #6bbcff; }

/* ---- monospace for technical read-outs (font-family only) ---- */
.zom-dataset-row time[data-expiry],
.zom-workspace-header p,
.zom-dataset-workspace header p,
.zom-artifact-details dd,
.zom-lineage-row > div:nth-child(2) > span {
  font-family: "Ubuntu Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ---- retired inline list-card selectors (kept in sync for safety) ---- */
.zom-dataset-actions button {
  border-color: rgba(255, 255, 255, 0.08);
  background: #20242e;
  color: #b7bcc5;
  box-shadow: none;
}
.zom-dataset-actions button:hover { border-color: rgba(255, 255, 255, 0.16); }
.zom-dataset-actions .danger {
  border-color: rgba(224, 116, 128, 0.34);
  background: rgba(224, 116, 128, 0.08);
  color: #ef929b;
}
.zom-dataset-actions .danger:hover {
  border-color: rgba(224, 116, 128, 0.50);
  color: #f2a7ae;
}
.zom-dataset-artifacts { border-color: rgba(255, 255, 255, 0.08); }
.zom-dataset-artifacts i { color: #74d0bd; }
.zom-dataset-artifacts li strong { color: #b7bcc5; }
.zom-dataset-artifacts small,
.zom-dataset-no-artifacts {
  color: #7d828c;
  border-color: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   MAIN TABLE — ACTION COLUMN  (Resume shortcut)

   Adds the 4th "Action" cell to the catalogue table. The row
   is now a <div role="row"> (was a <button>) so the name and
   the Resume control are two separate, non-nested buttons.
   The Resume button reuses .zom-compact-actions button
   styling (added to that selector group above) for full
   light + graphite theme parity.
========================================================= */

/* dataset name — the workspace-open control, styled as plain text */
.zom-dataset-open {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.zom-dataset-open:hover strong,
.zom-dataset-open:focus-visible strong { text-decoration: underline; }
.zom-dataset-open small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Action cell */
.zom-dataset-action {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 0;
}
.zom-dataset-action button {
  padding: 6px 10px;
  font-size: 0.76rem;
  white-space: nowrap;
}
.zom-dataset-action button:disabled { opacity: 0.6; cursor: progress; }
.zom-dataset-no-resume { color: #7d828c; font-weight: 700; }

@media (max-width: 760px) {
  /* Restore the author's mobile intent: the header row (which line ~21 hides
     via @media, but the later unscoped ".zom-dataset-row{display:grid}" at
     line ~245 re-shows on the head element by source order) stays hidden so
     the stacked data rows read cleanly. Higher-specificity, media-scoped. */
  .zom-dataset-row.zom-dataset-row--head { display: none; }
}

/* =========================================================
   MY DATASETS CATALOGUE — UI/UX REFINEMENT
   - non-scrolling header; only the dataset region scrolls
   - SVG close button in the fixed header
   - 5 columns: NAME | STATUS | ACTION | CREATED | EXPIRES
   - Select mode + temporary bulk-action panel
   - Today / Yesterday / Older collapsible date groups
   The expanded Dataset Workspace and its own internal scroll
   (.zom-workspace-body) are untouched.
========================================================= */

/* ---- scroll containment ------------------------------- */
.zom-datasets-card.zom-datasets-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.zom-datasets-card > .zom-datasets-header,
.zom-datasets-card > .zom-datasets-privacy,
.zom-datasets-card > .zom-datasets-toolbar,
.zom-datasets-card > .zom-bulk-panel { flex: 0 0 auto; }
.zom-datasets-list.zom-datasets-list {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #1b1e24;
  overscroll-behavior: contain;
  scrollbar-width: thin;                                  /* Firefox */
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent; /* Firefox */
}
/* Thin scrollbar that stays inside the rounded frame: the painted thumb is
   inset from the right edge (transparent border + padding-box clip) and the
   track is pulled clear of the rounded top/bottom corners, so nothing renders
   over the border radius. */
.zom-datasets-list::-webkit-scrollbar { width: 14px; }
.zom-datasets-list::-webkit-scrollbar-track {
  background: transparent;
  margin: 14px 0;
}
.zom-datasets-list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18);
  border: 4px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}
.zom-datasets-list::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.30); }
.zom-datasets-list > .zom-datasets-status,
.zom-datasets-list > .zom-datasets-empty { margin: 0; }

/* ---- SVG close button (fixed header) ------------------ */
.zom-datasets-close--icon.zom-datasets-close--icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #20242e;
  color: #b7bcc5;
  box-shadow: none;
}
.zom-datasets-close--icon .zom-icon { width: 16px; height: 16px; }
.zom-datasets-close--icon:hover {
  background: #262b37;
  color: #e6e8eb;
  border-color: rgba(255, 255, 255, 0.30);
}
.zom-datasets-close--icon:focus-visible { outline: 2px solid #6bbcff; outline-offset: 2px; }

/* ---- toolbar: Search | Status | Select | Sort --------- */
.zom-datasets-toolbar.zom-datasets-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.zom-datasets-toolbar > label:first-child { flex: 1 1 220px; min-width: 0; }
.zom-datasets-toolbar > label:not(:first-child),
.zom-datasets-toolbar > .zom-select-toggle { flex: 0 0 auto; }
.zom-select-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  background: #1b1e24;
  color: #b7bcc5;
  font-weight: 650;
  font-size: 0.8rem;
  white-space: nowrap;
}
.zom-select-toggle .zom-icon { width: 14px; height: 14px; }
.zom-select-toggle:hover { border-color: rgba(255, 255, 255, 0.20); color: #e6e8eb; }
.zom-select-toggle:focus-visible { outline: 2px solid #6bbcff; outline-offset: 2px; }
.zom-select-toggle.is-active {
  border-color: rgba(51, 148, 130, 0.45);
  background: rgba(51, 148, 130, 0.14);
  color: #74d0bd;
}

/* ---- temporary bulk-action panel --------------------- */
.zom-bulk-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0;
  transition: max-height 0.24s ease, opacity 0.18s ease, margin 0.24s ease;
}
.zom-bulk-panel.is-open { max-height: 96px; opacity: 1; margin: 10px 0 4px; }
.zom-bulk-panel-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(51, 148, 130, 0.09);
  font-size: 0.82rem;
  color: #b7bcc5;
}
.zom-bulk-count strong { color: #e6e8eb; }
.zom-bulk-error { color: #ef929b; font-size: 0.76rem; }
.zom-bulk-panel button.danger {
  margin-left: auto;
  padding: 7px 14px;
  border: 1px solid rgba(224, 116, 128, 0.34);
  border-radius: 9px;
  background: rgba(224, 116, 128, 0.10);
  color: #ef929b;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}
.zom-bulk-panel button.danger:hover:not(:disabled) { border-color: rgba(224, 116, 128, 0.55); color: #f2a7ae; }
.zom-bulk-panel button.danger:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- sticky column header + 5-col grid ---------------- */
.zom-dataset-colhead {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  background: #1b1e24;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #7d828c;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.zom-dataset-row,
.zom-dataset-colhead {
  grid-template-columns:
    minmax(140px, 1.5fr)   /* name   */
    minmax(108px, 0.7fr)   /* status */
    minmax(101px, auto)     /* action */
    minmax(126px, auto)     /* info   */
    minmax(90px, 0.5fr)    /* created */
    minmax(170px, 0.85fr); /* expires */
}
.zom-datasets-list.is-select-mode .zom-dataset-row,
.zom-datasets-list.is-select-mode .zom-dataset-colhead {
  grid-template-columns:
    24px
    minmax(130px, 1.5fr)
    minmax(108px, 0.7fr)
    minmax(78px, auto)
    minmax(66px, auto)
    minmax(90px, 0.5fr)
    minmax(170px, 0.85fr);
}
.zom-dataset-row > time[data-expiry] {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- compact rows ----------------------------------- */
.zom-dataset-row {
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}
.zom-dataset-group .zom-group-inner > .zom-dataset-row:last-child { border-bottom: 0; }
.zom-dataset-row.is-checked { background: rgba(51, 148, 130, 0.12); box-shadow: inset 3px 0 #6bbcff; }
.zom-dataset-open { gap: 2px; }
.zom-dataset-open strong { font-size: 12.5px; }
.zom-dataset-open small { margin-top: 1px; font-size: 10.5px; color: #7d828c; }
.zom-dataset-created {
  font-family: "Ubuntu Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  color: #969ba5;
  font-variant-numeric: tabular-nums;
}

/* ---- select-mode checkbox --------------------------- */
.zom-row-check { display: flex; align-items: center; justify-content: center; min-width: 0; }
.zom-row-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #339482;
  cursor: pointer;
}
.zom-row-check input:focus-visible { outline: 2px solid #6bbcff; outline-offset: 2px; }

/* ---- date groups + chevron ------------------------- */
.zom-dataset-group + .zom-dataset-group { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.zom-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: #b7bcc5;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}
.zom-group-head:hover { color: #e6e8eb; }
.zom-group-head:focus-visible { outline: 2px solid #6bbcff; outline-offset: -2px; }
.zom-group-count { color: #7d828c; font-weight: 600; letter-spacing: 0; }
.zom-chevron { width: 13px; height: 13px; flex: 0 0 auto; color: #969ba5; transition: transform 0.18s ease; }
.zom-group-head[aria-expanded="false"] .zom-chevron { transform: rotate(-90deg); }
.zom-group-body {
  overflow: hidden;
  opacity: 1;
  transition: height 0.24s ease, opacity 0.18s ease;
}
/* Fallback for a full re-render of an already-collapsed group (no animation). */
.zom-dataset-group.is-collapsed .zom-group-body { height: 0; opacity: 0; }
.zom-group-inner { overflow: hidden; }

/* ---- mobile stack ---------------------------------- */
@media (max-width: 760px) {
  .zom-datasets-list.zom-datasets-list { border-radius: 12px; }
  .zom-dataset-colhead { display: none; }
  .zom-datasets-toolbar.zom-datasets-toolbar > label:first-child { flex: 1 1 100%; }
  .zom-datasets-toolbar.zom-datasets-toolbar > label:not(:first-child) { flex: 1 1 auto; }

  .zom-dataset-row,
  .zom-datasets-list.is-select-mode .zom-dataset-row {
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 10px 12px;
  }
  .zom-datasets-list.is-select-mode .zom-dataset-row { grid-template-columns: 22px 1fr auto; }
  .zom-dataset-row .zom-row-check { grid-row: 1; align-self: start; margin-top: 3px; }
  .zom-dataset-open { grid-column: 1 / -1; }
  .zom-datasets-list.is-select-mode .zom-dataset-open { grid-column: 2 / -1; }
  .zom-dataset-row .zom-status { grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .zom-dataset-row .zom-dataset-action { grid-column: -2 / -1; grid-row: 2; justify-self: end; width: auto; }
  .zom-dataset-row .zom-dataset-action button { min-height: 32px; }
  .zom-dataset-created,
  .zom-dataset-row > time[data-expiry] { grid-column: 1 / -1; }
  .zom-dataset-row > time[data-expiry] { white-space: normal; }
  .zom-bulk-panel-inner { flex-wrap: wrap; }
  .zom-bulk-panel.is-open { max-height: 140px; }
  .zom-bulk-panel button.danger { margin-left: 0; }
}

/* =========================================================
   MY DATASETS — INFO COLUMN, MULTI-EXPAND ARTIFACTS,
   ANNOTATIONS DISCLOSURE, MOBILE DATASET-FIRST LAYOUT
========================================================= */

/* ---- INFO cell (SVG-only indicators) ------------------ */
.zom-dataset-info { display: flex; align-items: center; gap: 6px; min-width: 0; }
.zom-info-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8b93a1;
  cursor: pointer;
}
.zom-info-icon svg { width: 15px; height: 15px; }
.zom-info-icon:hover { background: rgba(255, 255, 255, 0.06); color: #d7dbe3; }
.zom-info-icon:focus-visible { outline: 2px solid #6bbcff; outline-offset: 1px; }
.zom-info-artifacts { color: #74d0bd; }
.zom-info-badge {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 12px;
  height: 12px;
  padding: 0 2px;
  border-radius: 6px;
  background: #2b3140;
  color: #cdd3dd;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---- artifact card: multi-expand + measured disclosure ---- */
.zom-artifact-details-wrap {
  overflow: hidden;
  opacity: 1;
  transition: height 0.22s ease, opacity 0.16s ease;
}
.zom-artifact-details-wrap[hidden] { display: block; height: 0; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .zom-artifact-details-wrap,
  .zom-annotations-body,
  .zom-group-body { transition: none; }
}
.zom-artifact-detail-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }
/* "Copy details" is an icon+label action, not a 30px icon-only square. Override
   the generic .zom-icon-button sizing (it is set with !important) so the label
   stays on one line and the control matches Details / Resume / Manifest. */
.zom-copy-details.zom-copy-details {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
.zom-copy-details.zom-copy-details svg,
.zom-copy-details.zom-copy-details .zom-icon { width: 14px; height: 14px; flex: 0 0 auto; }
.zom-copy-details.zom-copy-details span { white-space: nowrap; }
.zom-icon-button.is-flash {
  border-color: rgba(51, 148, 130, 0.5) !important;
  color: #74d0bd !important;
}

/* ---- collapsed-summary scientific-annotation indicator ---- */
.zom-artifact-summary .zom-icon-button[data-annot-artifact] { color: #b79bff !important; border-color: rgba(183, 155, 255, 0.4) !important; }
.zom-artifact-summary .zom-icon-button[data-annot-artifact]:hover { color: #cbb8ff !important; border-color: rgba(183, 155, 255, 0.65) !important; }

/* ---- Scientific annotations disclosure (chevron, animated) ---- */
.zom-annotations.zom-annotations {
  max-height: none;
  margin-top: 10px;
  padding-top: 8px;
  overflow: visible;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.zom-annotations-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #b7bcc5;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.zom-annotations-toggle:hover { color: #e6e8eb; }
.zom-annotations-toggle:focus-visible { outline: 2px solid #6bbcff; outline-offset: 2px; }
.zom-annotations-toggle .zom-chevron { width: 12px; height: 12px; }
.zom-annotations-toggle[aria-expanded="false"] .zom-chevron { transform: rotate(-90deg); }
.zom-annotations-body {
  overflow: hidden;
  opacity: 1;
  transition: height 0.2s ease, opacity 0.15s ease;
}
.zom-annotations-body[hidden] { display: block; height: 0; opacity: 0; }
.zom-annotations-body dl { margin: 8px 0 4px; }

/* ---- mobile: dataset-first, compact chrome ------------ */
@media (max-width: 760px) {
  .zom-datasets-card.zom-datasets-card { padding: 12px; }

  /* header on one line: PRIVATE WORKSPACE · My datasets & analyses */
  .zom-datasets-card > .zom-datasets-header { align-items: center; padding-bottom: 10px; }
  .zom-datasets-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; min-width: 0; }
  .zom-datasets-heading .zom-datasets-kicker { font-size: 0.62rem; }
  .zom-datasets-heading .zom-datasets-kicker::after { content: "·"; margin-left: 7px; opacity: 0.5; }
  .zom-datasets-card h2 { margin: 0; font-size: 1.02rem; letter-spacing: -0.01em; }
  .zom-datasets-header::after { display: none; }

  /* privacy: single horizontal line, quietly scrollable */
  .zom-datasets-privacy {
    margin: 8px 0;
    padding: 7px 10px;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    font-size: 0.72rem;
    line-height: 1.3;
  }
  .zom-datasets-privacy::-webkit-scrollbar { display: none; }
  .zom-datasets-privacy span { white-space: nowrap; }

  /* toolbar: one compact horizontally scrollable line */
  .zom-datasets-toolbar.zom-datasets-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    margin: 8px 0;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .zom-datasets-toolbar.zom-datasets-toolbar::-webkit-scrollbar { display: none; }
  .zom-datasets-toolbar.zom-datasets-toolbar > label:first-child { flex: 0 0 44vw; }
  .zom-datasets-toolbar.zom-datasets-toolbar > label:not(:first-child) { flex: 0 0 auto; }
  .zom-datasets-toolbar.zom-datasets-toolbar label > span:not(.sr-only) { display: none; }
  .zom-datasets-toolbar input,
  .zom-datasets-toolbar select { min-height: 36px; }
  .zom-select-toggle { min-height: 36px; padding: 0 10px; }
  .zom-select-toggle span[data-select-label] { display: none; }

  /* dataset name is the strongest element; INFO tucks under status/action */
  .zom-datasets-card h2 + * { min-height: 0; }
  .zom-dataset-open strong { font-size: 15px; font-weight: 700; line-height: 1.25; color: #f4f6fb; }
  .zom-dataset-row .zom-status,
  .zom-dataset-row .zom-dataset-created,
  .zom-dataset-row > time[data-expiry] { font-size: 11.5px; }
  .zom-dataset-row .zom-dataset-info { grid-column: 1; grid-row: 3; justify-content: flex-start; }
  .zom-dataset-created { grid-column: -2 / -1; grid-row: 3; justify-self: end; }
  .zom-dataset-row > time[data-expiry] { grid-column: 1 / -1; grid-row: 4; }

  /* close control: a true circle even when the heading text is long. The header
     is a flex row, so without a rigid basis the 38px button gets compressed to
     an oval. */
  .zom-datasets-close--icon.zom-datasets-close--icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 50%;
    align-self: flex-start;
  }

  /* horizontal-scroll affordance for the compact toolbar */
  .zom-toolbar-wrap .zom-scroll-hint { display: flex; }
  .zom-toolbar-wrap:not(.has-overflow-left) .zom-scroll-hint--left { display: none; }
  .zom-toolbar-wrap:not(.has-overflow-right) .zom-scroll-hint--right { display: none; }
}

/* ---- toolbar wrapper + non-interactive horizontal-scroll chevrons ---- */
.zom-datasets-card > .zom-toolbar-wrap { flex: 0 0 auto; }
.zom-toolbar-wrap { position: relative; min-width: 0; }
.zom-scroll-hint {
  position: absolute;
  top: 0;
  bottom: 0;
  display: none;               /* shown only inside the mobile media query */
  align-items: center;
  width: 26px;
  pointer-events: none;
  color: #9aa2b0;
  z-index: 2;
}
.zom-scroll-hint svg { width: 14px; height: 14px; }
.zom-scroll-hint--left {
  left: 0;
  justify-content: flex-start;
  background: linear-gradient(90deg, #181923 32%, rgba(24, 25, 35, 0));
}
.zom-scroll-hint--right {
  right: 0;
  justify-content: flex-end;
  background: linear-gradient(270deg, #181923 32%, rgba(24, 25, 35, 0));
}
@media (prefers-reduced-motion: reduce) {
  .zom-scroll-hint { transition: none; }
}
