:root {
  --bg-top: #0b132b;
  --bg-bottom: #1c2541;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f7fb;
  --muted: #c8d3e5;
  --accent: #ffcf5a;
  --ok: #67df9c;
  --warn: #ffb55c;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, #213967, var(--bg-top)),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.brand h1,
.hero h1,
.panel h2,
.eyebrow {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.layout > * {
  min-width: 0;
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.35));
  padding: 1rem 0.75rem;
}

.brand {
  padding: 0.35rem 0.45rem 0.85rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--accent);
}

.brand h1 {
  margin: 0.4rem 0 0;
  font-size: 1.3rem;
}

.nav-links {
  display: grid;
  gap: 0.4rem;
}

.nav-link {
  text-align: left;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 8px;
  padding: 0.52rem 0.6rem;
  cursor: pointer;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.shell {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.1rem 1rem 2.2rem;
  min-width: 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-end;
  margin-bottom: 0.9rem;
}

.subtitle {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  gap: 0.65rem;
  align-items: end;
  flex-wrap: wrap;
}

.inline-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.84rem;
}

.inline-field input {
  min-width: 0;
  width: min(360px, 100%);
}

input,
select,
textarea,
button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.56rem;
  font-size: 0.92rem;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.93);
  color: #13273f;
  max-width: 100%;
}

textarea {
  min-height: 90px;
}

button {
  background: var(--accent);
  color: #222;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #ffe194;
}

.global-strip {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.compatibility-banner {
  margin-bottom: 0.8rem;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 181, 92, 0.45);
  background: rgba(255, 181, 92, 0.16);
  color: #ffe6bd;
  font-size: 0.83rem;
}

.compatibility-banner.hidden {
  display: none;
}

.chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  font-size: 0.82rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.kpi-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.75rem;
}

.kpi-label {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-value {
  margin: 0.4rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 0.9rem;
}

.grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 0.9rem;
  min-width: 0;
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1.02rem;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.52rem;
}

.meta-list div {
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 0.5rem 0.58rem;
  min-width: 0;
  overflow: hidden;
}

.meta-list div.clickable-meta-row {
  cursor: pointer;
  border-color: rgba(246, 181, 70, 0.45);
}

.meta-list div.clickable-meta-row:hover {
  background: rgba(246, 181, 70, 0.14);
}

.meta-list span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.meta-list strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.health-item {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.58rem;
}

.health-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.health-item strong {
  margin-top: 0.25rem;
  display: block;
}

.pipeline-card {
  text-align: left;
  width: 100%;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.58rem;
}

.pipeline-card:hover {
  background: rgba(255, 255, 255, 0.12);
}

.pipeline-card small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 0.2rem;
}

