/* ---------------------------------------------------------------
   Design tokens harmonised with https://www.dataspace2.eu/
   Palette + type scale lifted from the DS2 site theme.

   Shared with the DS2 SEC module portal (sec_module/portal/public/ds2.css),
   so the two modules' demo sites read as one. Everything above the
   "MCL scenario pages" section is that file unchanged; keep it so, and
   put MCL-only rules at the bottom.
   --------------------------------------------------------------- */
:root {
  /* Brand accent: the DS2 signature turquoise */
  --ds2-turquoise:       #36EEE0;
  --ds2-turquoise-light: #95F4EC;
  --ds2-turquoise-pale:  #B9F9F4;
  --ds2-teal:            #249F95;
  --ds2-teal-deep:       #124F4B;

  /* Neutrals */
  --ds2-ink:       #232322;
  --ds2-black:     #080808;
  --ds2-slate-900: #222A2B;
  --ds2-slate-700: #455457;
  --ds2-slate-500: #677E82;
  --ds2-slate-300: #9AA9AC;
  --ds2-slate-200: #C7D3D5;
  --ds2-line:      #D8D8D8;
  --ds2-grey-100:  #F4F4F4;
  --ds2-white:     #FFFFFF;

  /* Semantic (also drawn from the DS2 palette) */
  --ds2-green: #4A8E60;
  --ds2-red:   #ED1C24;
  --ds2-sand:  #C99951;

  /* Type scale: mirrors the DS2 theme steps */
  --fs-display: 44px;
  --fs-h2:      24px;
  --fs-h3:      20px;
  --fs-lead:    18px;
  --fs-body:    16px;
  --fs-sm:      14px;
  --fs-xs:      12px;

  --font-display: Questrial, "Trebuchet MS", system-ui, sans-serif;
  --font-body: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 0;
  --radius-sm: 0;
  --maxw: 1180px;
  --shadow: 0 1px 2px rgba(35,35,34,.05), 0 8px 24px rgba(35,35,34,.06);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ds2-ink);
  background: var(--ds2-grey-100);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;      /* Questrial ships a single weight, as on the DS2 site */
  line-height: 1.4;      /* the DS2 theme baseline */
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: var(--ds2-teal-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ds2-teal); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--ds2-grey-100);
  color: var(--ds2-teal-deep);
  border: 1px solid var(--ds2-line);
  border-radius: 0;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  background: var(--ds2-slate-900);
  color: var(--ds2-turquoise-pale);
  border-radius: var(--radius-sm);
  padding: 16px;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;      /* wrap at spaces instead of overflowing */
  overflow-wrap: anywhere;    /* last resort for a single over-long token */
  font-size: var(--fs-xs);
  line-height: 1.6;
}
pre code {
  background: none; border: 0; padding: 0;
  color: inherit; font-size: inherit;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ----------------------------- top bar ---------------------------- */
.topbar { background: var(--ds2-white); border-bottom: 1px solid var(--ds2-line); }
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px;
}
.topbar img { display: block; width: auto; }
.ds2-mark  { height: 116px; }
.digi-mark { height: 52px; }
@media (min-width: 720px) {
  .ds2-mark  { height: 144px; }
  .digi-mark { height: 64px; }
}

/* ----------------------------- header ----------------------------- */
.masthead {
  background: linear-gradient(135deg, var(--ds2-slate-900) 0%, var(--ds2-teal-deep) 100%);
  color: var(--ds2-white);
  border-bottom: 3px solid var(--ds2-turquoise);
}
.masthead .wrap { padding-top: 48px; padding-bottom: 48px; }

.eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ds2-turquoise);
  font-weight: 500;
  margin: 0 0 10px;
}
.masthead h1 {
  font-size: 32px;
  color: var(--ds2-white);
}
@media (min-width: 720px) { .masthead h1 { font-size: var(--fs-display); } }

.masthead .lead {
  font-size: var(--fs-lead);
  font-weight: 300;
  color: rgba(255,255,255,.85);
  max-width: none;
  margin: 16px 0 0;
}

