:root {
  /* Brand tokens. Audience-aware bootstrap (`applyBranding()` in
     portal.html / launch.html) overrides --brand and --accent at
     runtime via document.documentElement.style.setProperty when a
     vendor audience is resolved — every brand-coloured rule already
     keys on these custom properties, so the swap is selector-free. */
  --brand: #0b2471;
  --brand-2: #1e3aa6;
  --accent: #00b6e8;

  /* Neutral palette — refreshed for an enterprise feel. Main content
     reads pure white; the sidebar gets a subtle off-white to recede
     visually so the eye lands on content first (Retell / Linear /
     GitHub app-shell pattern). Surface tokens are layered so we can
     pick the right one for hover/active states without inventing new
     greys at the rule site. */
  --bg: #f6f7f9;          /* warm grey body — cards sit on top of this */
  --surface: #ffffff;     /* card surface — white, pops against --bg */
  --surface-2: #eef0f4;   /* hover bg + active nav fill (slightly darker than --bg) */
  --surface-3: #f6f7f9;   /* sidebar background — same tone as --bg, continuous */
  --fg: #0e1530;
  --fg-mid: #4b5563;      /* secondary body text */
  --fg-dim: #6b7280;      /* tertiary / meta text */
  --muted: #5b6480;       /* legacy alias — kept for back-compat */
  --card: #ffffff;        /* legacy alias */
  --border: #e5e7eb;
  --border-strong: #d1d5db;
}

/* Employee-only audience preview switcher in the header. Hidden until
   bootstrap confirms staff identity; the inline width keeps it from
   pushing other top-bar elements off small viewports. */
.td-audience-switch {
  appearance: none;
  background: var(--surface);
  color: var(--fg-mid);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 26px 4px 10px;
  font-size: 12.5px;
  cursor: pointer;
  margin-right: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='currentColor'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 8px;
}
.td-audience-switch:focus { outline: 1px solid var(--accent); outline-offset: 1px; }
.td-audience-switch:hover { background-color: var(--surface-2); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
}
.brand img { display: block; }
.brand span {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

main { max-width: 1100px; margin: 0 auto; padding: 64px 32px; }

.hero { text-align: center; padding: 48px 0 64px; }
.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--brand);
}
.hero .lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 80ms ease, background 120ms ease;
}
.btn.primary {
  background: var(--brand);
  color: white;
}
.btn.primary:hover { background: var(--brand-2); }
.btn.big {
  font-size: 14px;
  padding: 9px 18px;
}
.btn.ghost {
  background: white;
  color: var(--brand);
  border-color: var(--border);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--brand);
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
code {
  background: #eef1f9;
  color: var(--brand);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

.card {
  background: var(--surface);
  border: 0;
  border-radius: 10px;
  padding: 28px;
  max-width: 480px;
  margin: 64px auto;
  box-shadow: none;
}
.card h2 {
  margin: 0 0 14px;
  color: var(--fg);
  font-size: 16px;
  font-weight: 600;
}
.card .muted { color: var(--muted); font-size: 14px; }

/* Provisioning progress UI */
.progress-bar {
  position: relative;
  height: 6px;
  background: #eef1f9;
  border-radius: 3px;
  overflow: hidden;
  margin: 16px 0 24px;
}
.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  border-radius: 3px;
  transition: width 400ms ease-out;
}
.progress-bar.indeterminate::after {
  width: 40%;
  left: -40%;
  animation: indeterminate 1.6s ease-in-out infinite;
}
.progress-bar.failed::after {
  background: #ef6f6c;
}
@keyframes indeterminate {
  0%   { left: -40%; }
  100% { left: 100%; }
}

.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  transition: color 200ms ease;
}
.steps li.active { color: var(--fg); font-weight: 500; }
.steps li.done   { color: var(--fg); }