.event-list {
  display: grid;
  gap: 0.5rem;
  max-height: 330px;
  overflow: auto;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.button-row button {
  flex: 1 1 160px;
}

.event-row {
  background: rgba(0, 0, 0, 0.23);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.52rem 0.62rem;
  min-width: 0;
  overflow: hidden;
}

.event-row p {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.event-row small {
  display: block;
  color: var(--muted);
  margin-top: 0.18rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.event-row span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-twin-list {
  display: grid;
  gap: 0.6rem;
}

.agent-twin-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0.7rem;
}

.agent-twin-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.agent-twin-role {
  margin: 0.24rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.agent-twin-card p {
  margin: 0.35rem 0;
  font-size: 0.86rem;
}

.agents-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.agents-toolbar label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
}

.agents-toolbar input,
.agents-toolbar select {
  width: 100%;
  min-width: 0;
}

.agent-table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  max-width: 100%;
}

.agent-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.agent-table th,
.agent-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.55rem;
  font-size: 0.8rem;
  line-height: 1.4;
  vertical-align: top;
  max-width: 14rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-table td small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-table th {
  text-align: left;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
}

.agent-table tbody tr {
  cursor: pointer;
}

.agent-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.agent-row-selected {
  background: rgba(255, 207, 90, 0.14);
}

.state-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.48rem;
  font-weight: 700;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.state-running,
.state-idle,
.state-recovering {
  background: rgba(103, 223, 156, 0.2);
}

.state-waiting,
.state-waiting_approval,
.state-paused,
.state-retrying,
.state-blocked {
  background: rgba(255, 181, 92, 0.2);
}

.state-degraded,
.state-failed,
.state-stopped {
  background: rgba(255, 107, 107, 0.22);
}

.result-box,
.raw-box {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(3, 13, 25, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.7rem;
  color: #e7eff8;
  max-height: 260px;
  overflow: auto;
}

.raw-box {
  margin-top: 0.7rem;
}

.status-ok {
  color: var(--ok);
}

.status-error {
  color: var(--danger);
}

.dan-shell-header {
  margin-bottom: 0.8rem;
}

.dan-header-top {
  display: grid;
  gap: 0.7rem;
}

.dan-breadcrumbs {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.dan-toolbar {
  margin-bottom: 0;
}

.dan-workspace-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0.8rem;
}

.dan-workspace-nav-panel {
  position: sticky;
  top: 0.6rem;
  align-self: start;
}

.dan-nav-links {
  display: grid;
  gap: 0.4rem;
}

.dan-nav-link {
  text-align: left;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  font-size: 0.82rem;
}

.dan-nav-link.active,
.dan-nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

.dan-section-link {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 0.7rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
}

.dan-section-link:hover {
  color: var(--accent, #f6b546);
}

.dan-workspace-main {
  display: grid;
  gap: 0.8rem;
}

.da-view {
  display: none;
}

.da-view.active {
  display: block;
}

@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

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

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

  .dan-workspace-grid {
    grid-template-columns: 1fr;
  }

  .dan-workspace-nav-panel {
    position: static;
  }

  .dan-nav-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 0.9rem 0.75rem 1.5rem;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar {
    width: 100%;
  }

  .inline-field {
    width: 100%;
  }

  .inline-field input {
    width: 100%;
  }

  .grid.two-col {
    grid-template-columns: 1fr;
  }

  .nav-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agents-toolbar {
    grid-template-columns: 1fr;
  }

  .dan-nav-links {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .agent-ops-table,
  .business-table {
    min-width: 0;
  }

  .agent-ops-table thead,
  .business-table thead {
    display: none;
  }

  .agent-ops-table tbody,
  .agent-ops-table tr,
  .business-table tbody,
  .business-table tr {
    display: block;
  }

  .agent-ops-table tr,
  .business-table tr {
    margin-bottom: 0.7rem;
    padding: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
  }

  .agent-ops-table td,
  .business-table td {
    display: grid;
    grid-template-columns: minmax(92px, 42%) minmax(0, 1fr);
    gap: 0.45rem;
    align-items: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.34rem 0;
    word-break: break-word;
  }

  .agent-ops-table td:last-child,
  .business-table td:last-child {
    border-bottom: none;
  }

  .agent-ops-table td::before,
  .business-table td::before {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    content: "Field";
  }

  .agent-ops-table td:nth-child(1)::before { content: "Agent"; }
  .agent-ops-table td:nth-child(2)::before { content: "Role"; }
  .agent-ops-table td:nth-child(3)::before { content: "Env"; }
  .agent-ops-table td:nth-child(4)::before { content: "Classification"; }
  .agent-ops-table td:nth-child(5)::before { content: "State"; }
  .agent-ops-table td:nth-child(6)::before { content: "Task"; }
  .agent-ops-table td:nth-child(7)::before { content: "Workflow"; }
  .agent-ops-table td:nth-child(8)::before { content: "Progress"; }
  .agent-ops-table td:nth-child(9)::before { content: "Last Decision"; }
  .agent-ops-table td:nth-child(10)::before { content: "Confidence"; }
  .agent-ops-table td:nth-child(11)::before { content: "Pending"; }
  .agent-ops-table td:nth-child(12)::before { content: "Budget"; }
  .agent-ops-table td:nth-child(13)::before { content: "Health"; }
  .agent-ops-table td:nth-child(14)::before { content: "Kill-Switch"; }

  .business-table td:nth-child(1)::before { content: "Title"; }
  .business-table td:nth-child(2)::before { content: "Status"; }
  .business-table td:nth-child(3)::before { content: "Owner"; }
  .business-table td:nth-child(4)::before { content: "Workflow"; }
  .business-table td:nth-child(5)::before { content: "Approval"; }
  .business-table td:nth-child(6)::before { content: "Risk"; }
  .business-table td:nth-child(7)::before { content: "Classification"; }
  .business-table td:nth-child(8)::before { content: "Updated"; }
}

/* ——— MNC1 Media Network ——— */
.mnc-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  background:
    linear-gradient(120deg, rgba(255, 207, 90, 0.12), transparent 42%),
    rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 207, 90, 0.22);
}

.mnc-kicker {
  margin: 0 0 0.25rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
}

.mnc-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
  margin: 0.85rem 0 1rem;
}

