:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1a1d21;
  --muted: #5c6570;
  --border: #d9dee3;
  --primary: #1e3a5f;
  --primary-hover: #152a45;
  --danger: #8b2942;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Публичный HTML-отчёт: ширина сетки (шапка + main + подвал) */
  --page-max-report: 1370px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Публичный отчёт: выравнивание шапки/футера с основным контейнером --- */
body.report-page-route {
  overflow-x: hidden;
}

body.report-page-route .site-header .container.site-header__inner,
body.report-page-route .public-footer .public-footer__inner {
  max-width: var(--page-max-report);
  box-sizing: border-box;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.public-header__contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  justify-content: flex-end;
  min-width: 0;
}

.public-header__link {
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.public-header__link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .public-header__contacts {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  .public-header__link {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.narrow-card {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  flex-shrink: 0;
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.brand {
  display: block;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.report-pdf-actions {
  margin: 0 0 0.75rem;
}

.report-pdf-actions .btn {
  display: inline-block;
}

.tagline {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.main {
  padding: 2rem 0 3rem;
}

.public-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 2rem 0 1.5rem;
}

.public-footer__inner {
  max-width: 1240px;
}

.public-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 1.75rem 2rem;
  align-items: flex-start;
}

.public-footer__logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.public-footer__org {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--text);
}

.public-footer__edu {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.public-footer__addresses-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.public-footer__addresses {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.public-footer__addresses li + li {
  margin-top: 0.35rem;
}

.public-footer__tagline-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.public-footer__contacts-title {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.public-footer__contacts p {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.public-footer__nationwide {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.public-footer__link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.public-footer__link:hover {
  text-decoration: underline;
}

.public-footer__legal {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

@media (max-width: 900px) {
  .public-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .public-footer__tagline {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .public-footer {
    padding: 1.5rem 0 1.25rem;
  }

  .public-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .public-footer__tagline {
    grid-column: auto;
  }
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card.success {
  border-left: 4px solid var(--primary);
}

.card.error {
  border-left: 4px solid var(--danger);
}

h1 {
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.lead {
  font-size: 1rem;
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack label span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

label.checkbox {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn.tertiary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.45rem 0.85rem;
}

.report-action-banner {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #eef2f7;
  border-radius: var(--radius);
}

code {
  font-size: 0.9rem;
}

.report-action-banner .dev-url-code {
  display: inline-block;
  max-width: 100%;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --- Private report shell (/r/{token}) --- */
.report-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.report-disclaimer {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: #f0f2f5;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.report-shell h1 {
  font-size: 1.35rem;
  margin-top: 0.5rem;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0;
}

.meta-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 0.35rem 1rem 0.35rem 0;
  width: 12rem;
  vertical-align: top;
}

.meta-table td {
  padding: 0.35rem 0;
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: none;
}

.badge-neutral {
  background: #e8ecf1;
  color: var(--text);
}

.badge-progress {
  background: #e3ecf8;
  color: var(--primary);
}

.badge-ok {
  background: #e6f4ea;
  color: #1e6f3e;
}

.sev-critical {
  background: #fde8e8;
  color: #8b1538;
}

.sev-high {
  background: #fff0e5;
  color: #a34c00;
}

.sev-medium {
  background: #fff8e6;
  color: #8a6d00;
}

.sev-low {
  background: #eef6ff;
  color: var(--primary);
}

.sev-info {
  background: #f0f2f5;
  color: var(--muted);
}

.prelim-risk-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.finding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.finding-title {
  font-size: 1rem;
}

.evidence-pre {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  overflow-x: auto;
  max-height: 14rem;
  overflow-y: auto;
}

.evidence-pre code {
  font-size: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stack-gap {
  margin-top: 1.5rem;
}

.empty-state {
  padding: 1rem 0;
  border-top: 1px dashed var(--border);
  margin-top: 1rem;
}

.muted-area {
  background: #f7f8fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}

.h2-small {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.report-summary-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.dev-technical pre {
  margin-top: 0.35rem;
}

/* --- Submit status / PR10 --- */
.progress-section {
  margin: 1.5rem 0;
}

.progress-bar-outer {
  height: 10px;
  border-radius: 6px;
  background: #e8ecf1;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #3d6aa5);
  border-radius: 6px;
  transition: width 0.35s ease;
}

.progress-label {
  margin: 0.65rem 0 0;
  font-weight: 500;
}

.stepper {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stepper .step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: 1px dashed transparent;
  color: var(--muted);
  font-size: 0.95rem;
}

.stepper .step.done {
  color: var(--text);
  border-color: var(--border);
  background: #fafbfc;
}

.stepper .step.current {
  border-color: var(--primary);
  background: #f0f5fb;
  color: var(--primary);
}

.stepper.stepper--warn .step.done {
  border-color: #e8c9d2;
  background: #fdf5f7;
}

.step-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--border);
  color: var(--muted);
}

.stepper .step.done .step-idx {
  background: var(--primary);
  color: #fff;
}

.btn.is-disabled,
a.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Client report / PR11 --- */
.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;
}

.report-h1 {
  font-size: 1.45rem;
  margin: 0 0 0.35rem;
  font-weight: 650;
}

.report-status-line {
  margin: 0 0 1rem;
}

.report-client-lead {
  margin-bottom: 1.25rem;
}

.h2-section {
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.report-section-accent {
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, #fafcfe 0%, var(--surface) 100%);
}

.executive-summary .executive-para {
  margin: 0 0 0.75rem;
  line-height: 1.55;
  font-size: 0.98rem;
}

.executive-summary .executive-para:last-child {
  margin-bottom: 0;
}

.severity-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
}

.severity-strip__card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.severity-strip__label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.severity-strip__num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.sev-strip-critical { border-top: 3px solid #8b1538; }
.sev-strip-high { border-top: 3px solid #c45c00; }
.sev-strip-medium { border-top: 3px solid #b8860b; }
.sev-strip-low { border-top: 3px solid var(--primary); }
.sev-strip-info { border-top: 3px solid #9aa3ad; }

.prelim-risk-intro {
  margin-bottom: 1rem;
}

.h3-prelim-risk-group {
  font-size: 1rem;
  margin: 1.35rem 0 0.65rem;
  font-weight: 600;
  color: var(--primary);
}

.prelim-risk-severity-block:first-child .h3-prelim-risk-group {
  margin-top: 0.35rem;
}

.risk-sign-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  background: #fafbfc;
}

.risk-sign-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.risk-sign-card__title {
  font-weight: 600;
  margin: 0 0 0.65rem;
  font-size: 1.02rem;
}

.badge-category {
  background: #eef1f5;
  color: var(--muted);
  font-weight: 500;
}

.badge-review {
  background: #fff4e5;
  color: #8a5a00;
}

.risk-sign-dl {
  margin: 0;
  font-size: 0.92rem;
}

.risk-sign-dl dt {
  font-weight: 600;
  margin-top: 0.55rem;
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.risk-sign-dl dt:first-child {
  margin-top: 0;
}

.risk-sign-dl dd {
  margin: 0 0 0.15rem;
  line-height: 1.45;
}

.risk-sign-loc-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.report-next-steps .next-steps-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.report-next-steps .next-steps-list li {
  margin-bottom: 0.35rem;
}

.report-technical {
  margin-top: 1.5rem;
}

.report-details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.65rem;
  background: var(--surface);
}

.report-details__summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 600;
  list-style: none;
}

.report-details__summary::-webkit-details-marker {
  display: none;
}

.report-details__summary::before {
  content: "▸ ";
  color: var(--muted);
  display: inline-block;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

.report-details[open] .report-details__summary::before {
  transform: rotate(90deg);
}

.report-details__body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.url-cell {
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 22rem;
}

.hosts-list {
  overflow-wrap: anywhere;
}

/* PR18 — индекс предварительного риска */
.risk-index-card {
  margin: 1.2rem 0;
}

.risk-index-score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0;
}

.risk-score-big {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary);
}

.risk-score-denom {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--muted);
}

.risk-score-bar-outer {
  height: 10px;
  background: #e8ecf0;
  border-radius: 6px;
  overflow: hidden;
  margin: 0.5rem 0 1rem;
}

.risk-score-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #2d6a4f, #52b788);
  border-radius: 6px;
  min-width: 0;
}

.risk-score-bar-inner--document {
  background: linear-gradient(90deg, #1e3a5f, #457b9d);
}

/* Шкалы общего индекса и индекса документов (единая цветовая логика) */
.score-bar {
  margin: 0.35rem 0 1rem;
}
.score-bar__track {
  height: 10px;
  background: #e8ecf0;
  border-radius: 6px;
  overflow: hidden;
}
.score-bar__fill {
  height: 100%;
  border-radius: 6px;
  min-width: 0;
  transition: width 0.2s ease;
}
.score-bar--green .score-bar__fill {
  background: linear-gradient(90deg, #2f6f4e, #52b788);
}
.score-bar--yellow .score-bar__fill {
  background: linear-gradient(90deg, #c9a227, #e9c46a);
}
.score-bar--orange .score-bar__fill {
  background: linear-gradient(90deg, #c97b2e, #e89956);
}
.score-bar--red .score-bar__fill {
  background: linear-gradient(90deg, #a83232, #d46262);
}
.score-bar--neutral .score-bar__fill {
  background: linear-gradient(90deg, #8a939e, #b5bcc4);
}

.score-block-headline {
  margin: 0.25rem 0 0.35rem;
  font-size: 1rem;
}
.score-block-interpretation {
  margin: 0 0 0.75rem;
}

.score-tier-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.score-tier-badge--green {
  background: #d8f3dc;
  color: #1b4332;
}
.score-tier-badge--yellow {
  background: #fff8e6;
  color: #7a5a00;
}
.score-tier-badge--orange {
  background: #fde8d4;
  color: #8a4200;
}
.score-tier-badge--red {
  background: #f8d7da;
  color: #721c24;
}
.score-tier-badge--neutral {
  background: #eef2f6;
  color: #51606f;
}

.hero-doc-score-cell {
  vertical-align: middle;
}

.document-topic-details {
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
  background: var(--surface);
}
.document-topic-details__summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
}
.document-topic-summary-line {
  margin: 0.35rem 0 0.5rem;
}

.risk-pages-collapsible {
  margin: 0.35rem 0 0;
}
.risk-pages-collapsible__summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}
.risk-sign-loc-list--overflow {
  margin-top: 0.35rem;
}

.risk-level-badge.risk-level-low {
  background: #d8f3dc;
  color: #1b4332;
}
.risk-level-badge.risk-level-moderate {
  background: #fff3cd;
  color: #856404;
}
.risk-level-badge.risk-level-elevated {
  background: #fde8d4;
  color: #a34a00;
}
.risk-level-badge.risk-level-high {
  background: #f8d7da;
  color: #721c24;
}

.h3-risk-sub {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

.risk-factors-list {
  margin: 0.25rem 0 0 1.1rem;
  padding: 0;
}

.risk-factors-list--positive li {
  margin-bottom: 0.35rem;
}

.formula-version {
  margin-top: 1rem;
}

.report-hero {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #fff8f4 100%);
}

.report-hero__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.report-hero__logo {
  max-width: 220px;
  width: auto;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  width: auto;
  flex-shrink: 0;
  display: block;
}

@media (max-width: 640px) {
  .report-hero__head {
    align-items: flex-start;
  }

  .report-hero__logo {
    max-width: 220px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .report-hero__head .btn {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .report-hero__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-hero__head .btn {
    width: auto;
    text-align: center;
    box-sizing: border-box;
  }
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0.65rem 0 0.35rem;
}

.metric-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  background: #fff;
}

.metric-card__label {
  font-size: 0.86rem;
  color: var(--muted);
}

.metric-card__value {
  margin-top: 0.2rem;
  font-size: 1.42rem;
  font-weight: 700;
  color: var(--primary);
}

.metric-card--attention {
  border-color: #f0c7a7;
}

.metric-card--manual {
  border-color: #bfd2ea;
}

.observation-list {
  margin: 0.4rem 0 0 1rem;
}

.observation-list__item {
  margin-bottom: 0.35rem;
}

.observation-list__item--attention::marker {
  color: #c45c26;
}

.observation-list__item--ok::marker {
  color: #2d6a4f;
}

/* Check matrix: semantic client labels (success / neutral / review / warning) + legacy internal suffixes */
.status-badge--success,
.status-badge--ok {
  background: #e6f4ea;
  color: #1f5132;
}
.status-badge--warning,
.status-badge--attention {
  background: #fff3e0;
  color: #a35a00;
}
.status-badge--review,
.status-badge--manual {
  background: #e8eef7;
  color: #1e3a5f;
}
.status-badge--neutral,
.status-badge--not_checked {
  background: #eef2f6;
  color: #51606f;
}
.status-badge--not_applicable {
  background: #f2f5f8;
  color: #6a7785;
}
.status-badge--danger {
  background: #fdecea;
  color: #8b1e1e;
}

.check-matrix-group {
  margin-top: 1rem;
}

.report-section,
.report-v2-section,
.report-prelim-risk,
.report-check-matrix,
.report-technical-details {
  margin-top: 1.15rem;
  margin-bottom: 1.15rem;
}

.priority-actions .priority-high::marker {
  color: #c45c26;
}

/* PR17 — матрица проверок */
.check-matrix-table th:first-child,
.check-matrix-table td:first-child {
  min-width: 12rem;
}

.check-status-badge.check-status-ok {
  background: #e3f2e6;
  color: #1b4332;
}
.check-status-badge.check-status-attention {
  background: #fff4e0;
  color: #b45309;
}
.check-status-badge.check-status-manual_review {
  background: #e8eef7;
  color: #1e3a5f;
}
.check-status-badge.check-status-not_checked {
  background: #eef2f6;
  color: #475569;
}
.check-status-badge.check-status-not_applicable {
  background: #f1f5f9;
  color: #64748b;
}

/* --- Публичный отчёт (/r/…): читаемость на узких экранах --- */
.report-shell {
  min-width: 0;
}

.report-shell .meta-table td {
  word-break: normal;
  overflow-wrap: break-word;
}

.report-shell .meta-table td.url-cell,
.report-shell .url-cell {
  overflow-wrap: anywhere;
  word-break: normal;
}

.report-shell .table-scroll {
  min-width: 0;
  max-width: 100%;
}

/* Технические широкие таблицы — горизонтальная прокрутка (не карточки) */
.report-shell .table-scroll .meta-table:not(.table-mobile-cards) {
  min-width: 520px;
}

.report-hero__head {
  flex-wrap: wrap;
}

.report-shell .risk-sign-card__head .badge {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
}

.report-shell .status-badge {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
}

.report-shell .score-tier-badge,
.report-shell .risk-level-badge {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 639px) {
  .report-shell .report-hero .meta-table,
  .report-shell .report-meta .meta-table {
    width: 100%;
  }

  .report-shell .report-hero .meta-table thead,
  .report-shell .report-meta .meta-table thead {
    display: none;
  }

  .report-shell .report-hero .meta-table tbody tr,
  .report-shell .report-meta .meta-table tbody tr {
    display: block;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.65rem;
    margin-bottom: 0.65rem;
  }

  .report-shell .report-hero .meta-table tbody tr:last-child,
  .report-shell .report-meta .meta-table tbody tr:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .report-shell .report-hero .meta-table th,
  .report-shell .report-hero .meta-table td,
  .report-shell .report-meta .meta-table th,
  .report-shell .report-meta .meta-table td {
    display: block;
    width: 100% !important;
    max-width: none !important;
    padding: 0.15rem 0;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .report-shell .report-hero .meta-table th,
  .report-shell .report-meta .meta-table th {
    font-size: 0.8rem;
    padding-top: 0.45rem;
  }

  .report-shell table.table-mobile-cards {
    border: 0;
  }

  .report-shell table.table-mobile-cards thead {
    display: none;
  }

  .report-shell table.table-mobile-cards tbody tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #fafbfc;
  }

  .report-shell table.table-mobile-cards tbody td {
    display: block;
    border: none;
    padding: 0.4rem 0;
    width: 100% !important;
    max-width: none !important;
  }

  .report-shell table.table-mobile-cards tbody td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-bottom: 0.12rem;
  }

  .report-shell .check-matrix-table th:first-child,
  .report-shell .check-matrix-table td:first-child {
    min-width: 0;
  }
}

/* --- Публичный HTML-отчёт: карточка отчёта + TOC-сайдбар вне report-shell (не PDF) --- */
main.container.main.report-page {
  max-width: var(--page-max-report);
  box-sizing: border-box;
}

html.report-toc-enabled {
  scroll-behavior: smooth;
}

.report-page .report-layout {
  display: block;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.report-page .report-content-column {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.report-page .report-shell {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.report-page .report-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.report-page .report-toc-column {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.report-page .report-toc-column.report-toc-column--hidden {
  display: none;
}

.report-page .report-layout.report-layout--with-toc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

/* Узкая сетка: сначала блок «Содержание» (TOC), затем тело отчёта */
.report-page .report-layout.report-layout--with-toc .report-content-column {
  order: 2;
}

.report-page .report-layout.report-layout--with-toc .report-toc-column {
  order: 1;
}

.report-page .report-toc {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: static;
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
  margin-bottom: 1rem;
  background: #eef2f6;
  border-radius: 14px;
  padding: 1rem 1.15rem 1.05rem;
  border: 1px solid var(--border);
}

.report-page .report-toc__title {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.report-page .report-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-page .report-toc__item {
  margin: 0.28rem 0;
  line-height: 1.35;
}

.report-page .report-toc__link {
  color: var(--primary);
  text-decoration: none;
  display: inline-block;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: break-word;
}

.report-page .report-toc__link:hover {
  text-decoration: underline;
}

.report-page .report-toc__link.report-toc__link--active {
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
}

.report-page .report-toc__item--h3 {
  padding-left: 1rem;
  font-size: 0.92rem;
}

.report-page .report-main :is(h2, h3) {
  scroll-margin-top: 5.75rem;
}

/* Mobile / tablet: TOC над контентом — небольшой зазор перед карточкой отчёта */
@media (max-width: 1023px) {
  .report-page .report-layout.report-layout--with-toc .report-toc-column {
    margin-top: 0;
    margin-bottom: 0.25rem;
  }
}

@media (max-width: 768px) {
  .main.report-page {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

  .report-page .report-shell.card,
  .report-page .report-hero.card {
    padding: 1.25rem 1.1rem;
  }
}

@media (min-width: 1024px) {
  .report-page .report-layout:not(.report-layout--with-toc) {
    display: block;
  }

  .report-page .report-layout.report-layout--with-toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 28px;
    align-items: start;
  }

  .report-page .report-layout.report-layout--with-toc .report-content-column {
    grid-column: 1;
    grid-row: 1;
    order: unset;
    min-width: 0;
  }

  .report-page .report-layout.report-layout--with-toc .report-toc-column {
    grid-column: 2;
    grid-row: 1;
    order: unset;
    min-width: 0;
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow: visible;
  }

  .report-page .report-layout.report-layout--with-toc .report-shell {
    max-width: none;
    width: 100%;
  }

  /* Sticky привязан к колонке; карточка .report-toc — внутренний скролл */
  .report-page .report-layout.report-layout--with-toc .report-toc {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
  }
}

.admin-shell {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

main.container.admin-shell {
  max-width: 1320px;
}

.admin-card {
  margin-bottom: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  vertical-align: top;
  text-align: left;
}

.admin-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #eef2f6;
}

.admin-badge.admin-badge--oreg-green {
  background: #e6f4ea;
  color: #1e4620;
}

.admin-badge.admin-badge--oreg-yellow {
  background: #fff8e1;
  color: #5c4a00;
}

.admin-badge.admin-badge--oreg-orange {
  background: #fff0e0;
  color: #6b3a00;
}

.admin-badge.admin-badge--oreg-red {
  background: #fdecef;
  color: #6b1c2e;
}

.admin-muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-actions-toolbar {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.admin-inline-form {
  display: inline;
  margin: 0;
}

.admin-detail-card > h2 {
  margin-top: 0;
  padding-bottom: 0.35rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
}

.admin-detail-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-detail-stack p {
  margin: 0;
}

.admin-divider-line {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

@media (max-width: 640px) {
  .admin-actions.admin-actions-vertical-mobile {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions.admin-actions-vertical-mobile .btn,
  .admin-actions.admin-actions-vertical-mobile button {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

.btn-admin-risk {
  border: 1px solid rgba(139, 41, 66, 0.45);
  color: var(--danger);
  background: var(--surface);
}

.btn-admin-risk:hover {
  background: #fff3f6;
  border-color: var(--danger);
}

.table-scroll.table-scroll--admin {
  margin: 0.25rem 0 0;
}

.admin-table--wide {
  min-width: 920px;
}

.admin-widget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

.admin-code-embed {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.admin-table-tight th,
.admin-table-tight td {
  padding: 0.35rem 0.5rem;
}

.admin-table-spaced-top {
  margin-top: 1rem;
}

.admin-cell-ellipsis {
  max-width: 20rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-log-table .submission-log-date {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .admin-widget-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-widget-actions .btn,
  .admin-widget-actions button {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .admin-widget-actions .admin-inline-form {
    display: block;
  }
}

.admin-form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 52rem;
}

.admin-form-stack--narrow {
  max-width: 560px;
}

.admin-form-stack h2,
.admin-form-stack h3 {
  margin: 1rem 0 0.25rem;
}

.admin-form-stack h2:first-of-type,
.admin-form-stack h2:first-child {
  margin-top: 0;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.admin-textarea,
.admin-input {
  width: 100%;
  max-width: 40rem;
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.admin-textarea {
  resize: vertical;
}

.admin-textarea--code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.35;
}

.admin-login-page {
  min-height: 100vh;
}

.admin-login-page .container {
  max-width: 480px;
  padding-top: 8vh;
  padding-bottom: 2rem;
}

.admin-login-card {
  margin: 0 auto;
  width: 100%;
}

.admin-login-brand h1 {
  margin-bottom: 0.25rem;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 1rem 0 0.8rem;
}

.admin-login-form label {
  font-size: 0.92rem;
  font-weight: 600;
}

.admin-login-submit {
  margin-top: 0.35rem;
  width: 100%;
}

.admin-login-error {
  border: 1px solid #ebc2cb;
  background: #fff3f6;
  color: #8b2942;
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
}

.admin-login-muted {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.admin-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.admin-topbar-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.85rem 0;
}

.admin-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.admin-topbar-row-main {
  min-height: 2.25rem;
}

.admin-topbar-row-nav {
  align-items: flex-start;
}

.admin-nav-left,
.admin-topbar-row-nav .admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.admin-nav-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 0 1 auto;
}

.admin-brand:hover {
  text-decoration: none;
}

.admin-brand__logo {
  display: block;
  width: auto;
  height: 44px;
  max-width: min(120px, 28vw);
  object-fit: contain;
  flex-shrink: 0;
}

.admin-brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.admin-brand__title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--text);
}

.admin-brand__subtitle {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--muted);
}

.admin-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-nav-link {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
}

.admin-nav-link:hover {
  background: #eef2f6;
}

.admin-nav-link.is-active {
  background: var(--surface-muted, #eef2f7);
  color: var(--text);
  border-radius: 6px;
}

.admin-back-link {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.admin-back-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-back-link a:hover {
  text-decoration: underline;
}

.admin-user {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 52vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-logout-form {
  margin: 0;
}

.admin-logout {
  white-space: nowrap;
}

.admin-account-action {
  white-space: nowrap;
}

.admin-menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.35rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-menu-toggle-line {
  display: block;
  width: 1rem;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.admin-mobile-user {
  display: none;
  width: 100%;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 960px) {
  .admin-nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .admin-brand__logo {
    height: 32px;
    max-width: min(96px, 26vw);
  }

  .admin-brand__title {
    font-size: 0.95rem;
  }

  .admin-brand__subtitle {
    font-size: 0.75rem;
  }

  .admin-menu-toggle {
    display: inline-flex;
  }

  .admin-nav-right {
    display: none;
  }

  .admin-topbar-row-nav {
    display: none;
    flex-direction: column;
  }

  .admin-topbar-row-nav[data-collapsed="false"] {
    display: flex;
  }

  .admin-topbar-row-nav .admin-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }

  .admin-topbar-row-nav .admin-nav-link {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-mobile-user {
    display: flex;
    flex-wrap: wrap;
  }

  .admin-actions-cell {
    min-width: 8.5rem;
  }
}

.admin-filters {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
}

.admin-filters-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
}

.admin-filter-grid label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.admin-filter-grid input,
.admin-filter-grid select {
  width: 100%;
}

.admin-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.admin-page-link {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}

.admin-page-link.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.admin-page-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.admin-empty-state {
  padding: 1rem 0;
  color: var(--muted);
}

.admin-alert {
  margin-bottom: 1rem;
}

.admin-alert-success {
  border-left: 4px solid var(--primary);
}

.admin-actions-cell {
  white-space: normal;
  min-width: 11rem;
}

.admin-select-col {
  width: 2.2rem;
  min-width: 2.2rem;
  text-align: center;
}

.admin-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
  margin-bottom: 0.65rem;
}

.admin-bulk-actions__left {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-bulk-actions__right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.admin-bulk-actions__hint {
  min-height: 1.1em;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.admin-modal-backdrop[hidden] {
  display: none !important;
}

.admin-modal {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

body.modal-open {
  overflow: hidden;
}

.admin-actions-cell .admin-actions {
  justify-content: flex-start;
}

@media (max-width: 560px) {
  .admin-bulk-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-bulk-actions__right {
    margin-left: 0;
    align-items: stretch;
  }

  .admin-bulk-actions .btn {
    width: 100%;
  }

  .admin-actions-cell .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions-cell .btn-compact {
    width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }
}

.btn-compact {
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
}

.admin-danger-zone {
  border-left: 4px solid var(--danger);
}

.admin-delete-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 420px;
}

.admin-delete-form input[type="text"] {
  width: 100%;
  max-width: 320px;
}

.admin-delete-submit {
  background: var(--danger);
  color: #fff;
  border: none;
}

.admin-delete-submit:hover {
  filter: brightness(1.05);
}

/* PR29 — user-facing 404 / error card */
.error-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.5rem 0 1.5rem;
}

.error-page--embedded {
  padding: 0;
}

.error-card {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2.25rem 2.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(30, 58, 95, 0.08);
  text-align: center;
}

.error-brand {
  margin-bottom: 1.25rem;
}

.error-brand img {
  display: block;
  margin: 0 auto;
  max-width: 140px;
  height: auto;
}

.error-code {
  font-size: clamp(3.5rem, 10vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: #3d5a80;
  letter-spacing: 0.04em;
  margin: 0.25rem 0 1rem;
  opacity: 0.9;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
  line-height: 1.35;
}

.error-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.error-hint {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  line-height: 1.55;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.report-shell .error-page {
  padding: 0;
}

.report-shell .error-card {
  box-shadow: 0 2px 16px rgba(30, 58, 95, 0.06);
}

@media (max-width: 600px) {
  .container {
    padding: 0 1rem;
  }

  .error-card {
    padding: 1.5rem 1.25rem 1.75rem;
  }

  .error-code {
    font-size: 3rem;
  }

  .severity-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* PR34/PR35 — hero accent, risk badge, ответственность */
.report-hero--pr34,
.report-hero--pr35 {
  position: relative;
  overflow: hidden;
  padding-left: 1.25rem;
}

.report-hero--pr35 > :not(.report-hero-accent) {
  position: relative;
  z-index: 1;
}

.report-hero-accent {
  position: absolute;
  left: 0;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1e3a5f, #52b788);
  pointer-events: none;
  z-index: 0;
}

.report-hero--pr35 .report-hero-accent {
  top: 0;
  bottom: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.risk-level-badge {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-weight: 700;
}
.responsibility-sub {
  margin-top: 0.25rem;
}
.responsibility-intro {
  margin: 0.75rem 0;
}
.responsibility-cards {
  display: grid;
  gap: 0.85rem;
  margin: 0.75rem 0 1rem;
}
.responsibility-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: #fafbfc;
}
.responsibility-reference {
  margin-top: 0.5rem;
}
.next-steps-main .compliance-scope-disclaimer {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: #fafbfc;
}

.next-steps-main .next-steps-list--numbered {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 0;
}

.next-step-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
}

.next-step-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.4rem;
}

.next-step-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: var(--surface);
}

.next-step-title {
  flex: 1 1 12rem;
  font-size: 1rem;
}

.next-step-card-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}
.policy-llm-table {
  width: 100%;
  margin-top: 0.75rem;
}
.policy-llm-table th,
.policy-llm-table td {
  vertical-align: top;
}

/* Admin — виджет: режимы домена (PR30 hotfix) */
.is-hidden {
  display: none !important;
}
.admin-widget-mode-hint {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.admin-widget-fixed-domain-block {
  margin-top: 0.75rem;
}

.widgets-table__domains {
  max-width: 26rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.widgets-table__actions {
  min-width: 14rem;
}

.widgets-table__actions .admin-actions {
  gap: 0.35rem;
}

.widgets-empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: #fafbfc;
}

@media (max-width: 680px) {
  .widgets-table__actions {
    min-width: 11rem;
  }

  .widgets-table__actions .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .widgets-table__actions .btn {
    width: 100%;
    text-align: center;
  }
}

.admin-card-header {
  margin-bottom: 0.65rem;
}

.admin-card-title {
  margin: 0 0 0.25rem;
}

.admin-card-muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  gap: 0.6rem;
}

.form-grid--create-user {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  align-items: center;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.button-row .admin-inline-form {
  display: inline-flex;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge--muted {
  background: #eef2f6;
  color: #51606f;
}

.danger-zone {
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border);
}

.admin-users-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.user-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.user-card__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.user-card__email {
  margin: 0;
  font-size: 1.03rem;
  overflow-wrap: anywhere;
}

.user-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.user-card__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.user-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.user-card__secret,
.user-card__backup {
  margin: 0;
}

@media (max-width: 1100px) {
  .form-grid--create-user {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .form-grid--create-user {
    grid-template-columns: 1fr;
  }

  .user-card__meta {
    grid-template-columns: 1fr;
  }

  .button-row .admin-inline-form {
    display: flex;
    width: 100%;
  }

  .button-row .btn,
  .button-row button {
    width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* --- Operator registry public report (PR6.1 + PR6.2) + submitted --- */
.report-page .oreg-report-shell {
  padding: 1.35rem 1.2rem 1.5rem;
}

.report-page .oreg-report-shell .report-main {
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.report-page .oreg-section {
  margin: 0;
}

.report-page .oreg-section:not(.oreg-section-card) {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.report-page .oreg-section.oreg-section-card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.report-page .oreg-section .h2-section {
  margin-top: 0;
  margin-bottom: 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.oreg-report-h1 {
  margin: 0 0 0.75rem;
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.oreg-summary-dl {
  margin-top: 1rem;
}

.report-page .oreg-summary-dl dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-page .oreg-attention-section .risk-sign-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.report-page .oreg-attention-section .risk-sign-dl dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-page .oreg-rkn-registry-header {
  margin-bottom: 1rem;
}

.report-page .oreg-rkn-registry-header .h2-section {
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
}

.report-page .oreg-rkn-registry-header p {
  margin: 0;
  max-width: 52rem;
}

.report-page .oreg-rkn-subsection {
  margin-top: 0.25rem;
}

.report-page .oreg-rkn-subsection--purposes {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.report-page .oreg-h3-in-registry {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.report-page .oreg-tech-details-body {
  padding-top: 0.35rem;
}

.report-page .oreg-tech-dadata {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}

/* Индекс: одна самостоятельная карточка (без внешней секционной обёртки) */
.report-page .oreg-index-section {
  margin-block: 0;
}

.report-page .registry-index-card.oreg-index-card.card {
  margin-top: 0;
  padding: 1.15rem 1.25rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #ffffff 0%, #f6f8fb 100%);
  border-left-width: 4px;
  border-left-style: solid;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.report-page .oreg-index-card__header .h2-section.oreg-index-card__title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
}

.report-page .oreg-index-card__body > :first-child {
  margin-top: 0;
}

.oreg-index-card--green {
  border-left-color: #2f6f4e;
}
.oreg-index-card--yellow {
  border-left-color: #c9a227;
}
.oreg-index-card--orange {
  border-left-color: #c97b2e;
}
.oreg-index-card--red {
  border-left-color: #a83232;
}
.oreg-index-card--neutral {
  border-left-color: #94a3b8;
}

.registry-index-score.oreg-index-score-num {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.oreg-index-card--green .registry-index-score.oreg-index-score-num {
  color: #1b4332;
}
.oreg-index-card--yellow .registry-index-score.oreg-index-score-num {
  color: #7a5a00;
}
.oreg-index-card--orange .registry-index-score.oreg-index-score-num {
  color: #8a4200;
}
.oreg-index-card--red .registry-index-score.oreg-index-score-num {
  color: #721c24;
}
.oreg-index-card--neutral .registry-index-score.oreg-index-score-num {
  color: var(--primary);
}

.registry-index-denom {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.15rem;
}

.oreg-index-headline {
  margin-top: 0.15rem;
}

.oreg-index-description {
  margin: 0.75rem 0 0;
}

.oreg-attention-summary {
  margin: 0.5rem 0 0;
}

.registry-index-footnote {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.oreg-index-methodology {
  margin-top: 1rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}

.oreg-index-methodology > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.98rem;
}

.oreg-methodology-body {
  margin-top: 0.65rem;
}

.oreg-methodology-body > p:first-of-type {
  margin-top: 0;
}

.oreg-methodology-table {
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.oreg-methodology-table th {
  width: 22%;
  vertical-align: top;
}

.oreg-methodology-table td:last-child {
  min-width: 0;
}

.oreg-report-data-table {
  margin-top: 0.5rem;
}

.report-page .oreg-report-data-table th {
  width: 14rem;
  max-width: 34%;
  vertical-align: top;
}

/* --- /ro: контейнеры и таблицы не расширяют viewport на мобильных --- */
.report-page .oreg-report-layout,
.report-page .oreg-report-layout .report-content-column,
.report-page .oreg-report-shell,
.report-page .oreg-section.oreg-section-card,
.report-page .oreg-tech-details,
.report-page .oreg-tech-details-body,
.report-page .oreg-technical-details,
.report-page .oreg-technical-details-body {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.report-page .oreg-methodology-table-wrap {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.report-page .oreg-purpose-body .meta-table dt,
.report-page .oreg-purpose-body .meta-table dd {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.report-page .oreg-signal-basis-dl dt,
.report-page .oreg-signal-basis-dl dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-page .oreg-pre-json {
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .report-page .oreg-methodology-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.5rem 0;
  }

  .report-page .oreg-methodology-table-wrap .oreg-methodology-table {
    width: max-content;
    min-width: min(100%, 32rem);
    max-width: none;
  }

  .report-page .oreg-methodology-table th {
    width: auto;
    white-space: nowrap;
  }

  /* Key-value: карточки по строке (как table-mobile-cards в /r, но под th/td) */
  .report-page .oreg-report-shell .oreg-mobile-kv-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
  }

  .report-page .oreg-report-shell .oreg-mobile-kv-table tbody,
  .report-page .oreg-report-shell .oreg-mobile-kv-table tr,
  .report-page .oreg-report-shell .oreg-mobile-kv-table th,
  .report-page .oreg-report-shell .oreg-mobile-kv-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .report-page .oreg-report-shell .oreg-mobile-kv-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
  }

  .report-page .oreg-report-shell .oreg-mobile-kv-table th {
    width: 100% !important;
    max-width: 100% !important;
    border-bottom: 1px solid var(--border);
    background: #f1f5f9;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  .report-page .oreg-report-shell .oreg-mobile-kv-table td {
    border-top: none;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  .report-page .oreg-report-shell .oreg-mobile-kv-table tr:last-child {
    margin-bottom: 0;
  }
}

.report-page .oreg-attention-section .prelim-risk-intro {
  margin-top: 0;
}

.report-page .oreg-signal-group + .oreg-signal-group {
  margin-top: 1.5rem;
}

.report-page .oreg-signal-card.oreg-signal-card--high {
  border-left: 3px solid rgba(139, 41, 66, 0.55);
}

.report-page .oreg-signal-card.oreg-signal-card--medium {
  border-left: 3px solid rgba(180, 134, 11, 0.6);
}

.report-page .oreg-signal-card.oreg-signal-card--low {
  border-left: 3px solid rgba(43, 90, 160, 0.45);
}

.report-page .oreg-signal-card.oreg-signal-card--info {
  border-left: 3px solid rgba(120, 130, 145, 0.55);
}

.report-page .oreg-signal-basis-dl {
  margin: 0.15rem 0 0;
}

.report-page .oreg-signal-basis-dl dt:first-of-type {
  margin-top: 0;
}

.oreg-purpose-details {
  margin-bottom: 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.35rem 0.75rem;
  background: #fcfdfe;
}

.oreg-purpose-summary {
  cursor: pointer;
  font-weight: 600;
}

.oreg-purpose-body {
  padding: 0.5rem 0 0.35rem;
}

.oreg-purpose-full {
  margin-top: 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.oreg-pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.oreg-pre-json {
  font-size: 0.82rem;
  max-height: 16rem;
  overflow: auto;
}

.oreg-tech-details summary {
  cursor: pointer;
  font-weight: 600;
}

.oreg-details-nested {
  margin-top: 0.75rem;
}

.admin-select-compact {
  max-width: 100%;
}

.btn.btn-sm {
  padding: 0.28rem 0.55rem;
  font-size: 0.88rem;
}

.oreg-stepper .step.oreg-step-failed {
  border-color: #d4a0a8;
  background: #fdf5f7;
  color: #8a2d3a;
}

.oreg-stepper .step.oreg-step-skipped {
  opacity: 0.55;
}

.oreg-submitted-note {
  margin-top: 0.75rem;
}

.oreg-report-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.oreg-report-link-label {
  font-weight: 600;
}
