/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --tokamak-bg: #f3eee6;
  --tokamak-panel: #ffffff;
  --tokamak-border: #e4dbcf;
  --tokamak-text: #2d241d;
  --tokamak-muted: #8a7c6e;
  --tokamak-green: #4b7e3a;
  --tokamak-green-bg: #d6e5c5;
  --tokamak-amber: #a06f18;
  --tokamak-amber-bg: #f7e7ae;
  --tokamak-red: #d86159;
  --tokamak-red-bg: #f5d4cf;
  --tokamak-blue: #7ea2d8;
  --tokamak-blue-bg: #d9e5f5;
  --tokamak-lilac: #d9c9e7;
  --tokamak-ink: #2b211a;
  --font-sans: "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--tokamak-bg);
  color: var(--tokamak-text);
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.flash {
  margin: 0 auto 16px;
  max-width: 1132px;
  border: 1px solid var(--tokamak-border);
  border-radius: 18px;
  background: var(--tokamak-panel);
  padding: 12px 14px;
}

.dashboard-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  border-right: 1px dashed var(--tokamak-border);
  padding: 28px 20px;
}

.app-content-shell {
  position: relative;
  min-width: 0;
  padding: 24px 22px 0;
}

.app-content-shell::before {
  content: "";
  position: sticky;
  z-index: 24;
  top: 0;
  display: block;
  height: 112px;
  margin-bottom: -112px;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      var(--tokamak-bg) 0%,
      rgba(243, 238, 230, 0.99) 58%,
      rgba(243, 238, 230, 0.78) 78%,
      rgba(243, 238, 230, 0) 100%
    );
}

.app-content-shell-with-area-nav::before {
  height: 174px;
  margin-bottom: -174px;
  background:
    linear-gradient(
      180deg,
      var(--tokamak-bg) 0%,
      rgba(243, 238, 230, 0.99) 64%,
      rgba(243, 238, 230, 0.88) 82%,
      rgba(243, 238, 230, 0) 100%
    );
}

.app-main {
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tokamak-text);
  font-size: 1.55rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.workspace-switcher {
  position: relative;
  margin-top: 28px;
}

.workspace-switcher > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  border-radius: 18px;
  background: #ebe3d8;
  cursor: pointer;
  list-style: none;
  padding: 15px 16px;
}

.workspace-switcher > summary::-webkit-details-marker {
  display: none;
}

.workspace-label {
  grid-column: 1 / -1;
  color: var(--tokamak-muted);
  font-size: 0.72rem;
}

.workspace-switcher strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.workspace-switcher > summary svg {
  width: 14px;
  height: 14px;
  color: var(--tokamak-muted);
  transition: transform 140ms ease;
}

.workspace-switcher[open] > summary svg {
  transform: rotate(180deg);
}

.workspace-menu {
  position: absolute;
  z-index: 40;
  right: 0;
  left: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 4px;
  border: 1px solid var(--tokamak-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  padding: 10px;
  box-shadow: 0 16px 36px rgba(45, 36, 29, 0.14);
}

.workspace-menu-label {
  padding: 2px 8px 6px;
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.workspace-area-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  border-radius: 999px;
  color: var(--tokamak-text);
  padding: 7px 9px;
  text-decoration: none;
}

.workspace-area-link:hover,
.workspace-area-link-active {
  background: var(--tokamak-ink);
  color: #ffffff;
}

.workspace-area-link svg {
  width: 14px;
  height: 14px;
}

.app-side-nav {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.app-side-section h2 {
  margin: 0 0 9px 14px;
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.app-side-section-active h2 {
  color: var(--tokamak-red);
}

.app-side-links {
  display: grid;
  gap: 4px;
}

.app-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  border-radius: 999px;
  color: var(--tokamak-text);
  padding: 7px 12px;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.app-side-link:hover,
.app-side-link-active {
  background: var(--tokamak-ink);
  color: #ffffff;
}

.app-side-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e7ded2;
  color: var(--tokamak-ink);
  flex: 0 0 auto;
}

.app-side-link-active .app-side-link-icon,
.app-side-link:hover .app-side-link-icon {
  background: var(--tokamak-red);
  color: #ffffff;
}

.app-side-link-icon svg {
  width: 12px;
  height: 12px;
}

.app-sidebar-note {
  margin: auto 0 0;
  border-radius: 16px;
  background: var(--tokamak-green-bg);
  color: var(--tokamak-text);
  padding: 14px 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.25;
}

.app-topbar {
  position: sticky;
  z-index: 30;
  top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1084px;
  min-height: 62px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 24px;
  backdrop-filter: blur(14px);
}

.app-context-pill,
.app-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.app-context-pill {
  gap: 10px;
  min-width: 0;
}

.app-context-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tokamak-amber-bg);
  color: var(--tokamak-text);
}

.app-context-icon svg {
  width: 14px;
  height: 14px;
}