.mnc-envelope-panel .mnc-kpi-strip {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

.mnc-kpi {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  min-height: 4.25rem;
  height: auto;
  overflow: visible;
  align-content: start;
}

.mnc-kpi-label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mnc-kpi strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mnc-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.mnc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.mnc-panel-head h3 {
  margin: 0;
}

.mnc-platform-list,
.mnc-property-list {
  display: grid;
  gap: 0.55rem;
  max-height: min(62vh, 720px);
  overflow: auto;
}

.mnc-platform-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.mnc-platform-row.is-expanded {
  border-color: rgba(255, 207, 90, 0.45);
  background: rgba(255, 207, 90, 0.08);
}

.mnc-platform-row.is-catalog {
  opacity: 0.78;
}

.mnc-platform-toggle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  text-align: left;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
}

.mnc-platform-toggle:hover,
.mnc-platform-toggle:focus-visible {
  background: rgba(255, 207, 90, 0.1);
  color: inherit;
}

.mnc-platform-row:hover {
  border-color: rgba(255, 207, 90, 0.4);
}

.mnc-platform-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
}

.mnc-platform-meta {
  display: grid;
  gap: 0.15rem;
}

.mnc-platform-caps {
  font-size: 0.7rem;
  line-height: 1.25;
}

.mnc-platform-stats {
  display: grid;
  gap: 0.1rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
}

.mnc-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.mnc-filters label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.mnc-property-row {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 220px);
  gap: 0.55rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.mnc-property-main {
  display: grid;
  gap: 0.28rem;
  text-align: left;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  border: none;
  padding: 0;
  cursor: pointer;
}

.mnc-property-main:hover,
.mnc-property-main:focus-visible {
  background: rgba(255, 207, 90, 0.08);
  color: inherit;
}

.mnc-property-row:hover {
  border-color: rgba(255, 207, 90, 0.35);
  background: rgba(255, 207, 90, 0.05);
}

.mnc-property-controls .ghost-btn,
.mnc-property-controls button[data-why] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 600;
}

.mnc-property-controls .ghost-btn:hover,
.mnc-property-controls button[data-why]:hover {
  background: rgba(255, 207, 90, 0.18);
  color: var(--text);
}

.mnc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.mnc-ready {
  background: rgba(255, 207, 90, 0.16);
}

.mnc-effective {
  font-size: 0.78rem;
  color: var(--muted);
}

.mnc-effective em {
  color: var(--accent);
  font-style: normal;
}