.navlinks {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  margin-top: 28px; padding: 0; list-style: none;
}
.navlinks a {
  color: var(--ds2-turquoise-light);
  font-size: var(--fs-sm);
  text-decoration: none;
  border-bottom: 1px solid rgba(54,238,224,.35);
  padding-bottom: 2px;
}
.navlinks a:hover { color: var(--ds2-turquoise); border-bottom-color: var(--ds2-turquoise); }

/* ----------------------------- layout ----------------------------- */
main.wrap { padding-top: 56px; padding-bottom: 24px; }

.section-title {
  font-size: var(--fs-h2);
  margin-bottom: 20px;
  color: var(--ds2-ink);
}
.section-title::after {
  content: ""; display: block;
  width: 48px; height: 3px; margin-top: 10px;
  background: var(--ds2-turquoise);
}

.grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }

/* ------------------------------ cards ------------------------------ */
.card {
  background: var(--ds2-white);
  border: 1px solid var(--ds2-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card h2 { font-size: var(--fs-h3); margin-bottom: 8px; }
.card > p { margin: 0 0 16px; color: var(--ds2-slate-700); font-size: var(--fs-sm); }
/* reserve 3 lines so the status rows align across a grid row */
@media (min-width: 760px) { .card > p:first-of-type { min-height: 4.95em; } }

.card.is-wide { grid-column: 1 / -1; }

/* ---------------------------- status dot ---------------------------- */
.status {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); color: var(--ds2-slate-700);
  padding: 8px 12px;
  background: var(--ds2-grey-100);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ds2-slate-300);
  flex: none;
  box-shadow: 0 0 0 3px rgba(154,169,172,.22);
}
.status-dot.is-ok {
  background: var(--ds2-green);
  box-shadow: 0 0 0 3px rgba(74,142,96,.2);
}
.status-dot.is-down {
  background: var(--ds2-red);
  box-shadow: 0 0 0 3px rgba(237,28,36,.18);
}

/* ---------------------------- endpoints ---------------------------- */
.endpoints { list-style: none; margin: 0 0 18px; padding: 0; font-size: var(--fs-sm); }
.endpoints li {
  display: flex; flex-wrap: wrap; gap: 6px; min-width: 0;
  padding: 7px 0;
  border-top: 1px solid var(--ds2-grey-100);
  color: var(--ds2-slate-500);
}
.endpoints li:first-child { border-top: 0; }
.endpoints .label { min-width: 88px; color: var(--ds2-slate-500); }

/* ------------------------------ badge ------------------------------ */
.badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--ds2-turquoise);
  color: var(--ds2-ink);
  border-radius: 999px;
  padding: 5px 13px;
}
.badge.is-muted { background: var(--ds2-slate-200); color: var(--ds2-ink); }
.card .badge { margin-top: auto; align-self: flex-start; padding-top: 5px; }

.note {
  font-size: var(--fs-xs);
  color: var(--ds2-slate-500);
  margin: 10px 0 0;
}
.subhead {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ds2-slate-500);
  font-weight: 500;
  margin: 18px 0 8px;
}

/* ----------------------------- testing ----------------------------- */
.panel {
  background: var(--ds2-white);
  border: 1px solid var(--ds2-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  margin-top: 72px;
}
@media (min-width: 720px) { .panel { padding: 40px; } }
.panel > p { color: var(--ds2-slate-700); max-width: 70ch; }

.split { display: grid; gap: 24px; margin-top: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, 1fr); } }

.subpanel {
  background: var(--ds2-grey-100);
  border: 1px solid var(--ds2-line);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  min-width: 0;
}
.subpanel h3 { font-size: var(--fs-h3); margin-bottom: 10px; }
.subpanel p, .subpanel li { font-size: var(--fs-sm); color: var(--ds2-slate-700); }
.subpanel pre { margin: 14px 0; }
.subpanel ul { margin: 12px 0 0; padding-left: 18px; }
.subpanel ul li { margin-bottom: 6px; }
.subpanel :not(pre) > code { background: var(--ds2-white); }