.steps .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.steps li.pending .icon::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.steps li.active .icon::before {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.steps li.done .icon::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}
.steps li.failed { color: #c0392b; font-weight: 500; }
.steps li.failed .icon::before {
  content: "✕";
  color: #c0392b;
  font-weight: 700;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lab-creds {
  background: #0e1530;
  color: #e2e8ff;
  border-radius: 8px;
  padding: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lab-creds > div { display: flex; align-items: baseline; gap: 12px; }
.lab-creds .cred-label {
  display: inline-block;
  width: 80px;
  color: #8a93b3;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lab-creds strong { color: #e2e8ff; font-weight: 600; word-break: break-all; }
.lab-creds a { color: #7fc8ff; text-decoration: none; }
.lab-creds a:hover { text-decoration: underline; }

/* Top header — full-width, white, sticky. Used on both the public landing
   and the authenticated app shell. User identity + log out live on the
   right; brand on the left. */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.top-bar .brand img { display: block; }
.top-bar .brand span {
  font-size: 14px;
  color: var(--muted);
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}
.active-lab-header {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  line-height: 1.25;
}
.active-lab-header[hidden] { display: none; }
.active-lab-header .alh-slot {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  color: var(--brand);
  font-weight: 600;
  margin-right: 4px;
}
.active-lab-header .alh-sep { color: var(--border); margin: 0 6px; font-weight: 400; }
.active-lab-header .alh-title { color: var(--fg); }
.top-bar-right strong { color: var(--fg); font-weight: 600; }
.top-bar-right .btn { padding: 6px 14px; font-size: 13px; }

/* App shell: top header + (left rail | scrollable main content) */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-shell-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}
.sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: var(--surface-3);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* No top-bar above us — sidebar runs the full viewport height and
     scrolls independently of the main content area. */
  position: sticky;
  top: 0;
  align-self: stretch;
  max-height: 100vh;
  overflow-y: auto;
}

/* Brand block at the top of the sidebar — replaces the old top-bar.
   Logo + wordmark, click goes back to /launch. */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  padding: 2px 6px 14px 6px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand img { display: block; }
.sidebar-brand span {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-mid);
  font-weight: 600;
}

/* Account menu — collapsible <details>. Closed = signed-in-as row.
   Open = expands to reveal audience-switch (employees only) + Log
   out. Sits directly under the brand; part of the nav surface, not
   its own raised card. */
.account-menu summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 80ms ease, border-color 80ms ease,
              box-shadow 80ms ease;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover {
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
              0 2px 6px rgba(15, 23, 42, 0.05);
}
.account-menu[open] summary {
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
              0 4px 12px rgba(15, 23, 42, 0.06);
}

.account-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--fg); color: white;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.account-who {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600; color: var(--fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Stacked up/down chevrons — static indicator that says "this is a
   selectable / collapsible control", matches the Retell workspace
   switcher pattern. No rotation on [open]; the icon is a semantic
   "this opens" hint, not a state indicator. */
.account-caret {
  color: var(--fg-dim);
  flex-shrink: 0;
}
.account-menu[open] .account-caret { color: var(--fg-mid); }

.account-pop {
  padding: 8px 6px 4px 6px;
  display: flex; flex-direction: column; gap: 8px;
}
.account-pop-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 600;
  padding-left: 4px;
}
.account-pop .td-audience-switch {
  width: 100%; margin-right: 0;
}
/* Audience preview only renders for employees — sidebar.js adds
   .has-audience to the menu once the <select> has been populated.
   Without it, both the label and the select are hidden so non-
   employees see a clean "Log out" panel. */
.account-menu:not(.has-audience) .account-pop-label,
.account-menu:not(.has-audience) .td-audience-switch { display: none; }

.account-action {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit; font-size: 13px;
  text-align: center;
  color: var(--fg-mid);
  cursor: pointer;
  transition: background 80ms ease, color 80ms ease;
}
.account-action:hover { background: var(--surface-2); color: var(--fg); }
.account-action.danger:hover {
  background: #fff1f1; color: #c53030; border-color: #f6cccc;
}

/* Section header — small-caps grey instead of full <h3> visual weight.
   Mirrors the Retell / Linear app-shell pattern: the sidebar is a
   navigation surface, not a content surface, so section labels should
   be quiet typographic cues, not headings competing with page titles. */
.sidebar h3,
.sidebar .side-section-head h3 {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 600;
  margin: 0 0 8px 4px;
}
.sidebar .side-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.sidebar .side-section-head h3 { margin: 0 0 0 4px; }
.sidebar .side-section { display: flex; flex-direction: column; }

/* Side-nav links — quiet by default, subtle bg on hover, soft tint +
   left rail when active. No outlines, no borders, no shadows. */
.sidebar .side-nav,
.sidebar .side-section { display: flex; flex-direction: column; gap: 1px; }
.sidebar .cat-link,
.sidebar .side-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--fg-mid);
  text-decoration: none;
  transition: background 80ms ease, color 80ms ease;
}
.sidebar .cat-link:hover,
.sidebar .side-link:hover {
  background: var(--surface-2);
  color: var(--fg);
}
/* Active = quiet grey fill + bolder text. No brand colour, no rail —
   the row tells you it's selected by weight, not by pigment. */
.sidebar .cat-link.active,
.sidebar .side-link.active {
  background: var(--surface-2);
  color: var(--fg);
  font-weight: 600;
}

/* Collapsible Tools <details> — match the rest of the sidebar instead
   of carrying the browser's default disclosure styling. */
.sidebar .side-collapsible { gap: 0; }
.sidebar .side-collapsible summary {
  list-style: none;
  cursor: pointer;
  padding: 0;
}
.sidebar .side-collapsible summary::-webkit-details-marker { display: none; }
.sidebar .side-collapsible[open] summary h3 { margin-bottom: 8px; }
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar .brand span {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: none;
  padding: 0;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.app-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-content > main { max-width: 1440px; margin: 0; padding: 22px 40px 16px; }

/* Card eyebrow — the small "lab1 · Lab Name" breadcrumb that lives
   above the card title. Replaces the page-top H1 we used to show
   when an active lab was being provisioned. Quiet, typographic,
   sits flush with the card's top edge. */
.card-eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 600;
  margin: 0 0 8px 0;
}
.card-eyebrow:empty { display: none; }