.mnc-property-controls {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.mnc-switch {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.mnc-switch em {
  font-style: normal;
  color: var(--text);
  min-width: 1.8rem;
}

.mnc-hint {
  color: var(--warn);
  font-size: 0.7rem;
  line-height: 1.3;
}

.mnc-pager {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.mnc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  z-index: 40;
  padding: 1rem;
  background: linear-gradient(180deg, #15233f, #0d1628);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
  overflow: auto;
}

.mnc-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mnc-detail-grid {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr;
  gap: 0.35rem 0.65rem;
  margin: 0;
}

.mnc-detail-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mnc-detail-grid dd {
  margin: 0;
  word-break: break-word;
}

@media (max-width: 980px) {
  .mnc-layout,
  .mnc-property-row {
    grid-template-columns: 1fr;
  }

  .mnc-platform-toggle {
    grid-template-columns: auto 1fr;
  }

  .mnc-platform-stats {
    grid-column: 1 / -1;
    text-align: left;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    gap: 0.45rem;
  }
}

.mnc-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 207, 90, 0.1);
  border: 1px solid rgba(255, 207, 90, 0.25);
}

.mnc-bulk-status {
  flex: 1 1 100%;
  font-size: 0.78rem;
  color: var(--muted);
  min-height: 1.1em;
}

.mnc-bulk-status.is-error {
  color: var(--warn, #ffb35c);
}

.mnc-bulk-status.is-ok {
  color: var(--accent);
}

.mnc-bulk-bar button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.mnc-select {
  align-self: start;
  padding-top: 0.35rem;
}

.mnc-property-row {
  grid-template-columns: auto 1fr minmax(180px, 220px);
}

.mnc-opportunity-list,
.mnc-radar {
  display: grid;
  gap: 0.55rem;
}

.mnc-opp-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.mnc-opp-rank {
  font-weight: 700;
  color: var(--accent);
}

.mnc-radar-group {
  padding: 0.45rem 0.55rem;
  border-left: 2px solid rgba(255, 207, 90, 0.45);
}

.mnc-ask-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.mnc-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 0.5rem 0 0.75rem;
}

.mnc-mini-table th,
.mnc-mini-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  padding: 0.3rem 0.2rem;
}

