/*
 * Responsive containment for the MyGovernance dashboard.
 *
 * Wide audit tables remain horizontally scrollable inside .table-wrap, while
 * the document itself never grows beyond the viewport.
 */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

.container,
.dashboard,
.metrics-grid,
.panel-grid,
.meta-grid,
.dataspaces-grid,
.ops-grid,
.panel,
.metric-card,
.meta-card,
.dataspace-card,
.ops-card,
.hero,
.hero-copy,
.hero-panel {
  min-width: 0;
  max-width: 100%;
}

.panel-head,
.stack-row,
.ops-card-head,
.hero-stats div {
  min-width: 0;
}

.panel-head > *,
.stack-row > *,
.ops-card-head > *,
.hero-stats div > * {
  min-width: 0;
}

.panel-subtitle,
.metric-detail,
.row-kicker,
.dataspace-card code,
.stack-row code,
.meta-list li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.panel img,
.panel svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.audit-table {
  max-width: none;
}

.json-block {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .container {
    width: 100%;
    padding: 14px;
  }

  .site-masthead {
    align-items: flex-start;
  }

  .brand-lockup-copy {
    min-width: 0;
  }

  .top-nav {
    width: 100%;
    padding: 10px;
  }

  .lang-switch {
    width: 100%;
    margin-left: 0;
  }

  .hero {
    padding: 22px;
    border-radius: 22px;
  }

  .panel,
  .metric-card,
  .meta-card,
  .dataspace-card,
  .ops-card {
    padding: 16px;
    border-radius: 18px;
  }

  .panel-head,
  .stack-row,
  .ops-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-pill {
    min-width: 0;
    max-width: 100%;
  }
}