/* ------------------------------ footer ------------------------------ */
footer {
  margin-top: 80px;
  border-top: 1px solid var(--ds2-line);
  background: var(--ds2-white);
}
footer .wrap {
  padding-top: 28px; padding-bottom: 32px;
  display: flex; flex-direction: column; gap: 20px;
  font-size: var(--fs-sm); color: var(--ds2-slate-500);
}
.funding { display: flex; align-items: flex-start; gap: 18px; }
.funding img { width: 78px; height: auto; flex: none; display: block; }
.funding p { margin: 0; line-height: 1.6; text-wrap: balance; }
/* keep identifiers such as the programme code from breaking at their hyphens */
.nowrap { white-space: nowrap; }
.footer-legal {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
}
@media (max-width: 560px) { .funding { flex-direction: column; gap: 12px; } }

:where(a, button):focus-visible {
  outline: 2px solid var(--ds2-teal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* =======================================================================
   Scenario demo pages (tokenisation / anonymisation)
   ======================================================================= */

/* actor strip: pX -> SEC -> pY */
.actors {
  display: grid; gap: 12px; margin: 0 0 52px;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 820px) { .actors { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; } }
.actor {
  background: var(--ds2-white); border: 1px solid var(--ds2-line);
  padding: 18px 20px; min-width: 0;
}
.actor.is-sec { background: var(--ds2-slate-900); border-color: var(--ds2-slate-900); color: var(--ds2-white); }
.actor .role {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em;
  color: var(--ds2-slate-500); margin: 0 0 6px; font-weight: 500;
}
.actor.is-sec .role { color: var(--ds2-turquoise); }
.actor .who { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.3; }
.actor .what { font-size: var(--fs-xs); color: var(--ds2-slate-500); margin-top: 4px; }
.actor.is-sec .what { color: rgba(255,255,255,.75); }
.arrow { color: var(--ds2-teal); font-size: 22px; text-align: center; line-height: 1; }
@media (max-width: 819px) { .arrow { transform: rotate(90deg); padding: 2px 0; } }

/* numbered steps */
.step { margin-bottom: 52px; }
.step-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.step-num {
  flex: none; width: 26px; height: 26px; background: var(--ds2-turquoise);
  color: var(--ds2-ink); font-size: var(--fs-xs); font-weight: 600;
  display: flex; align-items: center; justify-content: center; align-self: center;
}
.step-head h2 { font-size: var(--fs-h3); }
.step-head .sub { font-size: var(--fs-xs); color: var(--ds2-slate-500); margin-left: auto; text-align: right; }

/* data tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--ds2-line); background: var(--ds2-white); }
table.data { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
table.data th, table.data td {
  text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--ds2-grey-100);
  white-space: nowrap;
}
table.data th {
  background: var(--ds2-grey-100); font-weight: 500; color: var(--ds2-slate-700);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em;
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.sensitive { color: #9B1C1C; }
table.data td.tokenised, table.data td.generalised { color: var(--ds2-teal-deep); font-family: var(--font-mono); font-size: 12px; }
table.data td.kept { color: var(--ds2-slate-500); }

/* key/value record view */
.record { border: 1px solid var(--ds2-line); background: var(--ds2-white); }
.record .row {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  padding: 10px 16px; border-bottom: 1px solid var(--ds2-grey-100); font-size: var(--fs-sm);
  min-width: 0;
}
.record .row:last-child { border-bottom: 0; }
.record .k { flex: 0 0 190px; color: var(--ds2-slate-500); }
/* keys that must stay on one line, such as a cache node's tier/name */
.record.nowrap-keys .k { flex-basis: 210px; white-space: nowrap; }
.record .v { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.record .v.sensitive { color: #9B1C1C; }
.record .v.tokenised { color: var(--ds2-teal-deep); font-family: var(--font-mono); font-size: 12px; }
.record .v.kept { color: var(--ds2-slate-700); }

/* controls */
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 28px; }
button.act {
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 500;
  background: var(--ds2-turquoise); color: var(--ds2-ink);
  border: 1px solid var(--ds2-turquoise); padding: 11px 22px; cursor: pointer;
}
button.act:hover:not(:disabled) { background: var(--ds2-turquoise-light); border-color: var(--ds2-turquoise-light); }
button.act:disabled { background: var(--ds2-slate-200); border-color: var(--ds2-slate-200); color: var(--ds2-slate-500); cursor: not-allowed; }
button.act.secondary { background: var(--ds2-white); border-color: var(--ds2-slate-300); color: var(--ds2-ink); }
button.act.secondary:hover:not(:disabled) { background: var(--ds2-white); border-color: var(--ds2-teal); color: var(--ds2-teal-deep); }
/* .secondary sets a white background at the same specificity as :disabled, so restate it */
button.act.secondary:disabled { background: var(--ds2-grey-100); border-color: var(--ds2-line); color: var(--ds2-slate-300); }
.controls label { font-size: var(--fs-sm); color: var(--ds2-slate-700); }

/* a stacked form: one labelled choice per row, the action below it */
.fields { display: grid; gap: 6px 20px; grid-template-columns: 1fr; align-items: center; max-width: 760px; margin: 0 0 20px; }
@media (min-width: 720px) { .fields { grid-template-columns: 200px minmax(0, 1fr); row-gap: 14px; } }
@media (max-width: 719px) { .fields > :nth-child(even) { margin-bottom: 10px; } }
.fields > label { font-size: var(--fs-sm); color: var(--ds2-slate-700); }
.fields select {
  width: 100%; font-family: var(--font-body); font-size: var(--fs-sm); padding: 9px 12px;
  border: 1px solid var(--ds2-line); background: var(--ds2-white); color: var(--ds2-ink);
}

/* an on/off switch around a checkbox, which stays the real (focusable, labelled) control */
.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--ds2-ink); cursor: pointer; justify-self: start; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.toggle .track { position: relative; flex: none; width: 44px; height: 24px; border-radius: 12px; background: var(--ds2-slate-300); transition: background .15s; }
.toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ds2-white); transition: transform .15s;
}
.toggle input:checked + .track { background: var(--ds2-teal); }
.toggle input:checked + .track::after { transform: translateX(20px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--ds2-teal); outline-offset: 2px; }
.toggle input:disabled + .track { opacity: .5; }
.controls select {
  font-family: var(--font-body); font-size: var(--fs-sm); padding: 9px 12px;
  border: 1px solid var(--ds2-line); background: var(--ds2-white); color: var(--ds2-ink);
}