/* ——— MNC2 Publishing Policies ——— */
.mnc-mnc2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}
.mnc-mnc2-status {
  min-height: 1.25rem;
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mnc-mnc2-status[data-kind='ok'] {
  color: var(--ok);
}
.mnc-mnc2-status[data-kind='error'] {
  color: var(--danger);
}
.mnc-mnc2-list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  min-width: 0;
}
.mnc2-kpi-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.mnc-kpi-value {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mnc-mnc2-row em {
  font-style: normal;
  color: var(--accent);
}
.mnc-mnc2-panel {
  margin-top: 1rem;
  min-width: 0;
  overflow-x: clip;
  overflow-y: visible;
}
.mnc-mnc2-panel .result-box,
.mnc2-detail {
  max-width: 100%;
  margin-bottom: 0.85rem;
}
.mnc-hr1-review {
  margin: 0.75rem 0;
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.mnc-hr1-head {
  min-width: 0;
}
.mnc-hr1-head h4 {
  margin: 0 0 0.35rem;
}
.mnc-hr1-head p {
  margin: 0.2rem 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mnc-hr1-card {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.mnc-hr1-card h5 {
  margin: 0 0 0.5rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mnc-hr1-dl {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
  margin: 0 0 0.65rem;
  min-width: 0;
}
.mnc-hr1-dl dt {
  opacity: 0.7;
}
.mnc-hr1-dl dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mnc-hr1-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.mnc-hr1-actions button {
  font-size: 0.78rem;
}
.mnc-hr1-scroll,
.mnc-hr1-review pre,
.mnc-hr1-review details {
  min-width: 0;
  max-width: 100%;
}
.mnc-hr1-scroll,
.mnc-hr1-review pre {
  display: block;
  margin: 0.35rem 0 0;
  padding: 0.55rem 0.65rem;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.75rem;
  line-height: 1.35;
  background: rgba(3, 13, 25, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}
.mnc-mnc2-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.85rem;
  min-width: 0;
}
.mnc-mnc2-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 900px) {
  .mnc-mnc2-row {
    grid-template-columns: 1fr;
  }
  .mnc-hr1-dl {
    grid-template-columns: 1fr;
  }
}

.approvals-view {
  min-width: 0;
  font-family: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
}

.approvals-view h2 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  letter-spacing: 0.01em;
}

.approvals-view .panel {
  overflow-x: clip;
}

.approvals-view .meta-list {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.approvals-view .meta-list strong {
  font-weight: 500;
  font-size: 0.88rem;
}

.approvals-view .agents-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.approvals-view .agents-toolbar input,
.approvals-view .agents-toolbar select {
  font-family: inherit;
  font-size: 0.86rem;
}

.approvals-view .button-row button {
  flex: 1 1 180px;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  font-family: inherit;
  font-size: 0.84rem;
}

.approvals-view textarea {
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  line-height: 1.45;
}

.approvals-view .agent-table {
  min-width: 960px;
  font-family: inherit;
}

.approval-token {
  display: inline-block;
  max-width: 100%;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.approval-kv {
  display: grid;
  gap: 0.35rem;
  margin: 0.45rem 0 0;
  min-width: 0;
}

.approval-kv > div {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7.5rem) minmax(0, 1fr);
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.approval-kv dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.approval-kv dd {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 700px) {
  .approval-kv > div {
    grid-template-columns: 1fr;
  }
}

/* ——— MNC3 Enterprise Operational Health ——— */
.panel-note {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.eoh-hero {
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 207, 90, 0.28);
  background:
    linear-gradient(135deg, rgba(33, 57, 103, 0.55), rgba(11, 19, 43, 0.85)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      rgba(255, 255, 255, 0.015) 11px,
      rgba(255, 255, 255, 0.015) 12px
    );
}

.eoh-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.eoh-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--accent);
}

.eoh-hero h2 {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
}

.eoh-hero h2[data-status-group="positive"] { color: var(--ok); }
.eoh-hero h2[data-status-group="ready"] { color: #8fd3ff; }
.eoh-hero h2[data-status-group="warning"] { color: var(--warn); }
.eoh-hero h2[data-status-group="critical"] { color: var(--danger); }
.eoh-hero h2[data-status-group="attention"] { color: #e0c4ff; }
.eoh-hero h2[data-status-group="neutral"],
.eoh-hero h2[data-status-group="inactive"] { color: var(--muted); }

.eoh-summary {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

.eoh-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.eoh-metrics > div {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
}

.eoh-metrics span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eoh-metrics strong {
  font-size: 1.15rem;
}

.eoh-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: var(--muted);
  align-items: center;
}

.eoh-explain-btn,
.eoh-detail-btn,
.eoh-dialog-close {
  appearance: none;
  border: 1px solid rgba(255, 207, 90, 0.45);
  background: rgba(255, 207, 90, 0.12);
  color: var(--text);
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

.eoh-explain-box {
  margin-top: 0.75rem;
  max-height: 220px;
  overflow: auto;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.65rem;
}

.eoh-cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.55rem;
}

.eoh-cap-item {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

.eoh-cap-item span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.eoh-cap-item strong {
  display: block;
  margin-top: 0.2rem;
}

.eoh-domain-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.eoh-domain-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  padding: 0;
}

.eoh-domain-card > summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
}

.eoh-domain-card > summary::-webkit-details-marker { display: none; }

.eoh-status-pill {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.eoh-domain-body {
  padding: 0 0.7rem 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  color: var(--muted);
}

.eoh-domain-body ul {
  margin: 0.4rem 0 0.55rem;
  padding-left: 1.1rem;
}

.eoh-positive .eoh-status-pill { color: var(--ok); border-color: rgba(103, 223, 156, 0.4); }
.eoh-ready .eoh-status-pill { color: #8fd3ff; border-color: rgba(143, 211, 255, 0.4); }
.eoh-warning .eoh-status-pill { color: var(--warn); border-color: rgba(255, 181, 92, 0.45); }
.eoh-critical .eoh-status-pill { color: var(--danger); border-color: rgba(255, 107, 107, 0.45); }
.eoh-attention .eoh-status-pill { color: #e0c4ff; border-color: rgba(224, 196, 255, 0.4); }
.eoh-neutral .eoh-status-pill,
.eoh-inactive .eoh-status-pill { color: var(--muted); }

.eoh-actions-list {
  display: grid;
  gap: 0.55rem;
}

.eoh-action {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  padding: 0.65rem 0.75rem;
}

.eoh-action header {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.eoh-priority {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.eoh-dialog {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0f1a33;
  color: var(--text);
  max-width: min(720px, 92vw);
  width: 100%;
}

.eoh-dialog::backdrop {
  background: rgba(4, 8, 18, 0.72);
}

.eoh-dialog-inner header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.eoh-dialog-inner pre {
  max-height: 55vh;
  overflow: auto;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.75rem;
}

@media (max-width: 900px) {
  .eoh-hero-top {
    grid-template-columns: 1fr;
  }
}

.eoh-root-cause { font-size: 0.86rem; line-height: 1.55; }
.eoh-rc-node { margin: 0.15rem 0; }
.eoh-agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem;
}
.eoh-agent {
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  display: grid;
  gap: 0.15rem;
}
.eoh-agent small { color: var(--muted); font-size: 0.72rem; }
.eoh-timeline { display: grid; gap: 0.45rem; }
.eoh-tl-item {
  display: grid;
  gap: 0.1rem;
  padding: 0.45rem 0.55rem;
  border-left: 2px solid rgba(255,207,90,0.45);
  background: rgba(0,0,0,0.18);
  font-size: 0.82rem;
}
.eoh-tl-item time { color: var(--muted); font-size: 0.72rem; }

/* ——— TIKTOK-REVIEW-1 — Signal console surface ——— */
#view-tiktok-integration.view.active .ttk-shell,
#view-tiktok-integration .ttk-shell {
  --ttk-ink: #070b14;
  --ttk-signal: #4fd1c5;
  --ttk-signal-hot: #ff6b8a;
  --ttk-line: rgba(79, 209, 197, 0.28);
  --ttk-panel: rgba(7, 11, 20, 0.55);
  position: relative;
  display: grid;
  gap: 0.95rem;
  padding: 0.15rem 0 1.25rem;
  isolation: isolate;
}

#view-tiktok-integration .ttk-shell::before {
  content: "";
  position: absolute;
  inset: -0.4rem -0.2rem auto -0.2rem;
  height: 18rem;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 88% 0%, rgba(255, 107, 138, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 70% at 8% 10%, rgba(79, 209, 197, 0.18), transparent 50%),
    linear-gradient(180deg, rgba(7, 11, 20, 0.35), transparent);
  border-radius: 18px;
}

.ttk-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.9fr);
  gap: 1.1rem;
  align-items: end;
  padding: 1.25rem 1.2rem 1.15rem;
  border: 1px solid var(--ttk-line);
  background:
    linear-gradient(125deg, rgba(79, 209, 197, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.28));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ttk-hero-glow {
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: -4rem;
  top: -8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 209, 197, 0.22), transparent 68%);
  pointer-events: none;
  animation: ttk-pulse 5.5s ease-in-out infinite;
}

.ttk-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ttk-kicker {
  color: var(--ttk-signal) !important;
}

.ttk-hero h2 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ttk-hero .subtitle {
  max-width: 42rem;
  color: var(--muted);
}

.ttk-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.ttk-review-badge {
  background: rgba(255, 107, 138, 0.16);
  border: 1px solid rgba(255, 107, 138, 0.45);
  color: #ffd0da;
}

.ttk-env-badge {
  border-color: rgba(79, 209, 197, 0.4);
  color: var(--ttk-signal);
  background: rgba(79, 209, 197, 0.08);
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-size: 0.72rem;
}

.ttk-btn-connect {
  background: linear-gradient(180deg, #6ee7d8, var(--ttk-signal));
  color: #04110f;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(79, 209, 197, 0.25), 0 10px 28px rgba(79, 209, 197, 0.18);
}

.ttk-btn-connect:hover:not(:disabled) {
  filter: brightness(1.06);
}

.ttk-btn-connect:disabled {
  opacity: 0.55;
  cursor: wait;
}

.ttk-btn-ghost {
  border-color: rgba(79, 209, 197, 0.28);
}

.ttk-status-banner {
  margin: 0;
  min-height: 1.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.88rem;
  color: var(--muted);
}

.ttk-status-banner.is-ok {
  color: var(--ok);
  border-color: rgba(103, 223, 156, 0.35);
  background: rgba(103, 223, 156, 0.08);
}

.ttk-status-banner.is-error {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
}

.ttk-kpi-strip .mnc-kpi {
  border-color: rgba(79, 209, 197, 0.18);
  background:
    linear-gradient(160deg, rgba(79, 209, 197, 0.08), transparent 55%),
    rgba(0, 0, 0, 0.32);
}

.ttk-kpi-strip .mnc-kpi .label,
.ttk-kpi-strip .mnc-kpi-label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ttk-kpi-strip .mnc-kpi strong {
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-size: 0.8rem;
  color: var(--text);
}

.ttk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.ttk-span-2 {
  grid-column: 1 / -1;
}

.ttk-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    var(--ttk-panel);
  border-color: rgba(255, 255, 255, 0.14);
  animation: ttk-rise 0.55s ease both;
}

.ttk-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--ttk-signal), transparent 75%);
  opacity: 0.85;
}

