:root {
  color-scheme: light;
  --navy-950: #101d31;
  --navy-900: #15243a;
  --navy-800: #20334d;
  --ink: #182537;
  --muted: #64748b;
  --muted-2: #8794a6;
  --border: #e3e9ef;
  --border-strong: #d2dce6;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --canvas-2: #f9fbfc;
  --teal: #0d8b83;
  --teal-dark: #08736d;
  --teal-wash: #e6f5f2;
  --blue: #3372ba;
  --blue-wash: #eaf2fc;
  --amber: #a96a08;
  --amber-wash: #fff5e3;
  --red: #b53640;
  --red-wash: #fff0f0;
  --green: #257850;
  --green-wash: #e9f6ed;
  --shadow: 0 8px 30px rgba(24, 37, 55, .055);
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 360px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 13px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(13,139,131,.22); outline-offset: 2px; }

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.boot-screen p { margin: 0; font-size: 13px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #20a499, #06776f); font-family: Manrope, sans-serif; font-size: 13px; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 7px 18px rgba(11,133,125,.24); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 250px; color: #c1cbd7; background: var(--navy-950); border-right: 1px solid rgba(255,255,255,.055); }
.brand-block { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,.075); }
.brand-copy { min-width: 0; }
.brand-name { color: #f7fafc; font-family: Manrope, sans-serif; font-weight: 800; letter-spacing: -.035em; font-size: 13px; line-height: 1.1; }
.brand-subtitle { margin-top: 4px; color: #91a2b5; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.nav-scroll { flex: 1; overflow: auto; padding: 14px 10px 18px; }
.nav-group { margin: 0 0 17px; }
.nav-heading { padding: 0 10px; margin: 0 0 6px; color: #75889f; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin: 2px 0; border: 0; border-radius: 7px; color: #bfccd8; background: transparent; text-align: left; font-size: 12px; transition: color .15s, background .15s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-link.active { color: #fff; background: rgba(36,167,157,.18); box-shadow: inset 2px 0 #39c0b5; }
.nav-icon { display: grid; place-items: center; width: 19px; flex: 0 0 19px; color: #87a0b8; font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500; }
.nav-link.active .nav-icon { color: #6de0d5; }
.nav-link-label { flex: 1; }
.nav-count { min-width: 19px; padding: 1px 5px; color: #a8b7c7; background: rgba(255,255,255,.07); border-radius: 10px; text-align: center; font-family: 'DM Mono', monospace; font-size: 9px; }
.sidebar-footer { padding: 12px 16px 15px; border-top: 1px solid rgba(255,255,255,.075); }
.sidebar-status { display: flex; gap: 7px; align-items: center; color: #9aabbc; font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #33b69e; box-shadow: 0 0 0 3px rgba(51,182,158,.12); }
.sidebar-version { margin-top: 7px; color: #64778e; font-family: 'DM Mono', monospace; font-size: 9px; }

.workspace { min-height: 100vh; margin-left: 250px; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 20px; min-height: 62px; padding: 0 28px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.topbar-context { min-width: 180px; color: var(--muted); font-size: 11px; }
.topbar-context strong { display: block; color: var(--ink); font-size: 12px; font-weight: 700; }
.global-search { display: flex; align-items: center; gap: 8px; width: min(480px, 48vw); height: 34px; padding: 0 10px; margin-left: auto; border: 1px solid var(--border); border-radius: 7px; background: #f9fbfc; }
.global-search:focus-within { border-color: #9accc7; background: #fff; box-shadow: 0 0 0 3px rgba(13,139,131,.08); }
.search-glyph { color: #8291a2; font-size: 14px; }
.global-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.global-search input::placeholder { color: #9aa6b4; }
.kbd { padding: 2px 5px; color: #8d9aa7; border: 1px solid #e0e5eb; border-radius: 4px; background: #fff; font-family: 'DM Mono', monospace; font-size: 9px; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: 6px; }
.top-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 20px; color: #526479; background: #fff; font-size: 10px; white-space: nowrap; }
.top-pill .status-dot { width: 6px; height: 6px; }
.mobile-menu { display: none; border: 0; color: var(--ink); background: transparent; font-size: 19px; }

.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 28px; color: #6a501c; background: #fff8e9; border-bottom: 1px solid #f1e3c2; font-size: 11px; }
.demo-banner strong { color: #78510b; font-weight: 800; letter-spacing: .035em; }
.demo-banner a { color: #78510b; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

.page { max-width: 1600px; padding: 25px 28px 48px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-title { margin: 0; color: #142339; font-family: Manrope, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.045em; line-height: 1.2; }
.page-subtitle { max-width: 850px; margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.breadcrumb { margin-bottom: 6px; color: #91a0ae; font-size: 10px; letter-spacing: .045em; text-transform: uppercase; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; padding: 7px 11px; border: 1px solid var(--border-strong); border-radius: 6px; color: #33465c; background: #fff; font-size: 11px; font-weight: 600; transition: all .15s; }
.button:hover { border-color: #b7c5d2; background: #f8fafc; text-decoration: none; }
.button.primary { color: #fff; border-color: var(--teal); background: var(--teal); }
.button.primary:hover { border-color: var(--teal-dark); background: var(--teal-dark); }
.button.soft { color: var(--teal-dark); border-color: #c7e5e1; background: var(--teal-wash); }
.button.danger-soft { color: var(--red); border-color: #f0caca; background: var(--red-wash); }
.button.compact { min-height: 26px; padding: 4px 8px; font-size: 10px; }
.button[disabled] { opacity: .55; cursor: not-allowed; }

.panel, .metric-card { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); box-shadow: 0 1px 2px rgba(15,35,55,.018); }
.panel { margin-bottom: 15px; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 16px 11px; border-bottom: 1px solid var(--border); }
.panel-title { margin: 0; color: #26374b; font-family: Manrope, sans-serif; font-size: 12px; font-weight: 800; letter-spacing: -.015em; }
.panel-description { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 14px 16px; }
.panel-body.flush { padding: 0; }
.panel-link { color: var(--teal-dark); font-size: 10px; font-weight: 700; white-space: nowrap; }

.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 15px; }
.metric-card { position: relative; min-height: 93px; padding: 13px 15px; }
.metric-label { color: #788899; font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.metric-value { margin-top: 9px; color: #14253b; font-family: Manrope, sans-serif; font-size: 25px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.metric-note { margin-top: 7px; color: #718094; font-size: 10px; }
.metric-accent { position: absolute; top: 13px; right: 13px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--teal); background: var(--teal-wash); font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 700; }
.metric-card.amber .metric-accent { color: var(--amber); background: var(--amber-wash); }
.metric-card.blue .metric-accent { color: var(--blue); background: var(--blue-wash); }
.metric-card.red .metric-accent { color: var(--red); background: var(--red-wash); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(310px,.9fr); gap: 15px; align-items: start; }

.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 9px 11px; color: #79889a; background: #fafbfd; border-bottom: 1px solid var(--border); font-size: 9px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; white-space: nowrap; }
td { padding: 10px 11px; color: #3d4e62; border-bottom: 1px solid #edf1f4; font-size: 10px; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdfd; }
.cell-primary { color: #24354a; font-size: 11px; font-weight: 700; }
.cell-secondary { display: block; margin-top: 3px; color: #8492a1; font-size: 9px; line-height: 1.45; }
.mono { font-family: 'DM Mono', ui-monospace, monospace; font-size: 10px; }
.nowrap { white-space: nowrap; }
.table-action { color: var(--teal-dark); font-size: 10px; font-weight: 700; cursor: pointer; }

.badge, .tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid transparent; border-radius: 12px; font-size: 9px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.badge.high, .badge.critical, .badge.fail, .badge.overdue { color: var(--red); border-color: #f2d0d1; background: var(--red-wash); }
.badge.medium, .badge.review, .badge.pending, .badge.unassessed { color: var(--amber); border-color: #f1e0ba; background: var(--amber-wash); }
.badge.low, .badge.pass, .badge.active, .badge.current, .badge.succeeded, .badge.verified { color: var(--green); border-color: #c9e7d3; background: var(--green-wash); }
.badge.info, .badge.official, .badge.mapped, .badge.ready, .badge.parsed { color: var(--blue); border-color: #d1e0f3; background: var(--blue-wash); }
.badge.demo { color: #835b0c; border-color: #f0dfb7; background: #fff8e9; }
.badge.neutral, .badge.internal, .badge.unstructured, .badge.not-run, .badge.not-available { color: #617184; border-color: #e0e6ed; background: #f5f7f9; }
.tag { padding: 3px 6px; color: #637488; border-color: #e4eaf0; background: #f8fafb; font-size: 8px; letter-spacing: .035em; text-transform: uppercase; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--border); background: #fbfcfd; }
.toolbar input, .toolbar select { min-height: 31px; }
.input, select, textarea { width: 100%; min-height: 34px; padding: 8px 9px; color: #293c51; border: 1px solid #dce4eb; border-radius: 5px; background: #fff; font-size: 11px; }
.input:focus, select:focus, textarea:focus { border-color: #88c3bd; outline: none; box-shadow: 0 0 0 3px rgba(13,139,131,.07); }
.toolbar .input { width: min(270px, 100%); }
.toolbar select { width: auto; min-width: 140px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 12px; }
.form-grid.cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.field-control { display: flex; flex-direction: column; gap: 5px; }
.field-control.full { grid-column: 1 / -1; }
.field-control label { color: #53657a; font-size: 10px; font-weight: 700; }
.field-help { color: #8593a2; font-size: 9px; line-height: 1.4; }
textarea { min-height: 114px; resize: vertical; font-family: inherit; line-height: 1.5; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.form-note { color: #778799; font-size: 10px; }

.alert { padding: 10px 12px; margin-bottom: 12px; border: 1px solid #dbe7f1; border-radius: 6px; color: #53677d; background: #f7fafc; font-size: 10px; line-height: 1.55; }
.alert.warning { color: #73531d; border-color: #f0e1be; background: #fff9ed; }
.alert.success { color: #2d6547; border-color: #cde7d4; background: #f1faf3; }
.alert.danger { color: #854047; border-color: #f0d0d2; background: #fff5f5; }
.alert strong { font-weight: 800; }
.callout-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 5px 0 13px; }

.source-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 14px; padding: 11px 0; border-bottom: 1px solid #edf1f4; }
.source-card:last-child { border-bottom: 0; }
.source-title { color: #2a3c51; font-size: 11px; font-weight: 700; }
.source-meta { margin-top: 3px; color: #8190a0; font-size: 9px; line-height: 1.45; }
.hash-line { color: #617486; font-family: 'DM Mono', monospace; font-size: 9px; word-break: break-all; }
.source-url { display: inline-block; margin-top: 5px; color: var(--teal-dark); font-size: 9px; word-break: break-all; }

.status-list { display: grid; gap: 0; }
.status-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1f4; }
.status-item:last-child { border-bottom: 0; }
.status-name { color: #3d4f63; font-size: 10px; font-weight: 600; }
.status-detail { margin-top: 3px; color: #8592a0; font-size: 9px; }
.chain-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chain-step { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; color: #617185; border: 1px solid #e2e8ed; border-radius: 6px; background: #fafbfd; font-size: 9px; }
.chain-step.available { color: #24684b; border-color: #cce7d5; background: #f2faf4; }
.chain-check { font-weight: 800; }

.change-card { padding: 13px 15px; border-bottom: 1px solid #edf1f4; }
.change-card:last-child { border-bottom: 0; }
.change-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.change-title { color: #25374c; font-size: 11px; font-weight: 800; line-height: 1.45; }
.change-summary { margin-top: 6px; color: #63758a; font-size: 10px; line-height: 1.55; }
.change-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.value-box { min-width: 0; padding: 7px 8px; border: 1px solid #e7ebef; border-radius: 5px; background: #fafbfd; }
.value-label { color: #92a0ae; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.value-text { margin-top: 3px; color: #485a6e; font-family: 'DM Mono', monospace; font-size: 9px; overflow-wrap: anywhere; }

.progress-wrap { min-width: 82px; }
.progress-meta { display: flex; justify-content: space-between; gap: 8px; color: #748397; font-family: 'DM Mono', monospace; font-size: 9px; }
.progress-track { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 5px; background: #e9eef2; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg,#138c82,#5db7a8); }

.empty-state { display: grid; justify-items: center; gap: 6px; padding: 28px 18px; color: #8391a0; text-align: center; }
.empty-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid #e3e9ee; border-radius: 10px; color: #7790a2; background: #fafcfd; font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 600; }
.empty-title { color: #465a70; font-size: 11px; font-weight: 800; }
.empty-copy { max-width: 390px; font-size: 10px; line-height: 1.55; }

.split-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; align-items: start; }
.three-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.case-card { padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.case-code { color: #79899c; font-family: 'DM Mono', monospace; font-size: 9px; }
.case-title { margin-top: 6px; color: #283a4f; font-family: Manrope, sans-serif; font-size: 12px; font-weight: 800; }
.case-description { margin-top: 6px; color: #6e7f91; font-size: 10px; line-height: 1.55; }
.case-note { padding-top: 8px; margin-top: 8px; border-top: 1px solid #edf1f4; color: #6c7b8c; font-size: 9px; line-height: 1.5; }

.regulator-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; transition: border .15s, box-shadow .15s; }
.regulator-card:hover { border-color: #b9d9d6; box-shadow: var(--shadow); }
.regulator-monogram { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; color: #0a766f; background: #e7f5f2; font-family: Manrope, sans-serif; font-size: 10px; font-weight: 800; }
.regulator-name { color: #293b4f; font-size: 11px; font-weight: 800; }
.regulator-sector { margin-top: 3px; color: #8391a0; font-size: 9px; }
.regulator-stats { display: flex; gap: 10px; color: #6d7d8f; font-family: 'DM Mono', monospace; font-size: 9px; }
.regulator-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }

.kv-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.kv { min-width: 0; padding: 10px 11px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kv:nth-child(3n) { border-right: 0; }
.kv-label { color: #8391a0; font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.kv-value { margin-top: 4px; color: #33475c; font-size: 10px; overflow-wrap: anywhere; }

.search-result { display: grid; grid-template-columns: 77px minmax(0,1fr) 50px; gap: 10px; align-items: start; padding: 11px 13px; border-bottom: 1px solid #edf1f4; }
.search-result:last-child { border-bottom: 0; }
.search-result-title { color: #293a4e; font-size: 11px; font-weight: 800; }
.search-result-snippet { margin-top: 3px; color: #718195; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }

.diff-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diff-list { padding: 9px 11px; margin: 0; color: #42576c; border: 1px solid var(--border); border-radius: 6px; background: #fbfcfd; font-size: 10px; }
.diff-list li { margin: 3px 0; line-height: 1.5; }
.diff-list.added li::marker { color: var(--green); }
.diff-list.removed li::marker { color: var(--red); }

.editor-row td { padding: 0; background: #f8fbfc; }
.mapping-editor { padding: 13px; border-top: 1px dashed #d5e2e6; }
.mapping-editor .form-grid { grid-template-columns: 1.6fr 1fr 1fr; }
.mapping-editor .field-control.full { grid-column: auto; }

.code-block { max-width: 100%; padding: 11px 12px; overflow: auto; color: #dce7f2; border-radius: 7px; background: #17263b; font-family: 'DM Mono', monospace; font-size: 9px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

.toast { position: fixed; z-index: 40; right: 22px; bottom: 20px; max-width: min(480px,calc(100vw - 32px)); padding: 11px 14px; color: #fff; border-radius: 7px; background: #23374e; box-shadow: 0 12px 30px rgba(10,25,42,.22); font-size: 11px; }
.toast.success { background: #23734e; }
.toast.error { background: #a43b43; }
.loading-line { height: 2px; overflow: hidden; background: #e7eef1; }
.loading-line::after { display: block; width: 28%; height: 100%; content: ''; background: var(--teal); animation: load 1.1s ease-in-out infinite alternate; }
@keyframes load { from { transform: translateX(-5%); } to { transform: translateX(260%); } }

@media (max-width: 1180px) {
  .sidebar { width: 224px; }
  .workspace { margin-left: 224px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar { padding: 0 20px; }
  .page { padding-right: 20px; padding-left: 20px; }
  .demo-banner { padding-right: 20px; padding-left: 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 840px) {
  .sidebar { width: 68px; }
  .brand-block { justify-content: center; padding: 12px 7px; }
  .brand-copy, .nav-heading, .nav-link-label, .nav-count, .sidebar-footer, .nav-link .nav-icon + .nav-link-label { display: none; }
  .nav-scroll { padding: 12px 8px; }
  .nav-group { margin-bottom: 10px; }
  .nav-link { justify-content: center; padding: 9px 5px; }
  .nav-icon { width: 24px; flex-basis: 24px; font-size: 10px; }
  .workspace { margin-left: 68px; }
  .topbar-context { min-width: 120px; }
  .global-search { width: min(380px, 45vw); }
  .top-pill { display: none; }
  .split-grid, .three-grid { grid-template-columns: 1fr; }
  .regulator-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sidebar { position: fixed; inset: auto 0 0; display: block; width: 100%; height: 58px; border-top: 1px solid rgba(255,255,255,.09); border-right: 0; }
  .brand-block, .sidebar-footer { display: none; }
  .nav-scroll { display: flex; height: 58px; padding: 5px 6px; overflow-x: auto; overflow-y: hidden; }
  .nav-group { display: contents; }
  .nav-heading { display: none; }
  .nav-link { flex: 0 0 54px; width: 54px; height: 47px; margin: 0 2px; padding: 5px; }
  .nav-link-label, .nav-count { display: none; }
  .nav-icon { width: 30px; flex-basis: 30px; height: 30px; border-radius: 7px; background: rgba(255,255,255,.04); }
  .workspace { min-height: calc(100vh - 58px); margin-left: 0; padding-bottom: 58px; }
  .topbar { position: static; gap: 8px; min-height: 58px; padding: 0 12px; }
  .topbar-context { min-width: auto; flex: 0 0 auto; font-size: 9px; }
  .topbar-context strong { font-size: 10px; }
  .topbar-context span { display: none; }
  .global-search { width: 100%; max-width: 220px; height: 32px; margin-left: auto; }
  .global-search input { font-size: 10px; }
  .kbd { display: none; }
  .topbar-right { display: none; }
  .demo-banner { align-items: flex-start; padding: 8px 12px; font-size: 9px; }
  .demo-banner a { font-size: 9px; }
  .page { padding: 17px 12px 25px; }
  .page-head { display: block; }
  .page-title { font-size: 19px; }
  .page-actions { justify-content: flex-start; margin-top: 12px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .metric-card { min-height: 82px; padding: 10px; }
  .metric-value { font-size: 21px; }
  .metric-note { font-size: 9px; }
  .metric-accent { top: 9px; right: 9px; width: 20px; height: 20px; }
  .panel-head, .panel-body { padding-right: 11px; padding-left: 11px; }
  .panel-body.flush { padding: 0; }
  .panel { margin-bottom: 11px; }
  .toolbar { padding: 9px; }
  .toolbar .input { width: 100%; }
  .toolbar select { flex: 1; min-width: 120px; }
  .kv-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kv:nth-child(3n) { border-right: 1px solid var(--border); }
  .kv:nth-child(2n) { border-right: 0; }
  .form-grid, .form-grid.cols-3, .mapping-editor .form-grid { grid-template-columns: 1fr; }
  .field-control.full, .mapping-editor .field-control.full { grid-column: auto; }
  .diff-columns, .change-values { grid-template-columns: 1fr; }
  .search-result { grid-template-columns: 55px minmax(0,1fr); }
  .search-result > :last-child { display: none; }
  .table-wrap table { min-width: 700px; }
  .source-card { grid-template-columns: 1fr; }
}

/* Live platform banners (real-data mode) */
.demo-banner.live { color: #144d3a; background: #eefaf4; border-bottom-color: #cde9dc; }
.demo-banner.live strong { color: #0d6a46; }
.demo-banner.live a { color: #0d6a46; }
.demo-banner.danger { color: #6b1f22; background: #fdefef; border-bottom-color: #f2d0d1; }
.demo-banner.danger strong { color: #a02226; }
.demo-banner.danger a { color: #a02226; }

/* Public regulatory-intelligence workspace */
html { min-width: 320px; }
.public-shell { min-height: 100vh; display: flex; flex-direction: column; color: #182537; background: #f5f7fa; }
.public-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; min-height: 76px; padding: 10px clamp(14px, 4vw, 56px); border-bottom: 1px solid #e3e9ef; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
.public-brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; color: #17283b; text-decoration: none; }
.public-brand:hover { text-decoration: none; }
.public-brand .brand-mark { width: 38px; height: 38px; border-radius: 10px; font-size: 11px; }
.public-brand strong { display: block; font-family: Manrope, ui-sans-serif, sans-serif; font-size: 13px; font-weight: 800; letter-spacing: -.025em; }
.public-brand small { display: block; margin-top: 2px; color: #758598; font-size: 9px; letter-spacing: .035em; }
.public-nav { display: flex; flex: 1 1 auto; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.public-nav-link { flex: 0 0 auto; padding: 9px 10px; border-radius: 6px; color: #516175; font-size: 11px; font-weight: 650; white-space: nowrap; }
.public-nav-link:hover, .public-nav-link.active { color: #08736d; background: #eaf6f3; text-decoration: none; }
.public-nav-link[aria-current="page"] { box-shadow: inset 0 -2px #0d8b83; }
.header-consulting { flex: 0 0 auto; color: #08736d; font-size: 10px; font-weight: 750; white-space: nowrap; }
.public-status-strip { display: flex; align-items: center; gap: 10px; padding: 8px clamp(14px, 4vw, 56px); color: #55677c; border-bottom: 1px solid #e3e9ef; background: #f9fbfc; font-size: 10px; }
.public-status-strip strong { color: #65768a; font-size: 9px; letter-spacing: .06em; white-space: nowrap; }
.public-status-strip.live { color: #205b43; border-color: #cde9dc; background: #effaf4; }
.public-status-strip.live strong { color: #0d6a46; }
.public-status-strip a { margin-left: auto; color: #0d6a46; white-space: nowrap; }
.public-route-context { display: none; }
.public-main { width: min(1160px, 100%); flex: 1 0 auto; padding: 36px clamp(14px, 4vw, 56px) 54px; margin: 0 auto; }
.public-hero { position: relative; padding: clamp(25px, 5vw, 56px); margin: 0 0 30px; border: 1px solid #e1e7ec; border-radius: 14px; background: #fff; box-shadow: 0 5px 24px rgba(24,37,55,.04); }
.eyebrow { margin: 0 0 9px; color: #0b8279; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { color: #91a2b0; }
.public-hero h1, .public-page-head h1 { max-width: 850px; margin: 0; color: #13253a; font-family: Manrope, ui-sans-serif, sans-serif; font-size: clamp(30px, 4vw, 47px); font-weight: 800; letter-spacing: -.05em; line-height: 1.08; }
.hero-lede { max-width: 760px; margin: 16px 0 0; color: #33485d; font-family: Manrope, ui-sans-serif, sans-serif; font-size: clamp(17px, 2vw, 23px); line-height: 1.42; }
.hero-detail { max-width: 700px; margin: 11px 0 0; color: #66778a; font-size: 13px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.public-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; color: #33475c; border: 1px solid #d4dfe7; border-radius: 6px; background: #fff; font-size: 11px; font-weight: 750; line-height: 1.25; text-align: center; transition: background .15s, border-color .15s; }
.public-button:hover { border-color: #abc9c8; background: #f8fbfb; text-decoration: none; }
.public-button.primary { color: #fff; border-color: #0d8179; background: #0d8179; }
.public-button.primary:hover { border-color: #086c66; background: #086c66; }
.public-button.compact { min-height: 32px; padding: 6px 10px; font-size: 10px; }
.brand-byline { margin: 16px 0 0; color: #8492a2; font-size: 10px; }
.brand-byline a { color: #08736d; font-weight: 750; }
.live-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 19px; color: #68798b; font-size: 9px; }
.public-badge { display: inline-flex; align-items: center; padding: 4px 7px; color: #617184; border: 1px solid #e0e6ed; border-radius: 20px; background: #f5f7f9; font-size: 8px; font-weight: 800; letter-spacing: .055em; line-height: 1.2; white-space: nowrap; }
.public-badge.official { color: #2d6480; border-color: #d0e4ec; background: #f1f8fb; }
.public-badge.warning { color: #865e18; border-color: #f0dfb7; background: #fff8e9; }
.public-badge.success { color: #1d6c47; border-color: #c9e7d3; background: #eff9f1; }
.public-badge.neutral { color: #647386; border-color: #e1e6ec; background: #f5f7f9; }
.public-section { margin: 30px 0; }
.public-section > h2, .section-heading h2 { margin: 0; color: #20344b; font-family: Manrope, ui-sans-serif, sans-serif; font-size: clamp(20px, 2.3vw, 27px); font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.public-section > h3 { margin: 19px 0 8px; color: #354a60; font-size: 13px; }
.public-section > p { color: #5f7083; font-size: 12px; line-height: 1.7; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading p:not(.eyebrow) { max-width: 680px; margin: 7px 0 0; color: #718094; font-size: 11px; line-height: 1.6; }
.text-link { display: inline-block; color: #08736d; font-size: 10px; font-weight: 750; }
.count-pill { flex: 0 0 auto; padding: 5px 9px; color: #627488; border: 1px solid #e1e7ed; border-radius: 20px; background: #fff; font-size: 9px; font-weight: 700; }
.public-change-list, .public-source-list { display: grid; gap: 11px; }
.public-change-card, .public-source-card { padding: 17px 18px; border: 1px solid #e1e7ed; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(24,37,55,.025); }
.public-change-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.public-change-card h2, .public-change-card h3, .public-source-card h2, .public-source-card h3 { margin: 9px 0 4px; color: #263a50; font-family: Manrope, ui-sans-serif, sans-serif; font-size: 14px; font-weight: 800; line-height: 1.42; }
.public-change-card h3 a, .public-source-card h2 a, .public-source-card h3 a { color: inherit; }
.public-change-card-top p, .public-source-card > p { margin: 5px 0; color: #77879a; font-size: 10px; line-height: 1.55; }
.change-summary { color: #43576d; font-size: 11px; line-height: 1.65; }
.source-boundary { color: #758598; font-size: 10px; line-height: 1.65; }
.public-card-actions { margin-top: 12px; }
.public-empty { padding: 20px 19px; border: 1px dashed #d6e0e7; border-radius: 8px; color: #65778a; background: rgba(255,255,255,.7); font-size: 11px; line-height: 1.65; }
.public-empty strong { color: #344a60; }
.public-empty p { margin: 6px 0 0; }
.authority-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.authority-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid #e1e7ed; border-radius: 8px; background: #fff; }
.authority-acronym { display: grid; flex: 0 0 43px; place-items: center; min-height: 40px; color: #0b7771; border-radius: 8px; background: #e8f5f2; font-family: Manrope, ui-sans-serif, sans-serif; font-size: 10px; font-weight: 850; }
.authority-card h2 { margin: 0 0 4px; color: #33495f; font-size: 11px; line-height: 1.45; }
.authority-card h2 a { color: inherit; }
.authority-card p { margin: 3px 0; color: #758599; font-size: 9px; line-height: 1.55; }
.authority-card small { color: #8794a3; font-size: 9px; }
.public-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.public-metrics > div { min-height: 88px; padding: 13px; border: 1px solid #e1e7ed; border-radius: 8px; background: #fff; }
.public-metrics span { display: block; color: #748397; font-size: 9px; line-height: 1.5; }
.public-metrics strong { display: block; margin-top: 8px; color: #1e3349; font-family: Manrope, ui-sans-serif, sans-serif; font-size: 25px; font-weight: 800; letter-spacing: -.04em; }
.process-flow { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; padding: 0; margin: 13px 0 0; list-style: none; }
.process-flow li { min-height: 77px; padding: 11px; border: 1px solid #e2e8ed; border-radius: 7px; background: #fff; }
.process-flow li span { display: block; color: #0d8b83; font-family: 'DM Mono', monospace; font-size: 9px; }
.process-flow li strong { display: block; margin-top: 8px; color: #40546a; font-size: 10px; }
.consulting-cta { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 22px 24px; margin: 34px 0 0; border: 1px solid #d9e6e7; border-left: 3px solid #0d8b83; border-radius: 9px; background: #fff; }
.consulting-cta h2 { max-width: 700px; margin: 0; color: #1d3449; font-family: Manrope, ui-sans-serif, sans-serif; font-size: clamp(17px, 2vw, 22px); font-weight: 800; line-height: 1.32; letter-spacing: -.025em; }
.consulting-cta p:not(.eyebrow) { max-width: 700px; margin: 8px 0 0; color: #697a8c; font-size: 11px; line-height: 1.6; }
.consulting-cta .public-button { flex: 0 0 auto; }
.public-page-head { padding: 12px 0 22px; margin-bottom: 14px; border-bottom: 1px solid #e1e7ed; }
.public-page-head > p:not(.eyebrow) { max-width: 840px; margin: 12px 0 0; color: #637488; font-size: 13px; line-height: 1.75; }
.public-page-head > a { display: inline-flex; margin-top: 12px; }
.public-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; align-items: end; padding: 14px; margin: 17px 0 22px; border: 1px solid #e1e7ed; border-radius: 9px; background: #fff; }
.public-filters label { display: flex; flex-direction: column; gap: 5px; color: #53657a; font-size: 9px; font-weight: 750; }
.public-filters input, .public-filters select { min-height: 37px; padding: 8px 9px; font-size: 10px; }
.public-filters .public-button { align-self: end; }
.fact-row { display: flex; flex-wrap: wrap; gap: 8px 15px; margin: 9px 0; color: #738398; font-size: 9px; line-height: 1.5; }
.fact-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; overflow: hidden; border: 1px solid #e1e7ed; border-radius: 8px; background: #fff; }
.fact-grid > div { min-width: 0; padding: 12px; border-right: 1px solid #e9eef2; border-bottom: 1px solid #e9eef2; }
.fact-grid span, .fact-grid strong { display: block; overflow-wrap: anywhere; }
.fact-grid span { color: #8090a0; font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.fact-grid strong { margin-top: 5px; color: #3d5268; font-size: 10px; }
.detail-lede { color: #324960 !important; font-size: 15px !important; font-weight: 650; }
.change-detail-status { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.text-version { min-width: 0; padding: 13px; border: 1px solid #e0e6ec; border-radius: 7px; background: #fff; }
.text-version h3, .diff-columns h3 { margin: 0 0 8px; color: #53677c; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.text-version pre, .evidence-pre { max-height: 440px; padding: 11px; overflow: auto; color: #42566c; border: 1px solid #e6ebef; border-radius: 5px; background: #fafcfd; font-family: 'DM Mono', ui-monospace, monospace; font-size: 9px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.evidence-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 11px; }
.evidence-item { display: grid; gap: 6px; min-width: 0; padding: 13px; border: 1px solid #e1e7ed; border-radius: 7px; background: #fff; color: #6a7b8d; font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.evidence-item strong { color: #3c5268; font-size: 10px; }
.evidence-item code { color: #42576d; font-family: 'DM Mono', ui-monospace, monospace; font-size: 9px; overflow-wrap: anywhere; }
.evidence-item a { color: #0b776f; font-weight: 700; }
.public-notice { padding: 12px 14px; border: 1px solid #e5e9ed; border-radius: 6px; color: #596d81; background: #f9fbfc; font-size: 10px; line-height: 1.65; }
.impact-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.impact-list li { display: grid; gap: 5px; padding: 12px; border: 1px solid #e3e8ed; border-radius: 7px; background: #fff; color: #607287; font-size: 10px; }
.impact-list li strong { color: #344c63; }
.impact-list li small { color: #8290a0; }
.source-url-text { overflow-wrap: anywhere; }
.public-footer { display: grid; grid-template-columns: 1fr auto; gap: 10px 22px; padding: 24px clamp(14px, 4vw, 56px) 20px; border-top: 1px solid #dfe6ec; color: #748397; background: #fff; font-size: 9px; }
.footer-brand { display: block; color: #1d344b; font-family: Manrope, ui-sans-serif, sans-serif; font-size: 13px; font-weight: 850; }
.public-footer p { margin: 6px 0 0; }
.public-footer .footer-links { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 8px 16px; }
.footer-links a { color: #53687d; font-weight: 650; }
.legal-note { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #eef1f4; }
.admin-brand-link { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.admin-brand-link:hover { text-decoration: none; }
.admin-module-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.admin-module-card { display: flex; gap: 11px; align-items: flex-start; padding: 13px; border: 1px solid #e0e6ed; border-radius: 7px; color: #34485d; background: #fff; }
.admin-module-card:hover { border-color: #a8cfcc; text-decoration: none; }
.admin-module-card strong, .admin-module-card small { display: block; }
.admin-module-card strong { font-size: 11px; }
.admin-module-card small { margin-top: 4px; color: #7e8d9d; font-size: 9px; line-height: 1.5; }

.alert-subscribe-panel { max-width: 920px; }
.alert-subscribe-form { display: grid; gap: 18px; padding: 18px; border: 1px solid #dfe7ec; border-radius: 10px; background: #fff; }
.alert-subscribe-form fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.alert-subscribe-form legend, .alert-email { display: grid; gap: 7px; color: #3d5268; font-size: 10px; font-weight: 800; }
.alert-email input { min-height: 42px; padding: 10px 12px; border: 1px solid #cfd9e1; border-radius: 6px; font-size: 12px; }
.alert-choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 9px; }
.alert-choice { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 10px 11px; border: 1px solid #e0e7ec; border-radius: 7px; background: #fbfcfd; color: #50657a; font-size: 10px; cursor: pointer; }
.alert-choice input { flex: 0 0 auto; margin-top: 2px; }
.alert-choice span, .alert-choice strong, .alert-choice small { display: block; min-width: 0; }
.alert-choice strong { color: #2f485f; font-size: 10px; }
.alert-choice small { margin-top: 3px; color: #8090a0; font-size: 8px; line-height: 1.45; }
.alert-consent { display: flex; align-items: flex-start; gap: 9px; color: #5d7084; font-size: 9px; line-height: 1.55; }
.alert-consent input { margin-top: 2px; }
.alert-form-status:empty { display: none; }
.alert-form-status .public-notice { margin-top: 0; }

@media (max-width: 1020px) {
  .public-header { gap: 11px; padding-right: 16px; padding-left: 16px; }
  .public-nav-link { padding-right: 8px; padding-left: 8px; font-size: 10px; }
  .public-main { padding-right: 20px; padding-left: 20px; }
  .public-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .alert-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .public-header { position: sticky; display: grid; grid-template-columns: 1fr auto; gap: 8px; min-height: auto; padding: 9px 12px 0; }
  .public-brand { grid-column: 1; }
  .header-consulting { grid-column: 2; grid-row: 1; font-size: 9px; }
  .public-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: 0 0 7px; }
  .public-nav-link { padding: 8px 9px; }
  .public-status-strip { align-items: flex-start; padding: 8px 12px; font-size: 9px; line-height: 1.5; }
  .public-main { padding: 22px 13px 38px; }
  .public-hero { padding: 23px 17px; margin-bottom: 23px; }
  .public-hero h1, .public-page-head h1 { font-size: clamp(28px, 8vw, 37px); }
  .hero-detail { font-size: 11px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .public-button { width: 100%; }
  .section-heading { align-items: flex-start; }
  .section-heading .text-link { max-width: 100px; text-align: right; }
  .authority-grid, .public-metrics, .process-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .process-flow li { min-height: 68px; }
  .consulting-cta { align-items: flex-start; flex-direction: column; padding: 18px; }
  .consulting-cta .public-button { width: 100%; }
  .public-filters { grid-template-columns: 1fr; padding: 11px; }
  .public-filters > * { width: 100%; }
  .alert-choice-grid { grid-template-columns: 1fr; }
  .public-change-card, .public-source-card { padding: 14px; }
  .public-change-card-top { flex-direction: column; }
  .fact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .evidence-grid, .diff-columns { grid-template-columns: 1fr; }
  .public-footer { grid-template-columns: 1fr; padding: 21px 14px; }
  .public-footer .footer-links { justify-content: flex-start; }
  .public-footer .legal-note { grid-column: auto; }
  .admin-module-grid { grid-template-columns: 1fr; }
}