.app-breadcrumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.app-breadcrumbs a,
.app-breadcrumbs span {
  color: var(--tokamak-text);
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-breadcrumbs a {
  color: var(--tokamak-muted);
}

.app-breadcrumbs a:hover {
  color: var(--tokamak-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.app-breadcrumbs > * + *::before {
  content: "/";
  margin-right: 8px;
  color: var(--tokamak-muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

.app-context-pill time {
  border-radius: 999px;
  background: var(--tokamak-lilac);
  color: #6c5879;
  padding: 5px 11px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.app-user,
.session-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.app-user {
  gap: 16px;
  justify-content: flex-end;
  color: var(--tokamak-muted);
  font-size: 0.86rem;
}

.app-help-link {
  color: var(--tokamak-muted);
  text-decoration: none;
}

.app-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--tokamak-red);
  color: #ffffff;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.app-area-nav-frame {
  display: flex;
  position: sticky;
  z-index: 28;
  top: 94px;
  max-width: 1084px;
  margin: -16px auto 14px;
  border: 1px solid rgba(216, 207, 194, 0.74);
  border-radius: 999px;
  background: rgba(248, 244, 238, 0.96);
  padding: 6px;
  box-shadow: 0 8px 22px rgba(45, 36, 29, 0.06);
}

.app-area-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  overflow: visible;
  scrollbar-width: none;
}

.app-area-nav::-webkit-scrollbar {
  display: none;
}

.app-area-link {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--tokamak-text);
  padding: 6px 10px;
  font-size: 0.84rem;
  line-height: 1.15;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(45, 36, 29, 0.06);
}

.app-area-link:hover,
.app-area-link-active {
  background: var(--tokamak-ink);
  color: #ffffff;
}

.app-area-link svg {
  width: 14px;
  height: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1.08;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: relative;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px dashed var(--tokamak-border);
    padding: 20px;
  }

  .app-side-nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .app-sidebar-note {
    margin-top: 22px;
  }

  .app-content-shell {
    padding: 16px 12px 0;
  }

  .app-content-shell::before {
    display: none;
  }

  .app-topbar {
    position: relative;
    top: 0;
    border-radius: 24px;
    padding: 12px 16px;
  }

  .app-area-nav-frame {
    position: relative;
    top: auto;
    margin-top: 0;
    border-radius: 18px;
  }

  .app-area-nav {
    max-height: none;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-sidebar {
    width: 100%;
    padding: 16px 14px;
    overflow: hidden;
  }

  .brand-mark {
    font-size: 1.25rem;
  }

  .brand-mark-icon {
    width: 24px;
    height: 24px;
  }

  .workspace-switcher {
    margin-top: 14px;
  }

  .workspace-switcher > summary {
    border-radius: 16px;
    padding: 10px 12px;
  }

  .workspace-menu {
    position: static;
    margin-top: 8px;
  }

  .workspace-switcher strong {
    font-size: 1rem;
  }

  .app-side-nav {
    display: flex;
    gap: 8px;
    margin: 14px -14px 0;
    overflow-x: auto;
    padding: 0 14px 6px;
    scrollbar-width: none;
  }

  .app-side-nav::-webkit-scrollbar {
    display: none;
  }

  .app-side-section {
    display: contents;
  }

  .app-side-section h2 {
    display: none;
  }

  .app-side-links {
    display: flex;
    gap: 8px;
  }

  .app-side-link {
    min-height: 34px;
    white-space: nowrap;
    padding: 6px 10px;
  }

  .app-sidebar-note {
    display: none;
  }

  .app-topbar {
    margin-bottom: 12px;
    padding: 10px 12px;
  }

  .app-area-nav-frame {
    display: none;
  }

  .app-context-pill time {
    display: none;
  }

  .app-breadcrumbs {
    font-size: 0.98rem;
  }

  .app-user {
    gap: 10px;
  }

  .ui-pulse-hero {
    padding: 20px;
  }

  .ui-pulse-title {
    font-size: 3.15rem;
    line-height: 0.98;
  }

  .ui-pulse-copy {
    font-size: 1rem;
    line-height: 1.4;
  }

  .ui-pulse-metric {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ui-chart-card svg {
    height: 190px;
  }
}

h2 {
  font-weight: 700;
}

.session-actions {
  gap: 14px;
  color: var(--tokamak-muted);
  font-size: 0.9rem;
}

.text-button {
  border: 1px solid var(--tokamak-border);
  border-radius: 0;
  background: var(--tokamak-panel);
  color: var(--tokamak-text);
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: none;
}

.nav-link {
  color: var(--tokamak-text);
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover,
.table-link:hover,
.drilldown-breadcrumbs a:hover {
  text-decoration: underline;
}

.freshness-panel {
  border: 1px solid var(--tokamak-border);
  border-radius: 0;
  background: var(--tokamak-panel);
  padding: 24px;
}

.freshness-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.freshness-summary h2 {
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: var(--tokamak-muted);
}

.freshness-summary p {
  margin-bottom: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.status-dot-ok {
  background: var(--tokamak-green);
}

.status-dot-running {
  background: var(--tokamak-blue);
}

.status-dot-attention,
.status-dot-missing {
  background: var(--tokamak-red);
}

.freshness-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.freshness-card {
  min-width: 0;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  padding: 14px;
}

.freshness-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.freshness-card h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.freshness-card p {
  min-height: 42px;
  margin-bottom: 14px;
  color: var(--tokamak-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.status-pill {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill-ok {
  background: var(--tokamak-green-bg);
  color: var(--tokamak-green);
}

.status-pill-running {
  background: var(--tokamak-blue-bg);
  color: var(--tokamak-blue);
}

.status-pill-attention {
  background: var(--tokamak-red-bg);
  color: var(--tokamak-red);
}

.status-pill-missing {
  background: var(--tokamak-amber-bg);
  color: var(--tokamak-amber);
}

.status-pill-neutral {
  background: var(--tokamak-blue-bg);
  color: #506f9d;
}

.freshness-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.freshness-card dt {
  color: var(--tokamak-muted);
  font-size: 0.75rem;
}

.freshness-card dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.admin-section {
  margin-top: 18px;
}

.admin-freshness-region {
  background: #fffaf4;
}

.admin-freshness-region .freshness-summary {
  margin-bottom: 0;
}

.admin-freshness-region .freshness-summary h2 {
  color: var(--tokamak-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-freshness-region .freshness-summary p {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.2;
}

.search-panel,
.search-results {
  margin-top: 18px;
}

.search-panel {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
  padding: 18px;
}

.search-form {
  display: grid;
  gap: 12px;
}

.search-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-input,
.search-select {
  width: 100%;
  border: 1px solid var(--tokamak-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--tokamak-text);
}

.search-input {
  padding: 10px 12px;
}

.search-select {
  min-width: 180px;
  padding: 8px 10px;
}

.search-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.search-filter-row label {
  display: grid;
  gap: 5px;
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.primary-button {
  border-color: var(--tokamak-text);
  background: var(--tokamak-text);
  color: #ffffff;
}

.search-error {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  border: 1px solid #f1b7b1;
  border-radius: 8px;
  background: #fff7f6;
  color: var(--tokamak-red);
  padding: 13px 15px 13px 18px;
  box-shadow: inset 4px 0 0 var(--tokamak-red);
}

.result-summary {
  margin-bottom: 12px;
  color: var(--tokamak-muted);
}

.result-summary strong {
  color: var(--tokamak-text);
}

.result-card {
  position: relative;
  border: 1px solid #d7d7d0;
  border-radius: 8px;
  background: var(--tokamak-panel);
  padding: 15px 16px 16px 18px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--tokamak-blue);
}

.result-card + .result-card {
  margin-top: 12px;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.result-header h2 {
  margin-bottom: 4px;
  font-size: 1rem;
  line-height: 1.3;
}

.result-header p,
.result-url {
  margin-bottom: 0;
  color: var(--tokamak-muted);
  font-size: 0.84rem;
}

.result-header p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.result-header p span,
.result-header p time {
  border-radius: 999px;
  background: #f1f1ed;
  padding: 2px 7px;
}

.score-pill {
  border-radius: 999px;
  background: var(--tokamak-blue-bg);
  color: var(--tokamak-blue);
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
}

.result-snippet {
  margin: 12px 0;
  color: #333333;
  font-size: 0.94rem;
  line-height: 1.5;
}

.result-url {
  overflow-wrap: anywhere;
}

.tag-groups {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.tag-group {
  display: grid;
  gap: 6px;
}

.tag-group > span {
  color: var(--tokamak-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tag-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.metadata-tag {
  border-radius: 999px;
  background: #eeeeea;
  color: #333333;
  font-size: 0.78rem;
  padding: 4px 8px;
}

.empty-state {
  border: 1px dashed var(--tokamak-border);
  border-radius: 8px;
  color: var(--tokamak-muted);
  padding: 22px;
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--tokamak-muted);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.resource-card {
  display: grid;
  min-height: 160px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
  color: var(--tokamak-text);
  padding: 14px;
  text-decoration: none;
}

.resource-card:hover {
  border-color: var(--tokamak-blue);
}

.resource-title {
  font-weight: 700;
}

.resource-description,
.resource-sync {
  color: var(--tokamak-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.resource-meta {
  align-self: end;
  color: var(--tokamak-muted);
}

.resource-meta strong {
  color: var(--tokamak-text);
  font-size: 1.25rem;
}

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

.metric-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-summary-grid article,
.drilldown-card {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  padding: 14px;
}

.metric-summary-grid strong {
  display: block;
  font-size: 1.45rem;
}

.metric-summary-grid span,
.data-table small,
.metric-list span,
.metric-tree span {
  color: var(--tokamak-muted);
  font-size: 0.82rem;
}

.control-plane-summary {
  margin-bottom: 24px;
}

.control-plane-summary strong {
  min-height: 32px;
}

.control-plane-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-bottom: 24px;
}

.control-plane-resources {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-plane-sidebar {
  align-self: stretch;
}

.signal-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.signal-list div {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--tokamak-border);
  padding-top: 12px;
}

.signal-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.signal-list dt {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.signal-list dd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.support-tools-panel {
  margin-top: 24px;
}

.data-table-shell {
  overflow-x: auto;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--tokamak-border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.data-table small {
  display: block;
  margin-top: 4px;
}

.matrix-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.matrix-table th,
.matrix-table td {
  min-width: 160px;
}

.ln-hero {
  align-items: flex-start;
}

.ln-hero .muted-copy {
  max-width: 760px;
  margin: 10px 0 0;
}

.ln-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ln-status-frame {
  display: block;
}

.ln-summary-card,
.ln-panel,
.ln-source-card,
.ln-article-card {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 22px rgba(17, 17, 17, 0.025);
}

.ln-summary-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 15px;
  overflow: hidden;
}

.ln-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #d6e5df;
}

.ln-summary-card span,
.ln-summary-card small,
.ln-card-kicker,
.ln-source-stats dt,
.ln-audit-grid dt,
.ln-article-meta,
.ln-audit-timestamp {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.ln-summary-card strong {
  align-self: end;
  font-size: 1.65rem;
  line-height: 1;
}

.ln-panel {
  overflow: hidden;
  padding: 16px;
}

.ln-panel + .ln-panel {
  margin-top: 18px;
}

.ln-source-list,
.ln-article-list {
  display: grid;
  gap: 12px;
}

.ln-source-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 15px 16px 15px 18px;
}

.ln-source-card::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--tokamak-blue);
}

.ln-source-main,
.ln-source-actions,
.ln-article-header,
.ln-pagination {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ln-source-main h3,
.ln-article-header h3 {
  margin: 6px 0 0;
  font-size: 1.04rem;
  line-height: 1.35;
}

.ln-card-kicker code,
.ln-hero code {
  border-radius: 999px;
  background: #f1f1ed;
  color: var(--tokamak-text);
  padding: 2px 7px;
  overflow-wrap: anywhere;
}

.ln-source-stats,
.ln-audit-grid {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ln-source-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #e7e7df;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 10px 12px;
}

.ln-source-stats dd,
.ln-audit-grid dd {
  margin: 3px 0 0;
  font-weight: 700;
}

.ln-source-actions {
  justify-content: flex-start;
}

.ln-ad-hoc-panel {
  margin-bottom: 18px;
}

.ln-ad-hoc-form {
  display: grid;
  gap: 12px;
}

.ln-ad-hoc-form label {
  display: grid;
  gap: 6px;
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.ln-ad-hoc-form .ln-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--tokamak-text);
}

.ln-inline-sync-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.ln-inline-sync-form .ln-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tokamak-text);
  font-size: 0.84rem;
  font-weight: 700;
}

.ln-ad-hoc-query {
  min-height: 92px;
  resize: vertical;
}

.ln-ad-hoc-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.ln-source-filter-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.ln-source-filter-form label {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.ln-source-actions form,
.session-actions form {
  margin: 0;
}

.ln-sync-audit .section-heading {
  align-items: center;
}

.ln-audit-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ln-query-details {
  margin-top: 16px;
}

.ln-query-details summary,
.ln-raw-data summary {
  cursor: pointer;
  color: var(--tokamak-text);
  font-weight: 700;
}

.ln-query-details pre,
.ln-raw-data pre {
  overflow-x: auto;
  border: 1px solid var(--tokamak-border);
  background: #f2f2ee;
  padding: 12px;
  white-space: pre-wrap;
}

.ln-error-copy {
  margin: 14px 0 0;
  color: var(--tokamak-red);
}

.ln-article-card {
  padding: 16px;
}

.ln-article-card + .ln-article-card {
  margin-top: 0;
}

.ln-article-header {
  margin-bottom: 10px;
}

.ln-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.ln-article-header h3 a {
  color: var(--tokamak-text);
}

.ln-article-snippet {
  margin: 0 0 12px;
  color: #333333;
  line-height: 1.5;
}

.ln-source-intel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid #e7e7df;
  background: #fbfbf8;
  padding: 10px 12px;
}

.ln-source-intel dt {
  color: var(--tokamak-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ln-source-intel dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.ln-raw-data {
  margin-top: 12px;
}

.full-text-panel {
  margin: 12px 0;
}

.ui-full-text-panel.full-text-panel {
  margin: 0;
  border-radius: 8px;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.ui-full-text-panel.full-text-panel[open] {
  border: 0;
  background: #fbfaf8;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(216, 207, 194, 0.8), inset 0 -1px 0 rgba(216, 207, 194, 0.65);
}

.full-text-panel summary {
  cursor: pointer;
  color: var(--tokamak-text);
  font-weight: 700;
}

.ui-full-text-panel.full-text-panel[open] summary {
  border-bottom: 1px dashed #d8cfc2;
  padding-bottom: 12px;
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.full-text-content,
.structured-data-shell {
  max-height: 520px;
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--tokamak-border);
  background: #fbfbf8;
  padding: 14px;
}

.full-text-content {
  line-height: 1.55;
}

.ui-full-text-content.full-text-content {
  max-height: 38rem;
  margin-top: 16px;
  overflow: auto;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 4px solid var(--tokamak-lilac);
  background: transparent;
  padding: 4px 16px 4px 20px;
  box-shadow: none;
  color: var(--tokamak-text);
  font-size: 1rem;
  line-height: 2;
}

.ui-full-text-content.full-text-content > * {
  max-width: 62ch;
}

.ui-full-text-content.full-text-content > * + * {
  margin-top: 24px;
}

.ui-full-text-content.full-text-content p {
  margin: 0;
}

.ui-full-text-content.full-text-content p:first-child {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 2;
}

.ui-content-results {
  grid-template-columns: minmax(0, 1fr);
}

.ui-results-summary,
.ui-content-result,
.ui-content-result-header {
  min-width: 0;
}

.ui-content-result,
.ui-content-result-actions {
  grid-template-columns: minmax(0, 1fr);
}

.ui-content-result-actions {
  min-width: 0;
}

.ui-content-result-header h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ui-content-result-long-form {
  border-left: 4px solid #d9625f;
  background: #fffdfb;
}

.ui-content-result-short-form {
  border-left: 4px solid #8faed8;
  background: #fbfdff;
}

.ui-content-result-video {
  border-left: 4px solid #2d241d;
  background: #fbfaf8;
}

.ui-content-result-review {
  border-left: 4px solid #7fa56d;
  background: #fcfdf9;
}

.ui-content-result-document {
  border-left: 4px solid #e1c46b;
  background: #fffdfa;
}

.ui-content-result-body {
  min-width: 0;
}

.ui-content-lineage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ui-content-lineage-link,
.ui-content-lineage-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 32px;
  border: 1px solid #d8cfc2;
  border-radius: 999px;
  background: #ffffff;
  padding: 4px 10px;
  color: var(--tokamak-text);
  font-size: 0.75rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(205, 191, 174, 0.2);
}

.ui-content-lineage-link {
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ui-content-lineage-link:hover {
  border-color: #c9b9a5;
  background: #fffdfb;
}

.ui-content-lineage-link:focus-visible {
  outline: 2px solid var(--tokamak-ink);
  outline-offset: 2px;
}

.ui-content-lineage-link span {
  flex: none;
  color: var(--tokamak-muted);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ui-content-lineage-link strong {
  min-width: 0;
  overflow: hidden;
  color: var(--tokamak-text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-content-lineage-link code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
}

.ui-content-lineage-more {
  color: var(--tokamak-muted);
}

.ui-content-excerpt-lede {
  max-width: 68ch;
  font-family: var(--font-display);
  font-size: 1.04rem;
  line-height: 2;
}

.ui-content-excerpt-document {
  max-width: 80ch;
  border: 1px dashed #d8cfc2;
  border-radius: 6px;
  background: #fbfaf8;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.ui-content-post-frame {
  max-width: 64ch;
  border: 1px solid #d5e1f1;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(184, 203, 227, 0.2);
}

.ui-content-post-frame .ui-content-inline-image {
  display: block;
  width: 100%;
  max-height: 20rem;
  margin-bottom: 12px;
  border-radius: 6px;
  object-fit: cover;
}

.ui-content-post-frame p {
  margin: 0;
  color: var(--tokamak-text);
  font-size: 0.95rem;
  line-height: 1.75;
}

.ui-content-video-frame {
  max-width: 42rem;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(45, 36, 29, 0.15);
  border-radius: 8px;
  background: #2d241d;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(45, 36, 29, 0.15);
}

.ui-content-video-frame-target {
  min-height: 11rem;
  aspect-ratio: 16 / 9;
}

.ui-content-video-load {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 11rem;
  border: 0;
  background: transparent;
  padding: 0;
  color: #ffffff;
  text-align: left;
}

.ui-content-video-load:not(.ui-content-video-load-static) {
  cursor: pointer;
  transition: opacity 150ms ease;
}

.ui-content-video-load:not(.ui-content-video-load-static):hover {
  opacity: 0.9;
}

.ui-content-video-load:not(.ui-content-video-load-static):focus-visible {
  outline: 2px solid #d86159;
  outline-offset: 2px;
}

.ui-content-video-load-with-image {
  position: relative;
  grid-template-columns: 1fr;
}

.ui-content-video-load-with-image .ui-content-inline-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.ui-content-video-play {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 11rem;
  height: 100%;
  background: #d86159;
  color: #ffffff;
}

.ui-content-video-load-with-image .ui-content-video-play {
  position: absolute;
  inset: 0;
  width: 3.5rem;
  height: 3.5rem;
  min-height: 0;
  margin: auto;
  border-radius: 999px;
  background: #d86159;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

.ui-content-video-play svg {
  width: 1.75rem;
  height: 1.75rem;
}

.ui-content-video-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
}

.ui-content-video-load-with-image .ui-content-video-copy {
  align-self: end;
  padding-top: 4rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
}

.ui-content-video-copy > span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ui-content-video-copy strong {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.15;
}

.ui-content-video-copy small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-weight: 700;
}

.ui-content-video-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 11rem;
  border: 0;
}

.ui-content-review-frame {
  max-width: 66ch;
  margin: 0;
  border: 1px solid #d5dfc9;
  border-radius: 8px;
  background: #f7fbf1;
  padding: 12px 16px;
}

.ui-content-review-frame blockquote {
  margin: 0;
  color: var(--tokamak-text);
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-style: italic;
  line-height: 2;
}

.ui-content-review-frame figcaption {
  margin-top: 12px;
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ui-full-text-content.ui-content-reader-long-form {
  border-left-color: #d9625f;
}

.ui-full-text-content.ui-content-reader-short-form {
  border-left-color: #8faed8;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.75;
}

.ui-full-text-content.ui-content-reader-short-form > * {
  max-width: 76ch;
}

.ui-full-text-content.ui-content-reader-short-form > * + * {
  margin-top: 16px;
}

.ui-full-text-content.ui-content-reader-short-form p:first-child {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.75;
}

.ui-full-text-content.ui-content-reader-video {
  border-left-color: #2d241d;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.75;
}

.ui-full-text-content.ui-content-reader-video > * {
  max-width: 78ch;
}

.ui-full-text-content.ui-content-reader-video p:first-child {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.75;
}

.ui-full-text-content.ui-content-reader-review {
  border-left-color: #7fa56d;
}

.ui-full-text-content.ui-content-reader-review p:first-child {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-style: italic;
  line-height: 2;
}

.ui-full-text-content.ui-content-reader-document {
  border-left-color: #e1c46b;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.75;
}

.ui-full-text-content.ui-content-reader-document > * {
  max-width: 80ch;
}

.ui-full-text-content.ui-content-reader-document p:first-child {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.75;
}

.full-text-content p:last-child {
  margin-bottom: 0;
}

.structured-data,
.structured-data-row,
.structured-data-chip-list {
  min-width: 0;
}

.structured-data {
  margin: 0;
}

.structured-data-hash {
  display: grid;
  gap: 4px;
}

.structured-data-row {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(128px, 0.24fr) minmax(0, 1fr);
  column-gap: 12px;
  border-bottom: 1px solid #e7e7df;
  padding: 6px 0;
}

.structured-data-row:last-child {
  border-bottom: 0;
}

.structured-data-row-muted {
  border-bottom: 0;
  padding-bottom: 0;
}

.structured-data-row-section {
  display: block;
  padding: 4px 0;
}

.structured-data-row-section dd {
  display: block;
}

.structured-data dt {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.structured-data dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.structured-data-array {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.structured-data-array > li {
  padding-left: 2px;
}

.structured-data-depth-1,
.structured-data-depth-2,
.structured-data-depth-3,
.structured-data-depth-4 {
  border-left: 2px solid #e7e7df;
  padding-left: 8px;
}

.structured-data-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.structured-data-chip-list > li,
.structured-data-value {
  display: inline-block;
}

.structured-data-chip-list > li {
  max-width: 100%;
  border: 1px solid #e2e2d8;
  border-radius: 999px;
  background: #fff;
  padding: 2px 8px;
  font-size: 0.85rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.structured-data-chip-list-muted > li {
  color: var(--tokamak-muted);
  background: transparent;
}

.structured-data-section {
  border: 1px solid #e4e4dc;
  background: #fff;
}

.structured-data-section + .structured-data-section {
  margin-top: 6px;
}

.structured-data-section > summary {
  cursor: pointer;
  padding: 5px 8px;
  color: var(--tokamak-text);
  font-size: 0.85rem;
  font-weight: 700;
}

.structured-data-section > summary span {
  margin-left: 6px;
  color: var(--tokamak-muted);
  font-weight: 600;
}

.structured-data-section > summary strong + span::before {
  content: "· ";
}

.structured-data-section[open] > summary {
  border-bottom: 1px solid #e7e7df;
  background: #fbfbf8;
}

.structured-data-section > .structured-data-hash {
  padding: 6px 8px;
}

.structured-data-section > .structured-data-array {
  padding: 6px 8px 6px 28px;
}

.structured-data-long-value summary {
  cursor: pointer;
  color: var(--tokamak-text);
}

.structured-data-long-value div {
  margin-top: 6px;
  color: var(--tokamak-muted);
  line-height: 1.45;
}

.structured-data-empty {
  color: var(--tokamak-muted);
  font-style: italic;
}

.ln-pagination {
  align-items: center;
  justify-content: flex-start;
  margin-top: 16px;
  color: var(--tokamak-muted);
}

.table-link {
  color: var(--tokamak-blue);
  font-weight: 700;
  text-decoration: none;
}

.definition-detail-grid,
.split-panels,
.metric-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.definition-detail-grid dl,
.drilldown-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.definition-detail-grid dt,
.drilldown-card dt {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
}

.definition-detail-grid dd,
.drilldown-card dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.definition-inspector {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  gap: 18px;
  align-items: start;
}

.definition-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.definition-summary-grid .ui-stat-card {
  min-width: 0;
}

.definition-summary-grid .ui-stat-card:nth-child(1)::before {
  background: var(--tokamak-blue);
  box-shadow: 0 0 0 5px var(--tokamak-blue-bg);
}

.definition-summary-grid .ui-stat-card:nth-child(2)::before {
  background: var(--tokamak-green);
  box-shadow: 0 0 0 5px var(--tokamak-green-bg);
}

.definition-summary-grid .ui-stat-card:nth-child(3)::before {
  background: #9c83bc;
  box-shadow: 0 0 0 5px var(--tokamak-lilac);
}

.definition-summary-grid .ui-stat-card:nth-child(4)::before {
  background: var(--tokamak-red);
  box-shadow: 0 0 0 5px var(--tokamak-red-bg);
}

.definition-summary-grid .ui-stat-value {
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.definition-interpretation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  gap: 18px;
  align-items: start;
}

.definition-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.7fr);
  gap: 14px;
}

.definition-interpretation-card,
.definition-input-card {
  display: grid;
  align-content: start;
}

.definition-interpretation-card,
.definition-explanation {
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #fbfaf8;
  padding: 14px;
}

.definition-readout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.definition-readout-grid > div,
.definition-readout-list > div {
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 10px 12px;
}

.definition-readout-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.definition-readout-grid dt,
.definition-readout-list dt {
  margin-bottom: 4px;
  color: var(--tokamak-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.definition-readout-grid dd,
.definition-readout-list dd {
  margin: 0;
  line-height: 1.35;
}

.definition-main,
.definition-sidebar {
  display: grid;
  gap: 18px;
}

.definition-sidebar {
  position: sticky;
  top: 86px;
}

.definition-explanation .ui-section-heading {
  margin-bottom: 0;
}

.definition-explanation .ui-panel > .ui-section-heading:first-child,
.definition-explanation > .ui-section-heading:first-child {
  margin-bottom: 0;
}

.definition-fact-list,
.definition-config-list,
.definition-source-row dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.definition-fact-list > div,
.definition-config-list > div,
.definition-source-row dl > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.38fr) minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid #e7e7df;
  padding: 9px 0;
}

.definition-config-list > div {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.definition-fact-list > div:first-child,
.definition-config-list > div:first-child,
.definition-source-row dl > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.definition-fact-list dt,
.definition-config-list dt,
.definition-source-row dt,
.definition-row-label {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.definition-config-list dt {
  overflow-wrap: anywhere;
}

.definition-fact-list dd,
.definition-config-list dd,
.definition-source-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.definition-source-list {
  display: grid;
  gap: 10px;
}

.definition-source-section,
.definition-dependency-section {
  display: grid;
  gap: 12px;
}

.definition-source-row {
  display: grid;
  gap: 12px;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(45, 36, 29, 0.04);
}

.definition-source-row > div:first-child {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.definition-source-row > div:first-child span:last-child {
  color: var(--tokamak-muted);
}

.definition-source-row > div:first-child strong {
  border-radius: 999px;
  background: var(--tokamak-blue-bg);
  color: #496e9f;
  padding: 3px 8px;
}

.definition-source-row > div:first-child strong code {
  color: inherit;
}

.definition-inline-details summary,
.definition-raw-details summary {
  cursor: pointer;
  color: var(--tokamak-text);
  font-weight: 700;
}

.definition-inline-details code {
  display: block;
  margin-top: 6px;
  border: 1px solid #e0e0d9;
  border-radius: 6px;
  background: #ffffff;
  padding: 8px;
  white-space: pre-wrap;
}

.definition-raw-details .code-block,
.definition-raw-details .definition-config-list {
  margin-top: 12px;
}

.definition-dependent-list li {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.definition-technical-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.definition-technical-region {
  background: #fbfaf8;
}

.definition-technical-card {
  min-width: 0;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(205, 191, 174, 0.2);
}

.definition-yaml-card .code-block {
  max-height: 32rem;
}

.definition-technical-section .definition-raw-details {
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(45, 36, 29, 0.04);
}

.definition-dependency-section .dependency-tree {
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(45, 36, 29, 0.04);
}

.metric-list,
.metric-tree {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.metric-list li,
.metric-tree li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--tokamak-border);
  padding-bottom: 10px;
}

.code-block {
  overflow-x: auto;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
  padding: 14px;
}

.competitive-filters {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.score-hero h2 {
  margin-bottom: 4px;
  font-size: 3rem;
}

.selected-row td {
  background: var(--tokamak-blue-bg);
}

.ui-context-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #fbfaf8;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(205, 191, 174, 0.2);
}

.ui-context-actions-primary,
.ui-context-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ui-context-actions-secondary {
  font-size: 0.9rem;
}

.execution-audit-request-chip {
  max-width: min(56vw, 720px);
  border: 1px solid #e7ded2;
  border-radius: 999px;
  background: #ffffff;
  padding: 6px 10px;
}

.execution-audit-request-chip code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drilldown-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--tokamak-muted);
  font-size: 0.9rem;
}

.drilldown-breadcrumbs a {
  color: var(--tokamak-blue);
  font-weight: 700;
  text-decoration: none;
}

.drilldown-breadcrumbs a:hover {
  text-decoration: underline;
}

.drilldown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.drilldown-card {
  display: grid;
  min-height: 280px;
  align-content: space-between;
  gap: 14px;
}

.drilldown-card h3 {
  margin: 10px 0 8px;
}

.drilldown-card p {
  color: var(--tokamak-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.drilldown-node {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
  padding: 14px;
}

.drilldown-node summary {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
  gap: 18px;
  align-items: start;
  cursor: pointer;
  list-style: none;
}

.drilldown-node summary::-webkit-details-marker {
  display: none;
}

.drilldown-node h3,
.drilldown-node h4 {
  margin: 8px 0;
}

.drilldown-node p {
  margin: 0;
  color: var(--tokamak-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.drilldown-node dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.drilldown-node dt {
  color: var(--tokamak-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.drilldown-node dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.drilldown-node-body {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--tokamak-border);
}

.drilldown-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-walk {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--tokamak-border);
  padding-top: 16px;
}

.audit-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid #e7e7df;
  background: #fbfbf8;
  padding: 12px;
}

.audit-step-marker {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--tokamak-border);
  border-radius: 999px;
  background: var(--tokamak-panel);
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.audit-step h4,
.audit-step h5 {
  margin: 0 0 8px;
}

.audit-step .muted-copy {
  margin-bottom: 10px;
}

.audit-key-value-table th {
  width: 180px;
}

.debugger-panel {
  background: #fbfbf8;
}

.debugger-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding: 14px 16px 16px;
}

.debugger-flow article {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  min-height: 92px;
  border-top: 2px solid #d7d7d0;
  background: transparent;
  padding: 12px 14px 0 0;
}

.debugger-flow article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: -5px;
  right: 8px;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-top: 2px solid #d7d7d0;
  border-right: 2px solid #d7d7d0;
  transform: rotate(45deg);
}

.debugger-flow span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--tokamak-border);
  border-radius: 3px;
  background: var(--tokamak-panel);
  color: var(--tokamak-text);
  font-size: 0.76rem;
  font-weight: 700;
  transform: translateY(-24px);
  margin-bottom: -18px;
}

.debugger-flow strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.debugger-flow small {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.execution-output-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.execution-output-summary article {
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 9px 10px;
}

.execution-output-summary strong {
  display: block;
  color: var(--tokamak-text);
  font-size: 1rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.execution-output-summary span {
  display: block;
  margin-top: 5px;
  color: var(--tokamak-muted);
  font-size: 0.76rem;
}

.debugger-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 18px;
}

.debugger-card-wide {
  min-width: 0;
}

.debugger-chart-shell {
  overflow-x: auto;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.debugger-chart {
  width: 100%;
  min-width: 680px;
  height: auto;
}

.debugger-chart-axis {
  stroke: var(--tokamak-border);
  stroke-width: 1;
}

.debugger-chart-gridline {
  stroke: #ecece6;
  stroke-dasharray: 3 5;
  stroke-width: 1;
}

.debugger-chart-gridline-vertical {
  stroke: #f2f2ee;
}

.debugger-chart-axis-label {
  fill: var(--tokamak-text);
  font-size: 0.7rem;
  font-weight: 700;
}

.debugger-chart-tick-label {
  fill: var(--tokamak-muted);
  font-size: 0.62rem;
}

.debugger-chart a circle {
  cursor: pointer;
}

.debugger-chart a.debugger-selected-source circle {
  stroke: var(--tokamak-red);
  stroke-width: 3;
}

.debugger-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.debugger-chart-legend-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
  color: var(--tokamak-text);
  font-size: 0.82rem;
}

.debugger-chart-legend-heading span {
  color: var(--tokamak-muted);
}

.debugger-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  color: var(--tokamak-text);
  padding: 8px;
  text-decoration: none;
}

.debugger-legend-item:hover {
  border-color: var(--tokamak-blue);
}

.debugger-legend-item > span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--legend-color);
  flex: 0 0 auto;
}

.debugger-legend-item small {
  margin-left: auto;
  color: var(--tokamak-muted);
  white-space: nowrap;
}

.debugger-timeline {
  display: grid;
  gap: 10px;
}

.debugger-stacked-timeline {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.debugger-phase-sequence {
  display: grid;
  gap: 8px;
}

.debugger-phase-sequence article {
  display: grid;
  grid-template-columns: 34px minmax(180px, 0.35fr) minmax(180px, 0.45fr) minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 8px 10px;
}

.debugger-phase-sequence article > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--tokamak-border);
  border-radius: 3px;
  background: #ffffff;
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.debugger-phase-sequence strong {
  overflow: hidden;
  color: var(--tokamak-text);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debugger-phase-sequence small {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
}

.debugger-phase-sequence i {
  display: block;
  width: max(var(--phase-width), 2px);
  height: 10px;
  border-radius: 1px;
  background: var(--phase-color);
}

.debugger-phase-child-summary {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  border-top: 1px solid #e7e7df;
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  padding-top: 8px;
}

.debugger-phase-child-summary strong {
  color: var(--tokamak-text);
  font-size: 0.82rem;
}

.debugger-phase-child-summary span {
  color: var(--tokamak-muted);
}

.debugger-stacked-timeline-bar {
  display: flex;
  overflow: hidden;
  min-height: 30px;
  border: 1px solid var(--tokamak-border);
  border-radius: 4px;
  background: #eeeeea;
}

.debugger-stacked-timeline-bar > span {
  display: grid;
  place-items: center;
  min-width: 4px;
  width: max(var(--phase-width), 4px);
  background: var(--phase-color);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.debugger-stacked-timeline-bar > span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.45);
}

.debugger-stacked-timeline-bar > span > span {
  overflow: hidden;
  max-width: 100%;
  padding: 0 6px;
  text-overflow: ellipsis;
}

.debugger-phase-summary-shell {
  max-width: 760px;
}

.debugger-phase-summary-table {
  min-width: 560px;
}

.debugger-phase-summary-table th,
.debugger-phase-summary-table td {
  padding: 8px 10px;
}

.debugger-phase-summary-table th:not(:first-child),
.debugger-phase-summary-table td:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.debugger-phase-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.debugger-phase-name i {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--phase-color);
}

.debugger-phase-name code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.correlation-summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.48fr);
  gap: 18px;
  align-items: start;
}

.correlation-summary-panel .ui-section-heading {
  margin-bottom: 12px;
}

.correlation-summary-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 4px 14px;
}

.correlation-summary-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid #e7e7df;
  padding: 10px 0;
}

.correlation-summary-list > div:first-child {
  border-top: 0;
}

.correlation-summary-list dt {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.correlation-summary-list dd {
  min-width: 0;
  margin: 0;
  color: var(--tokamak-text);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.correlation-summary-list code {
  overflow-wrap: anywhere;
}

.correlation-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.correlation-summary-stats article {
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 9px 10px;
}

.correlation-summary-stats strong {
  display: block;
  color: var(--tokamak-text);
  font-size: 1.05rem;
  line-height: 1.1;
}

.correlation-summary-stats span {
  display: block;
  margin-top: 5px;
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.correlation-timeline {
  display: grid;
  gap: 0;
  overflow-x: auto;
  padding: 0 16px 4px;
}

.correlation-timeline-header,
.correlation-timeline-row {
  display: grid;
  grid-template-columns: 70px minmax(150px, 220px) 72px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-width: 860px;
}

.correlation-timeline-header {
  border-bottom: 1px solid #e7e7df;
  color: var(--tokamak-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 8px 0 7px;
  text-transform: uppercase;
}

.correlation-timeline-scale {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: none;
}

.correlation-timeline-scale strong {
  grid-column: 2;
  justify-self: center;
  color: var(--tokamak-text);
  font-weight: 700;
}

.correlation-timeline-scale span:first-child {
  grid-column: 1;
  justify-self: start;
}

.correlation-timeline-scale span:last-child {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.correlation-timeline-row {
  border-bottom: 1px solid #e7e7df;
  min-height: 31px;
  padding: 4px 0;
}

.correlation-timeline-row:nth-child(even) {
  background: #fbfbf8;
}

.correlation-timeline-id,
.correlation-timeline-report,
.correlation-timeline-duration {
  min-width: 0;
  font-size: 0.78rem;
  white-space: nowrap;
}

.correlation-timeline-report {
  color: var(--tokamak-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.correlation-timeline-duration {
  color: var(--tokamak-muted);
  text-align: right;
}

.correlation-timeline-track {
  position: relative;
  height: 22px;
  background:
    linear-gradient(to right, transparent 0 24.8%, #e1e1da 24.8% 25%, transparent 25% 49.8%, #d8d8d0 49.8% 50.1%, transparent 50.1% 74.8%, #e1e1da 74.8% 75%, transparent 75%),
    transparent;
}

.correlation-timeline-baseline {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: #deded7;
  transform: translateY(-50%);
}

.correlation-timeline-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: var(--timeline-left);
  width: var(--timeline-width);
  min-width: 8px;
  border-radius: 1px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.12);
}

.correlation-timeline-bar.status-pill-ok {
  background: var(--tokamak-green);
}

.correlation-timeline-bar.status-pill-attention {
  background: var(--tokamak-red);
}

.refresh-form {
  display: grid;
  gap: 14px;
}

.refresh-state-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.refresh-state-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid #e7e7df;
  padding: 12px 0;
}

.refresh-state-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.refresh-state-list > div:last-child {
  padding-bottom: 0;
}

.refresh-state-list dt {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.refresh-state-list dd {
  margin: 0;
  color: var(--tokamak-text);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.refresh-step-list {
  display: grid;
  gap: 12px;
}

.refresh-step-card {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 14px;
}

.refresh-step-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.refresh-step-card header > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.refresh-step-number {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--tokamak-blue-bg);
  color: var(--tokamak-blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.refresh-step-card p {
  margin: 0 0 10px;
  color: var(--tokamak-muted);
}

.refresh-step-running {
  border-color: var(--tokamak-blue);
  box-shadow: 0 0 0 2px var(--tokamak-blue-bg);
}

.refresh-step-failed {
  border-color: var(--tokamak-red);
  box-shadow: 0 0 0 2px var(--tokamak-red-bg);
}

.refresh-step-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 10px;
}

.refresh-step-meta div {
  min-width: 0;
}

.refresh-step-meta dt {
  color: var(--tokamak-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.refresh-step-meta dd {
  margin: 2px 0 0;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.refresh-progress-meter {
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--tokamak-border);
  border-radius: 999px;
  background: #ecebe3;
  margin-bottom: 8px;
}

.refresh-progress-meter div {
  height: 100%;
  border-radius: inherit;
  background: var(--tokamak-green);
  transition: width 180ms ease;
}

.refresh-progress-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--tokamak-muted);
  font-size: 0.86rem;
  margin-bottom: 14px;
}

.refresh-progress-caption strong {
  color: var(--tokamak-ink);
}

.refresh-current-window {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--tokamak-blue);
  border-radius: 8px;
  background: var(--tokamak-blue-bg);
  color: var(--tokamak-blue);
  padding: 10px 12px;
  margin-bottom: 14px;
}

.refresh-current-window span {
  overflow-wrap: anywhere;
  text-align: right;
}

.refresh-window-list {
  display: grid;
  gap: 8px;
}

.refresh-window-list article {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 10px;
}

.refresh-window-list strong,
.refresh-window-list span,
.refresh-window-list small {
  display: block;
  overflow-wrap: anywhere;
}

.refresh-window-list span,
.refresh-window-list small {
  color: var(--tokamak-muted);
  font-size: 0.82rem;
}

.refresh-sync-runs-panel[open] .refresh-sync-runs-summary {
  border-bottom: 1px solid var(--tokamak-border);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.refresh-sync-runs-panel[open] .ui-disclosure-toggle span {
  font-size: 0;
}

.refresh-sync-runs-panel[open] .ui-disclosure-toggle span::before {
  content: "Hide";
  font-size: 0.78rem;
}

.debugger-trace-panel {
  align-self: start;
}

.debugger-trace-empty {
  border: 1px dashed var(--tokamak-blue);
  border-radius: 8px;
  background: var(--tokamak-blue-bg);
  color: var(--tokamak-blue);
  line-height: 1.45;
  margin: 0 0 14px;
  padding: 14px;
}

.debugger-trace-empty-muted {
  border-color: #ddddd6;
  background: #fbfbf8;
  color: var(--tokamak-muted);
}

.debugger-trace-at-glance dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.debugger-trace-at-glance dl > div {
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 9px 10px;
}

.debugger-trace-at-glance dt {
  color: var(--tokamak-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.debugger-trace-at-glance dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.debugger-trace-stack {
  display: grid;
  gap: 8px;
}

.debugger-trace-card {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 12px;
}

.debugger-trace-card header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.debugger-trace-card header > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--tokamak-border);
  border-radius: 999px;
  background: var(--tokamak-panel);
  color: var(--tokamak-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.debugger-trace-card header strong {
  display: block;
}

.debugger-trace-card header small {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
}

.debugger-trace-card p {
  color: var(--tokamak-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.debugger-trace-connector {
  height: 14px;
  margin-left: 25px;
  border-left: 2px dashed var(--tokamak-border);
}

.debugger-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.debugger-pill-row span {
  border: 1px solid var(--tokamak-border);
  border-radius: 999px;
  background: var(--tokamak-panel);
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  padding: 3px 8px;
}

.debugger-selectable-row {
  cursor: pointer;
}

.debugger-selectable-row:hover td,
.debugger-selectable-row.debugger-selected-source td {
  background: var(--tokamak-blue-bg);
}

.debugger-timeline article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 10px;
}

.debugger-timeline strong {
  display: block;
  font-size: 0.9rem;
}

.debugger-timeline small {
  display: block;
  margin-top: 3px;
  color: var(--tokamak-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.debugger-timeline > article > span {
  color: var(--tokamak-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.debugger-timeline-bar {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #eeeeea;
}

.debugger-timeline-bar i {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: var(--tokamak-blue);
}

.debugger-primitive-block {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  padding: 12px;
}

.debugger-primitive-block + .debugger-primitive-block {
  margin-top: 12px;
}

.debugger-primitive-block > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.debugger-primitive-block > summary span {
  color: var(--tokamak-muted);
  font-size: 0.8rem;
}

.debugger-primitive-block .data-table-shell {
  margin-top: 12px;
}

.debugger-primitive-table {
  min-width: 100%;
  table-layout: fixed;
}

.lineage-graph-panel {
  overflow: hidden;
}

.lineage-graph-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
}

.lineage-graph-canvas {
  min-height: 420px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(215, 215, 208, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(215, 215, 208, 0.22) 1px, transparent 1px),
    #fbfbf8;
  background-size: 24px 24px;
}

.lineage-graph-inspector {
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 120px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
  padding: 12px;
}

.lineage-graph-inspector strong {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.lineage-graph-inspector small {
  color: var(--tokamak-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.debugger-raw-payload {
  max-height: 480px;
  white-space: pre-wrap;
}

.execution-explanation-node {
  margin-top: 12px;
  min-width: 0;
  overflow: hidden;
}

.execution-explanation-node > summary {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.28fr);
}

.execution-explanation-node h3 {
  font-size: 1rem;
}

.execution-explanation-node dl {
  grid-template-columns: repeat(2, minmax(72px, 1fr));
}

.execution-explanation-node dt {
  white-space: nowrap;
}

.execution-explanation-node dd {
  overflow-wrap: anywhere;
}

.execution-explanation-node .ui-section-copy {
  margin-top: 10px;
}

.execution-explanation-children {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-left: 18px;
  border-left: 2px solid color-mix(in srgb, var(--tokamak-accent), transparent 72%);
}

.execution-explanation-primitive {
  background: color-mix(in srgb, var(--tokamak-panel), var(--tokamak-accent) 4%);
}

.execution-explanation-primitive .debugger-inline-table,
.execution-explanation-primitive .ui-table-shell {
  margin-top: 12px;
  max-width: 100%;
  overflow-x: auto;
}

.execution-explanation-sample-list {
  display: none;
}

@media (max-width: 720px) {
  .execution-explanation-panel {
    overflow: hidden;
  }

  .execution-explanation-panel > .ui-content-region-header {
    align-items: start;
  }

  .execution-explanation-panel .drilldown-node summary,
  .execution-explanation-node > summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .execution-explanation-node dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .execution-explanation-children {
    padding-left: 6px;
  }

  .execution-explanation-sample-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
  }

  .execution-explanation-sample-list dl {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--tokamak-border);
    border-radius: 8px;
    background: var(--tokamak-panel);
  }

  .execution-explanation-sample-list dl > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .execution-explanation-sample-list dt,
  .execution-explanation-sample-list dd {
    margin: 0;
  }

  .execution-explanation-sample-list dt {
    color: var(--tokamak-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
  }

  .execution-explanation-sample-list dd {
    font-size: 0.84rem;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .execution-explanation-primitive > .ui-table-shell:last-of-type {
    display: none;
  }
}

.debugger-dag-table-shell {
  max-height: 560px;
  overflow: auto;
}

.debugger-dag-table {
  min-width: 920px;
  table-layout: fixed;
}

.debugger-dag-table th,
.debugger-dag-table td {
  padding: 8px 10px;
}

.debugger-dag-table th:first-child,
.debugger-dag-table td:first-child {
  width: 28%;
}

.debugger-dag-table th:nth-child(2),
.debugger-dag-table td:nth-child(2) {
  width: 30%;
}

.debugger-dag-table th:nth-child(3),
.debugger-dag-table td:nth-child(3) {
  width: 14%;
}

.debugger-dag-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debugger-dag-table code {
  color: var(--tokamak-muted);
}

.debugger-advanced {
  margin-top: 18px;
}

.debugger-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
}

.debugger-advanced > summary::-webkit-details-marker {
  display: none;
}

.debugger-advanced > summary h2,
.debugger-advanced > summary p {
  margin: 0;
}

.debugger-advanced > summary p {
  margin-top: 4px;
  color: var(--tokamak-muted);
}

.debugger-advanced > summary > span {
  flex: 0 0 auto;
  border: 1px solid var(--tokamak-border);
  border-radius: 999px;
  background: var(--tokamak-panel);
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  padding: 5px 10px;
}

.debugger-advanced[open] > summary {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--tokamak-border);
}

.advanced-audit-section {
  margin-top: 18px;
}

.advanced-audit-section:first-of-type {
  margin-top: 0;
}

.advanced-audit-section > h2 {
  margin-top: 0;
}

.execution-health-panel .ui-section-heading {
  margin-bottom: 0;
}

.execution-audit-summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.execution-audit-summary-panel .ui-section-heading {
  margin-bottom: 12px;
}

.execution-audit-summary-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 4px 14px;
}

.execution-audit-summary-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.24fr) minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid #e7e7df;
  padding: 10px 0;
}

.execution-audit-summary-list > div:first-child {
  border-top: 0;
}

.execution-audit-summary-list dt {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.execution-audit-summary-list dd {
  min-width: 0;
  margin: 0;
  color: var(--tokamak-text);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.execution-audit-summary-list code {
  overflow-wrap: anywhere;
}

.execution-audit-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.execution-audit-summary-stats article {
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 9px 10px;
}

.execution-audit-summary-stats strong {
  display: block;
  color: var(--tokamak-text);
  font-size: 1.05rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.execution-audit-summary-stats span {
  display: block;
  margin-top: 5px;
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.execution-audit-inline-details {
  display: grid;
  gap: 8px;
}

.execution-audit-inline-details summary {
  cursor: pointer;
  color: var(--tokamak-blue);
  font-weight: 700;
}

.execution-audit-inline-details code {
  display: block;
  max-height: 8.5rem;
  overflow: auto;
  white-space: normal;
  overflow-wrap: anywhere;
}

.execution-health-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 14px;
}

.execution-current-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 4px 14px;
}

.execution-current-list > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.44fr) minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid #e7e7df;
  padding: 11px 0;
}

.execution-current-list > div:first-child {
  border-top: 0;
}

.execution-current-list dt {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.execution-current-list dd {
  margin: 0;
  color: var(--tokamak-text);
  font-weight: 700;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.execution-health-metric-groups {
  display: grid;
  gap: 14px;
}

.execution-health-metric-groups h3 {
  margin: 0 0 8px;
  color: var(--tokamak-text);
  font-size: 0.9rem;
  line-height: 1.3;
}

.execution-health-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.execution-health-stat-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.execution-health-stat-grid article {
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 9px 10px;
}

.execution-health-stat-grid strong {
  display: block;
  color: var(--tokamak-text);
  font-size: 1.05rem;
  line-height: 1.1;
}

.execution-health-stat-grid span {
  display: block;
  margin-top: 5px;
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.execution-audit-records-panel {
  display: grid;
  gap: 14px;
}

.execution-audit-records-panel .ui-section-heading {
  margin-bottom: 0;
}

.execution-audit-filter-form {
  display: grid;
  gap: 10px;
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 12px;
}

.execution-audit-filter-main {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.execution-audit-filter-secondary {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.2fr) repeat(3, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}

.execution-correlations-panel {
  display: grid;
  gap: 14px;
}

.execution-correlations-panel .ui-section-heading {
  margin-bottom: 0;
}

.execution-correlations-table td {
  vertical-align: middle;
}

.execution-correlations-table td:first-child {
  min-width: 190px;
}

.execution-correlations-table small {
  display: inline-block;
  max-width: 100%;
  color: var(--tokamak-muted);
  font-size: 0.75rem;
}

.execution-correlations-table td:first-child small {
  display: block;
  margin-top: 4px;
}

.correlation-mini-timeline {
  position: relative;
  min-width: 260px;
  height: 18px;
  border: 1px solid #d7d7d0;
  border-radius: 5px;
  background: #f6f6f2;
  overflow: hidden;
}

.correlation-mini-baseline {
  position: absolute;
  inset: 8px 0 auto;
  height: 1px;
  background: #d7d7d0;
}

.correlation-mini-segment {
  position: absolute;
  top: 3px;
  left: var(--timeline-left, 0%);
  width: max(var(--timeline-width, 1%), 2px);
  height: 10px;
  border-radius: 999px;
  background: var(--tokamak-green);
  text-decoration: none;
  opacity: 0.88;
}

.correlation-mini-segment.status-pill-attention {
  background: var(--tokamak-red);
}

.correlation-mini-segment-debug {
  box-shadow: 0 0 0 2px var(--tokamak-blue-bg), inset 0 0 0 1px var(--tokamak-blue);
}

.correlation-mini-segment:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.execution-supporting-panel[open] .execution-supporting-summary {
  border-bottom: 1px solid var(--tokamak-border);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.execution-supporting-panel[open] .ui-disclosure-toggle span {
  font-size: 0;
}

.execution-supporting-panel[open] .ui-disclosure-toggle span::before {
  content: "Hide";
  font-size: 0.78rem;
}

.metrics-debugger-page {
  padding-top: 18px;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

.metrics-debugger-page .ui-page-title {
  overflow-wrap: anywhere;
}

.metrics-debugger-page [hidden] {
  display: none !important;
}

.metrics-debugger-page .topbar {
  margin-bottom: 14px;
}

.metrics-debugger-page .topbar h1 {
  font-size: 1.35rem;
  line-height: 1.2;
}

.metrics-debugger-page .eyebrow,
.metrics-debugger-page .muted-copy,
.metrics-debugger-page p,
.metrics-debugger-page td,
.metrics-debugger-page th,
.metrics-debugger-page dd,
.metrics-debugger-page dt {
  font-size: 0.82rem;
  line-height: 1.45;
}

.metrics-debugger-page h2 {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metrics-debugger-page h3 {
  font-size: 0.92rem;
}

.metrics-debugger-page code,
.metrics-debugger-page pre,
.metrics-debugger-page .data-table {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.metrics-debugger-page .search-panel {
  border-color: #e3e6ea;
  border-radius: 8px;
  padding: 0;
}

.metrics-debugger-page .section-heading {
  align-items: center;
  border-bottom: 1px solid #e3e6ea;
  background: #fafbfc;
  gap: 12px;
  padding: 10px 16px;
}

.metrics-debugger-page .section-heading h2,
.metrics-debugger-page .section-heading p {
  margin: 0;
}

.metrics-debugger-page .section-heading p {
  margin-top: 3px;
  color: #5a6573;
}

.metrics-debugger-page .data-table-shell {
  overflow-x: auto;
}

.metrics-debugger-page .data-table {
  min-width: 0;
  font-size: 0.76rem;
}

.metrics-debugger-page .data-table th,
.metrics-debugger-page .data-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.metrics-debugger-page .data-table th {
  color: #5a6573;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.debugger-request-output-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
}

.debugger-request-output-grid .search-panel {
  display: grid;
  align-content: start;
}

.debugger-request-output-grid .search-panel > h2 {
  border-bottom: 1px solid #e3e6ea;
  background: #fafbfc;
  padding: 12px 16px;
}

.debugger-request-output-grid .search-panel > p {
  padding: 12px 16px 0;
}

.debugger-request-output-grid .data-table-shell {
  padding: 14px 16px 16px;
}

.debugger-request-output-grid .data-table th {
  width: 150px;
}

.metrics-debugger-page .debugger-panel > .section-heading,
.metrics-debugger-page .debugger-panel > .debugger-flow,
.metrics-debugger-page .search-panel > .debugger-timeline,
.metrics-debugger-page .search-panel > .debugger-dag-list,
.metrics-debugger-page .search-panel > .drilldown-list,
.metrics-debugger-page .search-panel > .empty-state {
  padding: 14px 16px;
}

.metrics-debugger-page .debugger-flow article {
  min-height: 92px;
  padding: 12px 14px 0 0;
}

.metrics-debugger-page .debugger-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.metrics-debugger-page .debugger-chart-shell {
  margin: 16px;
}

.metrics-debugger-page .debugger-chart-legend-heading {
  margin: 0 16px 8px;
}

.metrics-debugger-page .debugger-legend {
  margin: 0 16px 16px;
}

.metrics-debugger-page .debugger-trace-panel {
  max-height: none;
  overflow: visible;
}

.metrics-debugger-page .debugger-trace-stack {
  grid-template-columns: minmax(0, 1fr);
}

.metrics-debugger-page .debugger-trace-empty {
  margin: 16px;
}

.metrics-debugger-page .debugger-trace-at-glance {
  padding: 0 16px 16px;
}

.metrics-debugger-page .debugger-trace-stack {
  gap: 0;
  padding: 16px;
}

.metrics-debugger-page .debugger-trace-card {
  background: #ffffff;
  padding: 0;
  overflow: hidden;
}

.metrics-debugger-page .debugger-trace-card header {
  margin: 0;
  border-bottom: 1px solid #e3e6ea;
  background: #fafbfc;
  padding: 10px 12px;
}

.metrics-debugger-page .debugger-trace-card p {
  margin: 0;
  padding: 12px;
}

.metrics-debugger-page .debugger-trace-card .structured-data-section {
  margin: 0 12px 12px;
}

.metrics-debugger-page .debugger-yaml-code {
  max-height: 18rem;
  overflow: auto;
  border-radius: 6px;
  font-size: 0.74rem;
  line-height: 1.45;
  white-space: pre;
}

.metrics-debugger-page .debugger-inline-table {
  margin: 0 12px 12px;
  border-radius: 6px;
}

.metrics-debugger-page .debugger-inline-table .data-table {
  width: 100%;
}

.metrics-debugger-page .debugger-trace-connector {
  height: 22px;
  margin-left: 33px;
}

.metrics-debugger-page .debugger-pill-row {
  margin: 0;
  padding: 0 12px 12px;
}

.metrics-debugger-page .debugger-timeline article,
.metrics-debugger-page .debugger-dag-list article {
  background: #ffffff;
}

.metrics-debugger-page .debugger-primitive-block {
  padding: 0;
  overflow: hidden;
}

.metrics-debugger-page .debugger-primitive-block > summary {
  background: #fafbfc;
  padding: 10px 12px;
}

.metrics-debugger-page .debugger-primitive-block .data-table-shell {
  margin-top: 0;
}

.metrics-debugger-page .debugger-primitive-table {
  min-width: 780px;
}

.metrics-debugger-page .debugger-primitive-table th,
.metrics-debugger-page .debugger-primitive-table td {
  white-space: normal;
}

.metrics-debugger-page .debugger-primitive-table td {
  max-width: 220px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.competitive-sparkline {
  width: 100%;
  max-width: 360px;
  height: auto;
  color: var(--tokamak-blue);
}

.compact-table {
  min-width: 520px;
}

.compact-table th,
.compact-table td {
  padding: 9px 10px;
}

.execution-records-table {
  min-width: 920px;
}

.execution-records-table td {
  vertical-align: top;
}

.execution-records-table th:first-child,
.execution-records-table td:first-child {
  width: 260px;
  max-width: 260px;
}

.execution-details-table {
  min-width: 980px;
  table-layout: fixed;
}

.execution-details-table th,
.execution-details-table td {
  vertical-align: middle;
  padding: 8px 12px;
}

.execution-details-table th:first-child,
.execution-details-table td:first-child {
  width: 150px;
  max-width: 150px;
}

.execution-details-table th:nth-child(2),
.execution-details-table td:nth-child(2) {
  width: 43%;
}

.execution-details-table th:nth-child(3),
.execution-details-table td:nth-child(3) {
  width: 27%;
}

.execution-details-table th:nth-child(4),
.execution-details-table td:nth-child(4) {
  width: 20%;
}

.execution-details-table th:nth-child(5),
.execution-details-table td:nth-child(5) {
  width: 90px;
  text-align: right;
}

.execution-id-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}

.execution-id-line small {
  color: var(--tokamak-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.execution-status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

.execution-status-dot.status-pill-ok {
  background: var(--tokamak-green);
}

.execution-status-dot.status-pill-attention {
  background: var(--tokamak-red);
}

.execution-request-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.execution-request-line strong {
  color: var(--tokamak-muted);
  font-size: 0.74rem;
}

.execution-request-line code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.truncate-cell {
  display: block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.truncate-cell code {
  white-space: nowrap;
}

.execution-context-line {
  display: flex;
  max-width: 360px;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--tokamak-muted);
  font-size: 0.82rem;
}

.execution-context-line-compact {
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.execution-context-line-compact span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.execution-context-line span:not(:last-child)::after {
  content: "|";
  margin-left: 6px;
  color: var(--tokamak-border);
}

.duration-ok {
  color: var(--tokamak-green);
  font-weight: 700;
}

.duration-warning {
  color: var(--tokamak-amber);
  font-weight: 700;
}

.duration-slow {
  color: var(--tokamak-red);
  font-weight: 700;
}

.duration-missing {
  color: var(--tokamak-muted);
}

.ui-disclosure {
  overflow: hidden;
}

.ui-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.ui-disclosure-summary::-webkit-details-marker {
  display: none;
}

.ui-disclosure-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #ddddd6;
  border-radius: 999px;
  background: #ffffff;
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 9px;
  white-space: nowrap;
}

.ui-disclosure-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 120ms ease;
}

.ui-disclosure[open] > .ui-disclosure-summary .ui-disclosure-toggle svg {
  transform: rotate(90deg);
}

.empty-inline {
  color: var(--tokamak-muted);
  font-size: 0.9rem;
}

.muted-copy {
  color: var(--tokamak-muted);
  line-height: 1.45;
}

.definition-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.definition-stats code {
  font-size: 0.9rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.refresh-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.ui-context-bar,
.refresh-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d8cfc2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 10px 8px 14px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

.ui-context-bar-actions,
.ui-context-meta,
.refresh-context-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ui-context-bar-actions {
  justify-content: flex-end;
}

.ui-context-bar form {
  margin: 0;
}

.ui-context-bar .ln-inline-sync-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ui-context-bar .ln-source-rank-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ui-context-bar .status-pill {
  align-self: center;
}

.ui-context-meta > span,
.refresh-context-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #e7ded2;
  border-radius: 999px;
  background: #fbfaf8;
  color: var(--tokamak-muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 10px;
}

.refresh-summary-card {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 118px;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 22px rgba(17, 17, 17, 0.025);
}

.refresh-summary-card > span {
  order: 0;
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.refresh-summary-card > strong {
  order: 1;
  min-width: 0;
  color: var(--tokamak-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 1.45vw, 1.62rem);
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.refresh-summary-card > small {
  order: 2;
  color: var(--tokamak-muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.refresh-summary-card .ui-status-pill {
  width: fit-content;
  max-width: 100%;
}

.refresh-summary-card > .refresh-summary-pill {
  display: flex;
  align-items: flex-start;
  min-height: auto;
  font-family: inherit;
  font-size: 1rem;
}

.metrics-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.31fr);
  align-items: start;
  gap: 16px;
  position: relative;
  padding: 18px;
}

.ui-summary-strip,
.metrics-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ui-summary-card,
.metrics-summary-card {
  min-width: 0;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 22px rgba(17, 17, 17, 0.025);
}

.ui-summary-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ui-summary-card-link:hover {
  border-color: #c9b9a5;
  background: #fffdfb;
}

.ui-summary-card-link:focus-visible {
  outline: 2px solid var(--tokamak-ink);
  outline-offset: 2px;
}

.ui-summary-card-link:hover strong {
  color: var(--tokamak-red);
}

.ui-summary-card strong,
.metrics-summary-card strong {
  display: block;
  min-height: 36px;
  color: var(--tokamak-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-summary-card span,
.metrics-summary-card span {
  display: block;
  margin-top: 8px;
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ui-summary-strip-compact {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ui-summary-strip-compact .ui-summary-card,
.ui-summary-strip-compact .metrics-summary-card {
  padding: 12px;
}

.ui-summary-strip-compact .ui-summary-card strong,
.ui-summary-strip-compact .metrics-summary-card strong {
  min-height: 28px;
  font-size: 1.5rem;
}

.ui-filter-surface,
.metrics-filter-surface {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.3fr);
  gap: 16px;
  align-items: start;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #f8f4ee;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 22px rgba(17, 17, 17, 0.025);
}

.ui-filter-surface > .ui-filter-primary:only-child,
.metrics-filter-surface > .metrics-search-primary:only-child {
  grid-column: 1 / -1;
}

.ui-content-region,
.metrics-workspace {
  display: grid;
  align-content: start;
  gap: 16px;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 22px rgba(17, 17, 17, 0.025);
}

.ui-content-region-primary,
.metrics-workspace-primary {
  gap: 20px;
}

.ui-content-region-header,
.metrics-workspace-header,
.ui-subsection-heading,
.metrics-subsection-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #e7ded2;
  padding-bottom: 12px;
}

.ui-content-region-header h2,
.metrics-workspace-header h2,
.ui-subsection-heading h2,
.metrics-subsection-heading h2 {
  margin: 0 0 4px;
  color: var(--tokamak-text);
  font-size: 1rem;
  line-height: 1.25;
}

.ui-content-region-header p,
.metrics-workspace-header p,
.ui-subsection-heading p,
.metrics-subsection-heading p {
  margin: 0;
  color: var(--tokamak-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ui-content-sidebar,
.metrics-side-rail {
  display: grid;
  gap: 12px;
}

.ui-sidebar-card,
.metrics-side-card {
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #fbfaf8;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

.ui-reference-region,
.metrics-reference-section {
  border: 1px dashed #d8cfc2;
  border-radius: 8px;
  background: #f8f4ee;
  padding: 16px;
}

.ui-description-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ui-description-list > div {
  display: grid;
  gap: 4px;
  border-top: 1px solid #e7ded2;
  padding-top: 10px;
}

.ui-description-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.ui-description-list dt {
  color: var(--tokamak-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ui-description-list dd {
  margin: 0;
  color: var(--tokamak-text);
  font-weight: 700;
}

.ui-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: 18px;
  align-items: start;
}

.health-content-text {
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  border: 1px solid #e7ded2;
  border-radius: 8px;
  background: #fffdfa;
  color: var(--tokamak-text);
  padding: 18px;
  font-family: var(--tokamak-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ui-filter-primary {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.ui-filter-primary .ui-section-heading {
  margin-bottom: 0;
}

.ui-filter-form {
  display: grid;
  gap: 12px;
}

.ui-filter-main-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.ui-filter-secondary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.ui-filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.ui-filter-secondary-row .ui-select {
  min-width: 180px;
}

.metrics-search-primary {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.metrics-search-primary .ui-section-heading {
  margin-bottom: 0;
}

.metrics-filter-form {
  display: grid;
  gap: 12px;
}

.metrics-filter-main-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.metrics-filter-secondary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.metrics-filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.metrics-filter-secondary-row .ui-select {
  min-width: 180px;
}

.definitions-search-field {
  min-width: 0;
}

.ui-stat-rail,
.metrics-search-stat-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-bg);
  padding: 12px;
}

.ui-stat-rail > *,
.metrics-search-stat-rail > * {
  border: 1px solid #e1e1da;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  padding: 8px 9px;
  box-shadow: none;
}

.ui-stat-rail strong,
.metrics-search-stat-rail strong {
  display: block;
  color: var(--tokamak-text);
  font-size: 1.05rem;
  line-height: 1.1;
}

.ui-stat-rail span,
.metrics-search-stat-rail span {
  display: block;
  margin-top: 3px;
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.definitions-category {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.definitions-category-list {
  display: grid;
  gap: 10px;
}

.definitions-category-header {
  background: #fbfaf8;
  padding: 12px 16px;
}

.definitions-category[open] .definitions-category-header {
  border-bottom: 1px solid var(--tokamak-border);
}

.definitions-category-header:hover {
  background: #f8f4ee;
}

.definitions-category-header h2 {
  margin: 0;
  color: var(--tokamak-text);
  font-size: 1rem;
  line-height: 1.3;
}

.definitions-category-header p {
  margin: 4px 0 0;
  color: var(--tokamak-muted);
  font-size: 0.86rem;
}

.definitions-category[open] .definitions-category-toggle span {
  font-size: 0;
}

.definitions-category[open] .definitions-category-toggle span::before {
  content: "Hide";
  font-size: 0.78rem;
}

.definitions-table-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.definitions-table {
  min-width: 920px;
}

.definitions-table th:nth-child(1) {
  width: 34%;
}

.definitions-table th:nth-child(2),
.definitions-table th:nth-child(3),
.definitions-table th:nth-child(4) {
  width: 12%;
}

.definitions-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.definitions-table td:first-child small {
  margin-top: 4px;
}

.definitions-table td:first-child code {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 1040px) {
  .metrics-search-panel {
    grid-template-columns: 1fr;
  }

  .ui-filter-surface,
  .metrics-filter-surface,
  .ui-content-layout,
  .health-annotation-layout,
  .metrics-detail-layout,
  .definition-primary-grid {
    grid-template-columns: 1fr;
  }

  .health-annotation-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-stat-rail,
  .metrics-search-stat-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ui-summary-strip-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .refresh-summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ui-filter-main-row,
  .metrics-filter-main-row {
    grid-template-columns: 1fr;
  }

  .ui-filter-actions .ui-button,
  .metrics-filter-actions .ui-button {
    justify-content: center;
    width: 100%;
  }

  .ui-stat-rail,
  .metrics-search-stat-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-summary-strip-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-summary-strip,
  .metrics-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-annotation-summary {
    grid-template-columns: 1fr;
  }

  .refresh-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .definitions-filter-actions {
    align-items: stretch;
  }

  .definitions-filter-actions .ui-button {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .ui-summary-strip,
  .metrics-summary-strip,
  .ui-summary-strip-compact,
  .refresh-summary-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .execution-health-grid {
    grid-template-columns: 1fr;
  }

  .execution-health-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .execution-audit-filter-main,
  .execution-audit-filter-secondary,
  .correlation-summary-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .execution-current-list > div,
  .execution-audit-filter-main,
  .execution-audit-filter-secondary,
  .correlation-summary-panel,
  .execution-audit-summary-panel,
  .correlation-summary-list > div {
    grid-template-columns: 1fr;
  }

  .execution-health-stat-grid,
  .execution-health-stat-grid-compact,
  .correlation-summary-stats,
  .execution-audit-summary-stats,
  .debugger-trace-at-glance dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .correlation-timeline-track {
    height: 34px;
  }
}

.metadata-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metadata-stack {
  display: grid;
  gap: 8px;
}

.metadata-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #ddddd6;
  border-radius: 8px;
  background: #fbfbf8;
  color: var(--tokamak-text);
  padding: 10px 12px;
  text-decoration: none;
}

.metadata-bar-row span {
  color: var(--tokamak-muted);
}

.metadata-bar-row strong {
  font-size: 0.95rem;
}

.metadata-link-list {
  display: grid;
  gap: 9px;
  max-height: 360px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.metadata-link-list li {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--tokamak-border);
  padding-bottom: 9px;
}

.metadata-link-list small {
  color: var(--tokamak-muted);
}

.metadata-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metadata-chip {
  border: 1px solid var(--tokamak-border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--tokamak-text);
  padding: 7px 10px;
  text-decoration: none;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.health-excellent {
  background: var(--tokamak-green-bg);
  color: var(--tokamak-green);
}

.health-good {
  background: var(--tokamak-blue-bg);
  color: var(--tokamak-blue);
}

.health-fair {
  background: var(--tokamak-amber-bg);
  color: var(--tokamak-amber);
}

.health-poor {
  background: var(--tokamak-red-bg);
  color: var(--tokamak-red);
}

.health-none {
  background: #eef1f6;
  color: var(--tokamak-muted);
}

.health-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--tokamak-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.health-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.health-chart-key {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.health-chart-key-success {
  background: #5f9f68;
}

.health-chart-key-failure {
  background: #d86f64;
}

.health-chart-key-other {
  background: #a3a9b2;
}

.health-chart-key-empty {
  background: rgba(45, 36, 29, 0.16);
}

.health-window-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(45, 36, 29, 0.06);
  border: 1px solid rgba(45, 36, 29, 0.08);
  border-radius: 7px;
}

.health-window-toggle-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  padding: 0 8px;
  color: var(--tokamak-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

.health-window-toggle-link.is-active {
  background: #fff;
  color: var(--tokamak-ink);
  box-shadow: 0 1px 2px rgba(45, 36, 29, 0.12);
}

.health-timeline-chart {
  display: grid;
  grid-auto-columns: minmax(18px, 1fr);
  grid-auto-flow: column;
  gap: 7px;
  overflow-x: auto;
  background:
    repeating-linear-gradient(
      to top,
      rgba(45, 36, 29, 0.05) 0,
      rgba(45, 36, 29, 0.05) 1px,
      transparent 1px,
      transparent 25%
    ),
    transparent;
  padding: 2px 0 0;
}

.health-timeline-column {
  display: grid;
  grid-template-rows: 150px 18px;
  gap: 7px;
  min-width: 18px;
}

.health-timeline-stack {
  display: flex;
  align-items: flex-end;
  align-self: end;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  width: 100%;
  min-height: 2px;
  background:
    linear-gradient(to top, rgba(45, 36, 29, 0.14), rgba(45, 36, 29, 0.14)) left bottom / 100% 2px no-repeat,
    rgba(45, 36, 29, 0.045);
  box-shadow: inset 0 0 0 1px rgba(45, 36, 29, 0.04);
}

.health-timeline-segment {
  display: block;
  width: 100%;
  min-height: 2px;
}

.health-timeline-segment-success {
  background: #5f9f68;
}

.health-timeline-segment-failure {
  background: #d86f64;
}

.health-timeline-segment-other {
  background: #a3a9b2;
}

.health-timeline-column small {
  overflow: hidden;
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-timeline-tick-empty::before {
  content: "";
  display: inline-block;
  width: 1px;
}

.health-source-type-table th,
.health-source-type-table td {
  padding-top: 7px;
  padding-bottom: 7px;
  vertical-align: middle;
}

.health-mini-trend-cell {
  min-width: 132px;
}

.health-mini-trend {
  display: grid;
  grid-auto-columns: 13px;
  grid-auto-flow: column;
  align-items: end;
  gap: 5px;
  width: max-content;
  min-width: 124px;
  height: 30px;
  padding: 3px 6px 3px;
  background:
    linear-gradient(to top, rgba(45, 36, 29, 0.1), rgba(45, 36, 29, 0.1)) left bottom / 100% 1px no-repeat,
    linear-gradient(to top, transparent 49%, rgba(45, 36, 29, 0.05) 50%, transparent 51%) left top / 100% 100% no-repeat;
  border: 1px solid rgba(45, 36, 29, 0.08);
  border-radius: 6px;
}

.health-mini-trend-long {
  grid-auto-columns: 4px;
  gap: 2px;
  min-width: 184px;
}

.health-mini-trend-hourly {
  grid-auto-columns: 6px;
  gap: 2px;
  min-width: 196px;
}

.health-mini-trend-column {
  display: flex;
  align-items: end;
  height: 24px;
}

.health-mini-trend-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  width: 13px;
  min-height: 2px;
  background:
    linear-gradient(to top, rgba(45, 36, 29, 0.16), rgba(45, 36, 29, 0.16)) left bottom / 100% 2px no-repeat,
    rgba(45, 36, 29, 0.045);
  box-shadow: inset 0 0 0 1px rgba(45, 36, 29, 0.04);
}

.health-mini-trend-long .health-mini-trend-stack {
  width: 4px;
}

.health-mini-trend-hourly .health-mini-trend-stack {
  width: 6px;
}

.health-mini-trend-column:hover .health-mini-trend-stack {
  box-shadow: 0 0 0 2px rgba(45, 36, 29, 0.14);
}

.health-mini-trend-segment {
  display: block;
  width: 100%;
  min-height: 2px;
}

.health-mini-trend-segment-success {
  background: #5f9f68;
}

.health-mini-trend-segment-failure {
  background: #d86f64;
}

.health-mini-trend-segment-other {
  background: #a3a9b2;
}

.health-mini-trend-empty {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.health-compact-table {
  table-layout: fixed;
}

.health-compact-table th,
.health-compact-table td {
  padding: 7px 8px;
  vertical-align: middle;
  line-height: 1.25;
}

.health-compact-table td {
  overflow: hidden;
}

.health-compact-table small,
.health-compact-table code {
  max-width: 100%;
}

.health-cell-truncate {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-cell-clamp {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.health-cell-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.health-inline-meta {
  display: block;
  overflow: hidden;
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-error-col-entity {
  width: 11%;
}

.health-error-col-type {
  width: 18%;
}

.health-error-col-category {
  width: 12%;
}

.health-error-col-count,
.health-error-col-rate,
.health-error-col-sources {
  width: 7%;
}

.health-error-col-trend {
  width: 12%;
}

.health-error-col-recovery {
  width: 13%;
}

.health-error-col-seen {
  width: 13%;
}

.health-failure-col-entity {
  width: 24%;
}

.health-failure-col-type {
  width: 10%;
}

.health-failure-col-error {
  width: 38%;
}

.health-failure-col-handler {
  width: 18%;
}

.health-failure-col-when {
  width: 10%;
}

.diagnostic-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  align-items: end;
}

.diagnostic-form label {
  display: grid;
  gap: 0.35rem;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 700;
}

.diagnostic-form input[type="text"] {
  min-height: 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #ffffff;
  color: #111827;
  font-weight: 500;
}

.diagnostic-checkbox-label {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 2.5rem;
  padding-top: 1.2rem;
}

.diagnostic-checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.diagnostic-section-nav {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.diagnostic-section-link {
  display: grid;
  gap: 0.18rem;
  min-height: 4.25rem;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  background: #ffffff;
  color: var(--tokamak-text);
  text-decoration: none;
}

.diagnostic-section-link:hover,
.diagnostic-section-link:focus-visible {
  border-color: color-mix(in srgb, var(--tokamak-accent) 42%, var(--tokamak-border));
  box-shadow: 0 8px 20px rgba(45, 36, 29, 0.08);
  outline: none;
}

.diagnostic-section-link-active {
  border-color: color-mix(in srgb, var(--tokamak-accent) 58%, var(--tokamak-border));
  background: color-mix(in srgb, var(--tokamak-accent) 8%, #ffffff);
}

.diagnostic-section-link strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.diagnostic-section-link span {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.diagnostic-freshness-section .ui-table-shell {
  overflow: auto;
}

.diagnostic-freshness-table {
  min-width: 58rem;
}

.diagnostic-freshness-table th,
.diagnostic-freshness-table td {
  vertical-align: top;
}

.diagnostic-freshness-table small {
  display: block;
  margin-top: 0.18rem;
  color: var(--tokamak-muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.diagnostic-score-trend {
  max-width: 18rem;
}

.diagnostic-score-trend-stack {
  min-height: 0.2rem;
}

.diagnostic-component-groups {
  display: grid;
  gap: 1rem;
}

.diagnostic-component-group {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
  overflow: visible;
}

.diagnostic-component-group-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--tokamak-border);
  padding: 0.85rem 1rem;
}

.diagnostic-component-group-header h3 {
  margin: 0;
  color: var(--tokamak-text);
  font-size: 0.98rem;
  line-height: 1.25;
}

.diagnostic-component-group-header small {
  display: block;
  margin-top: 0.2rem;
  color: var(--tokamak-muted);
  font-size: 0.78rem;
}

.diagnostic-component-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.diagnostic-component-table th:nth-child(1),
.diagnostic-component-table td:nth-child(1) {
  width: 20%;
}

.diagnostic-component-table th:nth-child(2),
.diagnostic-component-table td:nth-child(2) {
  width: 11%;
}

.diagnostic-component-table th:nth-child(3),
.diagnostic-component-table td:nth-child(3) {
  width: 29%;
}

.diagnostic-component-table th:nth-child(4),
.diagnostic-component-table td:nth-child(4) {
  width: 12%;
}

.diagnostic-component-table th:nth-child(5),
.diagnostic-component-table td:nth-child(5) {
  width: 28%;
}

.diagnostic-component-table td,
.diagnostic-component-table th {
  overflow-wrap: anywhere;
}

.diagnostic-summary-cell {
  position: relative;
}

.diagnostic-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.diagnostic-summary strong {
  min-width: 0;
}

.diagnostic-shape-cell strong,
.diagnostic-shape-cell small {
  display: block;
}

.diagnostic-shape-cell small {
  color: var(--tokamak-muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.diagnostic-component-table .diagnostic-score-trend {
  max-width: 11rem;
}

.annotation-path-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.annotation-path-section {
  overflow: visible;
}

.annotation-path-section .ui-table-shell {
  overflow: visible;
}

.annotation-path-table th:nth-child(1),
.annotation-path-table td:nth-child(1) {
  width: 17%;
}

.annotation-path-table th:nth-child(2),
.annotation-path-table td:nth-child(2) {
  width: 8%;
}

.annotation-path-table th:nth-child(3),
.annotation-path-table td:nth-child(3) {
  width: 18%;
}

.annotation-path-table th:nth-child(4),
.annotation-path-table td:nth-child(4) {
  width: 18%;
}

.annotation-path-table th:nth-child(5),
.annotation-path-table td:nth-child(5) {
  width: 12%;
}

.annotation-path-table th:nth-child(6),
.annotation-path-table td:nth-child(6) {
  width: 27%;
}

.annotation-path-table th,
.annotation-path-table td {
  padding: 0.52rem 0.65rem;
}

.annotation-path-table td {
  overflow-wrap: anywhere;
}

.annotation-path-table thead {
  position: sticky;
  top: 144px;
  z-index: 20;
}

.annotation-path-table thead th {
  position: sticky;
  top: 144px;
  z-index: 21;
  background-color: #ffffff;
  box-shadow: 0 1px 0 var(--tokamak-border), 0 6px 12px rgba(45, 36, 29, 0.12);
  white-space: normal;
}

.diagnostic-table-primary {
  display: block;
  font-weight: 700;
  line-height: 1.25;
}

.diagnostic-table-meta {
  display: block;
  margin-top: 0.18rem;
  color: var(--tokamak-muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.annotation-path-table .status-pill {
  max-width: 100%;
  white-space: normal;
}

.source-lifecycle-section .ui-table-shell {
  overflow: auto;
}

.source-lifecycle-table {
  width: 100%;
  min-width: 62rem;
  table-layout: fixed;
}

.source-lifecycle-table th:nth-child(1),
.source-lifecycle-table td:nth-child(1) {
  width: 14%;
}

.source-lifecycle-table th:nth-child(2),
.source-lifecycle-table td:nth-child(2) {
  width: 19%;
}

.source-lifecycle-table th:nth-child(3),
.source-lifecycle-table td:nth-child(3),
.source-lifecycle-table th:nth-child(4),
.source-lifecycle-table td:nth-child(4),
.source-lifecycle-table th:nth-child(5),
.source-lifecycle-table td:nth-child(5) {
  width: 14%;
}

.source-lifecycle-table th:nth-child(6),
.source-lifecycle-table td:nth-child(6) {
  width: 25%;
}

.source-lifecycle-table th,
.source-lifecycle-table td {
  padding: 0.52rem 0.65rem;
}

.source-lifecycle-table th {
  white-space: normal;
}

.source-lifecycle-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.source-lifecycle-primary {
  display: block;
  font-weight: 700;
  line-height: 1.25;
}

.source-lifecycle-meta {
  display: block;
  margin-top: 0.18rem;
  color: var(--tokamak-muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.source-lifecycle-meta code {
  font-size: 0.72rem;
}

.source-lifecycle-table .status-pill {
  margin-right: 0.25rem;
  max-width: 100%;
  padding: 0.16rem 0.45rem;
  font-size: 0.68rem;
  line-height: 1.15;
  white-space: nowrap;
}

.source-lifecycle-table .annotation-path-group-row td {
  padding: 0.48rem 0.65rem;
}

.annotation-path-group-row td {
  background: color-mix(in srgb, var(--tokamak-border) 46%, var(--tokamak-panel));
  border-top: 1px solid var(--tokamak-border);
  border-bottom: 1px solid var(--tokamak-border);
  padding: 0.62rem 0.85rem;
}

.annotation-path-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.annotation-path-group-title {
  display: block;
  color: var(--tokamak-text);
  font-size: 0.9rem;
  line-height: 1.25;
}

.annotation-path-group-summary small {
  display: block;
  margin-top: 0.12rem;
}

.diagnostic-line-chart {
  display: block;
  width: min(100%, 180px);
  height: 42px;
  border: 1px solid rgba(45, 36, 29, 0.08);
  border-radius: 6px;
  background:
    linear-gradient(to top, rgba(45, 36, 29, 0.1), rgba(45, 36, 29, 0.1)) left bottom / 100% 1px no-repeat,
    linear-gradient(to top, transparent 49%, rgba(45, 36, 29, 0.05) 50%, transparent 51%) left top / 100% 100% no-repeat;
}

.diagnostic-line-chart-axis {
  stroke: rgba(45, 36, 29, 0.18);
  stroke-width: 1;
}

.diagnostic-line-chart-line {
  fill: none;
  stroke: #5f9f68;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.diagnostic-line-chart-line-alert {
  stroke: #d86f64;
}

.diagnostic-line-chart-point {
  fill: #ffffff;
  stroke: #5f9f68;
  stroke-width: 1.8;
}

.diagnostic-line-chart-point-alert {
  stroke: #d86f64;
}

.diagnostic-info-button {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  color: #475569;
  cursor: help;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.diagnostic-info-button:hover,
.diagnostic-info-button:focus-visible {
  border-color: var(--tokamak-blue);
  color: var(--tokamak-blue);
  outline: none;
}

.diagnostic-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.4rem);
  left: 0;
  display: none;
  width: min(28rem, 72vw);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  color: #1f2937;
  padding: 0.75rem 0.85rem;
}

.diagnostic-popover p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.diagnostic-popover p + p {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid #e5e7eb;
}

.diagnostic-summary-cell:hover .diagnostic-popover,
.diagnostic-summary-cell:focus-within .diagnostic-popover {
  display: block;
}

.health-stage-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.health-stage-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--tokamak-border);
  background: #fff;
}

.health-stage-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.health-stage-marker-success {
  background: var(--tokamak-green-bg);
  color: var(--tokamak-green);
}

.health-stage-marker-failure {
  background: var(--tokamak-red-bg);
  color: var(--tokamak-red);
}

.health-stage-marker-other {
  background: rgba(45, 36, 29, 0.08);
  color: var(--tokamak-muted);
}

.health-stage-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.health-stage-body strong,
.health-stage-body small,
.health-stage-body code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-stage-body small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tokamak-muted);
  font-size: 0.76rem;
}

.health-annotation-panel {
  display: grid;
  gap: 18px;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 22px rgba(17, 17, 17, 0.025);
}

.health-annotation-header,
.health-annotation-subheader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.health-annotation-header {
  border-bottom: 1px solid #e7ded2;
  padding-bottom: 14px;
}

.health-annotation-header h2,
.health-annotation-subheader h3 {
  margin: 0 0 4px;
  color: var(--tokamak-text);
  font-size: 1rem;
  line-height: 1.25;
}

.health-annotation-header p,
.health-annotation-subheader p {
  margin: 0;
  color: var(--tokamak-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.health-annotation-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(150px, 0.72fr));
  gap: 12px;
}

.health-annotation-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 104px;
  border: 1px solid #e1d8cc;
  border-radius: 6px;
  background: #fbfaf8;
  padding: 14px;
}

.health-annotation-card strong {
  display: block;
  min-width: 0;
  color: var(--tokamak-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.health-annotation-card-status strong {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.health-annotation-card small {
  color: var(--tokamak-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
}

.health-annotation-card .status-pill {
  justify-self: start;
}

.health-annotation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 14px;
  align-items: stretch;
}

.health-annotation-detail {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  border: 1px solid #e1d8cc;
  border-radius: 6px;
  background: #fffdfa;
  padding: 14px;
}

.health-annotation-detail .ui-empty-state {
  margin: 0;
  border-radius: 6px;
}

.health-annotation-table-shell {
  border: 1px solid #e1d8cc;
  border-radius: 6px;
  overflow: auto;
}

.health-annotation-content-table th,
.health-annotation-content-table td {
  vertical-align: top;
}

.health-annotation-content-table td strong,
.health-annotation-content-table td small {
  display: block;
}

.health-annotation-content-table td small {
  margin-top: 3px;
  color: var(--tokamak-muted);
}

.health-annotation-content-table code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.health-forecast-sample small {
  color: var(--tokamak-muted);
  font-size: 0.72rem;
}

.health-forecast-date strong,
.health-forecast-date small {
  display: block;
}

.health-forecast-date small {
  color: var(--tokamak-muted);
  font-size: 0.72rem;
}

.health-forecast-sample {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-forecast-sample small {
  display: inline;
  margin-left: 6px;
  font-weight: 700;
}

.coverage-table {
  min-width: 1280px;
}

.coverage-cell {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 0.72rem;
  font-weight: 700;
}

.coverage-yes {
  background: var(--tokamak-green-bg);
  color: var(--tokamak-green);
}

.coverage-no {
  background: #eef1f6;
  color: var(--tokamak-muted);
}

.dependency-tree {
  margin: 0;
  padding-left: 18px;
  list-style: none;
}

.dependency-tree .dependency-tree {
  margin-top: 8px;
  border-left: 1px solid var(--tokamak-border);
}

.dependency-tree li {
  margin: 8px 0;
}

.dependency-tree div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dependency-tree span {
  color: var(--tokamak-muted);
  font-size: 0.8rem;
}

.overview-filter-form {
  display: grid;
  gap: 18px;
}

.overview-filter-form h2 {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.lineage-filter-form {
  margin-top: 0;
}

.lineage-root-list {
  display: grid;
  gap: 8px;
}

.framework-root-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.framework-root-grid .ui-resource-card {
  min-height: 112px;
  gap: 8px;
}

.framework-root-grid .ui-resource-title {
  line-height: 1.25;
}

.framework-root-grid .ui-resource-description {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.framework-root-grid .ui-resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.78rem;
}

.framework-root-grid .ui-resource-meta code {
  max-width: 100%;
  border-radius: 999px;
  background: #f1f1ed;
  padding: 2px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.framework-root-card {
  display: grid;
  gap: 10px;
  min-height: 128px;
  border: 1px solid var(--tokamak-border);
  background: var(--tokamak-panel);
  color: var(--tokamak-text);
  padding: 12px;
  text-decoration: none;
}

.framework-root-card:hover {
  border-color: var(--tokamak-text);
}

.lineage-node {
  --lineage-indent: calc(var(--lineage-depth, 0) * 14px);
  position: relative;
  margin-left: var(--lineage-indent);
}

.lineage-node summary {
  border: 1px solid #d8cfc2;
  border-radius: 7px;
  background: var(--tokamak-panel);
  padding: 7px 10px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

.lineage-node summary:hover {
  border-color: #c7b8a6;
  background: #fffdf9;
  box-shadow: 0 2px 5px rgba(17, 17, 17, 0.06);
}

.lineage-node-main {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
  gap: 5px 8px;
  align-items: baseline;
}

.lineage-node-header {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: baseline;
  min-width: 0;
}

.lineage-node-title {
  min-width: 0;
  font-weight: 700;
  line-height: 1.25;
}

.lineage-node-title a {
  color: var(--tokamak-text);
  text-decoration: none;
}

.lineage-node-title a:hover {
  text-decoration: underline;
}

.lineage-node-subtitle {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.lineage-node-badges {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}

.lineage-node-meta,
.lineage-child-count {
  color: var(--tokamak-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.lineage-node-meta {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid #e0e0d9;
  border-radius: 999px;
  background: #fbfbf8;
  padding: 2px 6px;
  white-space: normal;
}

.lineage-child-count {
  margin-top: 0;
}

.lineage-children {
  display: grid;
  gap: 5px;
  margin-top: 5px;
  margin-left: 6px;
  border-left: 1px solid #d8cfc2;
  padding-left: 8px;
}

.lineage-node-primitive {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  border: 1px solid #e2e2dc;
  border-radius: 7px;
  background: #f6f6f2;
  padding: 7px 10px;
}

.lineage-node-primitive .lineage-node-main {
  gap: 5px;
}

.lineage-node-match,
.lineage-node-match > summary {
  border-color: #dfb5ae;
  background: #fff7f3;
}

.lineage-node-match > summary {
  box-shadow: 0 0 0 2px rgba(216, 97, 89, 0.1);
}

.lineage-node-match.lineage-node-primitive {
  box-shadow: 0 0 0 2px rgba(216, 97, 89, 0.1);
}

.parity-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.46fr);
  gap: 18px;
  margin-bottom: 18px;
}

.parity-action-panel {
  gap: 14px;
}

.parity-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--tokamak-border);
  background: var(--tokamak-blue-bg);
  color: var(--tokamak-text);
  margin-bottom: 18px;
  padding: 14px 16px;
}

.parity-progress[hidden] {
  display: none;
}

.parity-progress strong,
.parity-progress span {
  display: block;
}

.parity-progress span {
  color: var(--tokamak-muted);
  font-size: 0.84rem;
  margin-top: 3px;
}

.parity-progress-indicator {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(36, 82, 74, 0.25);
  border-top-color: var(--tokamak-blue);
  border-radius: 50%;
  flex: 0 0 auto;
  animation: parity-spin 0.9s linear infinite;
}

@keyframes parity-spin {
  to {
    transform: rotate(360deg);
  }
}

.parity-form {
  display: grid;
  gap: 14px;
}

.parity-field-grid,
.parity-request-row,
.parity-save-row {
  display: grid;
  gap: 12px;
}

.parity-field-grid,
.parity-save-row {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.parity-request-row {
  grid-template-columns: 120px minmax(0, 1fr);
}

.parity-form label,
.parity-save-row label {
  display: grid;
  gap: 6px;
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.parity-save-row label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  min-height: 42px;
  text-transform: none;
}

.parity-form input,
.parity-form select {
  width: 100%;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--tokamak-text);
  padding: 10px 12px;
}

.parity-form input[type="checkbox"] {
  width: auto;
  accent-color: var(--tokamak-red);
}

.parity-help {
  margin: -4px 0 0;
  color: var(--tokamak-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.parity-subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e7ded2;
  padding-top: 12px;
}

.parity-subsection-heading h3 {
  margin: 0;
  color: var(--tokamak-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.parity-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.parity-action-grid form {
  margin: 0;
}

.parity-case-list {
  display: grid;
  gap: 8px;
}

.parity-run-all-button {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  margin-bottom: 0;
  white-space: normal;
}

.parity-case-list form {
  margin: 0;
}

.parity-case-button {
  display: grid;
  width: 100%;
  gap: 4px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
  color: var(--tokamak-text);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
}

.parity-case-button:hover {
  border-color: var(--tokamak-text);
}

.parity-case-button span {
  color: var(--tokamak-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.parity-result {
  margin-top: 18px;
}

@media (max-width: 1040px) {
  .parity-layout {
    grid-template-columns: 1fr;
  }
}

.parity-status {
  align-self: start;
  border: 1px solid var(--tokamak-border);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 9px;
  text-transform: uppercase;
}

.parity-status-match {
  background: var(--tokamak-green-bg);
  color: var(--tokamak-green);
}

.parity-status-mismatch {
  background: var(--tokamak-red-bg);
  color: var(--tokamak-red);
}

.parity-case-designation {
  display: block;
  width: fit-content;
  margin-top: 6px;
  border: 1px solid var(--tokamak-border);
  background: var(--tokamak-amber-bg);
  color: var(--tokamak-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 6px;
  text-transform: uppercase;
}

.parity-case-note {
  border-left: 3px solid var(--tokamak-amber);
  color: var(--tokamak-muted);
  margin: 8px 0 0;
  padding-left: 10px;
}

.parity-case-note-unknown {
  border-left-color: var(--tokamak-red);
}

.parity-response-grid article small {
  display: block;
  margin-top: 8px;
  color: var(--tokamak-red);
  overflow-wrap: anywhere;
}

.parity-freshness-warnings {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.parity-freshness-warnings p {
  border: 1px solid var(--tokamak-border);
  background: var(--tokamak-amber-bg);
  color: var(--tokamak-text);
  margin: 0;
  padding: 10px 12px;
}

.parity-section-heading {
  margin: 18px 0 10px;
}

.parity-section-heading h3 {
  margin: 0;
  font-size: 0.92rem;
}

.parity-section-heading p {
  margin: 4px 0 0;
  color: var(--tokamak-muted);
  font-size: 0.84rem;
}

.parity-diff-table pre {
  max-width: 360px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.parity-response-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parity-response-preview-grid article {
  border: 1px solid var(--tokamak-border);
  background: #ffffff;
  padding: 12px;
}

.parity-response-preview-grid h4 {
  margin: 0 0 8px;
  font-size: 0.86rem;
}

.parity-response-preview-grid pre {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.checkbox-row,
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.checkbox-grid {
  max-height: 130px;
  overflow-y: auto;
}

.checkbox-row label,
.checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tokamak-text);
  font-size: 0.9rem;
}

.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.graph-legend {
  display: inline-flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--tokamak-muted);
  font-size: 0.82rem;
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.graph-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

#overview-graph {
  width: 100%;
  height: 75vh;
  min-height: 560px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #0b1220;
}

#overview-graph:fullscreen {
  border-radius: 0;
  height: 100vh;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.admin-table th,
.admin-table td {
  max-width: 320px;
  border-bottom: 1px solid var(--tokamak-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #eeeeea;
  color: var(--tokamak-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.freshness-card,
.search-panel,
.empty-state,
.metric-summary-grid article,
.drilldown-card,
.data-table-shell,
.code-block,
.drilldown-node,
.table-wrap,
.search-input,
.search-select {
  border-radius: 0;
  box-shadow: none;
}

.ui-panel,
.ui-summary-item,
.ui-stat-card,
.ui-stats-grid > article,
.ui-resource-card,
.result-card,
.metadata-bar-row {
  border-radius: 8px;
}

.ui-panel,
.ui-summary-item,
.ui-stat-card,
.ui-stats-grid > article,
.ui-resource-card {
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 22px rgba(17, 17, 17, 0.025);
}

.ui-region-blue,
.ui-region-green,
.ui-region-red,
.ui-region-lilac,
.ui-region-amber {
  border-color: var(--tokamak-border);
  background: var(--tokamak-surface);
}

.ui-region-blue {
  border-color: var(--tokamak-blue-bg);
}

.ui-region-green {
  border-color: var(--tokamak-green-bg);
}

.ui-region-red {
  border-color: var(--tokamak-red-bg);
}

.ui-region-lilac {
  border-color: var(--tokamak-lilac);
}

.ui-region-amber {
  border-color: var(--tokamak-amber-bg);
}

.ui-panel.ui-region-blue {
  background: rgba(217, 229, 245, 0.2);
}

.ui-panel.ui-region-green {
  background: rgba(214, 229, 197, 0.2);
}

.ui-panel.ui-region-red {
  background: rgba(245, 212, 207, 0.2);
}

.ui-panel.ui-region-lilac {
  background: rgba(217, 201, 231, 0.2);
}

.ui-panel.ui-region-amber {
  background: rgba(247, 231, 174, 0.2);
}

.ui-region-blue > .ui-section-heading:first-child {
  background: rgba(217, 229, 245, 0.5);
}

.ui-region-green > .ui-section-heading:first-child {
  background: rgba(214, 229, 197, 0.5);
}

.ui-region-red > .ui-section-heading:first-child {
  background: rgba(245, 212, 207, 0.55);
}

.ui-region-lilac > .ui-section-heading:first-child {
  background: rgba(217, 201, 231, 0.5);
}

.ui-region-amber > .ui-section-heading:first-child {
  background: rgba(247, 231, 174, 0.5);
}

.ui-summary-item,
.ui-stat-card,
.ui-stats-grid > article {
  position: relative;
  overflow: hidden;
}

.ui-summary-item::before,
.ui-stat-card::before,
.ui-stats-grid > article::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--tokamak-blue);
  box-shadow: 0 0 0 5px var(--tokamak-blue-bg);
}

.ui-resource-card {
  position: relative;
}

.ui-resource-card:hover {
  box-shadow: 0 2px 4px rgba(17, 17, 17, 0.06), 0 14px 28px rgba(17, 17, 17, 0.04);
}

.ui-section-heading .ui-page-kicker {
  margin-bottom: 4px;
}

.ui-stack > .ui-section-heading:not(:first-child),
.ui-dashboard-grid .ui-stack > .ui-section-heading {
  margin-bottom: 0;
  border-left: 3px solid var(--tokamak-blue);
  padding-left: 12px;
}

.ui-panel > .ui-section-heading:first-child {
  background: linear-gradient(180deg, #fbfbf8 0%, #f5f5f1 100%);
}

.ui-panel.ui-region-blue > .ui-section-heading:first-child,
.ui-table-section.ui-region-blue > .ui-section-heading:first-child {
  background: rgba(217, 229, 245, 0.5);
}

.ui-panel.ui-region-green > .ui-section-heading:first-child,
.ui-table-section.ui-region-green > .ui-section-heading:first-child {
  background: rgba(214, 229, 197, 0.5);
}

.ui-panel.ui-region-red > .ui-section-heading:first-child,
.ui-table-section.ui-region-red > .ui-section-heading:first-child {
  background: rgba(245, 212, 207, 0.55);
}

.ui-panel.ui-region-lilac > .ui-section-heading:first-child,
.ui-table-section.ui-region-lilac > .ui-section-heading:first-child {
  background: rgba(217, 201, 231, 0.5);
}

.ui-panel.ui-region-amber > .ui-section-heading:first-child,
.ui-table-section.ui-region-amber > .ui-section-heading:first-child {
  background: rgba(247, 231, 174, 0.5);
}

.definitions-category.ui-region-blue > .definitions-category-header {
  background: rgba(217, 229, 245, 0.5);
}

.definitions-category.ui-region-green > .definitions-category-header {
  background: rgba(214, 229, 197, 0.5);
}

.definitions-category.ui-region-red > .definitions-category-header {
  background: rgba(245, 212, 207, 0.55);
}

.definitions-category.ui-region-lilac > .definitions-category-header {
  background: rgba(217, 201, 231, 0.5);
}

.definitions-category.ui-region-amber > .definitions-category-header {
  background: rgba(247, 231, 174, 0.5);
}

.ui-lineage-stat-rail .ui-stat-card::before {
  display: none;
}

.resource-card:hover,
.metadata-bar-row:hover {
  border-color: var(--tokamak-text);
}

.table-link,
.drilldown-breadcrumbs a {
  color: var(--tokamak-text);
}

@media (max-width: 980px) {
  .app-header-inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 0;
  }

  .app-nav-link {
    padding: 8px 8px 6px;
  }

  .app-user {
    justify-content: flex-start;
  }

  .freshness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ln-summary-grid,
  .ln-audit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parity-layout,
  .parity-field-grid,
  .parity-save-row,
  .control-plane-grid,
  .debugger-flow,
  .lineage-graph-layout,
  .debugger-grid {
    grid-template-columns: 1fr;
  }

  .lineage-graph-canvas {
    min-height: 360px;
  }

  .debugger-flow article:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -14px;
    transform: translateX(50%) rotate(135deg);
  }

  .debugger-phase-sequence article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .debugger-phase-sequence small,
  .debugger-phase-sequence i {
    grid-column: 2;
  }

  .debugger-trace-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .dashboard-shell {
    width: min(100% - 24px, 1240px);
    padding-top: 20px;
  }

  .app-header-inner {
    width: min(100% - 24px, 1240px);
  }

  .topbar,
  .session-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .freshness-panel {
    padding: 16px;
  }

  .freshness-summary p {
    font-size: 1.05rem;
  }

  .freshness-grid {
    grid-template-columns: 1fr;
  }

  .metric-summary-grid,
  .definition-detail-grid,
  .split-panels,
  .metric-scoreboard,
  .drilldown-grid,
  .drilldown-node summary,
  .drilldown-node-body,
  .audit-step,
  .competitive-filters,
  .matrix-two-column,
  .parity-response-preview-grid,
  .debugger-dag-list dl {
    grid-template-columns: 1fr;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .control-plane-resources {
    grid-template-columns: 1fr;
  }

  .framework-root-grid {
    grid-template-columns: 1fr;
  }

  .ln-summary-grid,
  .ln-source-stats,
  .ln-audit-grid,
  .ln-source-intel {
    grid-template-columns: 1fr;
  }

  .ln-source-main,
  .ln-source-actions,
  .ln-article-header,
  .ln-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .structured-data-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .section-heading {
    flex-direction: column;
  }

  .search-input-row {
    grid-template-columns: 1fr;
  }

  .parity-request-row {
    grid-template-columns: 1fr;
  }

  .freshness-card p {
    min-height: 0;
  }
}

/* Voices --------------------------------------------------------------- */

.voices-signal,
.voices-report,
.voices-action-card,
.voices-evidence-row,
.voices-evidence-detail,
.voices-insight {
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-panel);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 22px rgba(17, 17, 17, 0.025);
}

.voices-signal,
.voices-report {
  display: grid;
  gap: 16px;
  padding: 18px;
  margin-top: 18px;
}

.voices-insights,
.voices-signal-actions,
.voices-signal-evidence,
.voices-action-grid,
.voices-evidence-list,
.voices-report-evidence,
.voices-report-actions,
.voices-relationships {
  display: grid;
  gap: 12px;
}

.voices-action-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.voices-action-card,
.voices-insight {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
}

.voices-action-header,
.voices-insight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voices-action-title,
.voices-insight-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.voices-action-subject,
.voices-action-body,
.voices-action-reasoning,
.voices-insight-reasoning,
.voices-evidence-excerpt {
  margin: 0;
  color: var(--tokamak-text);
}

.voices-action-reasoning,
.voices-insight-reasoning {
  color: var(--tokamak-muted);
  font-size: 0.85rem;
}

.voices-action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voices-action-key,
.voices-subject-type,
.voices-relationship-term {
  color: var(--tokamak-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.voices-evidence-row,
.voices-evidence-detail {
  display: grid;
  gap: 12px;
  padding: 15px 16px;
}

.voices-evidence-title {
  margin: 0;
  font-size: 1.05rem;
}

.voices-evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
}

.voices-evidence-meta dt {
  color: var(--tokamak-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.voices-evidence-meta dd {
  margin: 2px 0 0;
}

.voices-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tokamak-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.voices-source-badge svg {
  width: 16px;
  height: 16px;
}

.voices-label-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voices-label-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tokamak-blue-bg);
  border: 1px solid var(--tokamak-blue);
  font-size: 0.82rem;
}

.voices-label-term {
  color: var(--tokamak-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.voices-label-confidence {
  color: var(--tokamak-muted);
  font-size: 0.72rem;
}

.voices-relationship {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--tokamak-border);
  border-radius: 8px;
  background: var(--tokamak-bg);
}

.voices-relationship-node {
  display: inline-flex;
  flex-direction: column;
  font-weight: 600;
}

.voices-relationship-type {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tokamak-lilac);
  font-size: 0.78rem;
  font-weight: 700;
}

.voices-back-link {
  color: var(--tokamak-muted);
  font-weight: 700;
}

.voices-report-section + .voices-report-section {
  margin-top: 14px;
}

.voices-tenant-switcher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.voices-tenant-switcher-label {
  color: var(--tokamak-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* button_to renders each option as its own <form>; keep them inline. */
.voices-tenant-switcher form {
  display: inline-flex;
  margin: 0;
}

.voices-tenant-option {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--tokamak-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--tokamak-text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(45, 36, 29, 0.06);
}

.voices-tenant-option:hover {
  background: var(--tokamak-ink);
  color: #ffffff;
}

.voices-tenant-option-active {
  background: var(--tokamak-ink);
  color: #ffffff;
  border-color: var(--tokamak-ink);
}