.ttk-panel--scopes::before { background: linear-gradient(180deg, var(--accent), transparent 75%); }
.ttk-panel--stats::before { background: linear-gradient(180deg, #7dd3fc, transparent 75%); }
.ttk-panel--videos::before { background: linear-gradient(180deg, var(--ttk-signal-hot), transparent 75%); }
.ttk-panel--safety::before { background: linear-gradient(180deg, var(--danger), transparent 75%); }

.ttk-panel:nth-child(1) { animation-delay: 0.04s; }
.ttk-panel:nth-child(2) { animation-delay: 0.08s; }
.ttk-panel:nth-child(3) { animation-delay: 0.12s; }
.ttk-panel:nth-child(4) { animation-delay: 0.16s; }
.ttk-panel:nth-child(5) { animation-delay: 0.2s; }
.ttk-panel:nth-child(6) { animation-delay: 0.24s; }
.ttk-panel:nth-child(7) { animation-delay: 0.28s; }
.ttk-panel:nth-child(8) { animation-delay: 0.32s; }

.ttk-section {
  min-width: 0;
  margin-top: 0.35rem;
}

.ttk-dl {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.ttk-dl > div {
  display: grid;
  grid-template-columns: minmax(7rem, 10.5rem) 1fr;
  gap: 0.55rem;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ttk-dl dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  align-self: center;
}

.ttk-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-size: 0.82rem;
  color: var(--text);
}

.ttk-scope-list,
.ttk-purpose-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.ttk-scope-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  align-items: start;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.24);
}

