:root {
  color-scheme: light;
  --ink: #14202b;
  --muted: #66717c;
  --line: #dfe4e8;
  --soft: #f3f5f6;
  --paper: #ffffff;
  --navy: #102a3a;
  --blue: #176b87;
  --blue-dark: #0d5068;
  --mint: #dff3ed;
  --orange: #e96b3a;
  --yellow: #f4bf4f;
  --red: #c94444;
  --shadow: 0 18px 48px rgba(20, 32, 43, 0.08);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f8f9f9; color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(23, 107, 135, 0.24); outline-offset: 2px; }
a:focus-visible { outline: 3px solid rgba(23, 107, 135, 0.24); outline-offset: 3px; }

.auth-callback { min-height: 100vh; display: grid; place-items: center; background: var(--navy); color: white; }
.auth-callback main { max-width: 440px; padding: 40px; text-align: center; }
.auth-callback .brand-mark { margin: 0 auto 28px; }
.auth-callback h1 { max-width: none; font-size: 32px; }
.auth-callback p { color: #bdcad1; line-height: 1.6; }

.site-header {
  height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.brand-mark { width: 28px; height: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(45deg); }
.brand-mark i { display: block; background: var(--blue); border-radius: 2px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--orange); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.local-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; color: #426258; background: #edf8f4; border: 1px solid #d4ebe3; border-radius: 999px; padding: 7px 11px; }
.local-pill > span { width: 7px; height: 7px; border-radius: 50%; background: #26966e; box-shadow: 0 0 0 3px rgba(38, 150, 110, 0.12); }

.button { border: 0; border-radius: 8px; min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-weight: 700; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.button-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.button-primary { background: var(--orange); color: white; box-shadow: 0 8px 20px rgba(233, 107, 58, .22); }
.button-primary:hover:not(:disabled) { background: #d85c2e; }
.button-secondary { background: var(--paper); color: var(--navy); border: 1px solid #cfd6db; }

.app-shell { width: min(1480px, calc(100% - 40px)); margin: 24px auto 72px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.intro-panel { min-height: calc(100vh - 120px); max-height: calc(100vh - 96px); position: sticky; top: 88px; display: flex; flex-direction: column; padding: 28px 22px 22px; border-radius: 14px; overflow: hidden; background: var(--navy); color: white; box-shadow: var(--shadow); }
.intro-panel::after { content: ""; position: absolute; width: 220px; height: 220px; right: -95px; top: -85px; border: 46px solid rgba(255, 255, 255, .04); border-radius: 50%; }
.eyebrow { margin: 0 0 9px; font-size: 11px; line-height: 1.2; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--blue); }
.intro-panel .eyebrow { color: #7ed3cf; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.intro-panel h1 { font-size: 31px; line-height: 1; letter-spacing: -.035em; }
.intro-copy { margin: 10px 0 0; color: #bdcad1; line-height: 1.5; font-size: 12px; }
.side-nav { min-height: 0; display: grid; align-content: start; gap: 5px; margin: 28px -8px 18px; overflow-y: auto; scrollbar-width: thin; }
.side-nav-item { width: 100%; min-height: 58px; padding: 9px 10px; display: grid; grid-template-columns: 29px 1fr; gap: 10px; align-items: center; border: 0; border-radius: 8px; color: #91a7b2; background: transparent; text-align: left; }
.side-nav-item:hover:not(:disabled) { color: white; background: rgba(255,255,255,.05); }
.side-nav-item:disabled { cursor: default; opacity: .45; }
.side-nav-item > span:last-child { min-width: 0; display: grid; gap: 2px; }
.side-nav-item strong, .side-nav-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav-item strong { color: inherit; font-size: 12px; }
.side-nav-item small { font-size: 10px; }
.nav-index { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #557080; border-radius: 50%; font-size: 10px; font-weight: 800; }
.side-nav-item.active { color: white; background: rgba(255,255,255,.09); }
.side-nav-item.active .nav-index { color: var(--navy); background: #7ed3cf; border-color: #7ed3cf; }
.side-nav-item.done .nav-index { color: white; background: var(--blue); border-color: var(--blue); }
.nav-status { width: 7px; height: 7px; border-radius: 50%; background: #7ed3cf; }
.nav-status.partial { background: var(--yellow); }
.nav-status.error { background: #ef8f83; }
.privacy-note { margin-top: auto; padding: 16px; display: flex; align-items: flex-start; gap: 11px; border-top: 1px solid rgba(255,255,255,.14); color: #b9c7ce; font-size: 11px; line-height: 1.45; }
.privacy-note > span { width: 21px; height: 21px; flex: 0 0 21px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: #7ed3cf; font-weight: 900; }
.privacy-note p { margin: 0; }
.privacy-note strong { display: block; color: white; margin-bottom: 2px; }

.workspace { display: grid; gap: 24px; min-width: 0; }
.site-footer { width: min(1480px, calc(100% - 40px)); margin: -40px auto 28px; padding-left: 270px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a, .site-footer button { padding: 0; border: 0; color: var(--blue-dark); background: none; font: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal-dialog { width: min(700px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 14px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px rgba(16,42,58,.3); }
.legal-dialog::backdrop { background: rgba(16,42,58,.72); backdrop-filter: blur(3px); }
.legal-dialog form { padding: clamp(24px, 5vw, 42px); }
.legal-dialog-heading { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; }
.legal-dialog-heading h2 { max-width: 560px; font-size: clamp(27px, 4vw, 36px); }
.legal-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: #fff0ca; font-size: 21px; font-weight: 850; }
.legal-copy { margin: 24px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.legal-copy p { margin: 0; }
.legal-copy p + *, .legal-copy ul + p { margin-top: 14px; }
.legal-copy ul { padding-left: 20px; }
.legal-copy li + li { margin-top: 7px; }
.legal-copy a { color: var(--blue-dark); font-weight: 700; text-underline-offset: 3px; }
.legal-confirm { margin: 0 0 22px; padding: 15px 16px; display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start; border: 1px solid #d4e6e4; border-radius: 8px; background: #f2faf8; color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.5; cursor: pointer; }
.legal-confirm input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.legal-dialog .button { width: 100%; }
.section-block, .report { padding: clamp(26px, 4vw, 46px); background: var(--paper); border: 1px solid #e6e9eb; border-radius: 14px; box-shadow: var(--shadow); }
.section-heading, .report-toolbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 30px; }
.section-heading > div:first-child { position: relative; padding-left: 52px; }
.section-number { position: absolute; left: 0; top: 3px; color: #b8c1c7; font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
h2 { margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(27px, 3vw, 36px); line-height: 1.1; font-weight: 500; letter-spacing: -.025em; }
.save-status { margin-top: 27px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.save-status.saved { color: #267457; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field > span { font-size: 12px; font-weight: 750; color: #48545e; }
.field b { color: var(--orange); }
.field em { color: #929ba2; font-style: normal; font-weight: 500; }
.field input, .field select { width: 100%; height: 48px; padding: 0 14px; color: var(--ink); background: #fbfcfc; border: 1px solid #cfd6da; border-radius: 7px; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #66717c; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,107,135,.09); }
.form-hint { margin: 18px 0 0; padding-left: 18px; color: #7d878e; font-size: 11px; position: relative; }
.form-hint::before { content: "i"; position: absolute; left: 0; top: -1px; width: 13px; height: 13px; display: grid; place-items: center; border: 1px solid #9da6ac; border-radius: 50%; font-size: 9px; font-weight: 800; }
.report-names { margin-top: 18px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #d4e6e4; border-radius: 8px; background: #f2faf8; }
.report-names p { display: grid; gap: 4px; margin: 0; }
.report-names strong { color: var(--navy); font-size: 12px; }
.report-names strong em { margin-left: 5px; color: var(--blue); font-size: 9px; font-style: normal; letter-spacing: .07em; text-transform: uppercase; }
.report-names span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.report-names .button { flex: 0 0 auto; }
.auth-message { margin: 16px 0 0; padding: 12px 14px; color: #8f2929; background: #fff0ef; border-left: 3px solid var(--red); font-size: 12px; line-height: 1.5; }
.auth-message.success { color: #24654f; background: #edf8f4; border-left-color: #26966e; }
.setup-guide { margin-top: 22px; padding: 16px 18px; color: var(--muted); background: var(--soft); border-radius: 8px; font-size: 12px; line-height: 1.55; }
.setup-guide summary { color: var(--navy); font-weight: 750; cursor: pointer; }
.setup-guide ol { margin: 13px 0 10px; padding-left: 20px; }
.setup-guide li + li { margin-top: 5px; }
.setup-guide a { color: var(--blue); font-weight: 700; text-decoration: none; }
.setup-next { margin-top: 20px; }

.scope-heading { align-items: center; }
.text-actions { display: flex; align-items: center; gap: 10px; }
.text-actions button { padding: 2px; border: 0; background: none; color: var(--blue); font-size: 12px; font-weight: 700; }
.text-actions span { height: 14px; width: 1px; background: var(--line); }
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scope-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 13px; min-height: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfd; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.scope-card:hover { transform: translateY(-1px); border-color: #aebbc2; }
.scope-card:has(input:checked) { border-color: #80aebb; background: #f3fafb; box-shadow: inset 3px 0 0 var(--blue); }
.scope-card input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
.scope-card strong { display: block; margin-bottom: 5px; color: var(--navy); font-size: 14px; }
.scope-card small { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; }
.scope-tag { align-self: end; justify-self: start; margin-top: 10px; padding: 3px 7px; border-radius: 4px; background: #e8eef1; color: #58707d; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.start-row { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.start-row p { display: grid; gap: 4px; margin: 0; }
.start-row strong { font-size: 13px; }
.start-row p span { color: var(--muted); font-size: 11px; }
.start-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

.run-panel { padding: 60px 30px; text-align: center; background: var(--navy); color: white; border-radius: 14px; box-shadow: var(--shadow); }
.run-panel h2 { color: white; font-size: 30px; }
.run-panel .eyebrow { color: #7ed3cf; }
.spinner { margin: 0 auto 22px; width: 40px; height: 40px; border: 3px solid rgba(255,255,255,.18); border-top-color: #7ed3cf; border-radius: 50%; animation: spin .8s linear infinite; }
.progress-track { width: min(460px, 90%); height: 6px; margin: 28px auto 10px; background: rgba(255,255,255,.13); border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: #7ed3cf; transition: width .25s ease; }
#run-progress { color: #b8c8d0; font-size: 12px; }
.run-queue { width: min(620px, 100%); margin: 30px auto 0; padding: 0; list-style: none; display: grid; gap: 7px; text-align: left; }
.run-queue li { min-height: 56px; display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; color: #92a7b2; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); border-radius: 7px; }
.run-queue strong, .run-queue small { display: block; }
.run-queue strong { color: inherit; font-size: 12px; }
.run-queue small { margin-top: 2px; font-size: 10px; }
.queue-elapsed { color: #7ed3cf; font-variant-numeric: tabular-nums; }
.queue-state { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #5d7683; border-radius: 50%; font-size: 10px; font-weight: 900; }
.queue-label { font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.run-queue li.running { color: white; background: rgba(126,211,207,.09); border-color: rgba(126,211,207,.3); }
.run-queue li.running .queue-state { border: 2px solid rgba(126,211,207,.25); border-top-color: #7ed3cf; animation: spin .8s linear infinite; }
.run-queue li.done { color: #bdd6ce; }
.run-queue li.done .queue-state { color: var(--navy); background: #7ed3cf; border-color: #7ed3cf; }
.run-queue li.error { color: #f0b2aa; }
.run-queue li.error .queue-state { color: white; background: var(--red); border-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

.report { border-top: 4px solid var(--blue); }
.report-toolbar { align-items: center; }
.export-actions { display: flex; gap: 8px; }
.export-dialog { width: min(680px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 14px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px rgba(16,42,58,.28); }
.export-dialog::backdrop { background: rgba(16,42,58,.62); backdrop-filter: blur(3px); }
.export-dialog form { padding: 30px; }
.export-dialog-heading h2 { font-size: 29px; }
.export-dialog-heading > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.export-options { margin: 24px 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; border: 0; }
.export-options legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.export-options label { min-height: 66px; padding: 12px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.export-options label:has(input:checked) { border-color: #8bc9c4; background: #f1fbfa; }
.export-options input { margin-top: 3px; accent-color: var(--blue); }
.export-options span { display: grid; gap: 3px; }
.export-options strong { color: var(--navy); font-size: 12px; }
.export-options small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.export-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.export-recommendations { display: none; }
.recommendation-summary { display: grid; gap: 10px; }
.recommendation-group { padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; }
.recommendation-group h4 { margin: 0 0 9px; color: var(--navy); font-size: 13px; }
.recommendation-group ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.recommendation-group li + li { margin-top: 6px; }
.area-heading { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.area-heading h3 { margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; }
.area-heading > p:not(.eyebrow) { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.area-heading .area-explanation { max-width: 900px; padding: 12px 14px; background: var(--soft); border-left: 3px solid #7ed3cf; }
.area-practice { max-width: 900px; margin-top: 12px; padding: 14px; border: 1px solid #cde6e3; border-radius: 7px; background: #f1fbfa; }
.area-practice > strong { color: var(--navy); font-size: 12px; }
.area-heading .area-practice > p { margin: 5px 0 0; color: var(--ink); font-size: 12px; line-height: 1.55; }
.area-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin-top: 24px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: -8px 0 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.report-meta strong { color: var(--ink); }
.score-row { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
.score-card { min-height: 126px; padding: 20px; border-radius: 9px; background: var(--soft); }
.score-card.primary { background: var(--navy); color: white; }
.score-card small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.score-card.primary small { color: #9db0ba; }
.score-card strong { display: block; margin: 13px 0 4px; font-size: 31px; line-height: 1; letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-card.primary strong { color: #7ed3cf; font-size: 43px; }
.score-card p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.score-card.primary p { color: #b8c8d0; }
.metric-card { width: 100%; border: 1px solid transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.metric-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.metric-card[aria-pressed="true"] { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.metric-card span { display: block; margin-top: 16px; color: var(--blue-dark); font-size: 10px; font-weight: 750; }
.report-section { margin-top: 34px; }
.report-section h3 { margin: 0 0 16px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; }
.finding-list { display: grid; gap: 10px; }
.finding { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 8px; }
.severity { align-self: start; justify-self: start; min-width: 72px; padding: 5px 8px; border-radius: 5px; text-align: center; font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.severity.high { color: #9e2929; background: #fde8e7; }
.severity.medium { color: #7a5813; background: #fff2d8; }
.severity.low { color: #27644f; background: var(--mint); }
.severity.info { color: #27644f; background: var(--mint); }
.severity.ok { color: #27644f; background: var(--mint); }
.severity.error { color: #6d5555; background: #eee9e9; }
.finding strong { display: block; margin-bottom: 4px; font-size: 13px; }
.finding p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.finding .finding-label { display: block; margin: 11px 0 3px; color: #8a949b; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.finding .finding-action { color: var(--blue-dark); font-weight: 650; }
.finding .finding-practice { color: var(--ink); }
.finding-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.finding-actions a, .finding-actions button { min-height: 32px; padding: 7px 10px; display: inline-flex; align-items: center; border: 1px solid #cfd6db; border-radius: 6px; color: var(--blue-dark); background: white; text-decoration: none; font-size: 10px; font-weight: 750; }
.finding-actions .admin-link { color: white; background: var(--blue); border-color: var(--blue); }
.finding-actions a:hover, .finding-actions button:hover:not(:disabled) { border-color: var(--blue); }
.finding-actions .admin-link:hover { background: var(--blue-dark); }
.finding-actions button:disabled { cursor: wait; opacity: .55; }
.recheck-status { min-height: 32px; display: inline-flex; align-items: center; color: #267457; font-size: 10px; font-weight: 750; }
.inventory-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.inventory-table th { padding: 10px 12px; color: var(--muted); background: var(--soft); text-align: left; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.inventory-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
.table-sort { width: 100%; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; color: inherit; background: none; font: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; }
.table-sort span { min-width: 1em; opacity: .45; font-size: 13px; }
.table-sort:hover span, th[aria-sort]:not([aria-sort="none"]) .table-sort span { color: var(--blue); opacity: 1; }
.pagination { min-height: 42px; padding: 9px 12px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; color: var(--muted); background: var(--soft); border-top: 1px solid var(--line); font-size: 11px; }
.pagination button { width: 28px; height: 26px; border: 1px solid #cfd6db; border-radius: 5px; color: var(--navy); background: white; font-weight: 800; }
.pagination button:disabled { cursor: not-allowed; opacity: .4; }
.status-ok { color: #267457; font-weight: 700; }
.status-error { color: var(--red); font-weight: 700; }
.detail-groups { display: grid; gap: 10px; }
.detail-group { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.detail-group summary { display: flex; justify-content: space-between; gap: 20px; padding: 15px 17px; color: var(--navy); background: var(--soft); cursor: pointer; font-size: 12px; }
.detail-group summary span { color: var(--muted); font-weight: 500; white-space: nowrap; }
.table-filter { padding: 11px 17px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.table-filter label { display: flex; align-items: center; gap: 8px; }
.table-filter input, .table-filter select, .table-filter button { min-height: 34px; padding: 0 10px; color: var(--ink); background: white; border: 1px solid #cfd6db; border-radius: 6px; }
.table-filter input { width: min(280px, 52vw); }
.table-filter button { color: var(--blue-dark); font-weight: 750; }
.metric-filter-label { margin-right: auto; padding: 5px 8px; color: var(--blue-dark); background: var(--mint); border-radius: 5px; }
.detail-table-wrap { max-height: 420px; overflow: auto; }
.detail-table th { position: sticky; top: 0; z-index: 1; }
.detail-table td { min-width: 120px; vertical-align: top; overflow-wrap: anywhere; }
.table-link { color: var(--blue); font-weight: 700; text-decoration: none; white-space: nowrap; }
.demo-disclaimer { margin-top: 30px; padding: 15px 18px; color: #6c5b30; background: #fff7e7; border-left: 3px solid var(--yellow); font-size: 11px; line-height: 1.55; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; padding: 12px 16px; color: white; background: var(--navy); border-radius: 7px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .intro-panel { min-height: auto; max-height: none; position: static; }
  .side-nav { max-height: 320px; }
  .privacy-note { margin-top: 8px; }
  .site-footer { margin-top: -40px; padding-left: 0; }
  .score-row { grid-template-columns: repeat(3, 1fr); }
  .score-card.primary { grid-column: 1 / -1; }
  .inventory-table { display: block; overflow-x: auto; }
}

@media (max-width: 640px) {
  .site-header { height: auto; min-height: 66px; padding: 14px 18px; }
  .header-actions { gap: 8px; }
  .local-pill { display: none; }
  .app-shell { width: min(100% - 24px, 1380px); margin-top: 12px; }
  .site-footer { width: calc(100% - 32px); margin-top: -48px; align-items: flex-start; flex-direction: column; }
  .intro-panel, .section-block, .report { padding: 25px 20px; }
  .intro-panel { border-radius: 10px; }
  .form-grid, .scope-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .section-heading, .report-toolbar, .start-row, .report-names { align-items: stretch; flex-direction: column; }
  .save-status { margin: 0 0 0 52px; }
  .scope-heading { align-items: flex-start; }
  .text-actions { margin-left: 52px; }
  .start-actions, .start-row .button, .report-names .button { width: 100%; }
  .report-toolbar { gap: 18px; }
  .export-actions { display: grid; grid-template-columns: repeat(3, 1fr); }
  .export-options { grid-template-columns: 1fr; }
  .export-dialog form { padding: 24px 20px; }
  .legal-dialog form { padding: 20px; }
  .legal-dialog-heading { grid-template-columns: 34px 1fr; gap: 12px; }
  .legal-dialog-heading h2 { font-size: 26px; }
  .legal-mark { width: 34px; height: 34px; font-size: 18px; }
  .legal-copy { margin: 18px 0; font-size: 12px; line-height: 1.5; }
  .legal-copy p + *, .legal-copy ul + p { margin-top: 10px; }
  .legal-copy li + li { margin-top: 5px; }
  .legal-confirm { margin-bottom: 16px; padding: 12px; }
  .score-row { grid-template-columns: 1fr 1fr; }
  .area-metrics { grid-template-columns: 1fr 1fr; }
  .score-card.primary { grid-column: 1 / -1; }
  .finding { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}

@media print {
  @page { margin: 18mm; }
  body { background: white; }
  .site-header, .intro-panel, #setup, #scope, #run-panel, .report-toolbar .export-actions, .toast, .pagination, .finding-actions button, .table-filter, .export-dialog, .legal-dialog, .site-footer { display: none !important; }
  .app-shell { display: block; width: 100%; margin: 0; }
  .report { display: block !important; padding: 0; border: 0; box-shadow: none; }
  .score-card { break-inside: avoid; border: 1px solid #ddd; }
  .finding { break-inside: avoid; }
  .table-sort span { display: none; }
  tbody tr[hidden] { display: table-row !important; }
  tbody tr[data-filtered-out="true"] { display: none !important; }
  .finding-list > [hidden], [data-report-panel][hidden] { display: block !important; }
  body.print-exporting .export-recommendations:not([data-export-excluded="true"]) { display: block !important; }
  [data-export-excluded="true"], body.print-without-service [data-report-scope="service"] { display: none !important; }
}