/* result states */
.pending { color: var(--ds2-slate-500); font-size: var(--fs-sm); font-style: italic; }
.errbox { border-left: 3px solid var(--ds2-red); background: #FDF2F2; color: #9B1C1C;
          padding: 12px 16px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.hidden { display: none !important; }

/* metric tiles */
.metrics { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-top: 16px; }
@media (min-width: 720px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric { background: var(--ds2-white); border: 1px solid var(--ds2-line); padding: 14px 16px; min-width: 0; }
.metric .mlabel { font-size: var(--fs-xs); color: var(--ds2-slate-500); text-transform: uppercase; letter-spacing: .06em; }
.metric .mval { font-family: var(--font-display); font-size: 26px; line-height: 1.2; margin-top: 4px; }
.metric .mval.good { color: var(--ds2-green); }
.metric .mval.bad { color: var(--ds2-red); }
.metric .mnote { font-size: var(--fs-xs); color: var(--ds2-slate-500); margin-top: 2px; }

/* before / after */
.beforeafter { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .beforeafter { grid-template-columns: 1fr 1fr; } }
.ba-col { min-width: 0; }
.ba-col h3 { font-size: var(--fs-body); margin-bottom: 8px; }
.ba-col .tag { font-size: var(--fs-xs); color: var(--ds2-slate-500); display: block; margin-bottom: 10px; }

.callout {
  border-left: 3px solid var(--ds2-turquoise); background: var(--ds2-white);
  padding: 16px 20px; font-size: var(--fs-sm); color: var(--ds2-slate-700); margin: 0 0 48px;
}
.ledger-id { font-family: var(--font-mono); font-size: 12px; color: var(--ds2-teal-deep); }

/* =======================================================================
   OAuth 2.0 scenario: sign-in forms and the shared session strip
   ======================================================================= */
.signin {
  display: grid; gap: 14px; grid-template-columns: 1fr;
  max-width: 760px; margin: 0 0 20px;
}
@media (min-width: 720px) { .signin { grid-template-columns: 1fr 1fr auto; align-items: end; } }
.signin label {
  display: block; font-size: var(--fs-xs); color: var(--ds2-slate-500);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; font-weight: 500;
}
.signin input {
  width: 100%; font-family: var(--font-body); font-size: var(--fs-sm);
  padding: 10px 12px; border: 1px solid var(--ds2-line);
  background: var(--ds2-white); color: var(--ds2-ink);
}
.signin input:focus { outline: 2px solid var(--ds2-teal); outline-offset: 0; border-color: var(--ds2-teal); }
.signin button.act { white-space: nowrap; }

.request-line {
  font-family: var(--font-mono); font-size: 12px; color: var(--ds2-slate-700);
  background: var(--ds2-grey-100); border: 1px solid var(--ds2-line);
  padding: 8px 12px; margin: 0 0 14px; overflow-wrap: anywhere;
}

.sessionbar {
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center;
  padding: 12px 18px; margin: 0 0 48px;
  background: var(--ds2-white); border: 1px solid var(--ds2-line);
  border-left: 3px solid var(--ds2-turquoise);
  font-size: var(--fs-sm); color: var(--ds2-slate-700);
}
.sessionbar .sess { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.sessionbar .sess-link { margin-left: auto; font-size: var(--fs-sm); }
@media (max-width: 719px) { .sessionbar .sess-link { margin-left: 0; } }

.verdict { font-family: var(--font-mono); font-size: 12px; }
.verdict.ok { color: var(--ds2-green); }
.verdict.denied { color: var(--ds2-red); }

/* =======================================================================
   MCL scenario pages: governed transfers and data placement
   ======================================================================= */

/* extra dot states for a transfer's lifecycle */
.status-dot.is-active {
  background: var(--ds2-turquoise);
  box-shadow: 0 0 0 3px rgba(54,238,224,.35);
}
.status-dot.is-held {
  background: var(--ds2-sand);
  box-shadow: 0 0 0 3px rgba(201,153,81,.25);
}

/* state pills next to the controls */
.badge.is-ok   { background: #E3F1E7; color: #2F6B43; }
.badge.is-warn { background: #F6EBD9; color: #7A5418; }
.badge.is-bad  { background: #FDF2F2; color: #9B1C1C; }
.metric .mval.warn { color: var(--ds2-sand); }

/* governance pipeline: catalog -> negotiation -> agreement -> transfer -> flow */
.pipeline { border: 1px solid var(--ds2-line); background: var(--ds2-white); list-style: none; margin: 0; padding: 0; }
.pipeline li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 11px 16px; border-bottom: 1px solid var(--ds2-grey-100); min-width: 0;
}
.pipeline li:last-child { border-bottom: 0; }
.pipeline .status-dot { margin-top: 8px; }
.pipeline .pname { font-size: var(--fs-sm); color: var(--ds2-ink); }
.pipeline .pdetail {
  font-family: var(--font-mono); font-size: 12px; color: var(--ds2-slate-500);
  overflow-wrap: anywhere;
}

/* progress */
.bar { height: 10px; background: var(--ds2-white); border: 1px solid var(--ds2-line); overflow: hidden; margin: 16px 0 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--ds2-turquoise); transition: width .4s ease; }
.bar.is-done > i { background: var(--ds2-green); }
.bar.is-held > i { background: var(--ds2-sand); }
.bar.is-stopped > i { background: var(--ds2-slate-300); }

/* resume grid: one cell per part */
.parts {
  display: grid; gap: 2px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(12px, 1fr));
}
.parts .cell { aspect-ratio: 1; background: var(--ds2-white); border: 1px solid var(--ds2-line); }
.parts .cell.verified { background: var(--ds2-green); border-color: var(--ds2-green); }
.parts .cell.inflight { background: var(--ds2-turquoise); border-color: var(--ds2-turquoise); }
.parts .cell.kept { background: var(--ds2-green); border-color: var(--ds2-teal-deep); box-shadow: inset 0 0 0 1px var(--ds2-teal-deep); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: var(--fs-xs); color: var(--ds2-slate-500); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 10px; height: 10px; display: inline-block; border: 1px solid var(--ds2-line); }

/* live record feed and audit trail: the dark code surface used for <pre> */
.feed, .log {
  background: var(--ds2-slate-900); color: var(--ds2-turquoise-pale);
  font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.6;
  max-height: 260px; overflow-y: auto; padding: 8px 0;
}
.feed div, .log div {
  padding: 2px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed div:first-child { color: var(--ds2-turquoise); }

/* provider source files */
.files { border: 1px solid var(--ds2-line); background: var(--ds2-white); margin-top: 16px; }
.files .row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 9px 16px; border-bottom: 1px solid var(--ds2-grey-100); font-size: var(--fs-sm);
}
.files .row:last-child { border-bottom: 0; }
.files .nm { flex: 1 1 220px; min-width: 0; font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.files button.act { padding: 4px 12px; font-size: var(--fs-xs); }

/* the placement engine's reasons, in the order it weighed them */
.reasons { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ds2-line); background: var(--ds2-white); }
.reasons li {
  padding: 9px 16px; border-bottom: 1px solid var(--ds2-grey-100);
  font-size: var(--fs-sm); color: var(--ds2-slate-700); overflow-wrap: anywhere;
}
.reasons li:last-child { border-bottom: 0; }
.reasons li.forced { border-left: 3px solid var(--ds2-sand); background: #FBF6EE; }

/* a step's own explanatory paragraph */
.step > p.explain { font-size: var(--fs-sm); color: var(--ds2-slate-700); margin: 0 0 16px; }
.signin input[type=file] { padding: 7px 10px; }
table.data tr.is-hit td { color: var(--ds2-green); }

/* pX's storage locations (vast demo, Step 1): one card per cloud store, plus local storage */
.stores { margin-bottom: 24px; }
.card.store > p.store-meta { min-height: 0; margin: 0 0 14px; font-size: var(--fs-xs); color: var(--ds2-slate-500); }
.card.store .files { margin-top: 0; }
.card.store .files .badge { margin-top: 0; align-self: auto; }
.signin.is-wide { max-width: none; }
@media (min-width: 900px) { .signin.is-wide { grid-template-columns: 1fr 1fr 1.4fr auto; } }
.signin select {
  width: 100%; font-family: var(--font-body); font-size: var(--fs-sm);
  padding: 10px 12px; border: 1px solid var(--ds2-line);
  background: var(--ds2-white); color: var(--ds2-ink);
}
.stores + .note { margin: -12px 0 24px; }
.badge.is-cloud { background: var(--ds2-white); color: var(--ds2-teal-deep); border: 1px solid var(--ds2-teal); padding: 3px 10px; }
/* vast demo: dataset tick boxes (Step 1) and per-dataset progress (Step 3) */
.files label.nm { cursor: pointer; display: flex; align-items: center; gap: 8px; }
.files input.pick { width: 16px; height: 16px; margin: 0; accent-color: var(--ds2-teal); flex: none; }
.bar.mini { display: inline-block; vertical-align: middle; width: 120px; height: 6px; margin: 0 8px 0 0; }
table.data td.good { color: var(--ds2-green); }
table.data td.bad { color: #9B1C1C; }
#current-head { margin-top: 24px; }