.ttk-scope-name {
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-weight: 650;
  font-size: 0.84rem;
  color: var(--text);
}

.ttk-scope-list li .muted {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
}

.ttk-scope-list .chip {
  justify-self: end;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.ttk-scope-requested {
  background: rgba(255, 207, 90, 0.14);
  border-color: rgba(255, 207, 90, 0.4);
  color: var(--accent);
}

.ttk-scope-granted {
  background: rgba(103, 223, 156, 0.14);
  border-color: rgba(103, 223, 156, 0.4);
  color: var(--ok);
}

.ttk-scope-missing {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.4);
  color: var(--danger);
}

.ttk-scope-unknown {
  background: rgba(200, 211, 229, 0.08);
  border-color: rgba(200, 211, 229, 0.25);
  color: var(--muted);
}

.ttk-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.ttk-video-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ttk-video-card:hover {
  border-color: rgba(79, 209, 197, 0.4);
  transform: translateY(-1px);
}

.ttk-thumb {
  width: 84px;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(79, 209, 197, 0.2), rgba(0, 0, 0, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ttk-thumb-empty {
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  padding: 0.35rem;
}

.ttk-video-card strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.ttk-video-card a {
  color: var(--ttk-signal);
  text-decoration: none;
  font-size: 0.8rem;
}

.ttk-video-card a:hover {
  text-decoration: underline;
}

.ttk-purpose-list li {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  border-left: 3px solid var(--ttk-signal);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 0 10px 10px 0;
}

.ttk-purpose-list strong {
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  color: var(--ttk-signal);
  font-size: 0.82rem;
}

.ttk-disconnect-wrap {
  margin-top: 0.95rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.ttk-disconnect-note {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ttk-empty {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  border: 1px dashed rgba(79, 209, 197, 0.3);
  background: rgba(79, 209, 197, 0.05);
  color: var(--muted);
}

@keyframes ttk-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ttk-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.06); }
}

@media (max-width: 960px) {
  .ttk-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ttk-hero-actions {
    justify-content: flex-start;
  }

  .ttk-grid {
    grid-template-columns: 1fr;
  }

  .ttk-span-2 {
    grid-column: auto;
  }

  .ttk-dl > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ttk-panel,
  .ttk-hero-glow,
  .ttk-video-card {
    animation: none !important;
    transition: none !important;
  }
}
