html,
body {
    min-height: 100%;
}

body.risk-pwa-page { --green:#1769aa; --green-dark:#0d4f86; --risk-blue:#1769aa; --risk-blue-dark:#0d4f86; --risk-blue-soft:#edf6fd; --risk-blue-line:#bfd8ee; background:#fff; }
body.risk-pwa-page > main { background:#fff; }
.risk-app-bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.35rem 0 .8rem; border-bottom:1px solid var(--risk-blue-line); }
.risk-app-brand { display:flex; align-items:center; gap:.65rem; color:inherit; text-decoration:none; font-weight:800; }
.risk-app-brand img { display:block; width:205px; height:auto; object-fit:contain; object-position:left center; }
.risk-app-brand span { font-size:.9rem; color:var(--muted); }
.risk-app-controls { display:flex; align-items:center; gap:.5rem; }
.risk-app-controls form { margin:0; }
.risk-icon-button { width:44px; min-width:44px; height:44px; min-height:44px; padding:0; border-color:var(--risk-blue-line); border-radius:50%; color:var(--risk-blue); }
.risk-icon-button:hover,.risk-icon-button:focus-visible { border-color:var(--risk-blue); background:var(--risk-blue-soft); }
.risk-ui-icon { display:block; width:1.55rem; height:1.55rem; }
.risk-icon-button .risk-ui-icon { width:1.3rem; height:1.3rem; }
.risk-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.risk-location-status { margin:.75rem 0; padding:.65rem .8rem; border:1px solid #dbe7f0; border-radius:10px; background:#f5f8fb; color:var(--muted); font-size:.86rem; }
.risk-location-status.ready { border-color:var(--risk-blue-line); background:var(--risk-blue-soft); color:var(--risk-blue-dark); }
.risk-app-menu { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:1.1rem 0; }
.risk-app-menu .card { min-height:160px; padding:1.35rem; display:flex; flex-direction:column; justify-content:space-between; border-color:#dbe7f0; }
.risk-app-menu .tool:hover,.risk-app-menu .tool:focus-visible { border-color:var(--risk-blue); }
.risk-app-menu h2 { margin:.75rem 0 0; }
.risk-app-menu .risk-action-wide { grid-column:1/-1; min-height:125px; }
.risk-warning-icon { color:var(--risk-blue); border-color:var(--risk-blue-line); }
.risk-statistics-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.risk-stat-row { display:grid; grid-template-columns:90px 1fr 30px; gap:.6rem; align-items:center; margin:.7rem 0; }
.risk-stat-row i { display:block; width:var(--risk-value); min-width:5px; height:10px; border-radius:10px; background:var(--risk-blue); }
.risk-stat-row strong { text-align:right; }
.risk-install-login { width:100%; margin-top:1rem; }
.risk-install-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; margin-top:1rem; }
.risk-install-choice { width:100%; min-height:64px; gap:.7rem; padding:.75rem 1rem; justify-content:flex-start; text-align:left; }
.risk-install-choice > span { display:grid; gap:.05rem; }
.risk-install-choice small { font-size:.74rem; }
.risk-platform-icon { width:1.65rem; height:1.65rem; flex:0 0 1.65rem; }
.risk-install-choice.ready { border-color:var(--green); background:#edf6fd; }
.risk-install-choice:disabled { cursor:default; opacity:.65; }
.risk-install-dialog { max-width:520px; border:1px solid var(--line); border-radius:12px; padding:1.4rem; color:var(--ink); background:var(--white); }
.risk-install-dialog::backdrop { background:rgba(0,0,0,.45); }
.risk-page-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:1.25rem 0; }
.risk-page-heading h1 { margin:0; }
html[data-theme="dark"] .risk-location-status { background:#17271f; }
@media (max-width:620px) {
    body.risk-pwa-page > .site-header { display:none !important; }
    body.risk-pwa-page > main { width:100%; max-width:none; padding:14px 16px 24px; }
    .risk-app-shell { width:100%; max-width:none; }
    .risk-app-bar { align-items:center; }
    .risk-app-brand img { width:174px; }
    .risk-app-brand span { display:none; }
    .risk-app-controls { gap:.4rem; }
    .risk-app-controls .secondary { min-height:42px; padding:0; }
    .risk-app-menu { grid-template-columns:1fr 1fr; gap:.7rem; }
    .risk-app-menu .card { min-height:145px; padding:1rem; }
    .risk-app-menu h2 { font-size:1.2rem; }
    .risk-page-heading { align-items:flex-start; flex-direction:column; }
    .risk-statistics-grid { grid-template-columns:1fr; }
}

@media (max-width:360px) {
    .risk-app-brand img { width:154px; }
    .risk-icon-button { width:40px; min-width:40px; height:40px; min-height:40px; }
}

/* Beta 0.3.1.4: phone-inspired review layout and GPS separated from risk scoring. */
.risk-gps-menu { position:relative; }
.risk-gps-menu > summary { list-style:none; }
.risk-gps-menu > summary::-webkit-details-marker { display:none; }
.risk-gps-button.is-searching { color:#7a8791; }
.risk-gps-button.is-ready { color:#168247; border-color:#88c9a4; background:#eefaf3; }
.risk-gps-button.is-error { color:#b34a36; border-color:#e4aaa0; background:#fff3f0; }
.risk-gps-panel { position:absolute; z-index:30; top:calc(100% + 8px); right:0; width:min(300px,calc(100vw - 32px)); padding:.75rem .85rem; border:1px solid var(--risk-blue-line); border-radius:10px; background:var(--white); box-shadow:var(--shadow); color:var(--ink); font-size:.82rem; }
.risk-context-card { display:grid; gap:.25rem; padding:1rem; border:1px solid var(--risk-blue-line); border-radius:10px; background:var(--risk-blue-soft); }
.risk-context-card small { display:block; }
.risk-assessment-form fieldset { min-width:0; margin:0; padding:0; border:0; }
.risk-field-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; align-items:start; }
.risk-assessment-form legend { margin-bottom:.45rem; font-size:.9rem; font-weight:700; }
.risk-segmented { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; }
.risk-segmented.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.risk-segmented.four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.risk-segmented label { display:block; }
.risk-segmented input { position:absolute; opacity:0; pointer-events:none; }
.risk-segmented span { display:flex; min-height:44px; align-items:center; justify-content:center; padding:.55rem .45rem; border:1px solid var(--risk-blue-line); border-radius:8px; background:var(--white); color:var(--risk-blue-dark); text-align:center; cursor:pointer; }
.risk-segmented input:checked + span { border-color:var(--risk-blue); background:var(--risk-blue); color:#fff; box-shadow:0 0 0 2px rgba(23,105,170,.13); }
.risk-result { margin:1rem 0; padding:1.25rem; border:2px solid; border-radius:16px; }
.risk-result h2 { margin:.1rem 0; font-size:clamp(1.65rem,4vw,2.3rem); }
.risk-result-very_low,.risk-result-low { border-color:#7ac39a; background:#effaf3; }
.risk-result-elevated { border-color:#e2af43; background:#fff8e7; }
.risk-result-high { border-color:#d46b5d; background:#fff0ed; }
.risk-result-critical { border-color:#b91c1c; background:#fff0f0; }
.risk-status-card { display:grid; gap:1rem; box-shadow:0 14px 35px rgba(13,79,134,.08); }
.risk-status-heading { display:flex; align-items:center; gap:1rem; }
.risk-status-heading .eyebrow { margin:0 0 .2rem; }
.risk-status-shield { width:58px; min-width:58px; line-height:0; }
.risk-status-shield svg { width:100%; height:auto; overflow:visible; }
.risk-status-shield path { fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; }
.risk-status-shield .shield-outline { stroke-width:3; }
.risk-status-shield .shield-symbol { stroke-width:4; }
.risk-result-very_low .risk-status-shield,.risk-result-low .risk-status-shield { color:#169451; }
.risk-result-elevated .risk-status-shield { color:#ca8700; }
.risk-result-high .risk-status-shield { color:#c7493c; }
.risk-result-critical .risk-status-shield { color:#a40f17; }
.risk-status-card > p,.risk-status-card > ul { margin:0; }
.risk-status-meter { --risk-marker:10%; position:relative; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; padding-bottom:15px; }
.risk-status-meter span { height:6px; border-radius:999px; }
.risk-status-meter span:nth-child(1) { background:#139a51; }.risk-status-meter span:nth-child(2) { background:#7fbd22; }.risk-status-meter span:nth-child(3) { background:#e5c100; }.risk-status-meter span:nth-child(4) { background:#e98619; }.risk-status-meter span:nth-child(5) { background:#d13f36; }
.risk-status-meter i { position:absolute; left:var(--risk-marker); bottom:0; width:0; height:0; transform:translateX(-50%); border-left:6px solid transparent; border-right:6px solid transparent; border-bottom:8px solid currentColor; }
.risk-status-meter-very_low { --risk-marker:10%; }.risk-status-meter-low { --risk-marker:30%; }.risk-status-meter-elevated { --risk-marker:50%; }.risk-status-meter-high { --risk-marker:70%; }.risk-status-meter-critical { --risk-marker:90%; }
.risk-gps-save-block { display:grid; gap:.35rem; margin:0 0 1rem; }
.risk-sticky-recovery .button { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.risk-pilot-responsibility { margin:0 0 1rem; font-weight:650; }
.risk-review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; padding-bottom:96px; }
.risk-review-grid .card { padding:1rem; }
.risk-review-grid h2 { font-size:1.05rem; }
.risk-sticky-save { position:fixed; z-index:25; left:0; right:0; bottom:0; box-sizing:border-box; display:flex; justify-content:center; gap:.75rem; max-width:100vw; padding:.75rem max(16px,calc((100vw - 1100px)/2)) calc(.75rem + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--risk-blue-line); background:rgba(255,255,255,.96); backdrop-filter:blur(12px); }
.risk-sticky-save > * { min-width:min(240px,42vw); }
html[data-theme="dark"] .risk-gps-panel,html[data-theme="dark"] .risk-segmented span { background:#0b1218; }
html[data-theme="dark"] .risk-sticky-save { background:rgba(11,18,24,.96); }
html[data-theme="dark"] .risk-result-very_low,html[data-theme="dark"] .risk-result-low { background:#102b20; }html[data-theme="dark"] .risk-result-elevated { background:#302710; }html[data-theme="dark"] .risk-result-high,html[data-theme="dark"] .risk-result-critical { background:#321a19; }

/* The final review deliberately follows the compact phone concept on every viewport. */
.risk-review-page { width:min(100%,720px); }
.risk-review-page .risk-page-heading { margin:.9rem 0 1rem; padding:1rem 1.1rem; border:1px solid var(--risk-blue-line); border-radius:14px; background:linear-gradient(145deg,var(--risk-blue-soft),var(--white)); }
.risk-review-page .risk-page-heading h1 { font-size:clamp(1.45rem,4vw,2rem); }
.risk-review-page .risk-status-card { padding:1rem; border:1px solid var(--risk-blue-line); background:var(--white); box-shadow:0 10px 30px rgba(13,79,134,.1); }
.risk-review-page .risk-result-very_low h2,.risk-review-page .risk-result-low h2 { color:#168247; }.risk-review-page .risk-result-elevated h2 { color:#ad7300; }.risk-review-page .risk-result-high h2 { color:#b43c32; }.risk-review-page .risk-result-critical h2 { color:#950f18; }
.risk-review-page .risk-status-heading { align-items:flex-start; }
.risk-review-page .risk-status-card > p,.risk-review-page .risk-status-card > ul { padding:.7rem .85rem; border-radius:9px; background:var(--risk-blue-soft); }
.risk-review-page .risk-gps-save-block { padding:1rem; border-left-width:4px; border-radius:11px; background:#fff4f1; }
.risk-review-page .risk-gps-save-block strong { font-size:1rem; }
.risk-review-page .risk-review-grid { grid-template-columns:1fr; gap:.65rem; }
.risk-review-page .risk-review-grid .card { margin:0; padding:.9rem 1rem; border:1px solid var(--risk-blue-line); border-radius:11px; background:var(--white); box-shadow:0 5px 18px rgba(13,79,134,.06); }
.risk-review-page .risk-review-grid .card h2 { margin:0 0 .35rem; color:var(--risk-blue-dark); font-size:.9rem; letter-spacing:.02em; }
.risk-review-page .risk-review-grid .card p { margin:0; line-height:1.5; }
.risk-review-page .risk-pilot-responsibility { padding:.9rem 1rem; border-radius:11px; }
html[data-theme="dark"] .risk-review-page .risk-page-heading { background:linear-gradient(145deg,#10263a,#0b1218); }
html[data-theme="dark"] .risk-review-page .risk-status-card,html[data-theme="dark"] .risk-review-page .risk-review-grid .card { background:#0b1218; }
html[data-theme="dark"] .risk-review-page .risk-status-card > p,html[data-theme="dark"] .risk-review-page .risk-status-card > ul { background:#10263a; }
html[data-theme="dark"] .risk-review-page .risk-gps-save-block { background:#321a19; }

@media (max-width:620px) {
    body.risk-pwa-page { padding-bottom:calc(42px + env(safe-area-inset-bottom,0px)); }
    body.risk-pwa-page > footer { position:relative; z-index:1; margin-bottom:env(safe-area-inset-bottom,0px); padding-bottom:28px; }
    .risk-segmented.four { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .risk-review-grid { grid-template-columns:1fr; padding-bottom:112px; }
    .risk-sticky-save { justify-content:stretch; padding-inline:12px; }
    .risk-sticky-save > * { flex:1; min-width:0; }
    .risk-field-pair { gap:.55rem; }
    .risk-status-card { border-radius:13px; padding:1rem; }
    .risk-status-shield { width:50px; min-width:50px; }
    .risk-sticky-recovery { flex-direction:column; }
}

/* Beta 0.3.1.6 retains the five-level matrix, report, FAQ and strict mobile width. */
html,body { max-width:100%; overflow-x:hidden; }
body.risk-pwa-page { width:100%; max-width:100%; overflow-x:clip; }
body.risk-pwa-page > main,.risk-app-shell,.risk-assessment-form,.risk-review-page { box-sizing:border-box; width:100%; max-width:100%; min-width:0; }
.risk-app-bar,.risk-app-controls,.risk-app-menu,.risk-field-pair,.risk-review-grid,.risk-status-heading { min-width:0; }
.risk-assessment-form input,.risk-assessment-form select,.risk-assessment-form textarea { box-sizing:border-box; max-width:100%; }
.risk-centered-fields fieldset,.risk-centered-field { text-align:center; }
.risk-centered-fields legend,.risk-centered-field legend { width:100%; text-align:center; }
.risk-centered-fields .risk-segmented,.risk-centered-field .risk-segmented { width:100%; }
.risk-logbook-list { display:grid; gap:.7rem; }
.risk-logbook-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:0; }
.risk-logbook-row > div:first-child { display:grid; gap:.2rem; min-width:0; }
.risk-logbook-row > div:first-child span,.risk-logbook-row > div:first-child small { overflow-wrap:anywhere; }
.risk-logbook-actions { display:flex; align-items:center; justify-content:flex-end; gap:.55rem; flex-wrap:wrap; }
.risk-logbook-actions form { margin:0; }
.risk-logbook-report-layout { display:grid; grid-template-columns:minmax(0,.9fr) minmax(330px,1.1fr); gap:1rem; align-items:start; }
.risk-logbook-report { display:grid; gap:.8rem; min-width:0; }
.risk-logbook-report .card { margin:0; padding:1rem; }
.risk-logbook-report .card h2,.risk-logbook-map-panel h2 { margin-top:0; font-size:1.05rem; }
.risk-logbook-map-panel { position:sticky; top:1rem; min-width:0; padding:1rem; border:1px solid var(--risk-blue-line); border-radius:14px; background:var(--white); }
#risk-logbook-map { width:100%; height:min(64vh,620px); min-height:390px; border-radius:10px; overflow:hidden; }
.risk-faq-page { display:grid; gap:.75rem; }
.risk-faq-page > details { margin:0; padding:0; overflow:hidden; }
.risk-faq-page summary { padding:1rem 1.1rem; color:var(--risk-blue-dark); font-weight:800; cursor:pointer; }
.risk-faq-page details > :not(summary) { margin-left:1.1rem; margin-right:1.1rem; }
.risk-faq-levels { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.45rem; margin-bottom:1rem; }
.risk-faq-level { display:grid; place-items:center; gap:.2rem; min-height:76px; padding:.55rem; border-radius:10px; text-align:center; }
.risk-faq-level strong { font-size:1.35rem; }
.risk-faq-level-1,.risk-faq-level-2 { background:#eaf8f0; color:#126b3b; }.risk-faq-level-3 { background:#fff4d9; color:#946200; }.risk-faq-level-4 { background:#ffebe5; color:#ac3a26; }.risk-faq-level-5 { background:#ffe1e1; color:#920f18; }

@media (max-width:720px) {
    .risk-app-brand { min-width:0; }
    .risk-app-brand img { max-width:42vw; }
    .risk-app-controls { flex:0 0 auto; }
    .risk-icon-button { flex:0 0 auto; }
    .risk-segmented span { min-width:0; padding:.5rem .25rem; font-size:.78rem; overflow-wrap:anywhere; }
    .risk-field-pair { grid-template-columns:1fr; }
    .risk-logbook-row { align-items:stretch; flex-direction:column; }
    .risk-logbook-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
    .risk-logbook-actions > *,.risk-logbook-actions button { width:100%; }
    .risk-logbook-report-layout { grid-template-columns:1fr; }
    .risk-logbook-map-panel { position:static; }
    #risk-logbook-map { height:360px; min-height:0; }
    .risk-faq-levels { grid-template-columns:repeat(5,minmax(54px,1fr)); overflow-x:auto; }
    .risk-faq-level { font-size:.72rem; }
}

@media (max-width:390px) {
    body.risk-pwa-page > main { padding-inline:12px; }
    .risk-app-bar { gap:.35rem; }
    .risk-app-brand img { width:145px; max-width:39vw; }
    .risk-icon-button { width:38px; min-width:38px; height:38px; min-height:38px; }
    .risk-segmented span { font-size:.7rem; }
}

@media print {
    @page { margin:12mm; }
    body.risk-print-report > .site-header,body.risk-print-report > footer,.risk-print-actions,.risk-logbook-map-panel .maplibregl-control-container { display:none !important; }
    body.risk-print-report > main { max-width:none; padding:0; }
    .risk-logbook-report-layout { display:block; }
    .risk-logbook-map-panel { position:static; margin-top:10mm; border:1px solid #bbb; break-inside:avoid; }
    #risk-logbook-map { height:95mm; min-height:0; }
    .risk-result,.risk-logbook-report .card { break-inside:avoid; box-shadow:none; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}

/* Public homepage: layered tool folders. */
.home-folder-showcase { width:min(100%,1240px); margin:1.5rem auto 3rem; }
.home-folder-stage { position:relative; min-height:590px; padding-right:150px; }
.home-folder-panels { min-height:590px; }
.home-folder-panel { position:relative; z-index:3; display:grid; grid-template-columns:minmax(280px,.78fr) minmax(380px,1.22fr); gap:clamp(2rem,5vw,5rem); min-height:590px; align-items:center; padding:clamp(2rem,5vw,4.5rem); border:1px solid #bed5e8; border-radius:28px 8px 8px 28px; background:linear-gradient(145deg,#fff 55%,#f0f7fd); box-shadow:0 28px 60px rgba(13,79,134,.13); animation:home-folder-in .22s ease-out; }
.home-folder-panel[hidden] { display:none; }
@keyframes home-folder-in { from { opacity:.45; transform:translateX(8px); } to { opacity:1; transform:none; } }
.home-folder-copy h1 { margin:.25rem 0 1rem; font-size:clamp(2.25rem,5vw,4.4rem); line-height:1.02; }
.home-folder-copy .lead { max-width:500px; margin-bottom:1.6rem; }
.home-folder-tabs { position:absolute; z-index:2; top:24px; right:0; bottom:24px; display:flex; flex-direction:row; align-items:stretch; gap:6px; width:118px; }
.home-folder-tab { position:relative; width:54px; min-width:54px; padding:.85rem .65rem; border:1px solid #bed5e8; border-left:0; border-radius:0 15px 15px 0; background:#e7f1f9; color:#0d4f86; box-shadow:9px 12px 24px rgba(13,79,134,.08); cursor:pointer; }
.home-folder-tab span { position:absolute; top:50%; left:50%; white-space:nowrap; font-weight:800; transform:translate(-50%,-50%) rotate(90deg); }
.home-folder-tab.is-active { display:none; }
.home-folder-dots { display:flex; justify-content:center; gap:.55rem; margin-top:1rem; }
.home-folder-dots button { width:10px; min-width:10px; height:10px; min-height:10px; padding:0; border:0; border-radius:50%; background:#b8c8d5; cursor:pointer; transition:.18s ease; }
.home-folder-dots button.is-active { width:30px; background:#0d4f86; border-radius:999px; }
.home-folder-visual { display:grid; place-items:center; min-width:0; min-height:430px; }
.home-phone { width:min(270px,78%); padding:10px; border:5px solid #102a43; border-radius:38px; background:#102a43; box-shadow:0 28px 46px rgba(2,26,49,.25); transform:rotate(2deg); }
.home-phone-speaker { width:72px; height:18px; margin:-5px auto 3px; border-radius:0 0 14px 14px; background:#102a43; }
.home-phone-screen { min-height:480px; padding:1rem .8rem; border-radius:27px; background:#fff; }
.home-phone-brand { margin:.2rem 0 1.4rem; color:#1769aa; font-size:.72rem; font-weight:900; letter-spacing:.08em; }
.home-phone-card { display:grid; gap:.45rem; padding:1rem; border:1px solid #78c093; border-radius:14px; background:#effaf3; }
.home-phone-card small { color:#0d4f86; font-weight:800; letter-spacing:.06em; }.home-phone-card strong { color:#147444; font-size:1.45rem; }.home-phone-shield { display:grid; width:42px; height:48px; place-items:center; border:3px solid #168247; border-radius:45% 45% 50% 50%; color:#168247; font-size:1.3rem; font-weight:900; }
.home-phone-meter { display:grid; grid-template-columns:repeat(5,1fr); gap:3px; }.home-phone-meter i { height:5px; border-radius:5px; background:#159451; }.home-phone-meter i:nth-child(2){background:#80bd22}.home-phone-meter i:nth-child(3){background:#e5c100}.home-phone-meter i:nth-child(4){background:#e98619}.home-phone-meter i:nth-child(5){background:#d13f36}
.home-phone-info { height:58px; margin-top:.75rem; border:1px solid #c7dceb; border-radius:9px; background:linear-gradient(#f3f8fc 10px,transparent 10px); }.home-phone-info.short { height:42px; }.home-phone-screen button { width:100%; margin-top:.8rem; padding:.7rem .3rem; border:0; border-radius:8px; background:#1769aa; color:#fff; font-size:.68rem; font-weight:800; }
.home-city-scene { position:relative; width:100%; max-width:640px; overflow:hidden; border:1px solid #c7dceb; border-radius:18px; box-shadow:0 22px 50px rgba(13,79,134,.15); }
.home-city-scene img { display:block; width:100%; min-height:390px; object-fit:cover; filter:saturate(.8) contrast(1.02); }
.home-grid-overlay { position:absolute; inset:0 0 0 48%; background:linear-gradient(90deg,transparent,rgba(9,71,120,.42)),repeating-linear-gradient(0deg,transparent 0 24px,rgba(132,213,255,.42) 25px),repeating-linear-gradient(90deg,transparent 0 24px,rgba(132,213,255,.42) 25px); clip-path:polygon(14% 0,100% 0,100% 100%,0 100%); }
.home-route-line { position:absolute; left:18%; bottom:24%; width:62%; height:38%; border-top:4px solid #68c43a; border-right:4px solid #68c43a; border-radius:50%; transform:rotate(-14deg); filter:drop-shadow(0 0 5px #fff); }
.home-odm-window { position:relative; display:grid; grid-template-columns:58px 1fr 150px; grid-template-rows:42px 1fr; width:100%; max-width:650px; height:420px; overflow:hidden; border:5px solid #203343; border-radius:16px; background:#e8edf1; box-shadow:0 24px 48px rgba(3,31,53,.22); }
.home-odm-top { grid-column:1/-1; background:#263d50; }.home-odm-side { display:grid; align-content:start; gap:14px; padding:18px 14px; background:#324c60; }.home-odm-side i { height:22px; border-radius:4px; background:#75a4c6; }
.home-odm-map { position:relative; overflow:hidden; background:radial-gradient(circle at 65% 35%,#92af7f 0 9%,transparent 10%),linear-gradient(35deg,#829f6f 25%,#b7c699 25% 45%,#719166 45% 62%,#c2ba8a 62%); }.home-odm-map:after { content:""; position:absolute; inset:0; background:repeating-linear-gradient(25deg,transparent 0 32px,rgba(255,255,255,.25) 33px 35px); }.home-odm-map span,.home-odm-map b,.home-odm-map em { position:absolute; z-index:1; width:14px; height:14px; border:4px solid #fff; border-radius:50%; background:#1769aa; }.home-odm-map span{left:22%;top:68%}.home-odm-map b{left:50%;top:46%}.home-odm-map em{left:78%;top:22%}
.home-odm-panel { display:grid; align-content:start; gap:12px; padding:18px; background:#fff; }.home-odm-panel i { height:48px; border:1px solid #bed5e8; border-radius:7px; background:#edf5fb; }

@media (max-width:860px) {
    .home-folder-stage { padding-right:0; padding-top:58px; }
    .home-folder-tabs { top:0; right:0; bottom:auto; left:0; width:100%; height:64px; flex-direction:row; gap:6px; }
    .home-folder-tab { width:auto; min-width:0; flex:1; height:58px; padding:.5rem; border-left:1px solid #bed5e8; border-bottom:0; border-radius:13px 13px 0 0; }
    .home-folder-tab span { position:static; display:block; white-space:normal; transform:none; }
    .home-folder-panel { grid-template-columns:1fr; min-height:0; padding:1.5rem; border-radius:0 0 22px 22px; }
    .home-folder-copy { text-align:center; }.home-folder-copy .lead { margin-inline:auto; }
    .home-folder-visual { min-height:360px; }.home-phone-screen { min-height:430px; }
}

@media (max-width:520px) {
    .home-folder-showcase { margin-top:.5rem; }
    .home-folder-tab { font-size:.72rem; }
    .home-folder-panel { gap:1rem; padding:1.2rem; }
    .home-folder-copy h1 { font-size:2.2rem; }
    .home-folder-visual { min-height:330px; }
    .home-phone { width:230px; }.home-phone-screen { min-height:390px; }
    .home-city-scene img { min-height:300px; }
    .home-odm-window { grid-template-columns:38px 1fr 82px; height:300px; }
}

/* Beta 0.3.1.6: reporting, aircraft timeline and fleet forms. */
.risk-period-filter { display:grid; grid-template-columns:repeat(2,minmax(150px,1fr)) auto auto; gap:.75rem; align-items:end; }
.risk-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin:1rem 0; }
.risk-summary-grid .card { display:grid; gap:.2rem; margin:0; text-align:center; }
.risk-summary-grid strong { color:var(--risk-blue); font-size:clamp(1.8rem,5vw,3rem); }
.risk-heatmap-card { margin-top:1rem; }
#risk-statistics-map { width:100%; height:480px; border-radius:12px; overflow:hidden; }
.risk-drone-selector { display:flex; align-items:end; gap:.75rem; }
.risk-drone-selector label { flex:1; }
.risk-drone-report-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.risk-drone-report-head h2 { margin:.2rem 0; }
.risk-drone-report-head > strong { display:grid; min-width:100px; color:var(--risk-blue); font-size:2.4rem; text-align:center; }
.risk-drone-report-head > strong small { color:var(--muted); font-size:.72rem; }
.risk-timeline { position:relative; display:grid; gap:.8rem; margin:1rem 0; padding-left:48px; }
.risk-timeline:before { content:""; position:absolute; top:0; bottom:0; left:21px; width:2px; background:var(--risk-blue-line); }
.risk-timeline-event { position:relative; }
.risk-timeline-event .card { margin:0; }
.risk-timeline-event time { color:var(--muted); font-size:.78rem; font-weight:700; }
.risk-timeline-event h3 { margin:.3rem 0; }
.risk-timeline-dot { position:absolute; z-index:1; top:18px; left:-48px; display:grid; width:44px; height:44px; place-items:center; border:2px solid var(--risk-blue-line); border-radius:50%; background:var(--white); color:var(--risk-blue); }
.risk-timeline-incident .risk-timeline-dot { color:#b43c32; }.risk-timeline-maintenance .risk-timeline-dot { color:#946200; }
.fleet-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; }
.fleet-form-grid .full { grid-column:1/-1; }
.fleet-row-actions { display:flex; justify-content:flex-end; gap:.45rem; flex-wrap:wrap; }
.fleet-edit-dialog { width:min(520px,calc(100vw - 28px)); border:1px solid var(--line); border-radius:14px; padding:1.2rem; background:var(--white); color:var(--ink); }
.fleet-edit-dialog::backdrop { background:rgba(4,18,30,.55); }

/* Beta 0.3.1.7: consistent module switcher with an unmistakable active state. */
.home-folder-showcase { width:min(100%,1120px); }
.home-folder-stage { min-height:660px; padding:76px 0 0; }
.home-folder-panels { min-height:584px; }
.home-folder-panel { box-sizing:border-box; width:100%; height:584px; min-height:584px; overflow:hidden; border-radius:0 0 24px 24px; }
.home-folder-tabs { z-index:4; inset:0 0 auto; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; width:100%; height:76px; }
.home-folder-tab,.home-folder-tab.is-active { position:relative; display:flex; width:100%; min-width:0; height:76px; align-items:center; justify-content:center; padding:.8rem 1rem; border:1px solid #bed5e8; border-bottom:0; border-radius:16px 16px 0 0; background:#e7f1f9; color:#0d4f86; box-shadow:none; }
.home-folder-tab span { position:static; white-space:normal; text-align:center; transform:none; }
.home-folder-tab.is-active { background:#1769aa; color:#fff; border-color:#1769aa; box-shadow:0 -5px 18px rgba(13,79,134,.18); }
.home-folder-tab:focus-visible { outline:3px solid #68b8f1; outline-offset:2px; }
.home-folder-dots { display:none; }

.print-report-header { display:none; }
.beta-reset-card { border:3px solid #d71920; background:#fff1f1; box-shadow:0 12px 32px rgba(215,25,32,.22); }
.beta-reset-card h2,.beta-reset-card h3,.beta-reset-card strong { color:#b40009; }
.beta-reset-card.tool { background:linear-gradient(145deg,#fff4f4,#ffd8d8); }
.beta-reset-card.tool:hover { border-color:#9f0008; transform:translateY(-2px); }
.password-reveal { width:100%; margin-top:.55rem; }
.portal-risk-register table { min-width:860px; }
.beta-reset-button { border:0; border-radius:9px; padding:.85rem 1.15rem; background:#d71920; color:#fff; font:inherit; font-weight:900; box-shadow:0 7px 18px rgba(215,25,32,.28); cursor:pointer; }
.beta-reset-button:hover { background:#a90008; }
.password-suggestion { display:flex; align-items:end; gap:.6rem; }
.password-suggestion label { flex:1; }
.report-number { color:var(--risk-blue-dark); font-size:.82rem; font-weight:800; letter-spacing:.06em; }

@media (max-width:720px) {
    .home-folder-stage { min-height:0; padding-top:62px; }
    .home-folder-tabs { height:62px; gap:4px; }
    .home-folder-tab,.home-folder-tab.is-active { height:62px; padding:.45rem .3rem; border-radius:10px 10px 0 0; font-size:.74rem; }
    .home-folder-panels,.home-folder-panel { min-height:0; height:auto; }
    .home-folder-panel { overflow:visible; border-radius:0 0 18px 18px; }
    .risk-period-filter { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .risk-period-filter > * { width:100%; }
    .risk-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #risk-statistics-map { height:360px; }
    .risk-drone-report-head { align-items:flex-start; flex-direction:column; }
    .fleet-form-grid { grid-template-columns:1fr; }.fleet-form-grid .full { grid-column:auto; }
}

@media print {
    .print-report-header { display:flex !important; align-items:center; justify-content:space-between; gap:18mm; margin:0 0 8mm; padding:0 0 5mm; border-bottom:1px solid #9fb9cf; }
    .print-report-header img { display:block; width:48mm; height:auto; }
    .print-report-header div { text-align:right; }
    .print-report-header h1 { margin:0; font-size:18pt; }
    .print-report-header p { margin:2mm 0 0; color:#42576a; font-size:9pt; }
    body.access-sheet-page > .site-header,body.access-sheet-page > footer,body.portal-report-page > .site-header,body.portal-report-page > footer { display:none !important; }
    body.access-sheet-page > main,body.portal-report-page > main { max-width:none; padding:0; }
    body.risk-statistics-print > .site-header,body.risk-statistics-print > footer,body.risk-drone-history-print > .site-header,body.risk-drone-history-print > footer,.risk-print-actions,.risk-app-bar { display:none !important; }
    body.risk-statistics-print > main,body.risk-drone-history-print > main { max-width:none; padding:0; }
    .risk-summary-grid { grid-template-columns:repeat(4,1fr); }.risk-statistics-grid { grid-template-columns:repeat(3,1fr); }
    #risk-statistics-map { height:110mm; }.risk-timeline-event .card,.risk-heatmap-card { break-inside:avoid; }
}

.dashboard-status-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; margin:1rem 0; }
.dashboard-status-grid .notice { margin:0; }
.dashboard-status-grid .notice p { margin:.35rem 0 .7rem; }
.dashboard-stat-row,.dashboard-account-row { margin-top:.75rem; }
.dashboard-stat-card { background:#fff8d9; border-color:#e8d47a; }
.dashboard-stat-card > strong { color:#8a6500; font-size:clamp(1.8rem,4vw,2.7rem); line-height:1; }
.profile-grid { align-items:start; }
.profile-grid label { align-self:start; }
.profile-grid input,.profile-grid select { min-height:46px; }
.risk-app-shell { max-width:1100px; margin-inline:auto; }
.risk-app-heading { display:flex; justify-content:space-between; gap:1rem; align-items:end; }
.risk-mobile-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:1rem 0; }
.risk-mobile-actions .card { min-height:190px; padding:1.4rem; }
.risk-action-icon { display:grid; place-items:center; width:3.25rem; height:3.25rem; border:1px solid var(--risk-blue-line); border-radius:50%; background:#fff; color:var(--risk-blue); }
.risk-primary-action { border-color:var(--risk-blue-line); background:var(--risk-blue-soft); }
html[data-theme="dark"] .dashboard-stat-card { background:#302b15; border-color:#766727; }
html[data-theme="dark"] .dashboard-stat-card > strong { color:#ffe076; }
html[data-theme="dark"] body.risk-pwa-page { --risk-blue:#68b8f1; --risk-blue-dark:#a8d8f7; --risk-blue-soft:#122b3c; --risk-blue-line:#315f7c; background:#0b1218; }
html[data-theme="dark"] body.risk-pwa-page > main { background:#0b1218; }
html[data-theme="dark"] .risk-primary-action { background:#10283a; }
html[data-theme="dark"] .risk-action-icon { background:#0b1218; }
html[data-theme="dark"] .risk-location-status { border-color:#304958; background:#13232d; }
@media (max-width:720px) {
    .dashboard-status-grid,.risk-mobile-actions { grid-template-columns:1fr; }
    .risk-app-heading { align-items:stretch; flex-direction:column; }
    .risk-mobile-actions .card { min-height:170px; padding:1.25rem; }
    .risk-mobile-actions h2 { font-size:1.55rem; }
    .risk-app-shell .primary,.risk-app-shell .secondary:not(.risk-icon-button) { min-height:50px; display:inline-flex; align-items:center; justify-content:center; }
}

/* Beta 0.3.1.8: compact navigation, aligned user form, and iPhone-sized Risk App controls. */
.site-nav-menu { position:relative; }
.site-nav-menu > summary { list-style:none; padding:5px 17px 5px 0; color:var(--muted); font-size:.91rem; cursor:pointer; }
.site-nav-menu > summary::-webkit-details-marker { display:none; }
.site-nav-menu > summary::after { content:""; position:absolute; top:13px; right:2px; width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); }
.site-nav-menu[data-active="true"] > summary,.site-nav-menu[open] > summary { color:var(--green); }
.site-nav-panel { position:absolute; z-index:30; top:calc(100% + 10px); left:-14px; display:grid; min-width:220px; padding:.55rem; border:1px solid var(--line); border-radius:10px; background:var(--white); box-shadow:0 16px 36px rgba(16,36,58,.16); }
.site-nav-panel a { display:block; padding:.58rem .7rem; border-radius:7px; white-space:nowrap; }
.site-nav-panel a:hover,.site-nav-panel a.active { background:var(--surface); color:var(--green); }
.admin-user-create-grid { align-items:start; }
.admin-user-create-grid > label { align-self:start; align-content:start; }
.admin-user-create-grid input,.admin-user-create-grid select { min-height:46px; height:46px; }
.identity-availability { min-height:1.2em; }
.identity-availability.is-available { color:#087a49; font-weight:700; }
.identity-availability.is-unavailable { color:#b42318; font-weight:700; }

@media (max-width:900px) {
    .site-nav { align-items:flex-start; overflow:visible; }
    .site-nav-panel { position:fixed; top:auto; left:18px; right:18px; min-width:0; margin-top:7px; }
}

@media (max-width:620px) {
    body.risk-pwa-page > main { padding-inline:14px; }
    .risk-app-menu { gap:.63rem; margin:.9rem 0; }
    .risk-app-menu .card { min-height:131px; padding:.9rem; }
    .risk-app-menu .risk-action-wide { min-height:113px; }
    .risk-app-menu h2 { font-size:1.08rem; }
    .risk-action-icon { width:2.93rem; height:2.93rem; }
    .risk-app-brand img { width:157px; }
    .risk-icon-button,.risk-app-controls .risk-language-menu .language-menu-button { width:40px; min-width:40px; height:40px; min-height:40px; }
    .admin-user-create-grid { grid-template-columns:1fr; }
    .site-nav-menu > summary { font-size:.82rem; }
}

body {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
}

body > main {
    width: 100%;
    flex: 1 0 auto;
}

body > footer {
    width: 100%;
    margin-top: auto;
    flex: 0 0 auto;
}

.language-switcher {
    align-items: center;
    margin: 0;
}

.language-switcher label {
    font-size: .76rem;
    color: var(--muted);
}

.language-switcher select {
    width: auto;
    min-width: 170px;
    padding: 6px 32px 6px 10px;
    border-color: var(--line);
    background-color: var(--white);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #9acbb3;
    outline-offset: 1px;
}

.release-intro {
    width: 100%;
    margin: 28px 0 22px;
    background: var(--surface);
}

.release-intro h2 {
    font-size: 1.3rem;
}

.release-intro p:last-child {
    margin-bottom: 0;
}

.release-main {
    flex: 1 1 auto;
    min-width: 0;
}

.release-details summary {
    display: grid;
    grid-template-columns: minmax(72px, auto) minmax(220px, 1fr) 24px;
    align-items: center;
    gap: 14px;
    list-style: none;
    cursor: pointer;
}

.release-details summary::-webkit-details-marker {
    display: none;
}

.release-details summary::after {
    content: "+";
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--green);
    font-size: 1rem;
    font-weight: 800;
}

.release-details[open] summary::after {
    content: "−";
}

.release-version {
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 800;
}

.release-file {
    overflow: hidden;
    color: var(--muted);
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.release-notes {
    max-width: 820px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.65;
}

.luxembourg-origin {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.luxembourg-origin > img {
    display: block;
    width: 22px;
    height: 29px;
    object-fit: contain;
}

footer .luxembourg-origin-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    color: #87938d;
    line-height: 1.35;
}

footer .luxembourg-origin-copy > span {
    color: #87938d;
    font-weight: 650;
}

footer .luxembourg-origin-copy small {
    color: #87938d;
    font-weight: 650;
}

footer {
    padding: 14px clamp(18px, 5vw, 72px);
    gap: 14px;
    background: var(--surface);
    color: #87938d;
    font-size: .76rem;
}

footer > div,
footer span,
footer small {
    color: #87938d;
}

footer a,
footer a:visited {
    color: #87938d;
    text-decoration-color: #aab3af;
}

footer a:hover,
footer a:focus-visible {
    color: var(--green);
    text-decoration-color: currentColor;
}

@media (max-width:620px) {
    body.risk-pwa-page > footer {
        display:flex;
        padding:12px 16px calc(18px + env(safe-area-inset-bottom, 0px));
        gap:6px;
        align-items:center;
        text-align:center;
    }
    body.risk-pwa-page .footer-product,
    body.risk-pwa-page .luxembourg-origin-copy {
        line-height:1.2;
    }
}

@media (max-width:620px) {
    body.risk-pwa-page > footer {
        margin-bottom:env(safe-area-inset-bottom,0px);
        padding-bottom:28px;
    }
    body.risk-pwa-page:has(.risk-sticky-save) > main { padding-bottom:112px; }
}

.form-footer {
    margin: 16px 0 0;
    color: var(--muted);
    text-align: center;
}

.form-footer a,
.text-link {
    color: var(--green);
    font-weight: 700;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.page-heading h1,
.page-heading p {
    margin-bottom: 0;
}

.table-actions {
    text-align: right;
    white-space: nowrap;
}

.table-actions a {
    color: var(--green);
    font-weight: 700;
}

.profile-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-grid .full,
.admin-grid .full {
    grid-column: 1 / -1;
}

.admin-dashboard {
    display: grid;
    gap: 12px;
}

.admin-dashboard > h1 {
    margin-bottom: 0;
}

.admin-dashboard-row,
.system-info-grid,
.update-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.admin-dashboard-row .card {
    min-height: 0;
    padding: 14px 16px;
}

.admin-dashboard-row .card h3 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.admin-dashboard-row .card p {
    margin: 0;
    font-size: .82rem;
    line-height: 1.45;
}

.admin-dashboard .update-available {
    border-color: #38a169;
    background: #e7f7ed;
    box-shadow: inset 4px 0 0 #16834b;
}

.admin-dashboard .update-available h3::after {
    content: "Update";
    display: inline-block;
    margin-left: 7px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #16834b;
    color: white;
    font-size: .62rem;
    text-transform: uppercase;
}

.admin-dashboard-row .card,
.update-method-grid .card {
    margin: 0;
}

.admin-dashboard-row.system-row {
    margin-top: 2px;
}

.dashboard-compact {
    max-width: 1160px;
    margin: 0 auto;
}

.dashboard-compact .page-heading {
    margin-bottom: 14px;
}

.dashboard-compact .page-heading h1 {
    font-size: clamp(2.25rem, 5vw, 4.1rem);
}

.dashboard-compact .cards {
    gap: 10px;
}

.dashboard-compact .card.tool {
    min-height: 0;
    padding: 16px 18px;
}

.dashboard-profile-card {
    border-color: #a9c9e8;
    background: #eef6fd;
}

.profile-compact {
    max-width: 860px;
}

.profile-compact .page-heading {
    margin-bottom: 12px;
}

.profile-compact .profile-grid {
    gap: 10px 14px;
    padding: 18px;
}

.profile-compact .profile-grid h2,
.profile-compact .profile-grid p {
    margin: 0;
}

.profile-section-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 12px;
    padding: 14px 18px;
}

.profile-section-card h2,
.profile-section-card p {
    margin: 0;
}

body.admin-page main {
    padding-top: 28px;
    padding-bottom: 40px;
}

body.admin-page main > section:not(.narrow) {
    max-width: 1180px;
}

body.admin-page h1 {
    font-size: clamp(2.4rem, 5vw, 4.25rem);
}

body.admin-page .card {
    padding: 16px 18px;
}

body.admin-page .form-stack {
    gap: 12px;
}

body.admin-page table th,
body.admin-page table td {
    padding: 9px 10px;
    font-size: .82rem;
}

.admin-privacy-note {
    margin: -6px 0 0;
    color: var(--muted);
}

.system-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.system-info-card dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.system-info-card dl > div {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr);
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.system-info-card dl > div:last-child {
    border-bottom: 0;
}

.system-info-card dt {
    color: var(--muted);
    font-weight: 700;
}

.system-info-card dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.system-info-card:empty {
    display: none;
}

.drone-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-height: 560px;
    overflow: auto;
    padding: 4px;
}

.drone-choice,
.mission-type-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.drone-choice input,
.mission-type-option input {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

.drone-choice span,
.mission-type-option span {
    display: grid;
    gap: 2px;
}

.planner-layout {
    display: grid;
    grid-template-columns: minmax(330px, .75fr) minmax(0, 1.25fr);
    align-items: start;
    gap: 24px;
}

.planner-create-card {
    position: sticky;
    top: 96px;
    margin: 0;
}

.compact-grid {
    gap: 12px;
}

.mission-type-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.mission-type-fieldset legend {
    margin-bottom: 8px;
    font-size: .9rem;
    font-weight: 650;
}

.mission-type-grid,
.mission-card-list {
    display: grid;
    gap: 8px;
}

.mission-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mission-type-option:has(input:checked) {
    border-color: var(--green);
    background: #eff8f3;
}

.mission-type-option.unavailable {
    background: #f1f3f2;
    color: var(--muted);
    cursor: not-allowed;
    opacity: .68;
}

.mission-type-option.unavailable input {
    cursor: not-allowed;
}

.mission-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
}

.mission-summary h3,
.mission-summary p {
    margin-bottom: 0;
}

.mission-summary h3 {
    font-size: 1.05rem;
}

.mission-summary p {
    font-size: .84rem;
    line-height: 1.4;
}

.mission-summary .eyebrow {
    margin-bottom: 4px;
    font-size: .66rem;
}

.mission-actions,
.table-actions form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.archived-missions {
    margin-top: 28px;
}

.planner-mission-list > .page-heading {
    margin-bottom: 16px;
}

.planner-mission-list > div > h2,
.planner-mission-list .archived-missions > h2 {
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.planner-mission-list .archived-missions > .lead {
    margin: 0 0 10px;
    font-size: .92rem;
    line-height: 1.45;
}

.planner-mission-list .table-wrap {
    margin-top: 10px;
    padding: 10px 14px;
}

.planner-mission-list th,
.planner-mission-list td {
    padding: 8px 6px;
}

.danger-link {
    color: var(--error);
}

.danger-button {
    border-color: var(--error);
    color: var(--error);
}

.danger-button:hover {
    background: #fff1f1;
}

body.planner-editor-page main.planner-editor-main {
    width: 100%;
    max-width: none;
    padding: 14px clamp(12px, 1.5vw, 26px) 24px;
}

.planner-editor-shell > .page-heading {
    margin-bottom: 10px;
}

.planner-editor-heading {
    align-items: center;
}

.planner-editor-heading .eyebrow {
    margin: 0 0 2px;
}

.planner-editor-heading h1 {
    display: inline;
    margin: 0 12px 0 0;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    line-height: 1;
}

.planner-editor-lead {
    display: inline;
    color: var(--muted);
    font-size: .9rem;
}

.planner-editor {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    align-items: stretch;
    height: clamp(540px, calc(100dvh - 205px), 760px);
    min-height: 0;
    gap: 12px;
}

.footer-product {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.footer-product small {
    font-weight: 650;
}

.planner-sidebar {
    min-width: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 14px;
    transition: padding .2s ease;
    height: 100%;
}

.planner-sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.planner-sidebar-heading h2 {
    margin: 0;
    font-size: 1.2rem;
}

.planner-sidebar-toggle {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    font-size: 1.35rem;
}

.planner-sidebar-fields {
    gap: 9px;
    margin-top: 10px;
}

.planner-sidebar-fields label {
    gap: 4px;
    font-size: .76rem;
}

.planner-sidebar-fields input,
.planner-sidebar-fields select {
    min-height: 38px;
    padding: 7px 10px;
}

.planner-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.planner-editor.sidebar-collapsed {
    grid-template-columns: 48px minmax(0, 1fr);
}

.planner-editor.sidebar-collapsed .planner-sidebar {
    padding: 8px 7px;
    overflow: hidden;
}

.planner-editor.sidebar-collapsed .planner-sidebar-heading h2,
.planner-editor.sidebar-collapsed .planner-sidebar-fields {
    display: none;
}

.planner-editor.sidebar-collapsed .planner-sidebar-toggle {
    transform: rotate(180deg);
}

.planner-sidebar input,
.planner-sidebar select,
.planner-sidebar button {
    min-width: 0;
}

.planner-map-wrap {
    position: relative;
    min-width: 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
}

#planner-map {
    position: absolute;
    inset: 0;
}

.planner-map-help {
    position: absolute;
    z-index: 2;
    left: 16px;
    bottom: 16px;
    max-width: 460px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, .94);
    color: var(--muted);
    font-size: .84rem;
    box-shadow: var(--shadow);
}

.planner-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.planner-stats > div {
    display: grid;
    gap: 2px;
    padding: 10px;
    border-radius: 7px;
    background: var(--surface);
}

.planner-stats span {
    color: var(--muted);
    font-size: .72rem;
}

.planner-stats .battery-ok {
    color: var(--green);
}

.planner-stats .battery-warning {
    color: #b65300;
}

.planner-stats .battery-critical {
    color: #b42318;
}

.planner-battery-status {
    margin: 0;
    font-size: .82rem;
    line-height: 1.42;
}

.planner-flight-layers {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.planner-flight-layers legend {
    padding: 0 5px;
    font-size: .82rem;
    font-weight: 800;
}

#planner-flight-layer-list {
    display: grid;
    gap: 5px;
}

.planner-flight-layer {
    display: grid;
    grid-template-columns: auto 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    font-size: .78rem;
    font-weight: 650;
}

.planner-flight-layer input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.planner-flight-layer-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.planner-flight-layer small {
    color: var(--muted);
    font-size: .68rem;
}

.planner-marker {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    padding: 0;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--green);
    color: white;
    font-size: .7rem;
    font-weight: 800;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .25);
    cursor: grab;
}

.planner-marker:active,
.planner-operation-marker.draggable:active {
    cursor: grabbing;
}

.planner-vertex-marker {
    background: #174ea6;
}

.planner-editor-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.planner-editor-actions #planner-save-mission {
    grid-column: 1 / -1;
}

.planner-client-status {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}

.planner-readiness {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.35;
}

.planner-readiness::before {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 2px;
    border-radius: 50%;
    background: #d29a16;
    content: '';
}

.planner-readiness.ready::before {
    background: var(--green);
}

.planner-safety-status {
    margin: 0;
    padding: 8px 10px;
    font-size: .75rem;
}

.planner-client-status.ready {
    color: var(--green);
}

.planner-save-diagnostic {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid currentColor;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .78rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    user-select: all;
}

.planner-message-stack {
    position: fixed;
    z-index: 20;
    top: 132px;
    right: clamp(12px, 1.5vw, 26px);
    width: min(680px, calc(100vw - 24px));
    pointer-events: none;
}

.planner-message-stack > .notice {
    position: relative;
    margin: 0 0 8px;
    padding: 10px 42px 10px 14px;
    box-shadow: 0 8px 28px rgba(16, 43, 34, .18);
    pointer-events: auto;
}

.planner-message-close {
    position: absolute;
    top: 5px;
    right: 7px;
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: currentColor;
    font-size: 1.35rem;
    line-height: 1;
}

.planner-save-diagnostic {
    margin-top: 5px;
    padding-top: 0;
    border-top: 0;
}

.planner-save-diagnostic summary {
    cursor: pointer;
    font-family: inherit;
    font-size: .76rem;
}

.planner-save-diagnostic small {
    display: block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid currentColor;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.danger-zone {
    margin-top: 18px;
    border-color: #d77;
}

.danger-zone .danger-button {
    justify-self: start;
}

.planner-waypoint-list {
    display: grid;
    gap: 7px;
    max-height: 330px;
    overflow: auto;
}

.planner-waypoint-row {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.planner-waypoint-row summary {
    padding: 9px 10px;
    font-size: .82rem;
    font-weight: 750;
    cursor: pointer;
}

.planner-waypoint-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px 10px;
}

.planner-waypoint-grid label {
    font-size: .72rem;
}

.planner-waypoint-grid input,
.planner-waypoint-grid select {
    padding: 7px 8px;
    font-size: .78rem;
}

@media (max-width: 1000px) {
    .planner-layout,
    .planner-editor {
        grid-template-columns: 1fr;
    }

    .planner-create-card {
        position: static;
    }

    .planner-map-wrap {
        min-height: 560px;
    }

    .drone-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Beta 0.30 Mission Planner */

.legal-page .card {
    margin-block: 1rem;
}

.legal-page .card h2 {
    margin-top: 0;
}

.legal-page .lead,
.legal-page .card p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.legal-page .lead,
.legal-page .card p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}
[hidden] {
    display: none !important;
}

.planner-create-page .planner-create-card {
    position: static;
    max-width: none;
}

.planner-conditional-warning {
    display: grid;
    gap: 10px;
}

.safety-confirm,
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-weight: 500;
}

.safety-confirm input,
.check-row input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 2px;
}

.planner-orbits,
.planner-operation-points {
    min-width: 0;
    margin: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.planner-orbits legend,
.planner-operation-points legend {
    padding: 0 5px;
    font-size: .86rem;
    font-weight: 750;
}

#planner-orbit-list {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.planner-orbit-card {
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.planner-orbit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.planner-orbit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.planner-orbit-grid label {
    font-size: .72rem;
}

.planner-orbit-grid .check-row {
    grid-column: 1 / -1;
    align-items: center;
}

.planner-orbit-grid .check-row small {
    margin-left: auto;
}

.planner-mode-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-bottom: 8px;
}

.planner-mode-buttons .active,
.planner-layer-switch .active {
    border-color: var(--green);
    background: var(--green);
    color: white;
}

.planner-operation-points > small {
    display: block;
    margin-top: 7px;
    overflow-wrap: anywhere;
}

.planner-layer-switch {
    position: absolute;
    z-index: 3;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 90px);
}

.planner-layer-switch button {
    background: rgba(255, 255, 255, .95);
    box-shadow: var(--shadow);
}

.planner-layer-switch button.active {
    background: var(--green);
}

#planner-map.setting-operation-point .maplibregl-canvas {
    cursor: crosshair;
}

.planner-operation-marker {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 2px solid white;
    border-radius: 7px;
    color: white;
    font-size: .72rem;
    font-weight: 850;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .32);
    pointer-events: none;
}

.planner-operation-marker.draggable {
    pointer-events: auto;
    cursor: grab;
}

.planner-operation-marker.start {
    background: #0a7a4b;
}

.planner-operation-marker.landing {
    background: #174ea6;
}

.planner-operation-marker.poi {
    border-radius: 50%;
    background: #d62b2b;
}

@media (max-width: 720px) {
    .planner-orbit-grid,
    .mission-type-grid {
        grid-template-columns: 1fr;
    }

    .planner-layer-switch {
        max-width: calc(100% - 70px);
    }

    .planner-layer-switch button {
        padding: 7px 9px;
        font-size: .74rem;
    }
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.update-log-page {
    max-width: 980px;
    margin-inline: auto;
}

.update-log-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.update-log-release {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.update-log-release summary {
    display: grid;
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr) 24px;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    list-style: none;
    cursor: pointer;
}

.update-log-release summary::-webkit-details-marker {
    display: none;
}

.update-log-release summary::after {
    content: "+";
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--green);
    font-weight: 800;
}

.update-log-release[open] summary::after {
    content: "−";
}

.update-log-version {
    color: var(--green);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.update-log-meta {
    display: grid;
    gap: 2px;
}

.update-log-release ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0 42px 18px 46px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    color: var(--muted);
}

@media (max-width: 720px) {
    .section-actions {
        justify-content: flex-start;
    }

    .update-log-release summary {
        grid-template-columns: 1fr 24px;
    }

    .update-log-release summary strong {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .update-log-release summary::after {
        grid-column: 2;
        grid-row: 1;
    }

    .update-log-release ul {
        padding-right: 22px;
        padding-left: 38px;
    }
}

.update-method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.update-method-grid .update-drop {
    grid-column: 1 / -1;
}

/* Keep every System update panel on the same responsive card grid. */
section:has(> .update-method-grid) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
}

section:has(> .update-method-grid) > .eyebrow,
section:has(> .update-method-grid) > .page-heading,
section:has(> .update-method-grid) > .notice,
section:has(> .update-method-grid) > .update-history {
    grid-column: 1 / -1;
}

section:has(> .update-method-grid) > .card,
section:has(> .update-method-grid) > .update-method-grid > .card {
    box-sizing: border-box;
    height: 100%;
    margin: 0;
}

section:has(> .update-method-grid) > .update-method-grid {
    display: contents;
}

section:has(> .update-method-grid) > .update-method-grid .update-drop {
    grid-column: auto;
}

@media (max-width: 1050px) {
    section:has(> .update-method-grid) {
        grid-template-columns: 1fr;
    }

    section:has(> .update-method-grid) > .eyebrow,
    section:has(> .update-method-grid) > .page-heading,
    section:has(> .update-method-grid) > .notice,
    section:has(> .update-method-grid) > .update-history {
        grid-column: auto;
    }
}

.member-list {
    display: grid;
    gap: 10px;
}

.member-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.member-row:last-child {
    border-bottom: 0;
}

.member-choice {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-choice input {
    width: 20px;
    height: 20px;
}

.member-choice span {
    display: grid;
}

.update-drop {
    border: 1px dashed #9dbeb0;
    background: var(--surface);
}

.update-history td:first-child,
.update-history td:nth-child(2) {
    white-space: nowrap;
}

.status-label {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 5px;
    background: var(--surface);
    font-size: .74rem;
    font-weight: 750;
}

.status-label.succeeded {
    background: #e2f4e9;
    color: #08633d;
}

.status-label.failed {
    background: #fff1f1;
    color: var(--error);
}

.status-label.published {
    background: #e2f4e9;
    color: #08633d;
}

.status-label.draft {
    background: #f1f2f1;
    color: #627069;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-heading h2,
.section-heading p {
    margin-bottom: 0;
}

.dashboard-news-heading {
    margin-top: 48px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.news-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.news-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.news-card h3 a:hover {
    color: var(--green);
}

.news-card > p:not(.news-date) {
    color: var(--muted);
}

.news-card .text-link {
    margin-top: auto;
}

.news-date {
    margin: 0 0 10px;
    color: var(--green);
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .05em;
}

.news-article h1 {
    max-width: 18ch;
}

.news-content {
    margin-top: 28px;
    color: var(--ink);
    line-height: 1.75;
}

.news-translation textarea {
    resize: vertical;
}

.download-release {
    align-items: center;
}

.download-release h2 {
    margin: 10px 0 6px;
}

.checksum {
    display: grid;
    gap: 6px;
}

.checksum code {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    user-select: all;
}

.checksum-short {
    display: block;
    max-width: 18ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 620px) {
    .language-switcher {
        justify-content: space-between;
    }

    .language-switcher select {
        min-width: 0;
        max-width: 72vw;
    }

    .release-details summary {
        grid-template-columns: minmax(64px, auto) 24px;
    }

    .release-file {
        display: none;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-grid,
    .admin-grid,
    .member-row,
    .admin-dashboard-row,
    .system-info-grid,
    .update-method-grid {
        grid-template-columns: 1fr;
    }

    .profile-grid .full,
    .admin-grid .full {
        grid-column: auto;
    }

    .update-method-grid .update-drop {
        grid-column: auto;
    }

    .system-info-card dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

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

    .mission-type-grid,
    .drone-selector,
    .planner-stats {
        grid-template-columns: 1fr;
    }

    .mission-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .planner-map-wrap {
        min-height: 440px;
    }

    .planner-message-stack {
        top: 116px;
    }

    .planner-editor {
        height: auto;
        min-height: 0;
    }

    .planner-editor.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .planner-editor.sidebar-collapsed .planner-sidebar {
        padding: 10px;
    }

    .planner-editor.sidebar-collapsed .planner-sidebar-heading h2 {
        display: block;
    }

    .planner-editor.sidebar-collapsed .planner-sidebar-toggle {
        transform: none;
    }
}

.planner-camera-profile {
    color: var(--muted, #64746d);
    display: block;
    font-size: .68rem;
    line-height: 1.35;
}

#planner-spacing[readonly] {
    background: var(--surface, #f4f7f5);
    cursor: default;
}

.status.module-status-available {
    background: #dff5e8;
    border-color: #8fd5ab;
    color: #08783e;
}

.status.module-status-beta {
    background: #fff0d8;
    border-color: #f1bd69;
    color: #9a5700;
}

.status.module-status-future,
.status.module-status-maintenance {
    background: #fde4e4;
    border-color: #ee9c9c;
    color: #b42323;
}

.module-key {
    color: var(--muted);
    display: block;
    font-size: .72rem;
    margin-top: 3px;
}

body.admin-page .module-row {
    grid-template-columns: minmax(170px, .65fr) minmax(170px, .7fr) minmax(280px, 1.35fr);
    gap: 14px;
}

main a:not(.primary):not(.secondary):not(.card),
main a:not(.primary):not(.secondary):not(.card):visited {
    color: var(--ink);
}

main a.card:visited {
    color: inherit;
}

.module-locked {
    cursor: not-allowed;
    opacity: .78;
}

.module-locked:hover {
    border-color: var(--line);
    transform: none;
}

@media (max-width: 900px) {
    body.admin-page .module-row {
        grid-template-columns: 1fr;
    }
}

.install-form {
    align-items: start;
}

.install-form > label {
    align-self: start;
    width: 100%;
}

.install-form input:not([type="hidden"]) {
    min-height: 46px;
}

.theme-toggle {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    background: var(--white);
    cursor: pointer;
}

.theme-toggle[hidden] {
    display: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--green);
    color: var(--green);
}

.theme-toggle:focus-visible {
    outline: 2px solid #9acbb3;
    outline-offset: 2px;
}

.theme-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-moon {
    fill: currentColor;
    stroke: none;
}

.theme-icon-sun {
    display: none;
}

.update-log-date {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 650;
    white-space: nowrap;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e8f2fa;
    --muted: #a9bac8;
    --line: #2a3d4c;
    --surface: #111d27;
    --green: #68b8f1;
    --green-dark: #3f96d1;
    --white: #0b1218;
    --warning: #ffd27c;
    --error: #ff9b9b;
    --shadow: 0 18px 48px rgba(0, 0, 0, .28);
    background: #0b1218;
}

html[data-theme="dark"] body {
    background: #0b1218;
    color: var(--ink);
}

html[data-theme="dark"] .site-header {
    border-color: var(--line);
    background: rgba(11, 18, 24, .96);
}

html[data-theme="dark"] .brand img {
    filter: brightness(0) invert(1);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .card,
html[data-theme="dark"] .theme-toggle {
    border-color: var(--line);
    background-color: var(--white);
    color: var(--ink);
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    box-shadow: 0 0 0 1000px #16241e inset;
}

html[data-theme="dark"] .language-switcher,
html[data-theme="dark"] footer,
html[data-theme="dark"] .news,
html[data-theme="dark"] #planner-spacing[readonly] {
    background: var(--surface);
}

html[data-theme="dark"] .notice.info {
    border-color: #35576c;
    background: #122532;
    color: #b9dff5;
}

html[data-theme="dark"] .notice.success {
    border-color: #38684c;
    background: #11271a;
    color: #bce5ca;
}

html[data-theme="dark"] .notice.warning {
    border-color: #735d31;
    background: #2a2110;
    color: #ffe2a3;
}

html[data-theme="dark"] .notice.error {
    border-color: #744242;
    background: #2b1717;
    color: #ffc1c1;
}

html[data-theme="dark"] .theme-icon-moon {
    display: none;
}

html[data-theme="dark"] .theme-icon-sun {
    display: block;
}

@media (max-width: 900px) {
    .theme-toggle {
        margin-left: auto;
    }
}

.account .theme-toggle {
    margin-left: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.stat-card {
    display: grid;
    gap: 4px;
    padding: 18px;
}

.stat-card strong {
    color: var(--green);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1;
}

.stat-card span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.activity-ranking-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}

.activity-ranking-grid .table-wrap {
    margin-top: 0;
}

.activity-ranking-grid td small {
    display: block;
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-ranking-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .account {
        gap: 10px;
    }

    .account .theme-toggle {
        margin-left: 0;
    }
}

/* Beta 0.2.1.6: consistent administration, menu language picker, and Planner proportions */
.language-menu {
    position: relative;
    flex: 0 0 auto;
}

.language-menu > summary {
    list-style: none;
}

.language-menu > summary::-webkit-details-marker {
    display: none;
}

.language-menu-button {
    display: inline-flex;
    width: 36px;
    height: 36px;
    min-height: 36px;
    justify-content: center;
    align-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-size: .82rem;
    font-weight: 750;
    cursor: pointer;
}

.language-menu-button::after {
    display: none;
}

.language-menu[open] .language-menu-button,
.language-menu-button:hover,
.language-menu-button:focus-visible {
    border-color: var(--green);
    color: var(--green);
}

.language-menu-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 9px);
    right: 0;
    display: grid;
    width: 220px;
    gap: 3px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.language-menu-panel a {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 7px;
    color: var(--ink);
    font-size: .86rem;
    text-decoration: none;
}

.access-details dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    margin: 0 0 24px;
}

.access-details dl div {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.access-details dt {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    text-transform: uppercase;
}

.access-details dd {
    margin: 5px 0 0;
    font-size: 1.05rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.access-details .access-password {
    grid-column: 1 / -1;
    padding: 14px;
    border: 2px solid var(--green);
    border-radius: 8px;
}

.access-details .access-password dd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.35rem;
    letter-spacing: .04em;
}

@media print {
    .site-header, .site-footer, .print-hidden { display: none !important; }
    body, main { background: #fff !important; color: #000 !important; }
    main { width: 100%; max-width: none; margin: 0; padding: 0; }
    .user-access-sheet { max-width: none; }
    .access-details { border: 1px solid #777; box-shadow: none; }
}

.language-menu-panel a:hover,
.language-menu-panel a.active {
    background: var(--surface);
    color: var(--green);
}

.language-menu-panel small {
    font-size: .7rem;
    font-weight: 750;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 10px;
}

.dashboard-account-card {
    border-color: #a9c9e8;
    background: #eef6fd;
}

.dashboard-card-stat {
    display: block;
    margin-top: auto;
    padding-top: 12px;
    color: var(--green);
    font-size: .82rem;
}

.dashboard-card-stat strong {
    font-size: 1.05rem;
}

.admin-dashboard-grid > .card:nth-child(-n+3) {
    border-color: #9fd3b7;
    background: #eff9f3;
}

.admin-dashboard-grid > .card:nth-child(n+4):nth-child(-n+6) {
    border-color: #e6b5b5;
    background: #fff3f3;
}

.admin-dashboard-grid > .card:nth-child(n+10) {
    border-color: #e9bf83;
    background: #fff7eb;
}

.license-sheet dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
}

.license-sheet dt { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.license-sheet dd { margin: 4px 0 0; font-weight: 750; overflow-wrap: anywhere; }
.license-sheet .license-secret { grid-column: 1 / -1; padding: 14px; border: 2px solid var(--green); border-radius: 8px; }

.license-login-dialog {
    position: fixed;
    z-index: 1000;
    inset: 50% auto auto 50%;
    width: min(520px, calc(100vw - 32px));
    transform: translate(-50%, -50%);
    padding: 24px;
    border: 1px solid var(--warning);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .3);
}

.license-login-dialog::backdrop { background: rgba(8, 24, 19, .55); }

input[readonly] {
    background: var(--surface);
    color: var(--muted);
    cursor: not-allowed;
}

@media print {
    .license-print-page .site-header,
    .license-print-page .site-footer,
    .license-print-page .print-hidden { display: none !important; }
    .license-print-page main { width: 100%; max-width: none; margin: 0; padding: 0; }
    .license-print-page .license-sheet { border: 1px solid #777; box-shadow: none; }
}

html[data-theme="dark"] .dashboard-account-card,
html[data-theme="dark"] .admin-dashboard-grid > .card {
    background: var(--white);
}

.admin-dashboard-grid .card {
    display: flex;
    min-height: 114px;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    padding: 16px 18px;
}

.admin-dashboard-grid .card h3 {
    margin-bottom: 6px;
    font-size: 1rem;
}

.admin-dashboard-grid .card p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.48;
}

.seo-language-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.seo-language-grid .card {
    margin: 0;
}

.seo-language-grid h2 {
    margin-bottom: 0;
    font-size: 1.15rem;
}

.install-form > label:not(.full) {
    grid-template-rows: auto 46px minmax(3em, auto);
    align-content: start;
}

.planner-editor {
    grid-template-columns: clamp(360px, 23vw, 435px) minmax(0, 1fr);
}

.planner-compact-grid {
    align-items: stretch;
}

.planner-compact-grid > label {
    grid-template-rows: minmax(2.35em, auto) 40px;
    align-content: start;
}

.planner-compact-grid .planner-conditional-warning {
    grid-column: 1 / -1;
}

.planner-editor-actions .planner-export-mission {
    grid-column: 1 / -1;
    width: 100%;
    border-color: #c65c08;
    background: #e86f12;
    color: #fff;
    font-weight: 800;
}

.planner-editor-actions .planner-export-mission:hover,
.planner-editor-actions .planner-export-mission:focus-visible {
    border-color: #a84800;
    background: #c95b08;
    color: #fff;
}

.disabled-release-download {
    cursor: not-allowed;
    opacity: .42;
    pointer-events: none;
}

html[data-theme="dark"] .language-menu-button,
html[data-theme="dark"] .language-menu-panel {
    border-color: var(--line);
    background: var(--white);
    color: var(--ink);
}

html[data-theme="dark"] .language-menu-panel a:hover,
html[data-theme="dark"] .language-menu-panel a.active {
    background: var(--surface);
}

@media (max-width: 1000px) {
    .planner-editor {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .admin-dashboard-grid,
    .seo-language-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .language-menu-code {
        display: none;
    }

    .language-menu-button {
        width: 36px;
        justify-content: center;
        padding: 0;
    }

    .language-menu-button::after {
        display: none;
    }

    .admin-dashboard-grid,
    .seo-language-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-grid .card {
        min-height: 0;
    }

    .install-form > label:not(.full) {
        grid-template-rows: auto;
    }
}

/* Beta 0.2.1.17: official blue logo system and calmer heading scale. */
.brand .brand-logo-dark,
.risk-app-brand .brand-logo-dark { display:none; }

html[data-theme="dark"] .brand .brand-logo-light,
html[data-theme="dark"] .risk-app-brand .brand-logo-light { display:none; }

html[data-theme="dark"] .brand .brand-logo-dark,
html[data-theme="dark"] .risk-app-brand .brand-logo-dark { display:block; filter:none; }

/* Beta 0.2.1.18: four-language Risk App and mobile safe-area layout. */
.risk-app-controls .risk-language-menu .language-menu-button {
    width:44px;
    height:44px;
    min-height:44px;
    border-color:var(--risk-blue-line);
    color:var(--risk-blue);
    font-size:1.05rem;
}

.risk-app-controls .risk-language-menu .language-menu-button:hover,
.risk-app-controls .risk-language-menu .language-menu-button:focus-visible,
.risk-app-controls .risk-language-menu[open] .language-menu-button {
    border-color:var(--risk-blue);
    background:var(--risk-blue-soft);
}

.risk-login-language-row { display:none; justify-content:flex-end; margin-bottom:.5rem; }
.risk-page-heading > .secondary { flex:0 0 auto; }

body h1 { font-size:clamp(1.6rem,3.6vw,3.45rem); }
body .dashboard-compact .page-heading h1 { font-size:clamp(1.5rem,3.35vw,2.75rem); }
body.admin-page h1 { font-size:clamp(1.6rem,3.35vw,2.85rem); }
body .planner-editor-heading h1 { font-size:clamp(1.2rem,2vw,1.75rem); }

@media (max-width:620px) {
    body h1,
    body.admin-page h1,
    body .dashboard-compact .page-heading h1 { font-size:1.7rem; }
    body.risk-pwa-page > main { padding-bottom:32px; }
    .risk-page-heading { align-items:stretch; gap:.75rem; }
    .risk-page-heading > .secondary { width:100%; margin-top:.15rem; }
    .risk-login-language-row { display:flex; }
    .risk-install-options { grid-template-columns:1fr 1fr; }
    .risk-install-choice { min-height:72px; padding:.65rem; align-items:center; }
}

@media (max-width:360px) {
    .risk-app-controls .risk-language-menu .language-menu-button {
        width:40px;
        height:40px;
        min-height:40px;
    }
}

/* Final Beta 0.3.1.8 responsive overrides. */
@media (max-width:620px) {
    body.risk-pwa-page > main { padding-inline:14px; }
    .risk-app-menu { gap:.63rem; margin:.9rem 0; }
    .risk-app-menu .card { min-height:131px; padding:.9rem; }
    .risk-app-menu .risk-action-wide { min-height:113px; }
    .risk-app-menu h2 { font-size:1.08rem; }
    .risk-action-icon { width:2.93rem; height:2.93rem; }
    .risk-app-brand img { width:157px; }
    .risk-icon-button,.risk-app-controls .risk-language-menu .language-menu-button { width:40px; min-width:40px; height:40px; min-height:40px; }
}

/* Beta 0.3.1.9: public project information and compact navigation. */
.public-information-page,.update-log-page,.platform-workflow{width:min(100%,1040px);margin-inline:auto}
.public-information-sections,.data-source-list{display:grid;gap:1rem;margin-top:1.25rem}
.public-information-sections{grid-template-columns:repeat(2,minmax(0,1fr))}
.public-information-sections .card,.data-source-card{padding:clamp(1rem,2.2vw,1.5rem)}
.public-information-sections .card h2,.data-source-card h2{margin-top:0}
.public-information-sections .card p,.public-information-sections .card li,.data-source-card dd{line-height:1.65}
.data-source-card dl{display:grid;gap:.8rem;margin:1rem 0}
.data-source-card dl div{display:grid;grid-template-columns:minmax(130px,.35fr) 1fr;gap:1rem;border-top:1px solid var(--border);padding-top:.8rem}
.data-source-card dt{font-weight:800;color:var(--navy)}
.data-source-card dd{margin:0;color:var(--muted)}
.platform-workflow{margin-top:clamp(2rem,5vw,4rem);padding:clamp(1.2rem,3vw,2rem);border:1px solid var(--border);border-radius:24px;background:var(--surface)}
.workflow-steps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.55rem;padding:0;margin:1.5rem 0;list-style:none;counter-reset:workflow}
.workflow-steps li{counter-increment:workflow;display:grid;align-content:center;min-height:92px;padding:.8rem;border:1px solid var(--border);border-radius:16px;background:var(--soft-blue);font-weight:800;text-align:center}
.workflow-steps li::before{content:counter(workflow);width:26px;height:26px;display:grid;place-items:center;margin:0 auto .45rem;border-radius:50%;background:var(--blue);color:#fff;font-size:.78rem}
.site-nav-panel{max-height:min(70vh,520px);overflow-y:auto;overscroll-behavior:contain}
.changelog-section+.changelog-section{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--border)}
.changelog-section h3{margin:.2rem 0 .55rem;color:var(--blue);font-size:.9rem;text-transform:uppercase;letter-spacing:.08em}
@media(max-width:760px){
  .public-information-sections{grid-template-columns:1fr}
  .data-source-card dl div{grid-template-columns:1fr;gap:.2rem}
  .workflow-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Beta 0.3.1.10: shared statistics and selectable aircraft history. */
.unified-statistics-page,.unified-drone-history{width:min(100%,1180px);margin-inline:auto}
.unified-statistics-filter{display:grid;grid-template-columns:minmax(180px,1.35fr) repeat(2,minmax(150px,.75fr)) auto auto auto;align-items:end;gap:.75rem;margin-bottom:1rem}
.unified-statistics-filter label{margin:0}
.unified-statistics-filter .primary,.unified-statistics-filter .secondary{min-height:46px;white-space:nowrap}
.unified-statistics-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.unified-statistics-kpis .card{display:grid;gap:.25rem;margin:0;text-align:center}
.unified-statistics-kpis strong{color:var(--blue);font-size:clamp(2rem,4vw,3.25rem);line-height:1}
.unified-statistics-kpis span{font-weight:800}
.statistics-definition{display:block;margin:.55rem 0 1rem;color:var(--muted)}
.unified-statistics-charts{display:grid;grid-template-columns:1.4fr 1fr;gap:1rem;margin:1rem 0}
.unified-statistics-charts>.card{margin:0;min-width:0}
.statistics-risk-card{grid-column:1/-1}
.statistics-month-chart{display:grid;grid-template-columns:repeat(var(--month-count),minmax(42px,1fr));align-items:end;gap:.45rem;height:245px;overflow-x:auto;padding:.75rem .2rem .15rem}
.statistics-month{display:grid;grid-template-rows:auto 1fr auto;align-items:end;gap:.3rem;height:100%;min-width:42px;text-align:center}
.statistics-month strong,.statistics-month span{font-size:.72rem}.statistics-month i{display:block;width:72%;height:var(--bar-height);min-height:4px;margin:auto;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,#68b8f1,var(--blue))}
.statistics-horizontal-bars{display:grid;gap:.7rem}.statistics-horizontal-bars>div{display:grid;grid-template-columns:minmax(90px,1fr) 2fr auto;align-items:center;gap:.65rem}.statistics-horizontal-bars span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.statistics-horizontal-bars i{height:10px;overflow:hidden;border-radius:10px;background:var(--soft-blue)}.statistics-horizontal-bars b{display:block;height:100%;border-radius:inherit;background:var(--blue)}
.statistics-risk-layout{display:grid;grid-template-columns:180px 1fr;align-items:center;gap:1.5rem}.statistics-donut{display:grid;width:170px;aspect-ratio:1;place-items:center;border-radius:50%;background:var(--segments);position:relative}.statistics-donut:after{content:"";position:absolute;inset:28%;border-radius:50%;background:var(--surface)}.statistics-donut strong{position:relative;z-index:1;font-size:1.8rem}.statistics-risk-legend{display:grid;gap:.55rem}.statistics-risk-legend span{display:grid;grid-template-columns:14px 1fr auto;align-items:center;gap:.55rem}.statistics-risk-legend i{width:12px;height:12px;border-radius:50%}
.unified-statistics-map-card{margin-top:1rem}.unified-statistics-map{width:100%;height:420px;border:1px solid var(--border);border-radius:16px;overflow:hidden;background:var(--soft-blue)}
.admin-ranking-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1rem}.admin-ranking-grid .card{margin:0}.admin-ranking-grid td small{display:block;color:var(--muted)}
.admin-data-quality{display:grid;grid-template-columns:1fr auto auto auto auto;align-items:center;gap:.7rem}.admin-data-quality h2{margin:0}.admin-data-quality strong{color:var(--blue);font-size:1.5rem}
.drone-history-filter{display:grid;grid-template-columns:1.4fr 1.4fr repeat(2,minmax(140px,.7fr));align-items:end;gap:.75rem}.drone-history-filter fieldset{grid-column:1/-2;display:flex;align-items:center;gap:1rem;margin:0;padding:.75rem;border:1px solid var(--border);border-radius:14px}.drone-history-filter legend{padding:0 .3rem;font-weight:800}.drone-history-filter .check-row{display:flex;flex-direction:row;align-items:center;gap:.4rem;margin:0}.drone-history-selection-bar{position:sticky;z-index:6;bottom:1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1rem 0;padding:.8rem 1rem;border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--surface) 94%,transparent);box-shadow:0 10px 30px rgba(11,39,68,.12);backdrop-filter:blur(10px)}.drone-history-selection-bar span{display:grid}.drone-history-selection-bar small{color:var(--muted)}
.drone-history-check{position:absolute;z-index:3;top:8px;right:8px;display:grid;width:34px;height:34px;place-items:center;border-radius:50%;background:var(--surface);box-shadow:0 3px 12px rgba(11,39,68,.12)}.drone-history-check input{width:18px;height:18px}.drone-history-map-card{margin-top:1rem}.drone-history-print-table{width:100%;border-collapse:collapse}.drone-history-print-table th,.drone-history-print-table td{padding:.45rem;border-bottom:1px solid var(--border);vertical-align:top;text-align:left}.print-only{display:none}

@media(max-width:900px){
  .unified-statistics-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.unified-statistics-filter>*{min-width:0}
  .unified-statistics-charts,.admin-ranking-grid{grid-template-columns:1fr}.statistics-risk-card{grid-column:auto}
  .drone-history-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.drone-history-filter fieldset{grid-column:1/-1}
}

/* Beta 0.3.1.11: geozone administration, country statistics, support, and diagnostics. */
.geozone-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.geozone-source-heading{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.geozone-source-heading h2{margin:.5rem 0 0}.geozone-source-grid details{border-top:1px solid var(--border);padding-top:.8rem}.geozone-source-grid summary{cursor:pointer;font-weight:800;color:var(--blue)}
.geozone-result-zones_found{border-color:#e78322!important;background:#fff7e8!important}.geozone-result-clear{border-color:#15924b!important}.statistics-country-card{margin-top:1rem}.statistics-country-card table{max-width:720px}.support-page{max-width:980px}.support-message{margin:.8rem 0}.support-message.is-admin{border-left:5px solid var(--blue);background:var(--soft-blue)}.support-message time{display:block;color:var(--muted);font-size:.82rem;margin:.25rem 0}.status-label.waiting_user{background:#fff2cb;color:#7c5600}.status-label.resolved{background:#dff5e8;color:#116633}.status-label.closed{background:#e8edf2;color:#445463}
@media(max-width:760px){.geozone-source-grid{grid-template-columns:1fr}.geozone-source-heading{display:block}}
@media print{.statistics-country-card,.geozone-result{break-inside:avoid}}
@media(max-width:520px){
  .unified-statistics-filter,.unified-statistics-kpis,.drone-history-filter{grid-template-columns:1fr}
  .unified-statistics-filter .primary,.unified-statistics-filter .secondary{width:100%}
  .unified-statistics-kpis{gap:.6rem}.unified-statistics-kpis .card{grid-template-columns:auto 1fr;align-items:center;text-align:left;padding:.85rem 1rem}.unified-statistics-kpis strong{font-size:2rem}.statistics-risk-layout{grid-template-columns:1fr}.statistics-donut{width:150px;margin:auto}.unified-statistics-map{height:310px}
  .drone-history-filter fieldset{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.drone-history-selection-bar{bottom:calc(.5rem + env(safe-area-inset-bottom));align-items:stretch;flex-direction:column}.drone-history-selection-bar .primary{width:100%}
}

/* Beta 0.3.1.12: WebKit-safe Risk Assessment widths and actionable admin alerts. */
.admin-dashboard .support-available {
    border:2px solid #dc2626;
    background:#fff1f1;
    box-shadow:0 0 0 4px rgba(220,38,38,.1);
}
.admin-dashboard .support-available h3 { color:#b91c1c; }
.admin-dashboard .support-available h3::after {
    content:"NEW";
    display:inline-block;
    margin-left:.55rem;
    padding:.16rem .42rem;
    border-radius:999px;
    background:#dc2626;
    color:#fff;
    font-size:.62rem;
    letter-spacing:.08em;
    vertical-align:middle;
}
.diagnostic-gps-card { grid-column:1/-1; }
.admin-support-alert { border-width:2px; box-shadow:0 10px 28px rgba(185,28,28,.12); }
.admin-support-alert p { margin:.45rem 0 .8rem; }

body.risk-pwa-page,
body.risk-pwa-page > main {
    overflow-x:hidden;
    -webkit-text-size-adjust:100%;
}
body.risk-pwa-page *,
body.risk-pwa-page *::before,
body.risk-pwa-page *::after { box-sizing:border-box; }
body.risk-pwa-page > main > *,
.risk-app-shell > *,
.risk-assessment-form > *,
.risk-assessment-form fieldset,
.risk-assessment-form label,
.risk-field-pair > *,
.risk-segmented,
.risk-segmented > *,
.risk-context-grid > *,
.risk-review-grid > * {
    min-width:0;
    max-width:100%;
}
.risk-assessment-form input,
.risk-assessment-form select,
.risk-assessment-form textarea { width:100%; }
.risk-gps-panel { overflow-wrap:anywhere; }

@media (max-width:720px) {
    .risk-gps-menu[open] .risk-gps-panel {
        position:fixed;
        z-index:100;
        top:calc(env(safe-area-inset-top,0px) + 92px);
        right:max(12px,env(safe-area-inset-right,0px));
        left:max(12px,env(safe-area-inset-left,0px));
        width:auto;
        max-width:none;
    }
    .risk-assessment-form .risk-field-pair,
    .risk-context-grid { grid-template-columns:minmax(0,1fr); }
}

@supports (-webkit-touch-callout:none) {
    body.risk-pwa-page { width:100vw; }
    .risk-app-shell { overflow-x:hidden; }
    .risk-segmented span { word-break:break-word; }
}
@media print{
  .print-hidden,.site-header,body>footer,.screen-timeline{display:none!important}.print-only{display:table!important}
  .unified-statistics-page,.unified-drone-history{width:100%;max-width:none}.print-report-header{margin:0 0 8mm!important}.unified-statistics-kpis{grid-template-columns:repeat(3,1fr)}.unified-statistics-kpis .card,.unified-statistics-charts>.card,.unified-statistics-map-card,.drone-history-map-card,.risk-drone-report-head{padding:4mm;box-shadow:none;break-inside:avoid}.unified-statistics-map{height:72mm}.statistics-month-chart{height:58mm}.statistics-risk-layout{grid-template-columns:42mm 1fr}.statistics-donut{width:38mm}.drone-history-print-table{display:table!important;font-size:9pt}.drone-history-print-table tr{break-inside:avoid}.drone-history-map-card{margin-top:5mm}
}

/* Beta 0.3.1.13: support overview, compact period control and catalogue totals. */
.dashboard-support-row{margin:1rem 0;grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-support-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;background:var(--surface,#fff)}
.dashboard-support-card h3,.dashboard-support-card p{margin:.15rem 0}
.dashboard-support-count{font-size:clamp(2rem,4vw,3.25rem);font-weight:800;color:var(--ink,#10263e)}
.support-unread-badge{position:absolute;top:.75rem;right:.75rem;padding:.28rem .55rem;border-radius:999px;background:#c73f36;color:#fff;font-size:.75rem;line-height:1}
.statistics-period-details{margin-bottom:1rem;padding:0;overflow:hidden}
.statistics-period-details>summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:1rem 1.15rem;cursor:pointer;list-style:none}
.statistics-period-details>summary::-webkit-details-marker{display:none}
.statistics-period-details>summary span{font-size:.8rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--muted,#5b7085)}
.statistics-period-details>summary small{text-align:right}
.statistics-period-details[open]>summary{border-bottom:1px solid var(--line,#d7e3ed)}
.statistics-period-details .unified-statistics-filter{margin:0;padding:1rem 1.15rem;box-shadow:none;border:0;border-radius:0}
.statistics-month i.is-zero{min-height:2px;background:var(--line,#d7e3ed)}
.system-drone-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0}
.system-drone-kpis .card{display:grid;gap:.15rem;text-align:center}
.system-drone-kpis strong{font-size:clamp(2rem,4vw,3.2rem);line-height:1;color:var(--accent,#1769aa)}
.system-drone-kpis span{font-weight:700}
@media(max-width:720px){.dashboard-support-row,.system-drone-kpis{grid-template-columns:1fr}.statistics-period-details>summary{grid-template-columns:1fr auto}.statistics-period-details>summary span{grid-column:1/-1}.statistics-period-details>summary small{text-align:left}}
