.preview-sgsi {
  width: calc(100% - 2 * clamp(.75rem, 1.5vw, 1.5rem));
  max-width: none;
}
.preview-sgsi .notebook {
  --notebook-margin: clamp(1.2rem, 2vw, 2rem);
  padding-right: clamp(1rem, 2vw, 2rem);
}
.preview-sgsi .notebook p { max-width: none; }
.preview-sgsi .notebook .case-prose { overflow-wrap: break-word; }
.preview-sgsi .ceo-letter { max-width: none; }
.preview-sgsi .case-section > h3 { font-size: clamp(1.4rem, 2vw, 1.85rem); }
.preview-sgsi .case-prose { line-height: 1.65; }
.preview-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: .7rem;
  margin-block: 1rem;
}
.preview-facts div { padding: .65rem .8rem; border-left: 2px solid var(--wine); background: var(--paper); }
.preview-facts dt { color: var(--wine); font-weight: 600; }
.preview-facts dd { margin: .15rem 0 0; }
.approval-tags { justify-content: start; }
.preview-sgsi .case-table { font-size: clamp(.79rem, 1vw, .9rem); }
.preview-sgsi .case-table caption { font: 400 1.45rem/1.15 var(--serif); color: var(--ink); }
.preview-sgsi .motivation-table th:first-child { width: 30%; }
.preview-sgsi .stakeholder-table th:first-child { width: 24%; }
.preview-sgsi .treatment-table th:first-child { width: 24%; }
.preview-sgsi .treatment-table th:nth-child(2) { width: 16%; }
.preview-sgsi .risk-scales :is(th, td):nth-child(2) { width: 13%; text-align: center; }
.preview-sgsi .risk-scales .case-table { align-self: start; }
.ceo-letter {
  margin: 1rem auto;
  max-width: 65ch;
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--paper);
  border-left: 3px solid var(--wine);
}
.ceo-letter header { border-bottom: 1px solid var(--rule); padding-bottom: .75rem; }
.ceo-letter-title { font: 400 2rem/1.15 var(--serif); }
.ceo-letter > p { margin-top: .8rem; }
.ceo-letter footer { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--rule); }
.preview-certificate {
  max-width: 48rem;
  margin: 1rem auto;
  padding: clamp(1rem, 5vw, 3rem);
  border: 1px solid var(--rule);
  border-left: clamp(.65rem, 3vw, 2rem) solid var(--wine);
  text-align: center;
  background: var(--paper);
}
.preview-certificate figcaption { font-size: .8rem; color: var(--wine); font-weight: 700; }
.preview-certificate p { margin-inline: auto; }
.preview-certificate .certificate-title { font: 400 clamp(2.5rem, 6vw, 4.2rem)/1 var(--serif); margin-block: .65rem 1.2rem; }
.certificate-organization { padding: 1rem .25rem; border-block: 1px solid var(--rule); }
.preview-certificate .certificate-standard { font-weight: 700; color: var(--wine); margin-top: 1rem; }
.preview-certificate .case-prose { margin-top: .85rem; }
.certificate-footer { margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--rule); font-size: .8rem; color: var(--muted); }
@media (max-width: 46rem) {
  .preview-sgsi { width: calc(100% - 1.5rem); }
  .preview-sgsi .case-table :is(td, th) { padding: .4rem .3rem; }
}

.preview-certificate {
  border-left-width: clamp(1rem, 5vw, 4rem);
}
.preview-certificate .certificate-title { margin-bottom: .35rem; }
.certificate-number {
  color: var(--muted);
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--wine);
  letter-spacing: .06em;
}
.certificate-intro { margin-block: 1.3rem .45rem; }
.certificate-dates,
.certificate-institutions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .7rem 1.4rem;
  margin: 1.3rem 0;
  padding-block: .85rem;
  border-block: 1px solid var(--rule);
}
.certificate-dates dt,
.certificate-institutions dt { font-size: .8rem; color: var(--muted); }
.certificate-dates dd,
.certificate-institutions dd { margin: .2rem 0 0; font-weight: 600; }
.certificate-signature { font: italic 400 2.15rem/1.25 var(--serif); color: var(--wine); }
.certificate-footer { color: var(--wine); font-weight: 700; }

