@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f8fc;
  --white: #fff;
  --ink: #132546;
  --muted: #4e607c;
  --rule: #d9e3f1;
  --blue: #19468f;
  --dark: #0b1d41;
  --sky: #abd8ff;
  --mist: #edf4ff;
  --map-surface: #f0f5fd;
  --map-none: #dce5f1;
  --map-low: #c5dcfb;
  --map-medium: #8ebaf2;
  --map-high: #5488d2;
  --map-very-high: #2858a6;
  --map-selected: #142e67;
  --map-border: #fafcff;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--body); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
:focus-visible { outline: 2px solid #2961ad; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); }
.wrap { width: min(100% - 80px, 1240px); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 20; padding: .7rem 1rem; background: var(--white); }

.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 45px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.25rem/1 var(--display); white-space: nowrap; letter-spacing: -.035em; }
.brand-mark { width: 33px; height: 33px; border-radius: 11px; background: var(--blue); display: grid; place-items: center; position: relative; flex: none; }
.brand-mark i { width: 17px; height: 17px; border: 1px solid var(--sky); border-radius: 50%; position: relative; }
.brand-mark i::before, .brand-mark i::after { content: ""; position: absolute; }
.brand-mark i::before { inset: 3px; border: 1px solid var(--sky); border-radius: 50%; }
.brand-mark i::after { width: 10px; top: 7px; left: 7px; border-top: 1px solid var(--sky); transform: rotate(-45deg); transform-origin: left; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 600; }
.site-nav a:hover, .site-nav a.nav-current { color: var(--blue); }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 43px; padding: 8px 15px; border: 1px solid transparent; border-radius: 8px; font-size: .9rem; font-weight: 700; line-height: 1.35; text-align: center; text-decoration: none; }
.btn-secondary { color: var(--ink); background: var(--white); border-color: var(--rule); }
.btn-secondary:hover { border-color: #a7bedf; background: var(--mist); }
.btn-primary { color: var(--white); background: var(--blue); }
.btn-primary:hover { background: #245caf; }
.btn-sky { color: #0c2951; background: var(--sky); padding: 11px 17px; }
.btn-sky:hover { background: #c9e8ff; }
.btn .plus { font-size: 1.3rem; line-height: .7; font-weight: 500; }

.hero { color: #fff; background: linear-gradient(110deg, var(--dark) 22%, #153b7e 100%); overflow: hidden; }
.hero-inner { min-height: 366px; display: grid; grid-template-columns: 1.16fr 1fr; align-items: center; }
.hero-copy { padding: 38px 0 42px; position: relative; z-index: 1; }
.hero-kicker { color: #dbeafe; display: flex; align-items: center; gap: 9px; font-size: .86rem; font-weight: 650; margin-bottom: 12px; }
.live-dot { display: inline-block; width: 8px; height: 8px; background: #548bd1; border-radius: 50%; flex: none; }
.hero .live-dot { background: var(--sky); box-shadow: 0 0 0 4px #abd8ff26; }
.hero h1 { font-size: clamp(3.15rem, 6.3vw, 5.9rem); font-weight: 710; line-height: .94; letter-spacing: -.032em; }
.hero-intro { margin-top: 18px; max-width: 47ch; color: #ccdcf3; line-height: 1.45; }
.hero-actions { margin-top: 21px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero-link { color: #edf5ff; display: inline-flex; gap: 7px; align-items: center; font-size: .88rem; font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hero a:focus-visible, .hero button:focus-visible { outline-color: var(--sky); }
.hero-visual { position: relative; align-self: stretch; min-width: 0; background: radial-gradient(ellipse at 55% 50%, #5696ff40, transparent 70%); }
.radar { position: absolute; top: 50%; left: 55%; width: 430px; height: 430px; transform: translate(-50%, -50%); border-radius: 50%; background: repeating-linear-gradient(90deg, #b2d6ff19 0 1px, transparent 1px 19px), repeating-linear-gradient(0deg, #b2d6ff19 0 1px, transparent 1px 19px); }
.radar-ring { position: absolute; inset: 9%; border: 1px solid #a8d3ff65; border-radius: 50%; }
.radar-ring:nth-child(2) { inset: 17%; }
.radar-ring:nth-child(3) { inset: 25%; }
.radar-ring:nth-child(4) { inset: 33%; }
.radar-ring:nth-child(5) { inset: 41%; }
.radar-sweep { position: absolute; inset: 9%; border-radius: 50%; background: conic-gradient(from 14deg, #abd8ff00, #abd8ff55 51deg, transparent 51deg); }
.radar-sweep::before { content: ""; position: absolute; width: 50%; top: 50%; left: 50%; border-top: 1px solid #abd8ffc0; transform: rotate(-25deg); transform-origin: left; }
.radar-point { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 5px #abd8ff3d; }
.radar-point-a { top: 34%; left: 71%; }
.radar-point-b { top: 58%; left: 36%; opacity: .5; }
.radar-point-c { top: 26%; left: 43%; opacity: .7; }
.radar-point-d { top: calc(50% - 3px); left: calc(50% - 3px); }
.visual-note { position: absolute; bottom: 54px; right: 5%; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border: 1px solid #7da6dd; border-radius: 9px; color: #eef5ff; background: #1b3b73; font-size: .85rem; line-height: 1.25; box-shadow: 0 10px 25px #071a3e66; }
.visual-note strong, .visual-note small { display: block; }
.visual-note small { color: #c5d7f0; margin-top: 3px; }
.note-icon { display: grid; place-items: center; width: 29px; height: 29px; background: var(--sky); color: var(--blue); border-radius: 6px; font-weight: 750; }

.atlas { padding-block: 38px 50px; scroll-margin-top: 12px; }
.section-heading { display: flex; gap: 16px; align-items: end; justify-content: space-between; margin-bottom: 19px; }
.section-heading h2 { font-weight: 740; font-size: clamp(1.7rem, 3.5vw, 2.35rem); letter-spacing: -.032em; line-height: 1.06; }
.section-heading p { color: var(--muted); margin-top: 6px; }
.demo-toggle { flex: none; }
.demo-banner { margin: 0 0 12px; color: #664717; background: #fbefcf; border: 1px solid #ebdbb5; padding: 8px 14px; border-radius: 7px; font-size: .9rem; }
.hero-copy .demo-banner { max-width: 50ch; margin: 12px 0 0; }
.atlas-grid { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(250px, 1fr); gap: 17px; align-items: start; }
.map-panel, .results { border: 1px solid var(--rule); border-radius: 12px; }
.map-panel { overflow: hidden; background: var(--white); }
.map-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--rule); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.filters button { border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 650; font-size: .86rem; min-height: 37px; padding: 4px 9px; white-space: nowrap; }
.filters button:hover, .filters button[aria-pressed=true] { background: var(--mist); color: var(--blue); }
.filters button[aria-pressed=true] { border-color: #d0e0f6; }
.department-picker { min-width: 0; }
.department-picker select { width: 100%; max-width: 225px; min-height: 37px; border: 1px solid var(--rule); border-radius: 7px; background: #fff; padding: 4px 8px; color: var(--ink); font-size: .85rem; }
.map-viewport { position: relative; background: var(--map-surface); }
#department-map { display: block; width: 100%; height: clamp(355px, 39vw, 505px); touch-action: pan-y; }
.map-caption { position: absolute; left: 14px; top: 13px; padding: 3px 7px; border-radius: 4px; border: 1px solid var(--rule); background: #ffffffdd; color: var(--muted); font-size: .72rem; pointer-events: none; }
.map-controls { position: absolute; right: 13px; bottom: 13px; display: grid; background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
.map-controls button { border: 0; background: transparent; color: var(--ink); width: 44px; height: 44px; font-size: 1.2rem; line-height: 1; }
.map-controls button + button { border-top: 1px solid var(--rule); }
.map-controls button:hover { background: var(--mist); }
.map-error { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 240px; text-align: center; color: var(--muted); }
.map-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding: 9px 13px; font-size: .72rem; color: var(--muted); }
.map-legend { display: flex; gap: 4px; align-items: center; }
.map-legend span:first-child { margin-right: 3px; }
.map-legend span:last-child { margin-left: 3px; }
.map-legend i { display: inline-block; width: 14px; height: 11px; border-radius: 2px; background: var(--map-low); }
.map-legend i:nth-of-type(2) { background: var(--map-medium); }
.map-legend i:nth-of-type(3) { background: var(--map-high); }
.map-legend i:nth-of-type(4) { background: var(--map-very-high); }
.map-footer a { text-underline-offset: 2px; }

.results { background: var(--white); padding: 21px 22px 19px; }
.results-scope { color: var(--muted); font-size: .8rem; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.results h3 { font-weight: 740; font-size: 1.4rem; line-height: 1.1; letter-spacing: -.035em; margin-top: 12px; }
.results-total { font: 720 clamp(2.85rem, 4.75vw, 4.25rem)/.99 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.035em; margin-top: 17px; color: var(--blue); }
.results-unit, .results-empty { font-size: .87rem; color: var(--muted); }
.results-empty:not(:empty) { margin-top: 10px; }
.results-list { list-style: none; padding: 0; margin: 17px 0 12px; }
.results-list li { border-top: 1px solid var(--rule); display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; padding: 9px 0; font-size: .86rem; }
.results-list li strong { font-variant-numeric: tabular-nums; }
.result-dot { display: block; width: 9px; height: 9px; border-radius: 3px; background: #2d66ad; }
.result-dot.suspicion { background: #7359a5; }
.results-note { border-radius: 7px; background: #eef4fc; color: #405574; padding: 10px 11px; font-size: .79rem; line-height: 1.45; }

.how-section { padding-block: 38px; background: #eaf1fb; border-block: 1px solid var(--rule); }
.how-heading { margin-bottom: 25px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 23px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li { border-top: 1px solid #c1d2e9; padding-top: 12px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #d9e8fb; color: var(--blue); font-size: .8rem; font-weight: 800; margin-bottom: 8px; }
.steps h3 { font-size: 1.2rem; letter-spacing: -.02em; }
.steps p { margin-top: 4px; color: var(--muted); font-size: .9rem; max-width: 41ch; }
.resources { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; margin-top: 25px; font-size: .88rem; }
.resources h3 { font-size: .95rem; }
.resources a { color: #204d8e; text-underline-offset: 2px; }
.footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 25px; padding-block: 17px; }
.legal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 20px; }
.legal-nav a { color: var(--blue); font-size: .88rem; text-underline-offset: 3px; }
.legal-nav a[aria-current=page] { font-weight: 700; }
.legal-page { padding-block: clamp(30px, 6vw, 72px); }
.legal-content { max-width: 760px; }
.legal-content h1 { font: 740 clamp(2.2rem, 6vw, 4rem)/.98 var(--display); letter-spacing: -.045em; margin-bottom: 18px; }
.legal-content h2 { font: 720 1.45rem/1.16 var(--display); letter-spacing: -.02em; margin: 27px 0 8px; }
.legal-content h3 { margin: 15px 0 5px; }
.legal-content p + p { margin-top: 10px; }
.legal-content ul, .legal-content ol, .legal-content dl { margin: 10px 0 15px; }
.legal-content li + li { margin-top: 5px; }
.legal-content dt { font-weight: 700; }
.legal-content dd { margin: 0 0 8px; }
.legal-content a:not(.btn) { color: var(--blue); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-notice { margin: 14px 0 21px; padding: 12px 15px; border: 1px solid var(--rule); border-left: 3px solid #5488d2; border-radius: 6px; background: var(--mist); }
.legal-intro { color: var(--muted); max-width: 64ch; }
.legal-form { display: grid; gap: 14px; margin-top: 20px; max-width: 620px; }
.legal-form :is(input, select, textarea) { padding: 9px 10px; min-width: 0; width: 100%; color: var(--ink); background: var(--white); border: 1px solid #b7c9e0; border-radius: 7px; }
.legal-form textarea { resize: vertical; min-height: 110px; }
.legal-form .flow-actions { margin-top: 2px; }
.legal-receipt { max-width: 620px; overflow-wrap: anywhere; }
.legal-receipt h2 { margin-top: 0; }
.legal-receipt p + p { margin-top: 6px; }
.admin-continue { margin-top: 18px; }

.subpage-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; font-size: .9rem; }
.subpage-nav a { color: var(--blue); text-underline-offset: 3px; }
.subpage-nav [aria-current=page] { font-weight: 700; }
.directory-page { padding-block: clamp(30px, 6vw, 70px); }
.directory-header { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.directory-header h1 { font: 740 clamp(2.2rem, 6vw, 4.2rem)/1 var(--display); letter-spacing: -.045em; }
.directory-header p { color: var(--muted); margin-top: 10px; max-width: 64ch; }
.directory-search { max-width: 630px; margin-top: 18px; }
.directory-search label { display: block; margin-bottom: 5px; font-size: .91rem; font-weight: 700; }
.directory-search input { width: 100%; min-height: 49px; padding: 9px 13px; border: 1px solid #b7c9e0; border-radius: 8px; background: var(--white); color: var(--ink); }
.atlas-search { margin: 0 0 16px; }
.atlas-search-row { display: flex; gap: 8px; }
.atlas-search-row input { min-width: 0; }
.atlas-search-row button { flex: none; }
.directory-status { margin: 16px 0 9px; color: var(--muted); }
.directory-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.directory-card { padding: 18px; border: 1px solid var(--rule); border-radius: 11px; background: var(--white); overflow-wrap: anywhere; }
.directory-label { color: var(--blue); font-size: .8rem; font-weight: 700; }
.directory-card h2 { margin-top: 6px; font: 730 clamp(1.25rem, 3vw, 1.55rem)/1.13 var(--display); }
.directory-card a { color: var(--blue); text-underline-offset: 3px; }
.directory-identity { margin-top: 7px; color: var(--muted); font-size: .88rem; }
.directory-detail { max-width: 690px; }
.directory-detail > a, .directory-note a { color: var(--blue); text-underline-offset: 3px; }
.directory-detail .directory-card { margin-top: 13px; padding: clamp(16px, 4vw, 26px); }
.company-data { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; }
.company-data dt { font-weight: 650; }
.company-data dd { margin: 0; color: var(--muted); }
.directory-context, .directory-note { color: var(--muted); font-size: .9rem; }
.directory-detail .btn, .directory-note, #directory-detail-message:not(:empty) { margin-top: 16px; }

.flow-dialog { width: min(650px, calc(100% - 26px)); max-height: min(88dvh, 900px); padding: 0; border: 1px solid var(--rule); border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 18px 75px #10254c50; }
.flow-dialog::backdrop { background: #101e40ad; }
.flow-panel { padding: clamp(17px, 4vw, 28px); }
.flow-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 15px; }
.flow-header h2, .flow-dialog h2 { font: 740 clamp(1.5rem, 4vw, 2rem)/1.05 var(--display); letter-spacing: -.04em; }
.flow-header p, .flow-meta, .flow-empty { margin-top: 5px; color: var(--muted); font-size: .9rem; }
.flow-close { color: var(--ink); min-width: 38px; min-height: 38px; background: var(--mist); border: 1px solid var(--rule); border-radius: 8px; font-size: 1.15rem; flex: none; }
.flow-form { display: grid; gap: 12px; }
.flow-panel > p + .flow-form, .flow-panel > p + .flow-actions { margin-top: 12px; }
.flow-field { display: grid; gap: 4px; min-width: 0; color: var(--ink); font-size: .88rem; font-weight: 650; }
.flow-field small, .flow-dialog small { color: var(--muted); font-weight: 400; }
.flow-dialog :is(input, select, textarea) { min-width: 0; width: 100%; border: 1px solid #b7c9e0; border-radius: 7px; background: #fff; color: var(--ink); padding: 8px 10px; min-height: 40px; font-weight: 400; }
.flow-dialog textarea { min-height: 82px; resize: vertical; }
.flow-dialog input[type=file] { padding: 6px; }
.flow-terms { display: flex; gap: 8px; align-items: center; }
.flow-dialog input[type=checkbox] { width: 1rem; min-height: 1rem; padding: 0; flex: none; accent-color: var(--blue); }
.flow-panel a:not(.btn) { color: var(--blue); text-underline-offset: 3px; }
.flow-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flow-error, .flow-notice { border-radius: 7px; padding: 8px 10px; font-size: .86rem; }
.flow-error { color: #8a2824; background: #fbece9; }
.flow-notice { color: #214e83; background: var(--mist); }
.flow-list { list-style: none; padding: 0; display: grid; gap: 9px; margin: 10px 0; }
.flow-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--rule); border-radius: 8px; }
.flow-card-title, .flow-report-description, .flow-meta { overflow-wrap: anywhere; }
.flow-report-description { white-space: pre-wrap; }
.flow-status { justify-self: start; width: fit-content; padding: 2px 7px; background: var(--mist); border-radius: 5px; color: #214e83; font-size: .78rem; font-weight: 700; }
.flow-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.flow-dialog .btn { margin-block: 2px; }
.flow-publication summary { cursor: pointer; font-weight: 700; }
.flow-publication form { margin-top: 8px; }

@media (max-width: 840px) {
  .wrap { width: min(100% - 40px, 1240px); }
  .hero-inner { grid-template-columns: 1.25fr .8fr; }
  .hero-visual { opacity: .86; }
  .radar { left: 56%; width: 350px; height: 350px; }
  .visual-note { right: 0; }
  .atlas-grid { grid-template-columns: minmax(0, 1fr) minmax(216px, .5fr); gap: 12px; }
  .map-toolbar { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { min-height: 60px; flex-wrap: wrap; column-gap: 12px; row-gap: 6px; padding-block: 7px; }
  .site-nav { order: 3; flex: 0 0 100%; gap: 20px; padding-block: 5px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .header-actions .btn { min-height: 37px; padding: 6px 9px; }
  .brand { font-size: 1.13rem; }
  .hero-inner { display: block; position: relative; min-height: 0; }
  .hero-copy { padding-block: 31px 35px; }
  .hero h1 { font-size: clamp(2.5rem, 13vw, 4.6rem); }
  .hero-intro { max-width: 39ch; }
  .hero-visual { position: absolute; inset: 0 0 0 48%; opacity: .33; }
  .radar { left: 100%; }
  .visual-note { display: none; }
  .hero-actions { gap: 12px; }
  .atlas { padding-block: 27px 30px; }
  .section-heading { flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .atlas-grid { grid-template-columns: 1fr; }
  #department-map { height: clamp(290px, 82vw, 390px); }
  .results { padding: 15px; }
  .results-total { margin-top: 10px; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .how-section { padding-block: 25px; }
}

@media (max-width: 390px) {
  .flow-row { grid-template-columns: 1fr; }
  .filters button { padding-inline: 6px; }
  .header-inner:has(#admin-button:not([hidden])) .brand { width: 100%; }
  .header-inner:has(#admin-button:not([hidden])) .header-actions { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