/* --- Lab gallery (browse / category landing) -------------------------- */
.lab-gallery[hidden] { display: none; }
.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}
.gallery-head h1 {
  margin: 0 0 4px;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.gallery-head .muted { margin: 0; font-size: 14px; }
.gallery-meta {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  white-space: nowrap;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.lab-tile {
  background: var(--surface);
  border: 0;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 120ms ease, transform 120ms ease;
}
.lab-tile:hover {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
              0 4px 12px rgba(15, 23, 42, 0.06);
}
/* Active = same white card, no brand tint. The tile communicates
   "this is the one you have running" through the active-lab-header
   crumb at the top of the page + a tiny ACTIVE label on the tile
   itself (.lab-tile.active::after below) — not through colour.
   This keeps every card visually equal and avoids the AI-demo look
   of one tile lit up against its peers. */
.lab-tile.active {
  background: var(--surface);
  box-shadow: none;
}
.lab-tile.active h3::after {
  content: "ACTIVE";
  display: inline-block;
  margin-left: 8px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
}
.lab-tile.coming-soon { opacity: 0.7; }
.lab-tile h3 {
  margin: 0;
  font-size: 15px;
  color: var(--fg);
  line-height: 1.3;
}
.lab-tile p.muted { margin: 0; font-size: 12.5px; line-height: 1.45; }
.lab-tile .tile-bullets { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.45; }
.lab-tile .tile-bullets li { margin: 0 0 3px; }
.lab-tile .tile-bullets li:last-child { margin-bottom: 0; }

.tile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tile-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--fg-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.lab-tile.active .tile-icon {
  background: var(--surface-2);
  color: var(--fg-mid);
}
.tile-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 5px;
}
.tile-badge.recommended { background: var(--brand); color: white; }
.tile-badge.soon { background: #eef1f9; color: var(--muted); }

.tile-meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tile-tags span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}
.lab-tile.active .tile-tags span {
  border-color: var(--border);
  color: var(--fg-mid);
  background: transparent;
}
.tile-cta {
  margin-top: auto;
  width: 100%;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 14px;
}
.tile-cta:disabled {
  cursor: not-allowed;
  background: #eef1f9;
  color: var(--muted);
  border-color: transparent;
}

/* Sidebar category links + info card */
.cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
}
.cat-link:hover { background: #eef1f9; }
.cat-link.active { color: var(--brand); font-weight: 600; }
.cat-link.active::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.side-info-card {
  background: #eef2ff;
  border: 1px solid #d6deff;
  border-radius: 10px;
  padding: 14px 16px;
}
.side-info-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  margin-bottom: 6px;
  font-size: 14px;
}
.side-info-icon { font-size: 14px; }
.side-info-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--brand);
}
body.detail-split .app-content > main {
  max-width: 1600px;
  padding: 24px 32px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
body.detail-split #provisioning-card,
body.detail-split #teardown-card { grid-column: 1; margin: 0; padding: 20px; max-width: none; }
body.detail-split #detail-stack { grid-column: 2; }
body.detail-split #guide-stack { grid-column: 3; }
body.detail-split #detail-stack .card,
body.detail-split #guide-stack .card { margin: 0; padding: 20px; max-width: none; }
.detail-stack,
.guide-stack { display: flex; flex-direction: column; gap: 12px; }
.detail-stack[hidden],
.guide-stack[hidden] { display: none; }
.guide-placeholder {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.guide-placeholder p { margin: 0; }
.kubectl-hint {
  background: #0b0e14;
  color: #d6deeb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 12px 0 0;
  overflow-x: auto;
}
.kubectl-hint code { background: transparent; color: inherit; padding: 0; }
@media (max-width: 1400px) {
  body.detail-split .app-content > main {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
  body.detail-split #guide-stack { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  body.detail-split .app-content > main {
    grid-template-columns: 1fr;
  }
  body.detail-split #provisioning-card,
  body.detail-split #detail-stack,
  body.detail-split #guide-stack { grid-column: 1; }
}
.app-content > footer { border-top: 1px solid var(--border); margin-top: auto; }

.admin-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.admin-sidebar h3 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.side-nav { margin-bottom: 24px; }
.side-link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms ease;
}
.side-link:hover { background: #eef1f9; }
.side-link.active {
  background: var(--brand);
  color: white;
}
.side-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.side-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.side-section-head h3 { margin: 0; }

/* Collapsible sidebar section (uses <details>/<summary>). The h3 lives
   INSIDE the summary so the existing typography is preserved; the marker
   is custom so we don't get the browser's default twisty. */
.side-collapsible > summary {
  list-style: none;            /* hide default disclosure marker */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  user-select: none;
}
.side-collapsible > summary::-webkit-details-marker { display: none; }
.side-collapsible > summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 11px;
  transition: transform 120ms ease;
  display: inline-block;
}
.side-collapsible[open] > summary::before { transform: rotate(90deg); }
.side-collapsible > summary h3 { margin: 0; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 26px; height: 26px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.icon-btn:hover { background: #eef1f9; color: var(--brand); }
.lab-list { list-style: none; padding: 0; margin: 0; }
.lab-item { font-size: 13px; }
.lab-item.expired { color: #b03a2e; }
.lab-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.lab-meta strong { color: var(--brand); }
.lab-cid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.lab-del {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  color: #b03a2e;
  border-color: #f3c8c0;
}
.lab-del:hover { background: #fff6f4; }
.lab-del.armed { background: #b03a2e; color: white; border-color: #b03a2e; }
.lab-del.armed:hover { background: #922d24; }

/* Lab-detail page-as-card UI: full-width primary actions + back link. */
.back-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--brand); }

.detail-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 16px;
}
.detail-actions .btn { text-align: center; }

.btn.danger {
  background: white;
  color: #b03a2e;
  border-color: #f3c8c0;
}
.btn.danger:hover { background: #fff6f4; }
.btn.danger.armed { background: #b03a2e; color: white; border-color: #b03a2e; }
.btn.danger.armed:hover { background: #922d24; }

.lab-list .lab-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 4px 8px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  text-decoration: none;
  color: var(--fg);
  font-size: 13px;
  transition: background 120ms ease;
}
.lab-list .lab-link:hover { background: #eef1f9; }
.lab-list .lab-link.active { background: #eef1f9; }
.lab-list .lab-link.expired { color: #b03a2e; }
.lab-list .lab-link strong { color: var(--brand); }
.lab-list .lab-link .lab-remaining { font-size: 12px; }
.lab-list .lab-link .lab-arrow { color: var(--muted); font-weight: 600; }
.lab-list .lab-link:hover .lab-arrow { color: var(--brand); }
.lab-list .lab-link .lab-actor {
  grid-column: 1 / -1;
  font-size: 11px;
  line-height: 1.2;
  word-break: break-all;
  margin-top: 2px;
}

@media (max-width: 800px) {
  .launch-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
}

footer {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

/* Admin event-log sidebar pane — compact, terminal-flavoured tail. */
.event-pane {
  background: #0b0e14;
  color: #d6deeb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #1f2a3a;
}
.event-pane .evt {
  display: grid;
  grid-template-columns: 56px 14px 50px 60px 1fr;
  gap: 6px;
  padding: 2px 0;
  white-space: nowrap;
}
.event-pane .evt-msg {
  white-space: normal;
  overflow-wrap: anywhere;
  color: #d6deeb;
}
.event-pane .evt-ts    { color: #5c6b80; }
.event-pane .evt-kind  { text-align: center; }
.event-pane .evt-prov  .evt-kind { color: #7ee2b8; }
.event-pane .evt-td    .evt-kind { color: #f7c948; }
.event-pane .evt-slot  { color: #82aaff; font-weight: 600; }
.event-pane .evt-actor { color: #c792ea; }
.event-pane .evt-warn  .evt-msg { color: #f7c948; }
.event-pane .evt-error .evt-msg { color: #ef6f6c; }

.guide-share-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.guide-share-row input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f7f8fa;
  color: #1f2937;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.guide-share-row .btn { flex: 0 0 auto; }

/* Lab guide rendered markdown (used by /guide.html and the launch
   card's inline render). Cap image height so screenshots don't dominate
   the viewport; click to toggle a full-resolution view. */
.guide-body img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin: 14px auto;
  cursor: zoom-in;
}
.guide-body img.zoomed {
  max-height: none;
  max-width: none;
  width: auto;
  cursor: zoom-out;
}

/* =====================================================================
   Landing-page lab tracks — four big visual tiles, gradient cosmic
   banner with floating colour orbs, white body with title + lede + CTA.
   Inspired by the Nutanix bootcamps layout but rebuilt with pure CSS so
   we ship no extra image assets.
   ===================================================================== */

.lab-tracks {
  margin: 96px 0 32px;
}
.lab-tracks-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.lab-tracks-head h2 {
  font-size: 30px;
  line-height: 1.2;
  color: var(--brand);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.lab-tracks-head p {
  font-size: 17px;
  color: var(--muted);
  margin: 0;
}

.lab-tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.lab-track {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease,
              border-color 180ms ease;
}
.lab-track:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px -18px rgba(11, 36, 113, 0.35);
  border-color: transparent;
}

/* Banner — gradient field with floating coloured orbs and a big title.
   Each track gets a distinct gradient via its banner-* modifier. */
.lab-track-banner {
  position: relative;
  height: 168px;
  overflow: hidden;
  /* default = AI Infrastructure: deep indigo → violet → cyan */
  background:
    radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.55), transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(0, 182, 232, 0.55), transparent 55%),
    linear-gradient(135deg, #0b1023 0%, #1b1b46 55%, #2c1361 100%);
}
.lab-track-banner.banner-mgmt {
  background:
    radial-gradient(circle at 75% 25%, rgba(34, 197, 94, 0.55), transparent 60%),
    radial-gradient(circle at 18% 80%, rgba(0, 182, 232, 0.55), transparent 55%),
    linear-gradient(135deg, #051a23 0%, #0f3b3a 55%, #114b3a 100%);
}
.lab-track-banner.banner-orch {
  background:
    radial-gradient(circle at 75% 30%, rgba(244, 63, 94, 0.55), transparent 60%),
    radial-gradient(circle at 18% 78%, rgba(251, 146, 60, 0.55), transparent 55%),
    linear-gradient(135deg, #1a0418 0%, #3d0f3a 55%, #5a1043 100%);
}
.lab-track-banner.banner-deploy {
  background:
    radial-gradient(circle at 70% 28%, rgba(168, 85, 247, 0.6), transparent 60%),
    radial-gradient(circle at 22% 82%, rgba(59, 130, 246, 0.55), transparent 55%),
    linear-gradient(135deg, #0a0a26 0%, #21125a 55%, #3a1968 100%);
}

/* Floating orbs — big soft blurred circles in the banner gradient.
   Pure decoration; aria-hidden in the markup. */
.lab-track-banner-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lab-track-banner-art .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0.85;
}
.lab-track-banner-art .orb.o1 {
  width: 70px; height: 70px; top: 14%; right: 18%;
  background: radial-gradient(circle, #fff, rgba(255,255,255,0) 70%);
  opacity: 0.7;
}
.lab-track-banner-art .orb.o2 {
  width: 38px; height: 38px; top: 60%; right: 12%;
  background: radial-gradient(circle, #ffd166, rgba(255,209,102,0) 70%);
}
.lab-track-banner-art .orb.o3 {
  width: 26px; height: 26px; top: 78%; right: 30%;
  background: radial-gradient(circle, #ff8db1, rgba(255,141,177,0) 70%);
}
.lab-track-banner-art .orb.o4 {
  width: 16px; height: 16px; top: 28%; right: 38%;
  background: radial-gradient(circle, #93c5fd, rgba(147,197,253,0) 70%);
}

.lab-track-banner-title {
  position: absolute;
  left: 24px;
  bottom: 18px;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
}
.lab-track-banner-sub {
  font-weight: 400;
  font-size: 16px;
  opacity: 0.88;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* Body — title + lede + CTA. */
.lab-track-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.lab-track-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--brand);
}
.lab-track-body p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  flex: 1;
}
.lab-track-cta {
  align-self: flex-start;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.lab-track:hover .lab-track-cta { color: var(--brand); }

/* =====================================================================
   Test Drive-style landing pages (body.landing).
   Dark cosmic hero + white catalogue grid + lab-detail explainer with
   login card. All scoped under .landing so the admin app keeps its
   existing light theme untouched.
   ===================================================================== */

body.landing {
  background: #0c0524;
  color: #e7e3f7;
}

/* --- shared dark-hero geometric shapes ------------------------------- */
.td-shape {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 8px;
  transform: rotate(45deg);
}
.td-shape-1 { width: 480px; height: 480px; top: -160px; right: -120px; }
.td-shape-2 { width: 280px; height: 280px; bottom: -90px; left: -90px;
              border-color: rgba(99, 102, 241, 0.22); }
.td-shape-3 { width: 720px; height: 720px; top: -260px; left: 35%;
              border-color: rgba(168, 85, 247, 0.10); }

/* --- top bar --------------------------------------------------------- */
/* Override the global `header { background: white; border-bottom: ... }`
   so the lab-detail header sits transparently over the dark hero. */
.td-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center;
  padding: 20px 36px;
  z-index: 10;
  background: transparent;
  border-bottom: 0;
}
/* Brand placed directly on the hero (homepage). Same look as .td-bar
   but lives inside .td-hero so we don't need a separate <header>. */
.td-brand-on-hero {
  position: absolute;
  top: 28px; left: 36px;
  z-index: 10;
}
.td-brand {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none; color: #fff;
  font-weight: 600; letter-spacing: 0.02em;
}
.td-brand-sep {
  color: rgba(255,255,255,0.35);
  font-weight: 300;
  font-size: 18px;
}
.td-brand-product {
  font-size: 15px;
  letter-spacing: 0.04em;
}

/* --- hero (homepage) ------------------------------------------------- */
.td-hero {
  position: relative;
  background: linear-gradient(135deg, #0c0524 0%, #1a0a3a 60%, #2a0e52 100%);
  overflow: hidden;
  padding: 120px 36px 96px;
}

/* Top-right "Log in" pill on the public hero. Routes to /login without
   a lab id, mirroring the employee path on /portal-emp — after auth
   the customer lands on /portal-customer with no auto-claim and picks
   a lab from the catalogue below. Sits in the same top zone as the
   td-brand-on-hero anchor on the opposite side. */
.td-hero-login {
  position: absolute;
  top: 36px;
  right: 36px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 160ms ease, border-color 160ms ease;
}
.td-hero-login:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}
.td-hero-art {
  position: absolute; inset: 0; pointer-events: none;
}
.td-hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.td-hero-counter {
  color: #a78bfa;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.td-hero-title {
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0 0 22px;
  font-weight: 700;
}
.td-hero-lede {
  color: rgba(231, 227, 247, 0.78);
  font-size: 17px;
  line-height: 1.55;
  max-width: 520px;
  margin: 0 0 32px;
}
.td-hero-lede code {
  background: rgba(139, 92, 246, 0.18);
  color: #ddd6fe;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
}
.td-cta {
  display: inline-block;
  background: #8b5cf6;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  transition: background 140ms ease, transform 140ms ease;
}
.td-cta:hover { background: #7c3aed; transform: translateY(-1px); }

.td-hero-right .td-quote {
  color: rgba(231, 227, 247, 0.82);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 22px;
  font-style: italic;
}
.td-quote-attrib {
  color: rgba(231, 227, 247, 0.6);
  font-size: 13px;
}
.td-quote-attrib strong {
  display: block;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  margin-bottom: 2px;
  font-style: normal;
}

/* --- catalogue (white section under hero) ---------------------------- */
.td-catalogue {
  background: #f5f4fb;
  padding: 56px 36px 96px;
}

.td-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto 48px;
}
.td-search input {
  width: 100%;
  padding: 13px 18px 13px 44px;
  border: 1px solid #e2dff0;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  color: #1f1645;
  outline: none;
}
.td-search input:disabled { background: #fff; color: #9b94b8; cursor: not-allowed; }
.td-search-icon {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  color: #9b94b8;
  display: inline-flex;
}

.td-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.td-tile {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 26px 24px 22px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  transition: transform 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}
.td-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 38px -22px rgba(76, 29, 149, 0.45);
}

/* Featured tile — used today for the Dell Tech World joint-demo lab
   in the vendor-dell portal. Subtle Dell-blue accent: thicker tinted
   border + soft outer glow + a hint of background wash so the card
   reads as "the special one" without screaming. Activated by adding
   `is-featured` to the card root (renderActiveTiles in portal.html). */
.td-tile.is-featured {
  border: 1.5px solid rgba(0, 125, 184, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 125, 184, 0.18),
              0 10px 28px -16px rgba(0, 125, 184, 0.55);
  background: linear-gradient(180deg, #f5fbff 0%, #fff 60%);
}
.td-tile.is-featured:hover {
  box-shadow: 0 0 0 1px rgba(0, 125, 184, 0.28),
              0 22px 38px -22px rgba(0, 125, 184, 0.7);
}

/* Corner badge (e.g. DTW 2026 mark) on the featured tile. Top-right,
   sized small enough to feel like a stamp, not a logo. */
.td-tile-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  pointer-events: none;
  z-index: 1;
}
.td-tile h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #15083d;
  font-weight: 700;
  line-height: 1.3;
}
.td-tile-sub {
  margin: 0 0 14px;
  color: #5a517a;
  font-size: 13.5px;
  line-height: 1.45;
}
.td-tile-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.td-tile-tags span {
  background: #f0eef9;
  color: #5a4f8a;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.td-tile-body {
  margin: 0 0 18px;
  font-size: 13px;
  color: #6a648a;
  line-height: 1.55;
  flex: 1;
}
.td-tile-launch {
  color: #8b5cf6;
  font-weight: 600;
  font-size: 13px;
  align-self: flex-start;
  letter-spacing: 0.01em;
}
.td-tile:hover .td-tile-launch { color: transparent; }
.td-tile-hover-cta {
  position: absolute;
  bottom: 18px; left: 24px;
  background: #8b5cf6;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}
.td-tile:hover .td-tile-hover-cta {
  opacity: 1;
  transform: translateY(0);
}

/* Coming-soon variant — kept visible but de-emphasised. */
.td-tile.is-soon {
  background: #fafaff;
  cursor: not-allowed;
}
.td-tile.is-soon:hover { transform: none; box-shadow: none; }
.td-tile.is-soon h3,
.td-tile.is-soon .td-tile-sub,
.td-tile.is-soon .td-tile-body { opacity: 0.55; }
/* Pill sits at the top of the tile in normal flow — keeps it from
   overlapping the heading text on narrower tiles. */
.td-tile-pill {
  display: inline-block;
  align-self: flex-start;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* --- lab detail page (lab.html) ------------------------------------- */
.td-detail {
  position: relative;
  background: linear-gradient(135deg, #0c0524 0%, #190834 60%, #260c4f 100%);
  min-height: calc(100vh - 76px);
  overflow: hidden;
  padding: 120px 36px 80px;
}
.td-detail-art {
  position: absolute; inset: 0; pointer-events: none;
}
.td-detail-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.td-detail-h1 {
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 24px;
  font-weight: 700;
}
.td-detail-lede {
  color: rgba(231, 227, 247, 0.78);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 36px;
  max-width: 560px;
}
.td-detail-divider {
  height: 1px;
  width: 80px;
  background: rgba(167, 139, 250, 0.5);
  margin: 0 0 22px;
}
.td-detail-eyebrow {
  color: #a78bfa;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.td-detail-h2 {
  font-size: 28px;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.td-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  max-width: 560px;
}
.td-checklist li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 14px;
  color: rgba(231, 227, 247, 0.85);
  font-size: 15px;
  line-height: 1.55;
}
.td-checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #8b5cf6 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/14px no-repeat;
}
.td-detail-fineprint {
  color: rgba(231, 227, 247, 0.6);
  font-size: 13.5px;
  margin: 0;
}

/* --- login card on the right ---------------------------------------- */
.td-login-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px;
  color: #1f1645;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6);
}
/* "Hello," + "Welcome to ClearML Hands-On Labs." render as a single
   visual heading: same size, weight, and colour. The trailing comma
   on "Hello," does the soft separation. */
.td-login-hello,
.td-login-welcome {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #15083d;
}
.td-login-hello { margin-bottom: 4px; }
.td-login-welcome { margin-bottom: 28px; }
.td-login-form { display: flex; flex-direction: column; }
/* Browsers default `hidden` to `display: none`, but our `display: flex`
   above wins and the form stays visible. Force the contract back. */
.td-login-form[hidden] { display: none; }
.td-login-form label {
  font-size: 13px;
  font-weight: 600;
  color: #15083d;
  margin-bottom: 8px;
}
.td-login-form input {
  padding: 12px 14px;
  border: 1px solid #d8d4ee;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
  outline: none;
}
.td-login-form input:focus { border-color: #8b5cf6; }
.td-btn-disabled {
  background: #c7c2dd;
  color: #fff;
  /* transparent 1px border (not `border: 0`) so disabled and primary
     buttons have identical box-model height — toggling one for the
     other doesn't shift the layout below by 2px. */
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 0;
  font-weight: 600;
  font-size: 14px;
  cursor: not-allowed;
  margin-bottom: 14px;
}
.td-btn-primary {
  background: #fff;
  color: #15083d;
  border: 1px solid #15083d;
  border-radius: 999px;
  padding: 13px 0;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  transition: background 140ms ease, color 140ms ease;
}
.td-btn-primary:hover { background: #15083d; color: #fff; }
/* Match the 14px gap that td-btn-disabled provides, so when the form's
   submit button flips disabled → primary the spacing to siblings below
   doesn't collapse. Scoped to the login form so it doesn't bleed into
   other primary-button placements (e.g. the active-card buttons in
   portal.html which want their own spacing). */
.td-login-form .td-btn-primary { margin-bottom: 14px; }
.td-btn-google {
  background: #fff;
  color: #15083d;
  border: 1px solid #dadce0;
  border-radius: 999px;
  padding: 13px 0;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 140ms ease, border-color 140ms ease;
}
.td-btn-google:hover { background: #f8f7fb; border-color: #15083d; }

/* Small employee-SSO escape hatch under the customer login card.
   Typography matches the form label (.td-login-form label): same
   13px / 600 / #15083d so it reads as part of the form's design
   system rather than a default browser blue link. No underline at
   rest, subtle underline on hover so the affordance is still clear. */
.td-login-emp {
  display: block;
  margin: 16px 0 0;
  text-align: center;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #15083d;
  text-decoration: none;
}
.td-login-emp:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- signup card (customer self-registration) -----------------------
   Same dark-hero / white-card pattern as the login card on lab.html,
   sized for the longer form. Field group uses gap stacking instead of
   per-element margins so adding/removing rows doesn't drift. */
.td-signup-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 32px 24px;
  color: #1f1645;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6);
  width: 420px;
  max-width: 100%;
}
.td-signup-h {
  margin: 0 0 22px;
  font-size: 20px;
  font-weight: 700;
  color: #15083d;
}
.td-signup-form { display: flex; flex-direction: column; gap: 14px; }
.td-field { display: flex; flex-direction: column; }
.td-field label {
  font-size: 13px;
  font-weight: 600;
  color: #15083d;
  margin-bottom: 6px;
}
.td-field input,
.td-field select {
  padding: 11px 14px;
  border: 1px solid #d8d4ee;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #1f1645;
  outline: none;
  font-family: inherit;
}
.td-field input:focus,
.td-field select:focus { border-color: #8b5cf6; }
.td-signup-form .td-btn-primary { margin-top: 8px; }
.td-signup-legal {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #6a648a;
}
.td-signup-legal a { color: #6d4cff; text-decoration: none; }
.td-signup-legal a:hover { text-decoration: underline; }
.td-signup-back {
  margin-top: 16px;
  background: transparent;
  border: 0;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #15083d;
  cursor: pointer;
}
.td-signup-back:hover { color: #6d4cff; }

/* --- access-code row (login.html) -----------------------------------
   Sits above the OTP input — label on the left, "Resend in 30s" link
   on the right. Resend doubles as the cooldown timer; while it's
   counting down it's disabled and muted, then it flips to an actionable
   purple link once the timer hits zero. */
.td-code-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 4px;
}
.td-code-row label {
  font-size: 13px;
  font-weight: 600;
  color: #15083d;
  margin-bottom: 8px;
}
.td-code-resend {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #6d4cff;
  cursor: pointer;
}
.td-code-resend.is-cooling { color: #b8b1d4; cursor: default; }
.td-code-resend:hover:not(.is-cooling):not(:disabled) { text-decoration: underline; }

.td-login-note {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: #6a648a;
}

/* --- footer ---------------------------------------------------------- */
.td-footer {
  background: #f5f4fb;
  color: #6a648a;
  padding: 24px 36px;
  text-align: center;
  font-size: 12.5px;
  border-top: 1px solid #e2dff0;
}
.td-footer.dark {
  background: #07021a;
  color: rgba(231, 227, 247, 0.5);
  border-top: 0;
}

/* --- responsive collapses ------------------------------------------- */
@media (max-width: 880px) {
  .td-hero-inner,
  .td-detail-inner { grid-template-columns: 1fr; gap: 36px; }
  .td-hero-title   { font-size: 36px; }
  .td-detail-h1    { font-size: 28px; }
}

/* =====================================================================
   Customer dashboard (portal.html, body.landing.portal).
   Dark top bar + light content area, mimicking Test Drive's
   logged-in dashboard. Reuses .td-tile from the public catalogue.
   ===================================================================== */

body.landing.portal {
  background: #f4f4f9;
  color: #15083d;
}

.td-portal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 36px;
  background: #0e0526;
  border-bottom: 0;
}
.td-portal-bar .td-brand { color: #fff; }
.td-portal-bar-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #c9bff5;
  font-size: 13.5px;
}
.td-portal-user { font-weight: 500; }
.td-portal-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: #c9bff5;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}
.td-portal-logout:hover { border-color: #a78bfa; color: #fff; }

.td-portal-welcome {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 36px 24px;
}

/* Two-column row: active-lab card on the left, "Featured Lab" tile
   on the right (same shape as the catalogue cards below). Audience
   YAML decides what goes in the featured slot via
   `branding.featured_recipe`; for vendor audiences the cobrand lockup
   embeds at the top of that tile (.td-tile-cobrand). */
.td-portal-active-row {
  display: flex;
  align-items: stretch;
  gap: 22px;
}
.td-portal-active-row > .td-active-card {
  flex: 1 1 auto;
  min-width: 0;
}
.td-featured-tile {
  flex: 0 0 320px;
  margin: 0;
}
/* Small label above the title — "Suggested Lab" / "Featured for Dell
   Tech World" etc. Audience YAML drives the copy via
   `branding.featured_label`. */
.td-tile-featured-label {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand, #0b2471);
  opacity: 0.85;
}
/* Cobrand strip inside the featured tile (ClearML × Dell Technologies). */
.td-tile-cobrand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 0 14px;
  margin: 0 0 12px;
  border-bottom: 1px dashed rgba(15, 8, 61, 0.12);
}
.td-tile-cobrand-img {
  height: 24px;
  width: auto;
  max-width: 120px;
  display: block;
}
.td-tile-cobrand-sep {
  font-size: 16px;
  font-weight: 400;
  color: #15083d;
  opacity: 0.55;
  line-height: 1;
}
@media (max-width: 900px) {
  /* Stack vertically on narrow viewports — featured tile drops below
     the active-lab card rather than fighting it for horizontal space. */
  .td-portal-active-row {
    flex-direction: column;
  }
  .td-featured-tile {
    flex: 1 1 auto;
  }
}
.td-portal-welcome h1 {
  font-size: 32px;
  line-height: 1.18;
  margin: 0 0 14px;
  color: #15083d;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.td-portal-welcome > p {
  margin: 0 0 28px;
  color: #57506e;
  font-size: 16px;
  max-width: 640px;
}
.td-portal-section-h {
  font-size: 15px;
  font-weight: 600;
  color: #15083d;
  margin: 8px 0 14px;
  letter-spacing: 0.01em;
}
.td-portal-section-h #active-count {
  font-weight: 400;
  color: #6a648a;
  font-size: 14px;
}

/* --- Active lab card -------------------------------------------------- */
.td-active-card {
  background: #fff;
  border: 1px solid #e1ddee;
  border-radius: 12px;
  padding: 22px 24px;
  max-width: 560px;
  box-shadow: 0 6px 22px -18px rgba(76, 29, 149, 0.35);
}
.td-active-card-head { margin-bottom: 14px; }
.td-active-card-head strong {
  display: block;
  font-size: 16px;
  color: #15083d;
  margin-bottom: 4px;
}
.td-active-sub {
  font-size: 13px;
  color: #8b5cf6;
  text-decoration: none;
}
.td-active-sub:hover { text-decoration: underline; }
.td-active-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #57506e;
  margin-bottom: 16px;
}
.td-active-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #c4b5fd;
  animation: td-pulse 1.4s ease-in-out infinite;
}
.td-active-dot.ok      { background: #16a34a; animation: none; }
.td-active-dot.err     { background: #dc2626; animation: none; }
.td-active-dot.pending { background: #c4b5fd; }
.td-active-dot.idle    { background: #c7c2d8; animation: none; }
@keyframes td-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
.td-active-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.td-btn-primary[disabled],
.td-btn-secondary[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}
.td-btn-secondary {
  background: #fff;
  color: #15083d;
  border: 1px solid #15083d;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.td-btn-secondary:hover:not([disabled]) { background: #15083d; color: #fff; }
.td-btn-ghost {
  background: transparent;
  color: #6b3f3f;
  border: 1px solid #e9d3d3;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}
.td-btn-ghost:hover { border-color: #c0392b; color: #c0392b; }
.td-active-card .td-btn-primary {
  padding: 10px 20px;
  font-size: 13px;
}

/* Creds accordion. The outer <details> is just a container; the inner
   .td-active-creds-body holds the URL / username / password grid. Keep
   the card short by default — body only renders when the user expands
   via the summary row. */
.td-active-creds {
  margin-top: 16px;
  border-top: 1px dashed #e2dff0;
  padding-top: 10px;
  font-size: 13px;
}
.td-active-creds-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  list-style: none;            /* drop default disclosure triangle (Firefox/Safari) */
  font-weight: 600;
  font-size: 13px;
  color: #15083d;
  user-select: none;
}
.td-active-creds-summary::-webkit-details-marker { display: none; }   /* Chrome */
.td-active-creds-summary:hover { color: var(--brand, #0b2471); }
.td-chevron {
  transition: transform 160ms ease;
  color: #6a648a;
}
.td-active-creds[open] .td-chevron { transform: rotate(180deg); }

.td-active-creds-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.td-active-creds-body > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 8px;
}
.td-active-creds-body span {
  color: #6a648a;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.td-active-creds-body strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  font-size: 12.5px;
  color: #15083d;
}
.td-active-creds-body a { color: #15083d; text-decoration: none; }
.td-active-creds-body a:hover { text-decoration: underline; }

/* --- Catalogue heading + Launch button on tile ----------------------- */
body.landing.portal .td-catalogue {
  background: transparent;
  padding: 24px 36px 80px;
}
.td-catalogue-h {
  max-width: 1200px;
  margin: 0 auto 16px;
  font-size: 16px;
  color: #15083d;
  font-weight: 600;
}

.td-tile-customer .td-btn-launch {
  background: #8b5cf6;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 4px;
  transition: background 140ms ease;
}
.td-tile-customer .td-btn-launch:hover:not([disabled]) { background: #7c3aed; }
.td-tile-customer .td-btn-launch[disabled] {
  background: #cdc2eb;
  cursor: not-allowed;
}

/* --- Hero carousel: "Trending labs" label + prev/next chevrons ------- */

.td-hero-section-label {
  position: absolute;
  top: 86px; left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(231, 227, 247, 0.7);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-style: italic;
  z-index: 5;
}
.td-hero-section-label::before,
.td-hero-section-label::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: rgba(167, 139, 250, 0.4);
  vertical-align: middle;
  margin: 0 12px;
}

.td-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  color: rgba(231, 227, 247, 0.55);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;
  cursor: pointer;
  z-index: 6;
  transition: background 140ms ease, color 140ms ease,
              border-color 140ms ease;
}
.td-hero-nav:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.45);
  color: #fff;
}
.td-hero-nav:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}
.td-hero-nav-prev { left: 22px; }
.td-hero-nav-next { right: 22px; }

/* The "Coming soon" affordance on the GPUaaS slide CTA — same shape as
   the active CTA but visually de-emphasised and not interactive. */
.td-cta.td-cta-soon {
  background: rgba(255,255,255,0.08);
  color: rgba(231, 227, 247, 0.6);
  cursor: not-allowed;
  pointer-events: none;
}
.td-cta.td-cta-soon:hover { background: rgba(255,255,255,0.08); transform: none; }

@media (max-width: 720px) {
  .td-hero-nav-prev { left: 8px; }
  .td-hero-nav-next { right: 8px; }
  .td-hero-section-label { top: 70px; }
}

/* --- "Schedule a guided demo" link below the login card on /lab.html
       and the demo-page form layout. ---------------------------------- */
.td-login-aside {
  margin: 18px 0 0;
  text-align: center;
}
.td-login-aside a {
  color: #c4b5fd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.td-login-aside a:hover { color: #fff; text-decoration: underline; }

.td-demo-form {
  display: flex;
  flex-direction: column;
}
.td-demo-form label {
  font-size: 13px;
  font-weight: 600;
  color: #15083d;
  margin-bottom: 6px;
}
.td-demo-form input,
.td-demo-form textarea {
  padding: 10px 12px;
  border: 1px solid #d8d4ee;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 14px;
  outline: none;
  resize: vertical;
}
.td-demo-form input:focus,
.td-demo-form textarea:focus { border-color: #8b5cf6; }
.td-demo-form .td-btn-primary {
  width: 100%;
  padding: 13px 0;
  font-size: 14px;
  margin-top: 4px;
}

.td-demo-thanks {
  text-align: center;
  padding: 12px 0;
}
.td-demo-thanks strong {
  display: block;
  font-size: 18px;
  color: #15083d;
  margin-bottom: 8px;
}
.td-demo-thanks p {
  color: #57506e;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.td-demo-thanks .td-btn-secondary {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}