.risk-table-image { margin-block: 1.25rem; }
.risk-table-image figcaption { font: 400 1.45rem/1.15 var(--serif); margin-bottom: .55rem; }
.risk-table-image img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); }
.risk-table-image p { margin-top: .4rem; }
.monitor-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.monitor-bars { display: grid; gap: .45rem; list-style: none; }
.risk-chart .monitor-bars { padding: 0; }
.monitor-bars li { display: grid; grid-template-columns: minmax(7rem, 1.2fr) minmax(0, 2fr) 3rem; gap: .5rem; align-items: center; }
.monitor-bars meter { width: 100%; height: .9rem; accent-color: var(--wine); }
.monitor-bars meter::-webkit-meter-optimum-value { background: var(--wine); }
.monitor-bars meter::-moz-meter-bar { background: var(--wine); }
.monitor-bars strong { text-align: right; }
.preview-sgsi .monitor-table { min-width: 52rem; table-layout: auto; }
@media (max-width: 52rem) { .monitor-charts { grid-template-columns: minmax(0, 1fr); gap: 0; } }

.soa-dashboard { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; margin-block: 1rem; }
.soa-dashboard .risk-chart { margin: 0; }
.soa-exclusion { background: var(--paper); border-left: 3px solid var(--wine); padding: 1rem; }
.soa-exclusion h4 { margin: 0 0 .5rem; font: 400 1.4rem/1.2 var(--serif); color: var(--wine); }
.soa-exclusion p + p { margin-top: .55rem; }
.soa-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: .65rem; }
.soa-filters label { display: grid; gap: .25rem; font-size: .85rem; }
.soa-filters :is(input, select) { min-width: 0; width: 100%; padding: .6rem; border: 1px solid var(--rule); border-radius: 0; background: #fffaf4; color: var(--ink); font: inherit; }
.soa-explorer > p { margin-block: .6rem; font-size: .82rem; color: var(--muted); }
.soa-table-scroll { overflow: auto; max-height: 34rem; border: 1px solid var(--rule); }
.preview-sgsi .soa-table { width: 100%; min-width: 49rem; margin: 0; table-layout: fixed; }
.preview-sgsi .soa-table caption { padding: .7rem; background: var(--paper); }
.preview-sgsi .soa-table thead th { position: sticky; top: 0; background: #f1e5dc; z-index: 1; }
.soa-table th:first-child { width: 7%; }
.soa-table th:nth-child(2) { width: 12%; }
.soa-table th:nth-child(3) { width: 22%; }
.soa-table th:nth-child(4) { width: 14%; }
.soa-table th:nth-child(5) { width: 45%; }
.soa-table tr[hidden] { display: none; }
@media (max-width: 52rem) {
  .soa-dashboard, .soa-filters { grid-template-columns: minmax(0, 1fr); }
}

.preview-sgsi .record-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  margin: 0;
}
.preview-sgsi .record-table caption { padding: .7rem; background: var(--paper); }
.preview-sgsi .record-table thead th { position: sticky; top: 0; background: #f1e5dc; z-index: 1; }
.record-table tr[hidden] { display: none; }
.soa-explorer { margin-block: 1rem; }

.implementation-path { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0; }
.notebook .implementation-path { padding-left: 0; }
.implementation-path li { padding: .45rem .65rem; border-bottom: 2px solid var(--wine); background: var(--paper); font-size: .85rem; }
.source-note { font-size: .82rem; color: var(--muted); margin-top: .6rem; }
.audit-sources { font-size: .85rem; }
.audit-sources li + li { margin-top: .45rem; }
