.audit-shell { min-height: 100vh; background: var(--canvas); }
.audit-topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--border-strong); background: #fff; }
.audit-brand { display: flex; align-items: center; gap: 11px; color: #263b4d; text-decoration: none; }
.audit-brand > span:last-child { display: grid; }
.audit-brand strong { font-size: 13px; }
.audit-brand small { color: var(--muted); font-size: 10px; }
.audit-back { border: 1px solid var(--border-strong); border-radius: 4px; padding: 8px 11px; color: #43566d; background: #fff; font-size: 11px; text-decoration: none; }
.audit-main { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 60px; }
.audit-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-bottom: 20px; }
.audit-header p { margin: 0 0 5px; color: #587795; font-size: 10px; font-weight: 750; }
.audit-header h1 { margin: 0; color: #203548; font-size: 28px; letter-spacing: 0; }
.audit-header > div > span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.audit-header label { min-width: 290px; }
.audit-header label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.audit-header select { width: 100%; height: 38px; border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 10px; color: #293b4c; background: #fff; }
.audit-status { display: grid; grid-template-columns: 1.25fr 1.25fr .8fr .8fr; border: 1px solid var(--border-strong); border-radius: 5px; background: #fff; }
.audit-status > div { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--border); }
.audit-status > div:last-child { border-right: 0; }
.audit-status span, .audit-status strong { display: block; }
.audit-status span { color: var(--muted); font-size: 10px; }
.audit-status strong { margin-top: 4px; overflow-wrap: anywhere; color: #30465d; font-size: 13px; }
.audit-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; margin: 16px 0; padding: 6px; border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.audit-tabs a { padding: 8px 12px; color: #526477; font-size: 11px; text-decoration: none; }
.audit-tabs a:hover { color: #244f6b; background: #edf3f8; }
.audit-section { scroll-margin-top: 60px; margin-top: 14px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 5px; background: #fff; }
.audit-section-title { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); border-left: 3px solid #587795; background: #f8fafb; }
.audit-section-title h2 { margin: 0; color: #263b4d; font-size: 14px; }
.audit-section-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.audit-definition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.audit-definition-grid > div { min-height: 66px; padding: 12px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.audit-definition-grid > div:nth-child(3n) { border-right: 0; }
.audit-definition-grid span, .audit-definition-grid strong { display: block; }
.audit-definition-grid span { color: var(--muted); font-size: 10px; }
.audit-definition-grid strong { margin-top: 5px; overflow-wrap: anywhere; color: #30465d; font-size: 12px; }
.mono { font-family: var(--mono); }
.method-sheet { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.method-sheet > div, .method-sheet article { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.method-sheet > div:nth-child(4) { border-right: 0; }
.method-sheet article { grid-column: span 2; border-bottom: 0; }
.method-sheet article:last-child { border-right: 0; }
.method-sheet span { display: block; color: var(--muted); font-size: 10px; }
.method-sheet strong, .method-sheet code { display: block; margin-top: 5px; overflow-wrap: anywhere; color: #30465d; font-size: 12px; }
.method-sheet code { color: #244f6b; }
.method-sheet p { margin: 5px 0 0; color: #536170; font-size: 11px; line-height: 1.65; }
.validation-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.validation-strip > div { min-height: 74px; padding: 13px 16px; border-right: 1px solid var(--border); }
.validation-strip > div:last-child { border-right: 0; }
.validation-strip span, .validation-strip strong { display: block; }
.validation-strip span { color: var(--muted); font-size: 10px; }
.validation-strip strong { margin-top: 7px; color: #234d43; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.audit-note { margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); color: #64717c; background: #fbfcfd; font-size: 10px; }
.audit-table-wrap { overflow-x: auto; }
.audit-table-wrap table { min-width: 1040px; }
.audit-table-wrap td { white-space: normal; vertical-align: top; color: #4d5d6d; font-size: 11px; line-height: 1.5; }
.audit-table-wrap td:first-child { color: #30465d; font-weight: 680; }
.evidence-chip { display: inline-flex; border-radius: 3px; padding: 3px 6px; color: #536170; background: #edf1f5; font-size: 9px; }
.evidence-chip.observed, .evidence-chip.approved-default { color: #24594c; background: #eaf4f0; }
.evidence-chip.reference-fallback, .evidence-chip.research-scenario { color: #815828; background: #f8f1e6; }
.audit-version-layout { display: grid; grid-template-columns: 1fr 1fr; }
.audit-version-layout > div { padding: 16px 18px; border-right: 1px solid var(--border); }
.audit-version-layout > div:last-child { border-right: 0; }
.audit-version-layout h3 { margin: 0 0 10px; color: #30465d; font-size: 12px; }
.audit-version-layout ol, .audit-version-layout ul { margin: 0; padding-left: 18px; color: #52606c; font-size: 11px; line-height: 1.7; }
.audit-version-layout li { margin-bottom: 5px; }
.audit-version-layout li strong, .audit-version-layout li span { display: block; }
.audit-version-layout li span { color: var(--muted); font-size: 9px; }
.audit-empty, .audit-load-error { display: grid; gap: 5px; padding: 28px; color: #596874; }
.audit-empty strong, .audit-load-error strong { color: #30465d; }
.proof-question { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; padding: 18px; border-bottom: 1px solid var(--border); background: #f6f9fb; }
.proof-question span { color: #587795; font-size: 10px; font-weight: 750; }
.proof-question strong { color: #263b4d; font-size: 13px; line-height: 1.6; }
.proof-formulas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.proof-formulas article { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.proof-formulas article:nth-child(2n) { border-right: 0; }
.proof-formulas span, .proof-formulas code { display: block; }
.proof-formulas span { margin-bottom: 7px; color: #587795; font-size: 10px; font-weight: 720; }
.proof-formulas code { margin-top: 4px; color: #244f6b; font-size: 12px; overflow-wrap: anywhere; }
.proof-formulas p { margin: 8px 0 0; color: #5b6874; font-size: 10px; line-height: 1.65; }
.proof-protocol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--border); background: #fbfcfd; }
.proof-protocol > div { min-width: 0; padding: 15px 16px; border-right: 1px solid var(--border); }
.proof-protocol > div:last-child { border-right: 0; }
.proof-protocol span { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid #c7d5e2; border-radius: 50%; color: #456985; font-family: var(--mono); font-size: 9px; }
.proof-protocol strong { display: block; margin-top: 8px; color: #30465d; font-size: 11px; }
.proof-protocol p { margin: 5px 0 0; color: #64717c; font-size: 10px; line-height: 1.6; }
.proof-table-block { border-bottom: 1px solid var(--border); }
.proof-subtitle { padding: 12px 16px; border-bottom: 1px solid var(--border); background: #f8fafb; }
.proof-subtitle h3 { margin: 0; color: #30465d; font-size: 12px; }
.proof-subtitle p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.candidate-method-table, .fold-table { min-width: 900px; }
.candidate-method-table td { white-space: normal; }
.candidate-method-table td:first-child strong, .candidate-method-table td:first-child small { display: block; }
.candidate-method-table td:first-child small { margin-top: 3px; color: #24594c; font-size: 9px; }
.candidate-method-table .formula-cell { color: #365a74; font-family: var(--mono); font-size: 10px; }
.candidate-method-table .is-selected-method td { background: #eef5f2; }
.proof-verdict { display: grid; grid-template-columns: 1.3fr .7fr; gap: 0; }
.proof-verdict > div, .proof-verdict ul { margin: 0; padding: 18px; }
.proof-verdict > div { border-right: 1px solid var(--border); }
.proof-verdict span, .proof-verdict strong { display: block; }
.proof-verdict span { color: #587795; font-size: 10px; font-weight: 730; }
.proof-verdict strong { margin-top: 6px; color: #29463f; font-size: 12px; line-height: 1.7; }
.proof-verdict ul { padding-left: 34px; color: #596874; background: #fbfcfd; font-size: 10px; line-height: 1.7; }
.change-log { padding: 8px 18px 16px; }
.change-entry { position: relative; margin-left: 8px; padding: 14px 0 16px 24px; border-left: 1px solid #cdd6df; }
.change-entry:last-child { padding-bottom: 4px; }
.change-marker { position: absolute; top: 18px; left: -5px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #8195a7; box-shadow: 0 0 0 1px #8195a7; }
.change-entry.is-current .change-marker { background: #3f746c; box-shadow: 0 0 0 1px #3f746c; }
.change-entry header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.change-entry header span, .change-entry header strong { display: block; }
.change-entry header span { color: var(--muted); font-size: 9px; }
.change-entry header strong { margin-top: 2px; color: #30465d; font-size: 12px; overflow-wrap: anywhere; }
.change-entry header em { flex: 0 0 auto; padding: 3px 6px; color: #526477; background: #edf1f5; font-size: 9px; font-style: normal; }
.change-entry > p { margin: 7px 0; color: #596874; font-size: 10px; }
.change-entry dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--border); }
.change-entry dl > div { display: grid; grid-template-columns: 62px minmax(0, 1fr); padding: 7px 9px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.change-entry dl > div:nth-child(2n) { border-right: 0; }
.change-entry dt { color: var(--muted); font-size: 9px; }
.change-entry dd { margin: 0; overflow-wrap: anywhere; color: #4c5c6c; font-size: 10px; line-height: 1.5; }
@media (max-width: 900px) {
  .audit-status, .audit-definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-status > div:nth-child(2n), .audit-definition-grid > div:nth-child(2n) { border-right: 0; }
  .method-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-sheet > div:nth-child(2n) { border-right: 0; }
  .validation-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-protocol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .validation-strip > div:nth-child(2n) { border-right: 0; }
}
@media (max-width: 620px) {
  .audit-topbar { padding: 0 14px; }
  .audit-main { width: calc(100% - 24px); padding-top: 18px; }
  .audit-header { display: grid; }
  .audit-header label { min-width: 0; }
  .audit-tabs { overflow-x: auto; }
  .audit-tabs a { flex: 0 0 auto; }
  .audit-status, .audit-definition-grid, .method-sheet, .validation-strip, .audit-version-layout { grid-template-columns: 1fr; }
  .proof-question, .proof-formulas, .proof-protocol, .proof-verdict, .change-entry dl { grid-template-columns: 1fr; }
  .proof-formulas article, .proof-protocol > div, .proof-verdict > div, .change-entry dl > div { border-right: 0; }
  .audit-status > div, .audit-definition-grid > div, .method-sheet > div, .method-sheet article, .validation-strip > div, .audit-version-layout > div { grid-column: auto; border-right: 0; border-bottom: 1px solid var(--border); }
}
