:root{
  --bg:#f6f8fc;
  --panel:#ffffff;
  --panel-2:#eef3fa;
  --ink:#071326;
  --text:#26344c;
  --muted:#63728a;
  --line:#d9e2ee;
  --navy:#061f4a;
  --navy-2:#0a3575;
  --red:#c40018;
  --red-2:#e1263b;
  --focus:#f4b400;
  --ok:#0f8a4b;
  --bad:#b61c1c;
  --warn:#a66b00;
  --shadow:0 22px 60px rgba(6,31,74,.13);
  --soft:0 10px 28px rgba(6,31,74,.08);
  --radius:24px;
  color-scheme:light;
}
:root[data-theme="dark"]{
  --bg:#07101f;
  --panel:#101b2d;
  --panel-2:#17253b;
  --ink:#f6f8fc;
  --text:#e7edf7;
  --muted:#a9b6c8;
  --line:#2c405f;
  --navy:#88a9ef;
  --navy-2:#bfd1ff;
  --red:#ff485b;
  --red-2:#ff6877;
  --shadow:0 22px 60px rgba(0,0,0,.36);
  --soft:0 10px 28px rgba(0,0,0,.25);
  color-scheme:dark;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
a{color:var(--navy);text-underline-offset:4px}
:root[data-theme="dark"] a{color:#d7e4ff}
img{max-width:100%;height:auto}
.wrap{width:min(1180px,calc(100% - 40px));margin:0 auto}.skip{position:absolute;left:-999px;top:10px;background:#fff;color:#000;padding:10px 14px;border-radius:12px;z-index:999}.skip:focus{left:12px}.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}:root[data-theme="dark"] .site-header{background:rgba(8,17,33,.92)}.header-inner{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:84px}.brand{display:flex;align-items:center;gap:14px;text-decoration:none;color:var(--ink)}.brand-logo{width:72px;height:72px;border-radius:16px;background:#fff;display:grid;place-items:center;box-shadow:0 4px 14px rgba(6,31,74,.14);border:1px solid var(--line);overflow:hidden}.brand-logo img{width:64px;height:64px;object-fit:contain}.brand-text strong{display:block;font-size:23px;line-height:1;color:var(--ink);letter-spacing:-.02em}.brand-text small{display:block;color:var(--muted);font-weight:800;margin-top:4px}.nav-panel{display:flex;align-items:center;gap:14px}.links{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.links a{color:var(--ink);text-decoration:none;font-weight:850;padding:10px 12px;border-radius:999px}.links a:hover,.links a:focus{background:var(--panel-2)}.menu-toggle{display:none;border:1px solid var(--line);background:var(--panel);border-radius:14px;padding:10px;min-width:48px;min-height:48px;color:var(--ink);cursor:pointer}.menu-toggle span{display:block;width:22px;height:2px;background:currentColor;margin:4px 0;border-radius:2px}.menu-toggle em{position:absolute;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.theme-toggle{border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--ink);padding:10px 13px;font-weight:850;display:inline-flex;align-items:center;gap:7px;cursor:pointer}.theme-toggle span{font-size:18px}.theme-toggle:hover{box-shadow:var(--soft)}main{padding:36px 0 0}.hero{position:relative;display:grid;grid-template-columns:1.25fr .75fr;gap:28px;align-items:stretch;background:linear-gradient(135deg,#061f4a 0%,#0a2c63 58%,#09204d 100%);color:#fff;border-radius:34px;padding:56px;overflow:hidden;box-shadow:var(--shadow)}.hero:before{content:"";position:absolute;inset:auto -130px -140px auto;width:440px;height:440px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.14),rgba(255,255,255,0) 62%)}.hero:after{content:"";position:absolute;right:40px;top:40px;width:120px;height:120px;border:28px solid rgba(255,255,255,.07);border-radius:50%}.hero-copy,.hero-card{position:relative;z-index:1}.hero h1{font-size:clamp(39px,6.2vw,76px);line-height:1;margin:12px 0 20px;color:#fff;letter-spacing:-.055em;max-width:820px}.hero p{font-size:clamp(17px,2vw,21px);color:#e6eefb;max-width:760px;margin:0 0 26px}.eyebrow,.badge{display:inline-flex;align-items:center;width:max-content;gap:8px;border-radius:999px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:950;color:var(--red);background:rgba(196,0,24,.08);padding:7px 10px}.hero .eyebrow{background:rgba(255,255,255,.12);color:#fff}.hero-card{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);border-radius:28px;padding:24px;backdrop-filter:blur(10px);align-self:end}.hero-card img{width:110px;height:110px;background:#fff;border-radius:22px;padding:8px;margin-bottom:16px;object-fit:contain}.hero-card strong{display:block;color:#fff;font-size:24px;line-height:1.1}.hero-card p{font-size:15px;color:#edf3ff;margin:10px 0 0}h1,h2,h3{color:var(--ink);line-height:1.08;letter-spacing:-.035em}h1{font-size:clamp(34px,5vw,62px);margin:12px 0 16px}h2{font-size:clamp(25px,3vw,38px);margin:0 0 12px}h3{font-size:21px;margin:0 0 10px}.section{margin-top:28px}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:24px;box-shadow:var(--soft)}.card.deep{background:linear-gradient(135deg,var(--panel),var(--panel-2))}.card ul,.card ol{padding-left:22px}.card li{margin:7px 0}.grid{display:grid;gap:20px}.grid2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid4{grid-template-columns:repeat(4,minmax(0,1fr))}.step{min-height:190px}.step span{width:42px;height:42px;border-radius:14px;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:950;margin-bottom:16px}.ecology{display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(135deg,var(--panel),var(--panel-2))}.actions{display:flex;gap:11px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:999px;padding:12px 18px;background:var(--navy);color:#fff!important;text-decoration:none;font-weight:900;cursor:pointer;box-shadow:0 10px 22px rgba(6,31,74,.16);min-height:46px}.btn:hover{transform:translateY(-1px)}.btn.red{background:var(--red);box-shadow:0 10px 22px rgba(196,0,24,.18)}.btn.light{background:var(--panel);color:var(--ink)!important;border:1px solid var(--line);box-shadow:none}.btn.ghost{background:transparent;color:var(--ink)!important;border:1px solid var(--line);box-shadow:none}.hero .btn.ghost{color:#fff!important;border-color:rgba(255,255,255,.35)}.btn.warn{background:var(--warn)}.btn.bad{background:var(--bad)}.btn:disabled{opacity:.58;cursor:not-allowed}.notice{border:1px solid #e5b85d;background:#fff7df;color:#593b00;border-radius:16px;padding:14px 16px;margin:14px 0}.ok{border-color:#8ed2aa;background:#eaf8f0;color:#074d2d}.badmsg{border-color:#e5a2a2;background:#fff1f1;color:#7a1111}.muted{color:var(--muted)}.small{font-size:13px}.required{color:var(--red)}.top-slab{background:linear-gradient(135deg,var(--panel),var(--panel-2));border:1px solid var(--line);border-radius:28px;padding:34px;margin:12px 0 22px;box-shadow:var(--soft)}.top-slab p{max-width:890px}.form fieldset{border:1px solid var(--line);border-radius:20px;margin:20px 0;padding:18px;background:var(--panel);box-shadow:var(--soft)}.form legend{font-weight:950;color:var(--ink);padding:0 8px}.row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}label{display:block;font-weight:850;margin:9px 0 6px;color:var(--ink)}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px 13px;background:var(--panel);color:var(--ink);font:inherit;outline:none}input:focus,select:focus,textarea:focus,button:focus,a:focus{outline:3px solid var(--focus);outline-offset:2px}textarea{min-height:120px}input[type=checkbox]{width:auto;margin-right:8px;accent-color:var(--red)}.checks label{font-weight:650;display:flex;align-items:flex-start;gap:8px}.checks input{margin-top:5px}.map-preview{margin-top:14px;border:1px dashed var(--line);border-radius:16px;background:var(--panel-2);padding:14px}.table-wrap{overflow:auto;border-radius:18px;border:1px solid var(--line);background:var(--panel)}.table{width:100%;border-collapse:collapse;background:var(--panel)}.table th,.table td{border-bottom:1px solid var(--line);padding:13px 12px;text-align:left;vertical-align:top}.table th{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);background:var(--panel-2)}.pill{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:var(--panel-2);color:var(--ink);font-weight:900;font-size:12px}.pill.pending{background:#fff3d6;color:#704700}.pill.approved{background:#eaf8ef;color:#0a5a30}.pill.recovered{background:#e5eefc;color:#164288}.pill.rejected,.pill.disputed,.pill.under_dispute{background:#ffe8e8;color:#8a1111}.kpi{font-size:42px;font-weight:950;letter-spacing:-.05em}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.tabs a{padding:10px 12px;background:var(--panel);border:1px solid var(--line);border-radius:999px;text-decoration:none;color:var(--ink);font-weight:850}.private-img{max-width:190px;max-height:150px;border:1px solid var(--line);border-radius:14px;object-fit:cover;box-shadow:var(--soft)}.statusline{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}.statusline div{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px}.codebox{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:var(--panel-2);padding:12px;border-radius:14px;overflow:auto}.adminbar{background:#07162f;color:#fff;padding:10px 0}.adminbar .wrap{font-weight:850}.timeline{counter-reset:item}.timeline>div{position:relative;padding-left:46px;margin:20px 0}.timeline>div:before{counter-increment:item;content:counter(item);position:absolute;left:0;top:0;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--red);color:#fff;font-weight:950}.empty{border:1px dashed var(--line);background:var(--panel-2);border-radius:18px;padding:22px;color:var(--muted)}
.map-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr);gap:22px;margin-top:24px}.map-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}.map-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:6px 6px 14px}.map-toolbar h2{font-size:24px;margin:0}.map-toolbar p{margin:5px 0 0;color:var(--muted)}.map-controls{display:flex;gap:8px}.map-controls button{width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:var(--panel-2);color:var(--ink);font-size:22px;font-weight:900;cursor:pointer}.web-map{position:relative;min-height:620px;border-radius:24px;overflow:hidden;border:1px solid var(--line);background:#d9e7f5;box-shadow:inset 0 0 0 1px rgba(255,255,255,.55)}:root[data-theme="dark"] .web-map{background:#0d1728}.map-viewport{position:absolute;inset:0;transition:transform .2s ease}.italy-map-svg{position:absolute;inset:0;width:100%;height:100%;display:block}.map-sea{fill:#dceaf7}:root[data-theme="dark"] .map-sea{fill:#0d1728}.italy-land{fill:#f8fbff;stroke:#6d829e;stroke-width:2.2;filter:drop-shadow(0 10px 16px rgba(7,19,38,.18))}:root[data-theme="dark"] .italy-land{fill:#162844;stroke:#7f98c9}.italy-coast{fill:none;stroke:#ffffff;stroke-width:.8;opacity:.85}.map-roads path{fill:none;stroke:#ffffff;stroke-width:9;stroke-linecap:round;opacity:.55}.map-roads path+path{stroke:#b9c8dc;stroke-width:3;opacity:.45}:root[data-theme="dark"] .map-roads path{stroke:#253a5e;opacity:.75}:root[data-theme="dark"] .map-roads path+path{stroke:#7790bd;opacity:.35}.map-labels text{font:700 18px system-ui,Arial,sans-serif;fill:#7487a1;paint-order:stroke;stroke:#fff;stroke-width:5;stroke-linejoin:round}:root[data-theme="dark"] .map-labels text{fill:#9fb4d5;stroke:#0d1728}.map-marker{position:absolute;width:28px;height:28px;margin:-28px 0 0 -14px;z-index:5;text-decoration:none}.marker-dot{position:absolute;left:50%;top:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border-radius:50% 50% 50% 0;background:var(--red);border:3px solid #fff;box-shadow:0 9px 22px rgba(0,0,0,.32);transform:rotate(-45deg)}.marker-dot:after{content:"";position:absolute;left:6px;top:6px;width:6px;height:6px;border-radius:50%;background:#fff}.marker-popup{position:absolute;left:25px;bottom:20px;min-width:245px;max-width:290px;background:#fff;color:#071326;border:1px solid #c9d5e5;border-radius:16px;padding:12px 13px;font-size:14px;box-shadow:0 18px 45px rgba(7,19,38,.22);opacity:0;transform:translateY(8px);pointer-events:none;transition:.16s;z-index:9}.marker-popup:before{content:"";position:absolute;left:-7px;bottom:12px;width:14px;height:14px;background:#fff;border-left:1px solid #c9d5e5;border-bottom:1px solid #c9d5e5;transform:rotate(45deg)}.marker-popup strong{display:block;font-size:18px;color:#071326;letter-spacing:.02em}.marker-popup em{display:block;font-style:normal;font-weight:850;margin-top:3px;color:#23334b}.marker-popup small{display:block;color:#5d6f86;margin-top:5px}.marker-popup b{display:inline-flex;margin-top:9px;color:var(--red);font-size:13px}.map-marker:hover .marker-popup,.map-marker:focus .marker-popup{opacity:1;transform:translateY(0)}.map-empty{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:4;max-width:460px;text-align:center;background:rgba(255,255,255,.94);border:1px solid #cbd6e4;border-radius:20px;padding:24px;box-shadow:var(--soft);color:#26344c}:root[data-theme="dark"] .map-empty{background:rgba(16,27,45,.95);color:var(--text)}.map-side{align-self:start}.province-list{display:grid;gap:12px;margin:18px 0}.province-row{position:relative;border:1px solid var(--line);border-radius:16px;padding:12px;background:var(--panel-2);overflow:hidden;display:grid;grid-template-columns:52px 1fr auto;gap:10px;align-items:center}.province-row strong,.province-row span,.province-row b{position:relative;z-index:2}.province-row i{position:absolute;left:0;bottom:0;height:4px;background:var(--red);border-radius:999px}.footer{background:#081630;color:#fff;margin-top:44px;padding:42px 0}.footer-grid{display:grid;grid-template-columns:1.4fr .8fr 1.1fr;gap:28px}.footer p{color:#dbe5f3}.footer a{color:#fff;font-weight:800}.footer .btn.ghost{color:#fff!important;border-color:rgba(255,255,255,.24)}.footer-brand{display:grid;grid-template-columns:64px 1fr;gap:18px;align-items:center}.footer-brand img{width:64px;height:64px;object-fit:contain;background:#fff;border-radius:16px;padding:4px}
@media(max-width:1100px){.grid4{grid-template-columns:repeat(2,1fr)}.grid3{grid-template-columns:repeat(2,1fr)}.hero{grid-template-columns:1fr}.map-layout{grid-template-columns:1fr}.web-map{min-height:540px}}
@media(max-width:900px){.header-inner{min-height:76px}.menu-toggle{display:inline-block}.nav-panel{position:absolute;left:20px;right:20px;top:86px;display:none;flex-direction:column;align-items:stretch;background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:14px;box-shadow:var(--shadow)}.nav-panel.is-open{display:flex}.links{flex-direction:column;align-items:stretch}.links a{display:block;padding:13px 14px}.theme-toggle{width:100%;justify-content:center}.brand-logo{width:58px;height:58px}.brand-logo img{width:52px;height:52px}.brand-text strong{font-size:20px}.brand-text small{font-size:12px}.hero{padding:34px 24px;border-radius:26px}.hero h1{font-size:44px}.hero-card{max-width:100%}.row,.grid2,.grid3,.grid4,.footer-grid{grid-template-columns:1fr}.ecology{align-items:flex-start;flex-direction:column}.footer-brand{grid-template-columns:1fr}.web-map{min-height:460px}.map-label{font-size:12px}}
@media(max-width:560px){.wrap{width:min(100% - 28px,1180px)}main{padding-top:22px}.brand-text small{max-width:160px}.hero{padding:26px 18px}.hero h1{font-size:36px}.actions{flex-direction:column}.actions .btn{width:100%}.top-slab{padding:24px 18px}.card{padding:18px;border-radius:20px}.form fieldset{padding:16px}.web-map{min-height:420px}.marker-popup{left:auto;right:-30px;min-width:210px}.province-row{grid-template-columns:46px 1fr auto}}
.web-map.is-local{background:#dceaf7}
.web-map.is-local .map-viewport{transform-origin:center center}
.map-marker.is-active .marker-popup{opacity:1;transform:translateY(0)}
.pill.email_pending{background:#fff3d6;color:#704700}
.brand-text strong,.hero h1,h1,h2,h3,.eyebrow,.badge,.kpi,.table th{letter-spacing:0}
.header-inner{gap:16px;min-height:74px}.brand{flex:0 0 auto;min-width:250px}.brand-logo{flex:0 0 60px;width:60px;height:60px;border-radius:14px}.brand-logo img{width:54px;height:54px}.brand-text strong{font-size:21px}.brand-text small{font-size:13px;line-height:1.25;max-width:190px}.nav-panel{flex:1;justify-content:flex-end;gap:10px}.links{justify-content:flex-end;gap:2px;row-gap:4px}.links a{font-size:14px;line-height:1.1;padding:8px 9px}.theme-toggle{padding:8px 11px;font-size:14px}.hero h1{letter-spacing:0}.card{border-radius:8px}.top-slab,.hero,.hero-card,.form fieldset,.notice,.empty,.map-card,.web-map{border-radius:16px}.btn,.links a,.theme-toggle{letter-spacing:0}
.citizen-access{display:flex;align-items:center;justify-content:space-between;gap:20px}.citizen-access h2{font-size:26px;margin:4px 0 8px}.citizen-access p{margin:0}.subnav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.subnav a{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--ink);text-decoration:none;font-weight:850}.subnav a.active,.subnav a:hover,.subnav a:focus{background:var(--navy);color:#fff}.back-link{display:inline-flex;align-items:center;gap:8px;text-decoration:none;font-weight:850;margin:0 0 14px}.back-link:before{content:"←";font-weight:950}.inline-form{display:inline-flex;margin:0}.inline-form .btn{white-space:nowrap}
.osm-map{position:relative;min-height:580px;background:#d8e8f8}.osm-tile-layer,.osm-marker-layer{position:absolute;inset:0}.osm-tile{position:absolute;width:256px;height:256px;max-width:none;user-select:none}.osm-marker{position:absolute;width:34px;height:34px;margin:-34px 0 0 -17px;z-index:5;text-decoration:none}.osm-pin{position:absolute;left:50%;top:50%;width:30px;height:30px;margin:-15px 0 0 -15px;border-radius:50% 50% 50% 0;background:var(--red);border:3px solid #fff;box-shadow:0 10px 24px rgba(0,0,0,.34);transform:rotate(-45deg)}.osm-pin:after{content:"";position:absolute;left:8px;top:8px;width:8px;height:8px;border-radius:50%;background:#fff}.osm-popup{position:absolute;left:29px;bottom:24px;min-width:245px;max-width:300px;background:#fff;color:#071326;border:1px solid #c9d5e5;border-radius:8px;padding:12px 13px;font-size:14px;box-shadow:0 18px 45px rgba(7,19,38,.22);opacity:0;transform:translateY(8px);pointer-events:none;transition:.16s;z-index:9}.osm-popup:before{content:"";position:absolute;left:-7px;bottom:12px;width:14px;height:14px;background:#fff;border-left:1px solid #c9d5e5;border-bottom:1px solid #c9d5e5;transform:rotate(45deg)}.osm-popup strong{display:block;font-size:18px;color:#071326}.osm-popup em{display:block;font-style:normal;font-weight:850;margin-top:3px;color:#23334b}.osm-popup small{display:block;color:#5d6f86;margin-top:5px}.osm-popup b{display:inline-flex;margin-top:9px;color:var(--red);font-size:13px}.osm-popup span{display:block;margin-top:6px;font-weight:900;color:#071326}.osm-marker:hover .osm-popup,.osm-marker:focus .osm-popup,.osm-marker.is-active .osm-popup{opacity:1;transform:translateY(0);pointer-events:auto}.osm-attribution{position:absolute;left:8px;bottom:8px;z-index:3;background:rgba(255,255,255,.9);border-radius:6px;padding:3px 7px;font-size:12px}.osm-attribution a{color:#1b3b67}:root[data-theme="dark"] .osm-map{background:#122136}:root[data-theme="dark"] .osm-attribution{background:rgba(16,27,45,.92)}:root[data-theme="dark"] .osm-attribution a{color:#d7e4ff}
@media(max-width:1100px){.brand{min-width:230px}.links a{font-size:13px;padding:7px 8px}.osm-map{min-height:520px}}
@media(max-width:900px){.brand{min-width:0}.nav-panel{justify-content:flex-start}.links{justify-content:flex-start}.citizen-access{align-items:flex-start;flex-direction:column}.osm-map{min-height:470px}.subnav{overflow:auto;flex-wrap:nowrap;padding-bottom:4px}.subnav a{white-space:nowrap}}
@media(max-width:560px){.brand-logo{width:56px;height:56px}.brand-logo img{width:50px;height:50px}.brand-text strong{font-size:19px}.brand-text small{font-size:12px;max-width:150px}.osm-map{min-height:430px}.osm-popup{left:auto;right:-38px;min-width:220px}.osm-popup:before{left:auto;right:22px;bottom:-7px;border-left:0;border-bottom:1px solid #c9d5e5;border-right:1px solid #c9d5e5}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}.btn:hover{transform:none}}

/* AMRI patch 20260620: admin menu, magazine, analytics */
.editorial-note{border:1px solid var(--line);background:linear-gradient(180deg,var(--panel),var(--panel-2));border-left:6px solid var(--red);border-radius:18px;padding:18px 20px;margin:22px 0;box-shadow:var(--soft)}
.editorial-note strong{display:block;color:var(--ink);font-size:18px;margin-bottom:5px}.editorial-note p{margin:0;color:var(--muted)}
.adminbar .wrap{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}.admin-status-mini{display:inline-flex;gap:6px;align-items:center;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:4px 10px;font-size:13px}
.admin-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%}.admin-nav-group{position:relative}.admin-nav-toggle,.admin-exit{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:999px;padding:9px 12px;font-weight:850;text-decoration:none;cursor:pointer}.admin-nav-toggle:after{content:"▾";font-size:12px}.admin-nav-group.is-open .admin-nav-toggle,.admin-nav-toggle:hover,.admin-exit:hover{background:var(--navy);color:#fff}.admin-subnav{display:none;position:absolute;z-index:40;top:calc(100% + 8px);left:0;min-width:230px;background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:8px;box-shadow:var(--shadow)}.admin-nav-group.is-open .admin-subnav{display:grid;gap:4px}.admin-subnav a{display:block;text-decoration:none;padding:10px 12px;border-radius:12px;color:var(--text);font-weight:750}.admin-subnav a:hover,.admin-subnav a:focus{background:var(--panel-2);color:var(--ink)}.admin-exit{margin-left:auto;background:var(--red);color:#fff;border-color:var(--red)}
.service-strip{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 24px}.service-strip form{margin:0}.service-pill{border:0;border-radius:999px;padding:10px 14px;font-weight:900;cursor:pointer}.service-pill.on{background:rgba(15,138,75,.12);color:var(--ok);border:1px solid rgba(15,138,75,.35)}.service-pill.off{background:rgba(196,0,24,.1);color:var(--red);border:1px solid rgba(196,0,24,.32)}
.mag-hero{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(320px,.92fr);gap:26px;align-items:stretch;margin:28px 0}.mag-hero-main{background:var(--navy);color:#fff;border-radius:28px;padding:42px;box-shadow:var(--shadow);position:relative;overflow:hidden}.mag-hero-main:after{content:"";position:absolute;right:-80px;bottom:-100px;width:270px;height:270px;border-radius:50%;background:rgba(196,0,24,.35)}.mag-hero-main h1{font-size:clamp(38px,5vw,68px);line-height:1;letter-spacing:-.045em;margin:6px 0 16px}.mag-hero-main p{max-width:720px;color:rgba(255,255,255,.86);font-size:18px}.mag-hero-main .eyebrow{color:#fff}.mag-featured{background:var(--panel);border:1px solid var(--line);border-radius:28px;padding:18px;box-shadow:var(--soft)}.mag-featured img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:20px;background:var(--panel-2)}.mag-featured h2{font-size:clamp(25px,3vw,38px);line-height:1.05;margin:10px 0}.mag-featured h2 a,.mag-card h2 a{color:var(--ink);text-decoration:none}.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:34px 0 16px}.section-head h2{margin:0;font-size:34px}.mag-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0 30px}.mag-card{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:var(--soft)}.article-thumb{display:block;background:var(--panel-2);overflow:hidden}.article-thumb img{width:100%;aspect-ratio:16/10;object-fit:cover;display:block;transition:transform .22s}.mag-card:hover .article-thumb img{transform:scale(1.03)}.mag-card-body{padding:18px}.mag-card h2{font-size:23px;line-height:1.12;margin:6px 0 8px}.article-meta{font-size:13px;color:var(--muted);font-weight:800}.category-strip{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 24px}.category-strip a{display:inline-flex;text-decoration:none;border:1px solid var(--line);border-radius:999px;padding:8px 12px;background:var(--panel);font-weight:800}.newsletter-box{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:36px 0;padding:28px;border-radius:26px;background:var(--navy);color:#fff;box-shadow:var(--shadow)}.newsletter-box p{color:rgba(255,255,255,.82);margin:0}.newsletter-box h2{margin:0 0 8px;font-size:34px}.article-layout{max-width:880px;margin:26px auto;background:var(--panel);border:1px solid var(--line);border-radius:28px;box-shadow:var(--soft);overflow:hidden}.article-head{padding:42px 42px 16px}.article-head h1{font-size:clamp(38px,5.2vw,64px);line-height:1;letter-spacing:-.045em;margin:8px 0 14px;color:var(--ink)}.article-head .lead{font-size:20px;color:var(--muted)}.article-cover{margin:0}.article-cover img{width:100%;display:block;max-height:560px;object-fit:cover}.article-cover figcaption{font-size:13px;color:var(--muted);padding:8px 42px 0}.article-body{padding:26px 42px 10px;font-size:19px;line-height:1.72;color:var(--text)}.article-body h2{font-size:31px;line-height:1.15;margin:32px 0 12px;color:var(--ink)}.article-body h3{font-size:24px;margin:26px 0 10px;color:var(--ink)}.article-footer{padding:10px 42px 42px}.article-footer .share-box{margin-top:20px}.share-actions a[data-amri-share],.share-actions a{position:relative}
@media(max-width:1000px){.mag-hero{grid-template-columns:1fr}.mag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-subnav{position:static;box-shadow:none;margin-top:6px}.admin-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.admin-nav-group,.admin-exit{width:100%}.admin-nav-toggle,.admin-exit{justify-content:space-between;width:100%}.admin-subnav{width:100%}}
@media(max-width:680px){.mag-hero-main{padding:28px}.mag-grid{grid-template-columns:1fr}.section-head,.newsletter-box{align-items:flex-start;flex-direction:column}.article-head,.article-body,.article-footer{padding-left:22px;padding-right:22px}.article-cover figcaption{padding-left:22px;padding-right:22px}.admin-nav{grid-template-columns:1fr}.adminbar .wrap{align-items:flex-start;flex-direction:column}.mag-hero{margin-top:18px}.article-body{font-size:17px}}

/* AMRI v4 professional: grafica più squadrata, leggibilità e magazine */
:root{--radius:4px;--shadow:0 10px 28px rgba(6,31,74,.10);--soft:0 4px 16px rgba(6,31,74,.07)}
.site-header{backdrop-filter:none}.brand-logo,.hero,.hero-card,.card,.top-slab,.form fieldset,.notice,.empty,.table-wrap,.pill,.tabs a,.statusline div,.codebox,.private-img,.map-preview,.newsletter-box,.mag-hero-main,.mag-featured,.mag-card,.article-layout,.article-cover img,.article-thumb img,.editorial-note,.admin-nav-toggle,.admin-exit,.admin-subnav,.admin-subnav a,.service-pill,.btn,.theme-toggle,.menu-toggle,.subnav a,input,select,textarea{border-radius:4px!important}.eyebrow,.badge{border-radius:3px!important}.btn,.links a{border-radius:4px!important}.hero:before,.hero:after,.mag-hero-main:after{display:none!important}.mag-hero-main h1,.mag-hero-main h2,.mag-hero-main h3,.newsletter-box h1,.newsletter-box h2,.newsletter-box h3{color:#fff!important}.mag-hero-main .btn.light{background:#fff!important;color:#071326!important}.mag-hero-main .btn.ghost{color:#fff!important;border-color:rgba(255,255,255,.5)!important}.newsletter-box .btn.red{background:#c40018!important;color:#fff!important}.newsletter-box .eyebrow{background:rgba(255,255,255,.10);color:#fff}.top-slab{background:#fff}.card,.top-slab,.mag-featured,.mag-card,.article-layout{box-shadow:0 8px 20px rgba(6,31,74,.07)}.table th{background:#eef3fa}.table th,.table td{padding:11px 12px}.table tr:hover td{background:rgba(6,31,74,.03)}
.site-header .header-inner{min-height:72px}.brand-logo{width:58px;height:58px}.brand-logo img{width:52px;height:52px}.brand-text strong{font-size:22px}.brand-text small{font-size:13px}.links a{padding:8px 10px}.admin-nav-toggle,.admin-exit{padding:8px 11px}.adminbar{padding:8px 0}.adminbar .wrap{font-size:14px}.admin-subnav{border-radius:4px!important}.admin-subnav a{border-radius:3px!important}.admin-exit{margin-left:8px}
.mag-hero{grid-template-columns:minmax(0,1fr) minmax(360px,.86fr);gap:22px}.mag-hero-main{background:#07162f;padding:42px;border:1px solid #14284e}.mag-hero-main h1{font-size:clamp(42px,5vw,70px);letter-spacing:-.055em}.mag-featured{padding:0;overflow:hidden}.mag-featured .eyebrow,.mag-featured h2,.mag-featured p{margin-left:22px;margin-right:22px}.mag-featured .article-meta{margin-bottom:22px}.mag-featured img{border-radius:0!important}.mag-grid{gap:20px}.mag-card{border-color:#d9e2ee}.mag-card-body{padding:20px}.mag-card h2{font-size:24px}.section-head{border-bottom:2px solid var(--ink);padding-bottom:10px}.managed-page{max-width:1020px;margin:0 auto 28px}.managed-page-body{font-size:18px;line-height:1.7}.managed-page-body h2{border-left:4px solid var(--red);padding-left:12px;margin-top:26px}.managed-hero{padding:42px}.managed-hero h1{font-size:clamp(42px,5vw,68px)}
.article-pro{max-width:1120px;border-radius:4px!important;background:#fff}.breadcrumb{display:flex;gap:8px;align-items:center;padding:18px 34px 0;font-size:14px;color:var(--muted)}.breadcrumb a{font-weight:800;text-decoration:none}.article-pro .article-head{padding:30px 34px 22px;border-bottom:1px solid var(--line)}.article-pro .article-head h1{font-size:clamp(42px,5.8vw,72px);letter-spacing:-.055em;max-width:960px}.article-pro .article-head .lead{max-width:850px;font-size:21px}.article-pro .article-cover img{max-height:620px;border-radius:0!important}.article-shell{display:grid;grid-template-columns:250px minmax(0,1fr);gap:34px;padding:32px 34px}.article-side{border-left:4px solid var(--red);padding-left:16px;color:var(--muted);font-size:14px;position:sticky;top:110px;align-self:start}.article-side strong{display:block;color:var(--ink);font-size:18px;margin-bottom:12px}.article-side b{color:var(--ink)}.tag-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.tag-list span{border:1px solid var(--line);padding:4px 7px;background:#f6f8fc;color:var(--ink);font-weight:700}.article-pro .article-body{padding:0;font-size:19px;line-height:1.78;max-width:760px}.article-pro .article-body p:first-child{font-size:21px;color:#111827}.article-pro .article-footer{padding:0 34px 34px}.share-actions .btn{box-shadow:none}
.form-note{margin-top:0;color:var(--muted)}.required{color:var(--red);font-weight:950}.checks label.required-auto:after,label.required-auto:after{content:' *';color:var(--red);font-weight:950}.checks label{gap:10px}.checks input[type=checkbox]{width:18px;height:18px}.newsletter-form fieldset{background:#fff}.newsletter-form .checks label{font-weight:760}.form-error{border:1px solid #e5a2a2;background:#fff1f1;color:#7a1111;padding:10px 12px;margin:10px 0;font-weight:800}
@media(max-width:1100px){.nav-panel{gap:8px}.links a{font-size:14px}.admin-nav{gap:6px}.admin-nav-toggle,.admin-exit{font-size:14px}.article-shell{grid-template-columns:1fr}.article-side{position:static;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.mag-hero{grid-template-columns:1fr}.mag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.wrap{width:min(100% - 28px,1180px)}.site-header{position:sticky}.menu-toggle{display:inline-grid;place-items:center}.nav-panel{display:none;position:absolute;left:14px;right:14px;top:76px;background:var(--panel);border:1px solid var(--line);padding:14px;box-shadow:var(--shadow)}.nav-panel.is-open{display:block}.links{display:grid;grid-template-columns:1fr;gap:4px}.links a{padding:12px}.theme-toggle{margin-top:8px;width:100%;justify-content:center}.mag-hero-main{padding:28px}.mag-hero-main h1{font-size:40px}.top-slab,.managed-hero{padding:26px}.row,.grid2,.grid3,.grid4,.mag-grid{grid-template-columns:1fr}.article-pro .article-head,.breadcrumb,.article-shell,.article-pro .article-footer{padding-left:22px;padding-right:22px}.article-side{grid-template-columns:1fr}.article-pro .article-head h1{font-size:40px}.admin-nav{grid-template-columns:1fr}.admin-exit{margin-left:0}.adminbar .wrap{align-items:flex-start}}
@media(max-width:480px){body{font-size:15px}.brand-text small{max-width:145px}.brand-logo{width:52px;height:52px}.brand-logo img{width:48px;height:48px}.mag-hero-main h1,.managed-hero h1,.article-pro .article-head h1{font-size:34px}.btn{width:100%;justify-content:center}.actions{width:100%}.article-pro .article-body{font-size:17px}.article-pro .article-body p:first-child{font-size:18px}}

/* AMRI v5: revisione richiesta da Michele, impostazione più editoriale e squadrata */
:root{--radius:0;--shadow:0 8px 22px rgba(6,31,74,.08);--soft:0 3px 12px rgba(6,31,74,.06)}
body{background:#f4f6fa;color:#151d2b}
.brand-logo,.hero,.hero-card,.card,.top-slab,.form fieldset,.notice,.empty,.table-wrap,.pill,.tabs a,.statusline div,.codebox,.private-img,.map-preview,.newsletter-box,.mag-hero-main,.mag-featured,.mag-card,.article-layout,.article-cover img,.article-thumb img,.editorial-note,.admin-nav-toggle,.admin-exit,.admin-subnav,.admin-subnav a,.service-pill,.btn,.theme-toggle,.menu-toggle,.subnav a,input,select,textarea,.map-card,.web-map,.map-controls button,.province-row,.article-side,.tag-list span{border-radius:0!important}
.hero:before,.hero:after,.mag-hero-main:after{display:none!important}
.mag-hero-main,.newsletter-box{background:#07162f!important;color:#ffffff!important;border:1px solid #14284e!important}
.mag-hero-main h1,.mag-hero-main h2,.mag-hero-main h3,.mag-hero-main p,.mag-hero-main .eyebrow,.newsletter-box h1,.newsletter-box h2,.newsletter-box h3,.newsletter-box p,.newsletter-box .eyebrow{color:#ffffff!important}
.mag-hero-main .btn.light,.newsletter-box .btn.light{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}
.mag-hero-main .btn.ghost{color:#ffffff!important;border-color:rgba(255,255,255,.65)!important}
.mag-hero{align-items:stretch}
.mag-hero-main{padding:44px 42px;display:flex;flex-direction:column;justify-content:center;min-height:430px}
.mag-hero-main h1{font-size:clamp(42px,5.2vw,74px);line-height:.98;letter-spacing:-.055em;text-wrap:balance}
.mag-featured{background:#fff;padding:0;overflow:hidden;border:1px solid #d8dee9}
.mag-featured img{border-radius:0!important;aspect-ratio:16/9;object-fit:cover}
.mag-featured .eyebrow,.mag-featured h2,.mag-featured p{margin-left:24px;margin-right:24px}
.mag-featured .article-meta{margin-bottom:24px}
.card,.top-slab,.mag-featured,.mag-card,.article-layout,.form fieldset{box-shadow:0 6px 18px rgba(6,31,74,.055)}
.top-slab,.managed-hero{background:#ffffff;border-left:5px solid var(--red);padding:38px 40px}
.top-slab h1,.managed-hero h1{letter-spacing:-.055em;text-wrap:balance}
.section-head{border-bottom:3px solid #071326;padding-bottom:10px;margin-top:40px}
.section-head h2{font-size:clamp(28px,3vw,42px)}
.mag-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.mag-card{background:#ffffff;border:1px solid #d8dee9;transition:transform .15s ease,box-shadow .15s ease}
.mag-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(6,31,74,.09)}
.mag-card h2{font-size:clamp(22px,2.2vw,28px);letter-spacing:-.04em}
.mag-card-body{padding:22px}
.article-layout.article-pro{max-width:1180px;background:#ffffff;border:1px solid #d8dee9;box-shadow:0 8px 24px rgba(6,31,74,.07)}
.article-pro .breadcrumb{padding:22px 44px 0}
.article-pro .article-head{padding:34px 44px 28px;border-bottom:1px solid #d8dee9;background:#ffffff}
.article-pro .article-head h1{font-size:clamp(46px,5.8vw,82px);line-height:.95;letter-spacing:-.06em;max-width:1040px;text-wrap:balance}
.article-pro .article-head .lead{font-size:clamp(19px,2.2vw,24px);line-height:1.45;max-width:900px;color:#566070}
.article-shell{grid-template-columns:280px minmax(0,1fr);gap:44px;padding:38px 44px}
.article-side{border-left:0;border-top:4px solid var(--red);padding:14px 0 0;color:#566070;background:#fff}
.article-pro .article-body{max-width:790px;font-size:20px;line-height:1.78;color:#1e293b}
.article-pro .article-body p:first-child{font-size:22px;line-height:1.68;color:#111827}
.article-pro .article-body h2{font-size:clamp(28px,3vw,40px);border-left:4px solid var(--red);padding-left:14px;margin-top:38px}
.article-pro .article-footer{padding:0 44px 44px}
.managed-page{max-width:1100px}
.managed-page-body{font-size:19px;line-height:1.76;border-left:5px solid var(--red)}
.prevention-grid{margin-top:12px}
.form fieldset{background:#ffffff;border:1px solid #d8dee9;padding:22px 26px}
.form legend{font-size:18px;padding:0 10px}
input,select,textarea{background:#ffffff;border-color:#cfd8e6;min-height:46px}
input:focus,select:focus,textarea:focus{border-color:#07162f}
.checks label{font-weight:760;line-height:1.45}
.required{color:#c40018;font-weight:950}
.table-wrap{border-radius:0!important}.table th{background:#eef2f7;color:#364152}.table th,.table td{padding:12px 13px}.table tr:hover td{background:#f8fafc}
.admin-mode .header-inner{width:min(1480px,calc(100% - 32px));min-height:72px;gap:18px}
.admin-mode .brand-logo{width:58px;height:58px}.admin-mode .brand-logo img{width:52px;height:52px}.admin-mode .brand-text strong{font-size:24px}.admin-mode .brand-text small{font-size:14px;line-height:1.15}.admin-mode .nav-panel{flex:1;justify-content:flex-end}.admin-mode .admin-nav{display:flex;flex-wrap:nowrap;align-items:center;gap:7px}.admin-mode .admin-nav-toggle,.admin-mode .admin-exit{padding:9px 13px;font-size:15px;white-space:nowrap}.admin-mode .admin-exit{margin-left:6px}.admin-mode .theme-toggle{white-space:nowrap}.adminbar .wrap{display:flex;align-items:center;justify-content:space-between;gap:12px;width:min(1480px,calc(100% - 32px))}
@media(max-width:1280px){.admin-mode .admin-nav{flex-wrap:wrap}.admin-mode .admin-exit{margin-left:0}.admin-mode .header-inner{align-items:flex-start;padding:8px 0}.admin-mode .nav-panel{justify-content:flex-start}}
@media(max-width:900px){.mag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.article-shell{grid-template-columns:1fr}.article-side{position:static}.admin-mode .nav-panel{display:none;position:absolute;left:14px;right:14px;top:76px;background:#fff;border:1px solid var(--line);padding:14px}.admin-mode .nav-panel.is-open{display:block}.admin-mode .admin-nav{display:grid;grid-template-columns:1fr}.admin-mode .admin-nav-toggle,.admin-mode .admin-exit{width:100%;justify-content:space-between}.admin-mode .admin-subnav{position:static;width:100%;box-shadow:none;margin-top:6px}.admin-mode .menu-toggle{display:inline-grid;place-items:center}}
@media(max-width:760px){.wrap{width:min(100% - 26px,1180px)}.mag-hero{grid-template-columns:1fr}.mag-hero-main{min-height:auto;padding:30px 24px}.mag-grid{grid-template-columns:1fr}.newsletter-box{flex-direction:column;align-items:flex-start}.top-slab,.managed-hero{padding:28px 22px}.row,.grid2,.grid3,.grid4{grid-template-columns:1fr}.article-pro .breadcrumb,.article-pro .article-head,.article-shell,.article-pro .article-footer{padding-left:22px;padding-right:22px}.article-pro .article-head h1{font-size:38px}.article-pro .article-body{font-size:17px}.article-pro .article-body p:first-child{font-size:18px}.btn{width:100%}.actions{width:100%}}


/* AMRI v6: correzioni responsività, contrasto admin e spazi banner */
html,body{max-width:100%;overflow-x:hidden}
.site-header,.adminbar{max-width:100%;overflow:visible}
.admin-mode .site-header{position:sticky;top:0;z-index:100;background:#ffffff!important;border-bottom:1px solid #d8dee9}
:root[data-theme="dark"] .admin-mode .site-header{background:#0b1220!important;border-color:#26364f}
.admin-mode .header-inner{width:min(1600px,calc(100% - 24px));min-height:72px;align-items:center;gap:14px;flex-wrap:wrap;padding:8px 0}
.admin-mode .brand{flex:0 0 auto;min-width:250px}.admin-mode .brand-text small{max-width:190px}.admin-mode .nav-panel{flex:1 1 780px;min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.admin-mode .admin-nav{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;min-width:0}.admin-nav-group{position:relative}.admin-nav-toggle,.admin-exit{border:1px solid #d8dee9;background:#ffffff;color:#071326!important;padding:9px 13px;font-size:14px;font-weight:900;line-height:1.1;box-shadow:none;min-height:44px;white-space:nowrap}.admin-nav-toggle:after{content:'▾';font-size:10px;margin-left:8px}.admin-exit{background:#c40018;color:#ffffff!important;border-color:#c40018;text-decoration:none}.admin-subnav{position:absolute;top:calc(100% + 6px);left:0;width:230px;background:#ffffff;color:#071326;border:1px solid #d8dee9;box-shadow:0 12px 28px rgba(6,31,74,.13);z-index:150;display:none}.admin-nav-group.is-open .admin-subnav{display:block}.admin-subnav a{display:block;color:#071326!important;text-decoration:none;padding:12px 13px;border-bottom:1px solid #eef2f7;font-weight:800;background:#ffffff}.admin-subnav a:hover,.admin-subnav a:focus{background:#eef2f7}.adminbar{background:#07162f;color:#ffffff}.adminbar .wrap{width:min(1600px,calc(100% - 24px));display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.admin-status-mini{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.24);padding:7px 12px;color:#fff}
.admin-mode main{padding-top:34px}.admin-mode .wrap{width:min(1340px,calc(100% - 32px))}.admin-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:8px 0 22px}.admin-page-head h1{margin:0}.admin-page-head p{margin:6px 0 0}.admin-mode .card,.admin-mode .top-slab,.admin-mode .form fieldset{overflow-x:auto}.admin-mode .table{min-width:720px}.admin-mode .table th,.admin-mode .table td{color:#172033}.admin-mode .card,.admin-mode .table,.admin-mode .form fieldset{background:#ffffff;color:#172033;border-color:#d8dee9}.admin-mode .table th{background:#eef2f7;color:#364152}.admin-mode .table td{background:#ffffff}.admin-mode .card h1,.admin-mode .card h2,.admin-mode .card h3,.admin-mode label{color:#071326}
:root[data-theme="dark"] .admin-mode{background:#07101f;color:#e7edf7}:root[data-theme="dark"] .admin-mode main{background:#07101f}:root[data-theme="dark"] .admin-mode .card,:root[data-theme="dark"] .admin-mode .top-slab,:root[data-theme="dark"] .admin-mode .form fieldset,:root[data-theme="dark"] .admin-mode .table{background:#0f172a!important;color:#e7edf7!important;border-color:#334155!important}:root[data-theme="dark"] .admin-mode .table th{background:#1e293b!important;color:#f8fafc!important}:root[data-theme="dark"] .admin-mode .table td{background:#0f172a!important;color:#e7edf7!important}:root[data-theme="dark"] .admin-mode .card h1,:root[data-theme="dark"] .admin-mode .card h2,:root[data-theme="dark"] .admin-mode .card h3,:root[data-theme="dark"] .admin-mode label,:root[data-theme="dark"] .admin-mode .muted{color:#f8fafc!important}:root[data-theme="dark"] .admin-nav-toggle{background:#111c31;color:#f8fafc!important;border-color:#334155}:root[data-theme="dark"] .admin-subnav{background:#0f172a;border-color:#334155}:root[data-theme="dark"] .admin-subnav a{background:#0f172a;color:#f8fafc!important;border-color:#334155}:root[data-theme="dark"] .admin-subnav a:hover{background:#1e293b}
.ad-slot{margin:28px 0}.ad-box{border:1px solid #d8dee9;background:#ffffff;padding:12px;display:block;color:#172033}.ad-label{display:block;font-size:11px;line-height:1;text-transform:uppercase;letter-spacing:.08em;color:#6b7280;font-weight:900;margin-bottom:8px}.ad-box img{display:block;width:100%;height:auto;object-fit:cover}.ad-wide .ad-box img{max-height:220px}.ad-sidebar{margin-top:24px}.ad-sidebar .ad-box img{max-height:520px}.ad-inarticle{margin:34px 0}.ad-html>*:first-child{margin-top:0}.ad-html>*:last-child{margin-bottom:0}.ad-box p{margin:8px 0 0;color:#566070;font-size:14px}.ad-vertical{max-width:360px}.ad-box a{display:block}.article-side .ad-slot{margin-top:24px}.article-body .ad-slot{max-width:100%}
:root[data-theme="dark"] .ad-box{background:#0f172a;border-color:#334155;color:#e7edf7}:root[data-theme="dark"] .ad-box p{color:#cbd5e1}:root[data-theme="dark"] .ad-label{color:#a9b6c8}
@media(max-width:1180px){.admin-mode .menu-toggle{display:inline-grid;place-items:center}.admin-mode .nav-panel{display:none;position:absolute;left:12px;right:12px;top:74px;background:#ffffff;border:1px solid #d8dee9;padding:12px;box-shadow:0 18px 44px rgba(6,31,74,.16);z-index:140}.admin-mode .nav-panel.is-open{display:block}.admin-mode .admin-nav{display:grid;grid-template-columns:1fr;gap:8px;justify-content:stretch}.admin-mode .admin-nav-toggle,.admin-mode .admin-exit{width:100%;justify-content:space-between;text-align:left}.admin-subnav{position:static;width:100%;box-shadow:none;margin-top:6px}.admin-nav-group.is-open .admin-subnav{display:block}.adminbar .wrap{align-items:flex-start}:root[data-theme="dark"] .admin-mode .nav-panel{background:#0f172a;border-color:#334155}}
@media(max-width:760px){.admin-mode .wrap{width:min(100% - 22px,1340px)}.admin-mode .brand{min-width:0}.admin-mode .brand-text strong{font-size:21px}.admin-mode .brand-text small{font-size:12px;max-width:150px}.admin-page-head{display:block}.admin-page-head .btn{margin-top:12px;width:100%}.adminbar .wrap{display:grid;grid-template-columns:1fr;gap:8px}.admin-status-mini{width:100%}.ad-wide .ad-box img{max-height:none}.ad-slot{margin:22px 0}.table{font-size:14px}}

/* AMRI v7: check generale, accesso riservato, contrasto admin e spaziature compatte */
:root{--radius:2px}
body{line-height:1.46}
.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.notice,.empty,.table-wrap,.btn,.theme-toggle,.links a,.brand-logo,.hero,.hero-card,.mag-card,.newsletter-box,.ad-box,.admin-nav-toggle,.admin-exit,.admin-status-mini,input,select,textarea{border-radius:2px!important}
.btn,.theme-toggle,.admin-nav-toggle,.admin-exit{box-shadow:none!important}
.wrap{width:min(1180px,calc(100% - 44px))}
main{padding-top:28px}
.section{margin-top:22px}
.top-slab,.managed-hero{padding:28px 34px;margin:10px 0 20px}
.top-slab h1,.managed-hero h1{font-size:clamp(32px,4.4vw,58px);line-height:1.02;margin:10px 0 12px}
.top-slab p,.managed-hero p{font-size:16px;line-height:1.5;margin:.35rem 0 0}
.card{padding:22px}
.managed-page{max-width:1080px;margin-inline:auto}
.managed-page-body{font-size:17px!important;line-height:1.55!important;border-left:4px solid var(--red);padding:24px 30px!important}
.managed-page-body h2{display:block;margin:24px 0 8px!important;font-size:clamp(24px,2.5vw,34px);line-height:1.15;color:var(--ink)}
.managed-page-body h2:first-child{margin-top:0!important}
.managed-page-body h3{display:block;margin:18px 0 8px!important;font-size:22px;line-height:1.2;color:var(--ink)}
.managed-page-body p{margin:0 0 14px!important;max-width:900px}
.managed-page-body ul{margin:8px 0 16px;padding-left:22px}.managed-page-body li{margin:5px 0}
.mag-grid{gap:18px}.mag-card{box-shadow:none}.mag-card-body{padding:18px}.mag-card h3{font-size:22px;line-height:1.18}.mag-card p{line-height:1.45}.section-head{margin:24px 0 12px}.section-head h2{font-size:clamp(26px,3vw,38px)}
.article-pro{margin:22px 0 36px}.article-pro .article-head{padding:28px 34px 24px}.article-pro .article-head h1{font-size:clamp(36px,5vw,72px);line-height:1;max-width:980px}.article-pro .article-head .lead{font-size:19px;line-height:1.43}.article-shell{gap:34px;padding:30px 34px}.article-pro .article-body{font-size:18px!important;line-height:1.62!important}.article-pro .article-body p{margin:0 0 18px}.article-pro .article-body p:first-child{font-size:19px!important;line-height:1.58!important}.article-pro .article-body h2{font-size:clamp(25px,2.7vw,36px);margin:30px 0 12px}.article-pro .article-footer{padding:0 34px 34px}
.form fieldset{padding:18px 22px;margin:16px 0}.form legend{font-size:17px}.checks label{line-height:1.38;margin:7px 0}.row{gap:12px}input,select,textarea{min-height:44px;padding:10px 12px}textarea{min-height:105px}.notice{padding:12px 14px}.login-required{max-width:860px;margin:0 auto 28px}.login-required h2{margin-top:0}
.footer{margin-top:32px}.footer-grid{gap:34px}.footer p{line-height:1.45}

/* Admin più compatto e leggibile */
body.admin-mode{background:#f4f6fa;color:#172033}
body.admin-mode main{background:#f4f6fa;color:#172033;padding-top:24px}
body.admin-mode .wrap{width:min(1360px,calc(100% - 36px))}
body.admin-mode main h1,body.admin-mode main h2,body.admin-mode main h3,body.admin-mode main p,body.admin-mode main li,body.admin-mode main td,body.admin-mode main th,body.admin-mode main label{color:#172033!important}
body.admin-mode .card,body.admin-mode .table,body.admin-mode .table td,body.admin-mode .form fieldset,body.admin-mode .top-slab{background:#ffffff!important;color:#172033!important;border-color:#d8dee9!important}
body.admin-mode .table th{background:#eef2f7!important;color:#344054!important}
body.admin-mode .table-wrap{overflow-x:auto;background:#fff!important}
body.admin-mode .admin-page-head h1{color:#071326!important}
body.admin-mode .muted{color:#5f6f85!important}
body.admin-mode .site-header{background:#ffffff!important}
body.admin-mode .adminbar{background:#07162f!important;color:#ffffff!important}
body.admin-mode .adminbar *{color:#ffffff!important}

html[data-theme="dark"] body.admin-mode{background:#07101f!important;color:#e7edf7!important}
html[data-theme="dark"] body.admin-mode main{background:#07101f!important;color:#e7edf7!important}
html[data-theme="dark"] body.admin-mode main h1,html[data-theme="dark"] body.admin-mode main h2,html[data-theme="dark"] body.admin-mode main h3,html[data-theme="dark"] body.admin-mode main p,html[data-theme="dark"] body.admin-mode main li,html[data-theme="dark"] body.admin-mode main td,html[data-theme="dark"] body.admin-mode main th,html[data-theme="dark"] body.admin-mode main label{color:#f8fafc!important}
html[data-theme="dark"] body.admin-mode .card,html[data-theme="dark"] body.admin-mode .table,html[data-theme="dark"] body.admin-mode .table td,html[data-theme="dark"] body.admin-mode .form fieldset,html[data-theme="dark"] body.admin-mode .top-slab,html[data-theme="dark"] body.admin-mode .table-wrap{background:#0f172a!important;color:#e7edf7!important;border-color:#334155!important}
html[data-theme="dark"] body.admin-mode .table th{background:#1e293b!important;color:#ffffff!important}
html[data-theme="dark"] body.admin-mode .muted{color:#cbd5e1!important}
html[data-theme="dark"] body.admin-mode .site-header{background:#0b1220!important;border-color:#26364f!important}
html[data-theme="dark"] body.admin-mode .nav-panel{background:#0f172a!important;border-color:#334155!important}
html[data-theme="dark"] body.admin-mode .admin-nav-toggle{background:#111827!important;color:#f8fafc!important;border-color:#334155!important}
html[data-theme="dark"] body.admin-mode .admin-subnav,html[data-theme="dark"] body.admin-mode .admin-subnav a{background:#0f172a!important;color:#f8fafc!important;border-color:#334155!important}
html[data-theme="dark"] body.admin-mode input,html[data-theme="dark"] body.admin-mode select,html[data-theme="dark"] body.admin-mode textarea{background:#111827!important;color:#f8fafc!important;border-color:#334155!important}

@media(max-width:1500px){
  body.admin-mode .menu-toggle{display:inline-grid!important;place-items:center}
  body.admin-mode .nav-panel{display:none;position:absolute;left:12px;right:12px;top:74px;background:#fff;border:1px solid #d8dee9;padding:12px;box-shadow:0 18px 44px rgba(6,31,74,.16);z-index:140}
  body.admin-mode .nav-panel.is-open{display:block}
  body.admin-mode .admin-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;justify-content:stretch}
  body.admin-mode .admin-nav-toggle,body.admin-mode .admin-exit{width:100%;justify-content:space-between;text-align:left}
  body.admin-mode .admin-subnav{position:static;width:100%;box-shadow:none;margin-top:6px}
}
@media(max-width:760px){
  .wrap,body.admin-mode .wrap{width:min(100% - 24px,1180px)}
  .top-slab,.managed-hero{padding:22px 18px}.card,.managed-page-body{padding:18px!important}
  .top-slab h1,.managed-hero h1{font-size:32px}.managed-page-body{font-size:16px!important;line-height:1.5!important;border-left:3px solid var(--red)}
  .managed-page-body h2{font-size:24px}.article-pro .article-head,.article-shell,.article-pro .article-footer{padding-left:18px;padding-right:18px}.article-pro .article-head h1{font-size:34px}.article-pro .article-body{font-size:16px!important;line-height:1.55!important}
  body.admin-mode .admin-nav{grid-template-columns:1fr}.table{font-size:13px}.table th,.table td{padding:9px 8px}.brand-logo{width:58px;height:58px}.brand-logo img{width:52px;height:52px}.brand-text strong{font-size:20px}.brand-text small{font-size:12px;line-height:1.15}
}


/* AMRI v8: pulizia contenuti pubblici, home più stabile, contrasto e spaziature */
.mag-empty-featured{display:flex;flex-direction:column;justify-content:center;min-height:390px;background:#ffffff!important;color:#071326!important;border-left:5px solid var(--red)}
.mag-empty-featured img{border-radius:0!important;background:#f5f7fb;object-fit:contain;padding:10px}
.mag-empty-featured h2,.mag-empty-featured p{color:#071326!important}
.mag-empty-featured .eyebrow{color:#c40018!important;background:rgba(196,0,24,.08)!important}
.mag-featured,.mag-card,.card,.top-slab,.newsletter-box,.managed-page-body,.ad-box,.empty{border-radius:0!important}
.empty{background:#ffffff;color:#516078;border-style:solid}
.mag-hero-main{min-height:390px}
.mag-hero-main p{line-height:1.45}
.section-head{margin-top:28px}
.managed-page-body{line-height:1.58!important}
.managed-page-body h2{line-height:1.12!important;margin-top:22px!important}
.managed-page-body p{line-height:1.5!important}
.mag-card h2{line-height:1.13}.mag-card p{line-height:1.42}
.footer{margin-top:28px}
body:not(.admin-mode) .admin-only-note{display:none!important}
:root[data-theme="dark"] .mag-empty-featured{background:#0f172a!important;color:#f8fafc!important;border-color:#ff485b}
:root[data-theme="dark"] .mag-empty-featured h2,:root[data-theme="dark"] .mag-empty-featured p{color:#f8fafc!important}
:root[data-theme="dark"] .empty{background:#0f172a!important;color:#cbd5e1!important;border-color:#334155!important}
@media(max-width:900px){.mag-hero-main,.mag-empty-featured{min-height:auto}.mag-hero{gap:14px}}
@media(max-width:560px){.mag-hero-main h1{font-size:34px;line-height:1.02}.mag-hero-main{padding:24px 20px}.section-head{align-items:flex-start}.section-head .btn{width:100%}}


/* AMRI v9: correzione globale contrasto e leggibilità */
html:not([data-theme="dark"]){
  --bg:#f4f6fa;
  --panel:#ffffff;
  --panel-2:#eef2f7;
  --ink:#061126;
  --text:#172033;
  --muted:#4b5b70;
  --line:#cfd8e3;
  --navy:#07162f;
  --navy-2:#0b2d63;
  --red:#c40018;
  --red-2:#a90015;
  color-scheme:light;
}
html[data-theme="dark"]{
  --bg:#07101f;
  --panel:#101828;
  --panel-2:#1d2939;
  --ink:#f8fafc;
  --text:#e7edf7;
  --muted:#cbd5e1;
  --line:#344054;
  --navy:#123b7a;
  --navy-2:#174a98;
  --red:#ff5a68;
  --red-2:#ff7a86;
  color-scheme:dark;
}
html,body{background:var(--bg)!important;color:var(--text)!important}
body{font-weight:500}
body.public-mode main,body.admin-mode main{background:var(--bg)!important;color:var(--text)!important}

/* Base chiara: nessun testo bianco su pannelli chiari */
html:not([data-theme="dark"]) :where(.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.table-wrap,.table,.mag-card,.mag-featured,.empty,.notice,.map-preview,.statusline div,.codebox,.plate-info-card,.plate-details,.ad-box){
  background:#ffffff!important;
  color:#172033!important;
  border-color:#cfd8e3!important;
}
html:not([data-theme="dark"]) :where(.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.table-wrap,.table,.mag-card,.mag-featured,.empty,.notice,.map-preview,.statusline div,.codebox,.plate-info-card,.plate-details,.ad-box) :where(h1,h2,h3,h4,h5,h6,p,li,td,th,label,legend,strong,b,small,span,em,summary){
  color:#172033!important;
}
html:not([data-theme="dark"]) .muted,
html:not([data-theme="dark"]) :where(.card,.managed-page-body,.mag-card,.mag-featured,.empty) .muted{color:#4b5b70!important}
html:not([data-theme="dark"]) .table th{background:#eef2f7!important;color:#26344c!important}
html:not([data-theme="dark"]) .table td{background:#ffffff!important;color:#172033!important}
html:not([data-theme="dark"]) input,html:not([data-theme="dark"]) select,html:not([data-theme="dark"]) textarea{background:#fff!important;color:#071326!important;border-color:#bdc8d6!important}
html:not([data-theme="dark"]) input::placeholder,html:not([data-theme="dark"]) textarea::placeholder{color:#667085!important;opacity:1}

/* Blocchi scuri: testo sempre chiaro */
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.plate-hero){
  background:#07162f!important;
  color:#ffffff!important;
  border-color:#07162f!important;
}
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.plate-hero) :where(h1,h2,h3,h4,h5,h6,p,li,td,th,label,legend,strong,b,small,span,em,a){
  color:#ffffff!important;
}
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.plate-hero) .muted{color:#e6edf7!important}
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.plate-hero) .btn.light{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.plate-hero) .btn.ghost{background:transparent!important;color:#ffffff!important;border-color:rgba(255,255,255,.75)!important}
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.plate-hero) .eyebrow{background:rgba(255,255,255,.13)!important;color:#ffffff!important}
.footer a{color:#ffffff!important;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}

/* Badge, pulsanti, pillole */
.eyebrow,.badge{background:#f8e7ea!important;color:#9b0013!important;border:1px solid #f1c6cc!important}
html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .badge{background:#3a1118!important;color:#ffd6dc!important;border-color:#7f1d2d!important}
.btn{background:#07162f!important;color:#ffffff!important;border:1px solid #07162f!important}
.btn.red{background:#c40018!important;color:#ffffff!important;border-color:#c40018!important}
.btn.light,.btn.ghost{background:#ffffff!important;color:#071326!important;border:1px solid #bdc8d6!important}
html[data-theme="dark"] .btn.light,html[data-theme="dark"] .btn.ghost{background:#1d2939!important;color:#f8fafc!important;border-color:#475467!important}
.pill{background:#eef2f7!important;color:#172033!important;border:1px solid #cfd8e3!important}
html[data-theme="dark"] .pill{background:#1d2939!important;color:#f8fafc!important;border-color:#475467!important}
.required{color:#c40018!important;font-weight:900}
html[data-theme="dark"] .required{color:#ff7a86!important}

/* Modalità scura coerente su tutto il sito */
html[data-theme="dark"] body,
html[data-theme="dark"] body.public-mode,
html[data-theme="dark"] body.admin-mode,
html[data-theme="dark"] main{background:#07101f!important;color:#e7edf7!important}
html[data-theme="dark"] :where(.site-header,.nav-panel){background:#0b1220!important;color:#f8fafc!important;border-color:#26364f!important}
html[data-theme="dark"] :where(.brand,.brand-text strong,.brand-text small,.links a,.theme-toggle,.menu-toggle){color:#f8fafc!important}
html[data-theme="dark"] .brand-logo{background:#ffffff!important;border-color:#475467!important}
html[data-theme="dark"] .theme-toggle,html[data-theme="dark"] .menu-toggle{background:#111827!important;border-color:#475467!important}
html[data-theme="dark"] .links a:hover,html[data-theme="dark"] .links a:focus{background:#1d2939!important}
html[data-theme="dark"] :where(.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.table-wrap,.table,.mag-card,.mag-featured,.empty,.notice,.map-preview,.statusline div,.codebox,.plate-info-card,.plate-details,.ad-box){
  background:#101828!important;
  color:#f8fafc!important;
  border-color:#344054!important;
}
html[data-theme="dark"] :where(.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.table-wrap,.table,.mag-card,.mag-featured,.empty,.notice,.map-preview,.statusline div,.codebox,.plate-info-card,.plate-details,.ad-box) :where(h1,h2,h3,h4,h5,h6,p,li,td,th,label,legend,strong,b,small,span,em,summary){
  color:#f8fafc!important;
}
html[data-theme="dark"] .muted,
html[data-theme="dark"] :where(.card,.managed-page-body,.mag-card,.mag-featured,.empty) .muted{color:#cbd5e1!important}
html[data-theme="dark"] .table th{background:#1d2939!important;color:#f8fafc!important;border-color:#344054!important}
html[data-theme="dark"] .table td{background:#101828!important;color:#f8fafc!important;border-color:#344054!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#111827!important;color:#f8fafc!important;border-color:#475467!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#cbd5e1!important;opacity:1}
html[data-theme="dark"] .notice{background:#2d210a!important;border-color:#b7791f!important;color:#fff7df!important}
html[data-theme="dark"] .ok{background:#092f1d!important;border-color:#2f9b64!important;color:#dcfce7!important}
html[data-theme="dark"] .badmsg{background:#3b0b0b!important;border-color:#b42318!important;color:#fee2e2!important}

/* Admin: niente testi invisibili in chiaro o in contrasto */
body.admin-mode .site-header{position:sticky;top:0;background:#ffffff!important;border-bottom:1px solid #cfd8e3!important}
body.admin-mode .adminbar{background:#07162f!important;color:#ffffff!important}
body.admin-mode .adminbar *{color:#ffffff!important}
body.admin-mode :where(.card,.top-slab,.table-wrap,.table,.form fieldset,.empty,.notice){background:#ffffff!important;color:#172033!important;border-color:#cfd8e3!important}
body.admin-mode :where(.card,.top-slab,.table-wrap,.table,.form fieldset,.empty,.notice) :where(h1,h2,h3,h4,p,li,td,th,label,legend,strong,b,small,span,em){color:#172033!important}
body.admin-mode .table th{background:#eef2f7!important;color:#26344c!important}
body.admin-mode .table td{background:#ffffff!important;color:#172033!important}
body.admin-mode .admin-page-head h1,body.admin-mode h1,body.admin-mode h2,body.admin-mode h3{color:#071326!important}
body.admin-mode .muted{color:#4b5b70!important}
html[data-theme="dark"] body.admin-mode .site-header{background:#0b1220!important;border-color:#26364f!important}
html[data-theme="dark"] body.admin-mode :where(.card,.top-slab,.table-wrap,.table,.form fieldset,.empty,.notice){background:#101828!important;color:#f8fafc!important;border-color:#344054!important}
html[data-theme="dark"] body.admin-mode :where(.card,.top-slab,.table-wrap,.table,.form fieldset,.empty,.notice) :where(h1,h2,h3,h4,p,li,td,th,label,legend,strong,b,small,span,em){color:#f8fafc!important}
html[data-theme="dark"] body.admin-mode .table th{background:#1d2939!important;color:#f8fafc!important}
html[data-theme="dark"] body.admin-mode .table td{background:#101828!important;color:#f8fafc!important}
html[data-theme="dark"] body.admin-mode .admin-page-head h1,html[data-theme="dark"] body.admin-mode h1,html[data-theme="dark"] body.admin-mode h2,html[data-theme="dark"] body.admin-mode h3{color:#f8fafc!important}
html[data-theme="dark"] body.admin-mode .muted{color:#cbd5e1!important}
html[data-theme="dark"] body.admin-mode .admin-nav-toggle,
html[data-theme="dark"] body.admin-mode .admin-exit,
html[data-theme="dark"] body.admin-mode .admin-status-mini{background:#111827!important;color:#f8fafc!important;border-color:#475467!important}
html[data-theme="dark"] body.admin-mode .admin-subnav,
html[data-theme="dark"] body.admin-mode .admin-subnav a{background:#101828!important;color:#f8fafc!important;border-color:#344054!important}

/* Articoli e home magazine */
.mag-hero{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);gap:28px;align-items:stretch}
.mag-hero-main{min-height:420px;display:flex;flex-direction:column;justify-content:center}
.mag-featured{box-shadow:0 14px 34px rgba(7,22,47,.09)!important}
.mag-featured h2,.mag-card h3{color:#071326!important}
.mag-featured p,.mag-card p{color:#344054!important}
html[data-theme="dark"] .mag-featured h2,html[data-theme="dark"] .mag-card h3{color:#f8fafc!important}
html[data-theme="dark"] .mag-featured p,html[data-theme="dark"] .mag-card p{color:#cbd5e1!important}

/* Tabelle e blocchi con overflow leggibile */
.table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
.table{min-width:640px}
.card{overflow-wrap:anywhere}

/* Miglioramento contrasto footer e newsletter */
.newsletter-box{border:1px solid #07162f!important}
.footer .brand-logo{background:#ffffff!important}
.footer .muted{color:#e6edf7!important}

/* Responsive sicuro */
@media(max-width:980px){
  .mag-hero{grid-template-columns:1fr}
  .mag-hero-main{min-height:auto}
  .header-inner{min-height:72px}
}
@media(max-width:760px){
  body{font-size:16px;line-height:1.48}
  .wrap,body.admin-mode .wrap{width:min(100% - 22px,1180px)!important}
  .top-slab,.managed-hero,.card,.newsletter-box{padding:18px!important}
  .mag-hero-main h1,h1{font-size:clamp(30px,10vw,42px)!important;line-height:1.04!important}
  h2{font-size:clamp(24px,7vw,32px)!important}
  .mag-grid,.grid2,.grid3,.grid4{grid-template-columns:1fr!important}
  .btn{width:auto;min-width:0}
  .actions .btn{flex:1 1 auto}
  .table{min-width:560px}
}

/* AMRI V10 - contrasto definitivo, menu admin, editor locale, banner base */
:root{
  --amri-bg:#f4f6fb;
  --amri-panel:#ffffff;
  --amri-ink:#071326;
  --amri-text:#172033;
  --amri-muted:#475467;
  --amri-line:#cfd8e3;
  --amri-red:#b51620;
  --amri-navy:#071326;
  --amri-blue:#0b2b63;
  --amri-focus:#f5c542;
}
html,body{background:var(--amri-bg)!important;color:var(--amri-text)!important}
body.public-mode main,body.admin-mode main{background:var(--amri-bg)!important;color:var(--amri-text)!important}
.site-header{background:#ffffff!important;color:var(--amri-ink)!important;border-bottom:1px solid var(--amri-line)!important;backdrop-filter:none!important}
.brand,.brand strong,.brand small,.links a,.theme-toggle,.menu-toggle{color:var(--amri-ink)!important}
.links a{border-radius:0!important}.links a:hover,.links a:focus{background:#eef2f7!important;color:#071326!important}
.nav-logout{background:#b51620!important;color:#fff!important;padding-inline:14px!important}
.theme-toggle,.menu-toggle{background:#fff!important;border:1px solid var(--amri-line)!important;border-radius:0!important;box-shadow:none!important}
.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.table-wrap,.table,.mag-card,.mag-featured,.empty,.notice,.newsletter-box,.ad-box,.map-preview,.statusline div,.codebox,.plate-info-card,.plate-details{background:#ffffff!important;color:var(--amri-text)!important;border:1px solid var(--amri-line)!important;border-radius:0!important;box-shadow:0 8px 22px rgba(7,19,38,.06)!important}
.card :where(h1,h2,h3,h4,h5,h6,p,li,td,th,label,legend,strong,b,small,span,em,summary),.top-slab :where(h1,h2,h3,p,span,strong),.managed-page-body :where(h1,h2,h3,p,li,strong,span),.mag-card :where(h1,h2,h3,p,span,strong),.mag-featured :where(h1,h2,h3,p,span,strong){color:var(--amri-text)!important}
h1,h2,h3,h4,h5,h6{color:var(--amri-ink)!important}.muted,.small{color:var(--amri-muted)!important}
.hero,.mag-hero-main,.newsletter-box{background:#071326!important;color:#ffffff!important;border-radius:0!important}.hero :where(h1,h2,h3,p,span,strong,a),.mag-hero-main :where(h1,h2,h3,p,span,strong,a),.newsletter-box :where(h1,h2,h3,p,span,strong,a){color:#ffffff!important}.newsletter-box .btn.red{background:#b51620!important;color:#fff!important}.newsletter-box .btn.light{background:#fff!important;color:#071326!important}
.btn{border-radius:0!important;box-shadow:none!important}.btn.light,.btn.ghost{background:#ffffff!important;color:#071326!important;border:1px solid var(--amri-line)!important}.btn.red,.admin-exit{background:#b51620!important;color:#fff!important}.btn.bad{background:#8a1111!important;color:#fff!important}.btn.warn{background:#9a6400!important;color:#fff!important}
.table{border-collapse:collapse!important}.table th{background:#eef2f7!important;color:#071326!important}.table td{background:#ffffff!important;color:#172033!important}.table th,.table td{border-bottom:1px solid var(--amri-line)!important}
input,select,textarea{background:#ffffff!important;color:#071326!important;border:1px solid #b8c4d2!important;border-radius:0!important;box-shadow:none!important}input::placeholder,textarea::placeholder{color:#667085!important;opacity:1!important}label,legend{color:#071326!important}.required{color:#b51620!important}
input:focus,select:focus,textarea:focus,button:focus,a:focus{outline:3px solid var(--amri-focus)!important;outline-offset:2px!important}

/* Admin: menu leggibile sempre */
body.admin-mode .site-header{position:sticky!important;top:0!important;background:#ffffff!important;color:#071326!important;z-index:1000!important}
body.admin-mode .header-inner{gap:18px!important;align-items:center!important;min-height:82px!important}
body.admin-mode .brand{min-width:250px!important;flex:0 0 auto!important}
body.admin-mode .nav-panel{flex:1 1 auto!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;background:#fff!important;color:#071326!important;border:0!important}
body.admin-mode .admin-nav{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;width:100%!important}
body.admin-mode .admin-nav-group{position:relative!important;display:inline-flex!important;align-items:center!important}
body.admin-mode .admin-nav-toggle{display:inline-flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:48px!important;padding:10px 14px!important;background:#ffffff!important;color:#071326!important;border:1px solid #cfd8e3!important;border-radius:0!important;font-weight:900!important;box-shadow:none!important;cursor:pointer!important}
body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,body.admin-mode .admin-nav-toggle:hover,body.admin-mode .admin-nav-toggle:focus{background:#071326!important;color:#ffffff!important;border-color:#071326!important}
body.admin-mode .admin-subnav{position:absolute!important;top:calc(100% + 8px)!important;left:0!important;min-width:260px!important;background:#ffffff!important;color:#071326!important;border:1px solid #cfd8e3!important;border-radius:0!important;box-shadow:0 22px 45px rgba(7,19,38,.18)!important;padding:8px!important;z-index:2000!important;display:none!important}
body.admin-mode .admin-nav-group:hover .admin-subnav,body.admin-mode .admin-nav-group:focus-within .admin-subnav,body.admin-mode .admin-nav-group.is-open .admin-subnav{display:block!important}
body.admin-mode .admin-subnav a{display:block!important;background:#ffffff!important;color:#071326!important;text-decoration:none!important;padding:12px 14px!important;border-bottom:1px solid #eef2f7!important;font-weight:850!important}
body.admin-mode .admin-subnav a:hover,body.admin-mode .admin-subnav a:focus,body.admin-mode .admin-subnav a.is-current{background:#071326!important;color:#ffffff!important}
body.admin-mode .admin-exit{display:inline-flex!important;align-items:center!important;min-height:48px!important;padding:10px 16px!important;border:1px solid #b51620!important;color:#fff!important;text-decoration:none!important;font-weight:900!important;border-radius:0!important}
body.admin-mode .adminbar{background:#071326!important;color:#ffffff!important}.admin-status-mini,.service-pill{border-radius:0!important;color:#071326!important;background:#fff!important;border:1px solid #cfd8e3!important}.service-pill.off{background:#fff4f4!important;color:#8a1111!important;border-color:#d9a6a6!important}.service-pill.on{background:#eefaf2!important;color:#0a5a30!important;border-color:#9ed6b2!important}

/* Modalità contrasto: niente testo invisibile */
html[data-theme="dark"] body,html[data-theme="dark"] body.public-mode,html[data-theme="dark"] body.admin-mode,html[data-theme="dark"] main{background:#07101f!important;color:#f8fafc!important}
html[data-theme="dark"] .site-header,html[data-theme="dark"] body.admin-mode .site-header{background:#0b1220!important;color:#f8fafc!important;border-color:#334155!important}
html[data-theme="dark"] .brand,html[data-theme="dark"] .brand strong,html[data-theme="dark"] .brand small,html[data-theme="dark"] .links a,html[data-theme="dark"] .theme-toggle,html[data-theme="dark"] .menu-toggle{color:#f8fafc!important}
html[data-theme="dark"] .theme-toggle,html[data-theme="dark"] .menu-toggle{background:#111827!important;border-color:#475467!important}
html[data-theme="dark"] :where(.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.table-wrap,.table,.mag-card,.mag-featured,.empty,.notice,.ad-box,.map-preview,.statusline div,.codebox,.plate-info-card,.plate-details){background:#101828!important;color:#f8fafc!important;border-color:#344054!important}
html[data-theme="dark"] :where(.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.table-wrap,.table,.mag-card,.mag-featured,.empty,.notice,.ad-box,.map-preview,.statusline div,.codebox,.plate-info-card,.plate-details) :where(h1,h2,h3,h4,h5,h6,p,li,td,th,label,legend,strong,b,small,span,em,summary){color:#f8fafc!important}
html[data-theme="dark"] .muted,html[data-theme="dark"] .small{color:#cbd5e1!important}html[data-theme="dark"] .table th{background:#1d2939!important;color:#f8fafc!important}html[data-theme="dark"] .table td{background:#101828!important;color:#f8fafc!important}html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#111827!important;color:#f8fafc!important;border-color:#475467!important}html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#cbd5e1!important}
html[data-theme="dark"] body.admin-mode .nav-panel{background:#0b1220!important;color:#f8fafc!important}html[data-theme="dark"] body.admin-mode .admin-nav-toggle{background:#111827!important;color:#f8fafc!important;border-color:#475467!important}html[data-theme="dark"] body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,html[data-theme="dark"] body.admin-mode .admin-nav-toggle:hover,html[data-theme="dark"] body.admin-mode .admin-nav-toggle:focus{background:#f8fafc!important;color:#071326!important;border-color:#f8fafc!important}html[data-theme="dark"] body.admin-mode .admin-subnav{background:#101828!important;color:#f8fafc!important;border-color:#344054!important}html[data-theme="dark"] body.admin-mode .admin-subnav a{background:#101828!important;color:#f8fafc!important;border-color:#344054!important}html[data-theme="dark"] body.admin-mode .admin-subnav a:hover,html[data-theme="dark"] body.admin-mode .admin-subnav a:focus,html[data-theme="dark"] body.admin-mode .admin-subnav a.is-current{background:#f8fafc!important;color:#071326!important}

/* Editor locale */
.editor-help{background:#eef2f7!important;color:#26344c!important;border:1px solid #cfd8e3!important;padding:10px 12px!important;margin:6px 0 10px!important;font-size:14px!important}.editor-toolbar{display:flex;gap:6px;flex-wrap:wrap;background:#f8fafc!important;border:1px solid #cfd8e3!important;padding:8px!important;margin:6px 0 0!important}.editor-toolbar button{background:#ffffff!important;color:#071326!important;border:1px solid #cfd8e3!important;border-radius:0!important;padding:8px 10px!important;font-weight:850!important;cursor:pointer!important}.editor-toolbar button:hover,.editor-toolbar button:focus{background:#071326!important;color:#ffffff!important}.editor-area{min-height:360px!important;font-family:inherit!important;line-height:1.55!important}.article-body blockquote,.managed-page-body blockquote{border-left:4px solid #b51620!important;margin:18px 0!important;padding:12px 16px!important;background:#f8fafc!important;color:#172033!important}
html[data-theme="dark"] .editor-help,html[data-theme="dark"] .editor-toolbar{background:#1d2939!important;color:#f8fafc!important;border-color:#475467!important}html[data-theme="dark"] .editor-toolbar button{background:#111827!important;color:#f8fafc!important;border-color:#475467!important}

/* Banner base */
.ad-base{display:grid;gap:7px;align-content:center;min-height:130px;padding:22px;border:2px solid #071326;background:#ffffff;color:#071326}.ad-base strong{font-size:clamp(22px,3vw,34px);line-height:1;color:inherit!important}.ad-base span{font-size:16px;color:inherit!important}.ad-base small{font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:inherit!important}.ad-base-horizontal{min-height:120px}.ad-base-vertical{min-height:420px}.ad-base-box{aspect-ratio:1/1}.ad-base-rosso{background:#b51620;color:#fff;border-color:#b51620}.ad-base-scuro{background:#071326;color:#fff;border-color:#071326}.ad-base-chiaro{background:#f8fafc;color:#071326;border-color:#cfd8e3}.ad-base-istituzionale{background:linear-gradient(90deg,#ffffff 0 65%,#071326 65% 100%);color:#071326}.ad-base-istituzionale small{color:#b51620!important}
html[data-theme="dark"] .ad-base{border-color:#f8fafc}.ad-label{background:#fff4f4!important;color:#8a1111!important;border-radius:0!important}

@media(max-width:1250px){body.admin-mode .menu-toggle{display:inline-grid!important;place-items:center!important}body.admin-mode .nav-panel{display:none!important;position:absolute!important;left:12px!important;right:12px!important;top:82px!important;background:#fff!important;border:1px solid #cfd8e3!important;padding:12px!important;box-shadow:0 18px 44px rgba(7,19,38,.18)!important;z-index:3000!important}body.admin-mode .nav-panel.is-open{display:block!important}body.admin-mode .admin-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}body.admin-mode .admin-nav-group{display:block!important}body.admin-mode .admin-subnav{position:static!important;display:none!important;box-shadow:none!important;margin-top:6px!important;min-width:0!important;width:100%!important}body.admin-mode .admin-nav-group.is-open .admin-subnav,body.admin-mode .admin-nav-group:focus-within .admin-subnav{display:block!important}body.admin-mode .admin-exit{width:100%!important;justify-content:center!important}}
@media(max-width:760px){.wrap{width:min(100% - 24px,1180px)!important}.header-inner{min-height:74px!important}.brand{min-width:0!important}.brand-logo{width:58px!important;height:58px!important;border-radius:0!important}.brand-logo img{width:52px!important;height:52px!important}.brand-text strong{font-size:20px!important}.brand-text small{font-size:12px!important}.menu-toggle{display:inline-grid!important}.nav-panel{display:none;position:absolute;left:12px;right:12px;top:74px;background:#fff;border:1px solid #cfd8e3;padding:12px;z-index:3000;box-shadow:0 18px 44px rgba(7,19,38,.18)}.nav-panel.is-open{display:block}.links{display:grid!important;gap:4px!important}.links a{display:block!important;padding:12px!important}.row,.grid2,.grid3,.grid4,.mag-grid{grid-template-columns:1fr!important}.top-slab,.managed-hero,.card,.newsletter-box{padding:18px!important}.top-slab h1,.managed-hero h1,.mag-hero-main h1{font-size:34px!important;line-height:1.05!important}.editor-area{min-height:300px!important}body.admin-mode .admin-nav{grid-template-columns:1fr!important}}


/* AMRI v11: guardia finale contrasto globale */
html,body{background:var(--bg)!important;color:var(--text)!important}
.site-header,.site-header *{color:var(--ink)!important}
.site-header{background:rgba(255,255,255,.98)!important;border-bottom:1px solid var(--line)!important}
html[data-theme="dark"] .site-header{background:rgba(11,18,32,.98)!important;border-bottom-color:#334155!important}

/* superfici scure sempre leggibili */
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.hero-card,.plate-hero){background-color:var(--navy)!important;color:#ffffff!important}
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.hero-card,.plate-hero) :where(h1,h2,h3,h4,h5,h6,p,li,small,strong,b,em,span,label,legend){color:#ffffff!important}
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.hero-card,.plate-hero) a:not(.btn){color:#ffffff!important}
:where(.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.hero-card,.plate-hero) .muted{color:#e6edf7!important}

/* badge e eyebrow leggibili */
.hero .eyebrow,.mag-hero-main .eyebrow,.newsletter-box .eyebrow,.footer .eyebrow,.hero-card .eyebrow{
  background:#ffffff!important;color:#8a1220!important;border:1px solid #ffffff!important;
}
.badge,.eyebrow{font-weight:900!important}

/* pulsanti: chiari e leggibili ovunque */
.btn,.btn:visited{font-weight:900!important}
.btn.red,.btn.red:visited,.admin-exit,.admin-exit:visited{background:#b51620!important;border:1px solid #b51620!important;color:#ffffff!important}
.btn.bad,.btn.bad:visited{background:#8a1111!important;border:1px solid #8a1111!important;color:#ffffff!important}
.btn.warn,.btn.warn:visited{background:#9a6400!important;border:1px solid #9a6400!important;color:#ffffff!important}
.btn.light,.btn.light:visited,.btn.ghost,.btn.ghost:visited,
.hero .btn.ghost,.mag-hero-main .btn.ghost,.newsletter-box .btn.ghost,.footer .btn.ghost,
.hero .btn.light,.mag-hero-main .btn.light,.newsletter-box .btn.light,.footer .btn.light{
  background:#ffffff!important;color:#071326!important;border:1px solid #ffffff!important;
}
html[data-theme="dark"] .btn.light,html[data-theme="dark"] .btn.light:visited,
html[data-theme="dark"] .btn.ghost,html[data-theme="dark"] .btn.ghost:visited,
html[data-theme="dark"] .hero .btn.ghost,html[data-theme="dark"] .mag-hero-main .btn.ghost,
html[data-theme="dark"] .newsletter-box .btn.ghost,html[data-theme="dark"] .footer .btn.ghost{
  background:#f8fafc!important;color:#071326!important;border-color:#f8fafc!important;
}
button[data-install-app][hidden]{display:none!important}
button[data-install-app]:not([hidden]){display:inline-flex!important}

/* card, box, tabelle e form su chiaro */
.card,.top-slab,.table,.table-wrap,.form fieldset,.notice,.empty,.mag-card,.mag-featured,.article-layout,.managed-page-body,.map-card,.ad-box{
  background:#ffffff!important;color:#172033!important;border-color:#cfd8e3!important;
}
.card *, .top-slab *, .table *, .table-wrap *, .form fieldset *, .empty *, .mag-card *, .mag-featured *, .article-layout *, .managed-page-body *, .map-card *, .ad-box *{
  color:inherit;
}
.table th{background:#eef2f7!important;color:#344054!important}
input,select,textarea{background:#ffffff!important;color:#071326!important;border-color:#cbd5e1!important}
input::placeholder,textarea::placeholder{color:#6b7280!important}

/* footer link e pulsanti */
.footer{background:#07162f!important;color:#ffffff!important}
.footer a:not(.btn){color:#ffffff!important;text-decoration:underline!important;text-underline-offset:4px!important}
.footer .btn,.footer button{min-width:220px}
.footer .brand-logo{background:#ffffff!important;border-color:#ffffff!important}

/* home hero e featured */
.mag-hero-main,.hero{background:linear-gradient(135deg,#061a40 0%,#08285d 58%,#071a3d 100%)!important}
.mag-hero-main h1,.hero h1{color:#ffffff!important}
.mag-hero-main p,.hero p,.hero-card p{color:#edf3ff!important}
.mag-featured .eyebrow,.mag-card .eyebrow,.section-head .eyebrow{background:#fff1f1!important;color:#8a1220!important;border:1px solid #f0cdd1!important}

/* admin menu e macro menu */
body.admin-mode .site-header,body.admin-mode .site-header *{color:#071326!important}
body.admin-mode .site-header{background:#ffffff!important;border-bottom:1px solid #d8dee9!important}
body.admin-mode .menu-toggle{background:#ffffff!important;color:#071326!important;border-color:#cbd5e1!important}
body.admin-mode .nav-panel{background:#ffffff!important;border-color:#d8dee9!important}
body.admin-mode .admin-nav-toggle,
body.admin-mode .admin-exit,
body.admin-mode .nav-panel .theme-toggle,
body.admin-mode .admin-subnav a{
  background:#ffffff!important;color:#071326!important;border:1px solid #cbd5e1!important;
}
body.admin-mode .admin-nav-group.is-active > .admin-nav-toggle,
body.admin-mode .admin-nav-group.is-open > .admin-nav-toggle,
body.admin-mode .admin-nav-toggle[aria-expanded="true"],
body.admin-mode .admin-nav-toggle:hover,
body.admin-mode .admin-nav-toggle:focus{
  background:#07162f!important;color:#ffffff!important;border-color:#07162f!important;
}
body.admin-mode .admin-subnav{background:#ffffff!important;border:1px solid #d8dee9!important;box-shadow:0 12px 30px rgba(6,31,74,.12)!important}
body.admin-mode .admin-subnav a:hover,body.admin-mode .admin-subnav a:focus{background:#eef2f7!important;color:#071326!important}
body.admin-mode .adminbar,body.admin-mode .adminbar *{background:#07162f!important;color:#ffffff!important}
body.admin-mode .admin-status-mini{background:#0e2a57!important;color:#ffffff!important;border-color:#5f7391!important}

/* admin dark */
html[data-theme="dark"] body.admin-mode .site-header,html[data-theme="dark"] body.admin-mode .nav-panel{background:#0f172a!important;border-color:#334155!important}
html[data-theme="dark"] body.admin-mode .site-header *,html[data-theme="dark"] body.admin-mode .nav-panel *{color:#f8fafc!important}
html[data-theme="dark"] body.admin-mode .admin-nav-toggle,
html[data-theme="dark"] body.admin-mode .admin-exit,
html[data-theme="dark"] body.admin-mode .nav-panel .theme-toggle,
html[data-theme="dark"] body.admin-mode .admin-subnav,
html[data-theme="dark"] body.admin-mode .admin-subnav a{
  background:#111827!important;color:#f8fafc!important;border-color:#475467!important;
}
html[data-theme="dark"] body.admin-mode .admin-nav-group.is-active > .admin-nav-toggle,
html[data-theme="dark"] body.admin-mode .admin-nav-group.is-open > .admin-nav-toggle,
html[data-theme="dark"] body.admin-mode .admin-nav-toggle[aria-expanded="true"],
html[data-theme="dark"] body.admin-mode .admin-nav-toggle:hover,
html[data-theme="dark"] body.admin-mode .admin-nav-toggle:focus{
  background:#f8fafc!important;color:#071326!important;border-color:#f8fafc!important;
}
html[data-theme="dark"] body.admin-mode .card,
html[data-theme="dark"] body.admin-mode .table,
html[data-theme="dark"] body.admin-mode .table-wrap,
html[data-theme="dark"] body.admin-mode .form fieldset,
html[data-theme="dark"] body.admin-mode .top-slab{
  background:#0f172a!important;color:#f8fafc!important;border-color:#334155!important;
}
html[data-theme="dark"] body.admin-mode .table th{background:#1f2937!important;color:#f8fafc!important}
html[data-theme="dark"] body.admin-mode input,
html[data-theme="dark"] body.admin-mode select,
html[data-theme="dark"] body.admin-mode textarea{background:#111827!important;color:#f8fafc!important;border-color:#475467!important}

/* responsive panel */
@media (max-width:1500px){
  body.admin-mode .nav-panel{top:78px!important}
}
@media (max-width:900px){
  .footer .btn,.footer button,.newsletter-box .btn,.mag-hero-main .btn,.hero .btn{width:100%!important;min-width:0!important}
}


/* =========================================================
   AMRI v12: CONTRAST RESET DEFINITIVO
   Obiettivo: eliminare testi scuri su fondo scuro e testi chiari su fondo chiaro.
   La vecchia modalità dark viene neutralizzata. Il pulsante usa data-theme="contrast".
   ========================================================= */
:root,
html[data-theme="light"]{
  --amri-bg:#f4f6fa;
  --amri-surface:#ffffff;
  --amri-surface-2:#eef2f7;
  --amri-text:#111827;
  --amri-heading:#061126;
  --amri-muted:#46576d;
  --amri-line:#cfd8e3;
  --amri-navy:#07162f;
  --amri-navy-2:#0b2d63;
  --amri-red:#b51620;
  --bg:#f4f6fa!important;
  --panel:#ffffff!important;
  --panel-2:#eef2f7!important;
  --ink:#061126!important;
  --text:#111827!important;
  --muted:#46576d!important;
  --line:#cfd8e3!important;
  --navy:#07162f!important;
  --red:#b51620!important;
  color-scheme:light!important;
}

/* vecchia dark e nuova contrast: stessi colori, alta leggibilità */
html[data-theme="dark"],
html[data-theme="contrast"]{
  --amri-bg:#07101f;
  --amri-surface:#101827;
  --amri-surface-2:#1f2937;
  --amri-text:#f8fafc;
  --amri-heading:#ffffff;
  --amri-muted:#d7e0ee;
  --amri-line:#64748b;
  --amri-navy:#07101f;
  --amri-navy-2:#0f172a;
  --amri-red:#ff5b67;
  --bg:#07101f!important;
  --panel:#101827!important;
  --panel-2:#1f2937!important;
  --ink:#ffffff!important;
  --text:#f8fafc!important;
  --muted:#d7e0ee!important;
  --line:#64748b!important;
  --navy:#07101f!important;
  --red:#ff5b67!important;
  color-scheme:dark!important;
}

html,body{background:var(--amri-bg)!important;color:var(--amri-text)!important}
main{background:var(--amri-bg)!important;color:var(--amri-text)!important}
body :where(h1,h2,h3,h4,h5,h6){color:var(--amri-heading)!important}
body :where(p,li,dt,dd,label,legend,td,th,span,small,strong,b,em,div){color:inherit}
body :where(a:not(.btn):not(.admin-nav-toggle):not(.admin-exit)){color:var(--amri-heading)!important}
.muted,.article-meta{color:var(--amri-muted)!important}

/* header pubblico sempre leggibile */
.site-header{background:var(--amri-surface)!important;border-bottom:1px solid var(--amri-line)!important;backdrop-filter:none!important}
.site-header,.site-header *{color:var(--amri-heading)!important}
.brand-text strong{color:var(--amri-heading)!important}.brand-text small{color:var(--amri-muted)!important}
.links a{color:var(--amri-heading)!important;background:transparent!important}
.links a:hover,.links a:focus{background:var(--amri-surface-2)!important;color:var(--amri-heading)!important}
.menu-toggle,.theme-toggle{background:var(--amri-surface)!important;color:var(--amri-heading)!important;border:1px solid var(--amri-line)!important}
.nav-panel{background:var(--amri-surface)!important;color:var(--amri-heading)!important}
html[data-theme="dark"] .site-header,html[data-theme="contrast"] .site-header{background:#07101f!important;border-color:#334155!important}
html[data-theme="dark"] .nav-panel,html[data-theme="contrast"] .nav-panel{background:#07101f!important;border-color:#64748b!important}

/* superfici chiare/scure coerenti */
.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.notice,.empty,.table-wrap,.table,.mag-card,.mag-featured,.article-layout,.map-card,.ad-box,.editor-toolbar,.article-pro{
  background:var(--amri-surface)!important;
  color:var(--amri-text)!important;
  border-color:var(--amri-line)!important;
}
.card :where(h1,h2,h3,h4,h5,h6),.top-slab :where(h1,h2,h3),.managed-page-body :where(h1,h2,h3),.article-layout :where(h1,h2,h3),.article-pro :where(h1,h2,h3),.mag-card :where(h1,h2,h3),.mag-featured :where(h1,h2,h3){color:var(--amri-heading)!important}
.card :where(p,li,label,td,th,strong,b,span,small),.top-slab :where(p,li,label,td,th,strong,b,span,small),.managed-page-body :where(p,li,label,td,th,strong,b,span,small),.article-layout :where(p,li,label,td,th,strong,b,span,small),.article-pro :where(p,li,label,td,th,strong,b,span,small),.mag-card :where(p,li,label,td,th,strong,b,span,small),.mag-featured :where(p,li,label,td,th,strong,b,span,small){color:var(--amri-text)!important}
.table th{background:var(--amri-surface-2)!important;color:var(--amri-heading)!important}
.table td{background:var(--amri-surface)!important;color:var(--amri-text)!important}

/* moduli, area utente, admin: etichette e input leggibili */
.form label,label,.checks label{color:var(--amri-heading)!important}
input,select,textarea{
  background:var(--amri-surface)!important;
  color:var(--amri-heading)!important;
  border:1px solid var(--amri-line)!important;
  -webkit-text-fill-color:var(--amri-heading)!important;
}
input::placeholder,textarea::placeholder{color:var(--amri-muted)!important;opacity:1!important;-webkit-text-fill-color:var(--amri-muted)!important}
input[type="checkbox"]{accent-color:#d94b58!important;-webkit-text-fill-color:initial!important}
.required{color:#ff5b67!important}

/* sezioni scure: testo sempre bianco */
.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.hero-card,.plate-hero{
  background:#07162f!important;
  color:#ffffff!important;
  border-color:#334155!important;
}
.hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),
.mag-hero-main :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),
.newsletter-box :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),
.footer :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),
.adminbar :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),
.hero-card :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),
.plate-hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small){color:#ffffff!important}
.footer a:not(.btn),.adminbar a:not(.btn),.hero a:not(.btn),.mag-hero-main a:not(.btn),.newsletter-box a:not(.btn){color:#ffffff!important;text-decoration:underline!important;text-underline-offset:4px!important}
.footer .brand-logo{background:#ffffff!important;border-color:#ffffff!important}

/* badge */
.eyebrow,.badge{background:#fff1f1!important;color:#8a1220!important;border:1px solid #e7b6bd!important}
.hero .eyebrow,.mag-hero-main .eyebrow,.newsletter-box .eyebrow,.footer .eyebrow{background:#ffffff!important;color:#8a1220!important;border-color:#ffffff!important}

/* pulsanti */
.btn{border-radius:0!important;box-shadow:none!important;color:#ffffff!important;background:#07162f!important;border:1px solid #07162f!important}
.btn.red,.admin-exit{background:#b51620!important;border-color:#b51620!important;color:#ffffff!important}
.btn.light,.btn.ghost,.hero .btn.light,.hero .btn.ghost,.mag-hero-main .btn.light,.mag-hero-main .btn.ghost,.newsletter-box .btn.light,.newsletter-box .btn.ghost,.footer .btn.light,.footer .btn.ghost{
  background:#ffffff!important;color:#071326!important;border:1px solid #ffffff!important;
}
html[data-theme="dark"] .btn.light,html[data-theme="dark"] .btn.ghost,
html[data-theme="contrast"] .btn.light,html[data-theme="contrast"] .btn.ghost{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}
button[data-install-app][hidden]{display:none!important}
button[data-install-app]:not([hidden]){display:inline-flex!important;background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}

/* admin macro menu */
body.admin-mode .site-header,body.admin-mode .nav-panel{background:var(--amri-surface)!important;color:var(--amri-heading)!important;border-color:var(--amri-line)!important}
body.admin-mode .site-header *{color:var(--amri-heading)!important}
body.admin-mode .admin-nav-toggle,
body.admin-mode .admin-subnav a,
body.admin-mode .theme-toggle{
  background:var(--amri-surface)!important;color:var(--amri-heading)!important;border:1px solid var(--amri-line)!important;
}
body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,
body.admin-mode .admin-nav-group.is-open>.admin-nav-toggle,
body.admin-mode .admin-nav-toggle[aria-expanded="true"],
body.admin-mode .admin-nav-toggle:hover,
body.admin-mode .admin-nav-toggle:focus{
  background:#07162f!important;color:#ffffff!important;border-color:#07162f!important;
}
body.admin-mode .admin-subnav{background:var(--amri-surface)!important;border:1px solid var(--amri-line)!important;box-shadow:none!important}
body.admin-mode .admin-subnav a:hover,body.admin-mode .admin-subnav a:focus{background:var(--amri-surface-2)!important;color:var(--amri-heading)!important}
body.admin-mode .adminbar,body.admin-mode .adminbar *{background:#07162f!important;color:#ffffff!important}
body.admin-mode .admin-status-mini{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}
html[data-theme="dark"] body.admin-mode .admin-status-mini,html[data-theme="contrast"] body.admin-mode .admin-status-mini{background:#ffffff!important;color:#071326!important}

/* area utente e pagine riservate: correzione specifica dei testi invisibili */
html[data-theme="dark"] main :where(h1,h2,h3,h4,h5,h6,label,legend,p,li,strong,b,span,small),
html[data-theme="contrast"] main :where(h1,h2,h3,h4,h5,h6,label,legend,p,li,strong,b,span,small){color:#ffffff!important}
html[data-theme="dark"] main .card :where(h1,h2,h3,h4,h5,h6,label,legend,p,li,strong,b,span,small),
html[data-theme="contrast"] main .card :where(h1,h2,h3,h4,h5,h6,label,legend,p,li,strong,b,span,small){color:#ffffff!important}
html[data-theme="dark"] main .card,html[data-theme="contrast"] main .card,
html[data-theme="dark"] main .form fieldset,html[data-theme="contrast"] main .form fieldset{
  background:#101827!important;color:#ffffff!important;border-color:#64748b!important;
}
html[data-theme="dark"] main input,html[data-theme="dark"] main select,html[data-theme="dark"] main textarea,
html[data-theme="contrast"] main input,html[data-theme="contrast"] main select,html[data-theme="contrast"] main textarea{
  background:#0f172a!important;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;border-color:#64748b!important;
}
html[data-theme="dark"] main input::placeholder,html[data-theme="dark"] main textarea::placeholder,
html[data-theme="contrast"] main input::placeholder,html[data-theme="contrast"] main textarea::placeholder{color:#d7e0ee!important;-webkit-text-fill-color:#d7e0ee!important}

/* se in una sezione scura ci sono bottoni chiari o input, non diventano invisibili */
.hero input,.hero select,.hero textarea,.mag-hero-main input,.mag-hero-main select,.mag-hero-main textarea,.newsletter-box input,.newsletter-box select,.newsletter-box textarea,.footer input,.footer select,.footer textarea{
  background:#ffffff!important;color:#071326!important;-webkit-text-fill-color:#071326!important;border-color:#ffffff!important;
}

@media(max-width:900px){
  .nav-panel{box-shadow:none!important}
  .btn,.theme-toggle{width:100%;justify-content:center}
  body.admin-mode .admin-nav{grid-template-columns:1fr!important}
}


/* AMRI v13: stabilizzazione definitiva contrasto e leggibilità
   Questa sezione prevale su tutte le regole precedenti. */
html, html[data-theme="light"], html[data-theme="contrast"]{
  --amri-bg:#f4f6fa;
  --amri-surface:#ffffff;
  --amri-surface-2:#eef2f7;
  --amri-heading:#071326;
  --amri-text:#172033;
  --amri-muted:#526174;
  --amri-line:#cfd8e3;
  --amri-navy:#07162f;
  --amri-red:#b51620;
  --amri-focus:#f4b400;
  --bg:var(--amri-bg);
  --panel:var(--amri-surface);
  --panel-2:var(--amri-surface-2);
  --ink:var(--amri-heading);
  --text:var(--amri-text);
  --muted:var(--amri-muted);
  --line:var(--amri-line);
  --navy:var(--amri-navy);
  --red:var(--amri-red);
  color-scheme:light!important;
}
html[data-theme="contrast"]{
  --amri-bg:#ffffff;
  --amri-surface:#ffffff;
  --amri-surface-2:#f1f5f9;
  --amri-heading:#000000;
  --amri-text:#000000;
  --amri-muted:#1f2937;
  --amri-line:#6b7280;
  --amri-navy:#000000;
  --amri-red:#a00012;
}
html[data-theme="dark"]{color-scheme:light!important}
html[data-theme="dark"] body{background:var(--amri-bg)!important;color:var(--amri-text)!important}

body{background:var(--amri-bg)!important;color:var(--amri-text)!important}
body :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b){color:var(--amri-heading)!important}
body :where(p,li,td,th,small,span,em){color:inherit}
a{color:#071326!important}
.muted{color:var(--amri-muted)!important}

/* Superfici chiare */
.card,.top-slab,.managed-hero,.managed-page-body,.article-layout,.mag-featured,.mag-card,.table-wrap,.form fieldset,.empty,.notice,.map-card,.ad-box,.statusline div,.codebox{
  background:var(--amri-surface)!important;
  color:var(--amri-text)!important;
  border:1px solid var(--amri-line)!important;
  box-shadow:none!important;
  border-radius:0!important;
}
.card :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b),.top-slab :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b),.managed-hero :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b),.managed-page-body :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b),.article-layout :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b),.mag-featured :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b),.mag-card :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b),.form fieldset :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b){color:var(--amri-heading)!important}
.card :where(p,li,span,small,em),.top-slab :where(p,li,span,small,em),.managed-hero :where(p,li,span,small,em),.managed-page-body :where(p,li,span,small,em),.article-layout :where(p,li,span,small,em),.mag-featured :where(p,li,span,small,em),.mag-card :where(p,li,span,small,em),.form fieldset :where(p,li,span,small,em){color:var(--amri-text)!important}

/* Superfici scure */
.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.plate-hero,.hero-card{
  background:#07162f!important;
  color:#ffffff!important;
  border-color:#07162f!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,span,small,em),.mag-hero-main :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,span,small,em),.newsletter-box :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,span,small,em),.footer :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,span,small,em),.adminbar :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,span,small,em),.plate-hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,span,small,em),.hero-card :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,span,small,em){color:#ffffff!important}
.hero a:not(.btn),.mag-hero-main a:not(.btn),.newsletter-box a:not(.btn),.footer a:not(.btn),.adminbar a:not(.btn){color:#ffffff!important;text-decoration:underline!important;text-underline-offset:4px!important}

/* Header pubblico */
.site-header{background:#ffffff!important;color:#071326!important;border-bottom:1px solid var(--amri-line)!important;backdrop-filter:none!important}
.site-header *{color:#071326!important}.site-header .brand-logo{background:#ffffff!important}.links a{background:transparent!important;color:#071326!important;border:0!important}.links a:hover,.links a:focus{background:#eef2f7!important;color:#071326!important}.links .nav-logout{background:#b51620!important;color:#ffffff!important;padding:9px 13px!important}
.theme-toggle,.menu-toggle{background:#ffffff!important;color:#071326!important;border:1px solid var(--amri-line)!important;border-radius:0!important;box-shadow:none!important}

/* Pulsanti */
.btn,.btn:visited{border-radius:0!important;box-shadow:none!important;font-weight:900!important;text-decoration:none!important}
.btn.red,.btn.red:visited,.admin-exit,.admin-exit:visited{background:#b51620!important;color:#ffffff!important;border:1px solid #b51620!important}
.btn.light,.btn.light:visited,.btn.ghost,.btn.ghost:visited,.app-install-link,.app-install-button{
  background:#ffffff!important;color:#071326!important;border:1px solid var(--amri-line)!important;
}
.hero .btn.light,.hero .btn.ghost,.mag-hero-main .btn.light,.mag-hero-main .btn.ghost,.newsletter-box .btn.light,.newsletter-box .btn.ghost,.footer .btn.light,.footer .btn.ghost{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}

/* Badge */
.eyebrow,.badge,.mag-featured .eyebrow,.mag-card .eyebrow,.section-head .eyebrow{background:#fff1f1!important;color:#8a1220!important;border:1px solid #efc9ce!important;border-radius:0!important}
.hero .eyebrow,.mag-hero-main .eyebrow,.newsletter-box .eyebrow,.footer .eyebrow{background:#ffffff!important;color:#8a1220!important;border-color:#ffffff!important}

/* Moduli */
input,select,textarea{background:#ffffff!important;color:#071326!important;-webkit-text-fill-color:#071326!important;border:1px solid var(--amri-line)!important;border-radius:0!important;box-shadow:none!important}
input::placeholder,textarea::placeholder{color:#6b7280!important;-webkit-text-fill-color:#6b7280!important}
input[type="checkbox"]{accent-color:#b51620!important}
.checks label,.form label{color:#071326!important}.required{color:#b51620!important}

/* Tabelle */
.table{background:#ffffff!important;color:#172033!important;border-collapse:collapse!important}.table th{background:#eef2f7!important;color:#344054!important}.table td{background:#ffffff!important;color:#172033!important}.table th,.table td{border-bottom:1px solid var(--amri-line)!important}

/* Area utente */
.subnav a{background:#ffffff!important;color:#071326!important;border:1px solid var(--amri-line)!important;border-radius:0!important;text-decoration:none!important}
.subnav a.active,.subnav a:hover,.subnav a:focus{background:#07162f!important;color:#ffffff!important;border-color:#07162f!important}
.subnav a.active *,.subnav a:hover *,.subnav a:focus *{color:#ffffff!important}
.back-link{color:#071326!important}

/* Admin: menu stabile */
body.admin-mode .site-header{background:#ffffff!important;color:#071326!important;border-bottom:1px solid var(--amri-line)!important}
body.admin-mode .header-inner{align-items:flex-start!important;min-height:auto!important;padding:12px 0!important}
body.admin-mode .brand{min-width:280px!important;align-self:flex-start!important}
body.admin-mode .nav-panel{display:flex!important;align-items:flex-start!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;position:static!important}
body.admin-mode .admin-nav{display:flex!important;align-items:flex-start!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;width:auto!important}
body.admin-mode .admin-direct,body.admin-mode .admin-nav-toggle,body.admin-mode .admin-exit,body.admin-mode .theme-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;padding:9px 14px!important;background:#ffffff!important;color:#071326!important;border:1px solid var(--amri-line)!important;border-radius:0!important;text-decoration:none!important;font-weight:900!important;line-height:1.1!important;box-shadow:none!important;white-space:nowrap!important}
body.admin-mode .admin-direct.is-current,body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,body.admin-mode .admin-nav-toggle:hover,body.admin-mode .admin-nav-toggle:focus,body.admin-mode .admin-nav-toggle[aria-expanded="true"]{background:#07162f!important;color:#ffffff!important;border-color:#07162f!important}
body.admin-mode .admin-subnav{position:absolute!important;top:calc(100% + 6px)!important;left:0!important;min-width:260px!important;display:none!important;background:#ffffff!important;color:#071326!important;border:1px solid var(--amri-line)!important;box-shadow:0 14px 30px rgba(7,19,38,.16)!important;padding:6px!important;z-index:9999!important;border-radius:0!important}
body.admin-mode .admin-nav-group{position:relative!important}
body.admin-mode .admin-nav-group.is-open .admin-subnav,body.admin-mode .admin-nav-group:hover .admin-subnav,body.admin-mode .admin-nav-group:focus-within .admin-subnav{display:block!important}
body.admin-mode .admin-subnav a{display:block!important;background:#ffffff!important;color:#071326!important;border-bottom:1px solid #eef2f7!important;padding:11px 12px!important;text-decoration:none!important;font-weight:850!important;border-radius:0!important}
body.admin-mode .admin-subnav a:hover,body.admin-mode .admin-subnav a:focus,body.admin-mode .admin-subnav a.is-current{background:#07162f!important;color:#ffffff!important}
body.admin-mode .admin-exit{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important}
body.admin-mode .adminbar{background:#07162f!important;color:#ffffff!important}.adminbar .wrap{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;flex-wrap:wrap!important}.admin-status-mini{background:#ffffff!important;color:#071326!important;border:1px solid #ffffff!important;padding:7px 12px!important}.admin-status-mini *{color:#071326!important}
body.admin-mode main{background:var(--amri-bg)!important;color:var(--amri-text)!important}
body.admin-mode main :where(h1,h2,h3,h4,h5,h6,label,legend,strong,b){color:#071326!important}
body.admin-mode main :where(p,li,td,th,span,small,em){color:#172033!important}

/* Footer e installazione app */
.footer .app-install-link{display:inline-flex!important;margin-top:8px!important}.footer .app-install-button{display:none!important}.footer .brand-logo{background:#ffffff!important;border-color:#ffffff!important}.footer img{background:#ffffff!important}

/* Contrasto: resta chiaro ma più netto */
html[data-theme="contrast"] body{background:#ffffff!important;color:#000000!important}
html[data-theme="contrast"] .card,html[data-theme="contrast"] .top-slab,html[data-theme="contrast"] .managed-hero,html[data-theme="contrast"] .managed-page-body,html[data-theme="contrast"] .article-layout,html[data-theme="contrast"] .mag-featured,html[data-theme="contrast"] .mag-card,html[data-theme="contrast"] .table-wrap,html[data-theme="contrast"] .form fieldset{background:#ffffff!important;color:#000000!important;border-color:#000000!important}
html[data-theme="contrast"] .btn.light,html[data-theme="contrast"] .btn.ghost,html[data-theme="contrast"] .theme-toggle{background:#ffffff!important;color:#000000!important;border-color:#000000!important}
html[data-theme="contrast"] .hero,html[data-theme="contrast"] .mag-hero-main,html[data-theme="contrast"] .newsletter-box,html[data-theme="contrast"] .footer,html[data-theme="contrast"] .adminbar{background:#000000!important;color:#ffffff!important}
html[data-theme="contrast"] .subnav a.active,html[data-theme="contrast"] body.admin-mode .admin-direct.is-current,html[data-theme="contrast"] body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle{background:#000000!important;color:#ffffff!important;border-color:#000000!important}

@media(max-width:1250px){
  body.admin-mode .menu-toggle{display:inline-grid!important;place-items:center!important}
  body.admin-mode .nav-panel{display:none!important;position:absolute!important;left:12px!important;right:12px!important;top:82px!important;background:#ffffff!important;border:1px solid var(--amri-line)!important;padding:12px!important;box-shadow:0 18px 44px rgba(7,19,38,.18)!important;z-index:9999!important}
  body.admin-mode .nav-panel.is-open{display:block!important}
  body.admin-mode .admin-nav{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important}
  body.admin-mode .admin-direct,body.admin-mode .admin-nav-toggle,body.admin-mode .admin-exit,body.admin-mode .theme-toggle{width:100%!important;justify-content:space-between!important;text-align:left!important}
  body.admin-mode .admin-subnav{position:static!important;min-width:0!important;width:100%!important;box-shadow:none!important;margin-top:6px!important}
}
@media(max-width:760px){
  .wrap{width:min(100% - 24px,1180px)!important}.grid2,.grid3,.grid4,.row,.mag-grid{grid-template-columns:1fr!important}.btn{width:100%!important}.site-header .header-inner{align-items:flex-start!important}.nav-panel{background:#ffffff!important}
}

/* AMRI v14: reset contrasto, menu sticky e leggerezza visiva */
html,body{background:#f4f6fa!important;color:#172033!important;color-scheme:light!important}
body{font-weight:400!important;line-height:1.5!important}
p,li,td,th,label,legend,input,select,textarea,small,span{font-weight:400!important}
strong,b{font-weight:700!important}
h1,h2,h3,h4{font-weight:800!important;color:#071326!important}
.links a,.btn,.theme-toggle,.subnav a,.admin-nav-toggle,.admin-direct,.admin-exit{font-weight:700!important}

/* Header sempre visibile e sticky */
.site-header{position:sticky!important;top:0!important;z-index:10000!important;background:#ffffff!important;color:#071326!important;border-bottom:1px solid #cfd8e3!important;box-shadow:0 2px 10px rgba(7,19,38,.06)!important;backdrop-filter:none!important}
.site-header *{color:#071326!important}.header-inner{min-height:70px!important;gap:14px!important}.brand{gap:10px!important;min-width:260px!important}.brand-logo{width:60px!important;height:60px!important;border-radius:0!important;background:#fff!important}.brand-logo img{width:54px!important;height:54px!important}.brand-text strong{font-size:22px!important;letter-spacing:.02em!important;line-height:1!important;color:#071326!important}.brand-text small{display:block!important;margin-top:3px!important;color:#071326!important;font-size:13px!important;line-height:1.15!important}.brand-text small b{display:block!important;color:#071326!important;font-size:13px!important;font-weight:700!important}.brand-text small span{display:block!important;color:#071326!important;font-size:13px!important;font-weight:600!important}
.nav-panel{background:#ffffff!important;color:#071326!important;border:0!important;box-shadow:none!important}.links{gap:2px!important}.links a{background:#ffffff!important;color:#071326!important;border:1px solid transparent!important;border-radius:0!important;padding:8px 9px!important;text-decoration:none!important;white-space:nowrap!important}.links a:hover,.links a:focus{background:#eef2f7!important;color:#071326!important;border-color:#cfd8e3!important}.links .nav-logout{background:#b51620!important;color:#fff!important;border-color:#b51620!important}.theme-toggle,.menu-toggle{background:#ffffff!important;color:#071326!important;border:1px solid #cfd8e3!important;border-radius:0!important;box-shadow:none!important;white-space:nowrap!important}

/* Desktop compatto: quando lo spazio è poco si usa il menu hamburger anche su Windows/PWA */
@media(max-width:1320px){
  .menu-toggle{display:inline-grid!important;place-items:center!important}.nav-panel{display:none!important;position:absolute!important;left:18px!important;right:18px!important;top:72px!important;background:#ffffff!important;border:1px solid #cfd8e3!important;padding:12px!important;box-shadow:0 14px 34px rgba(7,19,38,.14)!important;z-index:10001!important}.nav-panel.is-open{display:block!important}.links{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.links a{display:block!important;width:100%!important;padding:12px!important}.theme-toggle{margin-top:8px!important;width:100%!important;justify-content:center!important}.brand{min-width:220px!important}
}
@media(max-width:680px){.links{grid-template-columns:1fr!important}.brand-text small b{font-size:12px!important}.brand-text small span{font-size:12px!important}.brand{min-width:0!important}.header-inner{align-items:center!important}.brand-logo{width:54px!important;height:54px!important}.brand-logo img{width:48px!important;height:48px!important}}

/* Superfici normali */
.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.notice,.empty,.table-wrap,.table,.mag-card,.mag-featured,.article-layout,.map-card,.ad-box,.editor-toolbar,.article-pro{background:#ffffff!important;color:#172033!important;border-color:#cfd8e3!important;border-radius:0!important}.card :where(h1,h2,h3,h4,h5,h6),.top-slab :where(h1,h2,h3),.mag-card :where(h1,h2,h3),.mag-featured :where(h1,h2,h3),.article-layout :where(h1,h2,h3),.article-pro :where(h1,h2,h3),.managed-page-body :where(h1,h2,h3){color:#071326!important}.card :where(p,li,label,td,th,strong,b,span,small),.top-slab :where(p,li,label,td,th,strong,b,span,small),.mag-card :where(p,li,label,td,th,strong,b,span,small),.mag-featured :where(p,li,label,td,th,strong,b,span,small),.article-layout :where(p,li,label,td,th,strong,b,span,small),.article-pro :where(p,li,label,td,th,strong,b,span,small),.managed-page-body :where(p,li,label,td,th,strong,b,span,small){color:#172033!important}.muted,.article-meta{color:#526174!important}
.table th{background:#eef2f7!important;color:#344054!important}.table td{background:#ffffff!important;color:#172033!important}
input,select,textarea{background:#ffffff!important;color:#071326!important;-webkit-text-fill-color:#071326!important;border:1px solid #cfd8e3!important;border-radius:0!important;box-shadow:none!important}input::placeholder,textarea::placeholder{color:#6b7280!important;-webkit-text-fill-color:#6b7280!important}.form label,label,.checks label{color:#071326!important}.required{color:#b51620!important}

/* Sezioni scure in modalità normale */
.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.hero-card,.plate-hero{background:#07162f!important;color:#ffffff!important;border-color:#07162f!important;border-radius:0!important}.hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),.mag-hero-main :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),.newsletter-box :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),.footer :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),.adminbar :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),.hero-card :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small),.plate-hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small){color:#ffffff!important}.footer a:not(.btn),.adminbar a:not(.btn),.hero a:not(.btn),.mag-hero-main a:not(.btn),.newsletter-box a:not(.btn){color:#ffffff!important;text-decoration:underline!important;text-underline-offset:4px!important}.footer .brand-logo{background:#ffffff!important}.hero .eyebrow,.mag-hero-main .eyebrow,.newsletter-box .eyebrow,.footer .eyebrow{background:#ffffff!important;color:#8a1220!important;border:1px solid #ffffff!important}
.eyebrow,.badge{background:#fff1f1!important;color:#8a1220!important;border:1px solid #efc9ce!important;border-radius:0!important}

/* Pulsanti e installazione */
.btn{border-radius:0!important;box-shadow:none!important;text-decoration:none!important;color:#fff!important;background:#07162f!important;border:1px solid #07162f!important}.btn.red,.admin-exit{background:#b51620!important;color:#fff!important;border-color:#b51620!important}.btn.light,.btn.ghost{background:#fff!important;color:#071326!important;border:1px solid #cfd8e3!important}.hero .btn.light,.mag-hero-main .btn.light,.newsletter-box .btn.light,.footer .btn.light,.hero .btn.ghost,.mag-hero-main .btn.ghost,.newsletter-box .btn.ghost,.footer .btn.ghost{background:#fff!important;color:#071326!important;border-color:#fff!important}.footer-app-actions{display:flex!important;gap:10px!important;flex-wrap:wrap!important}.app-install-link{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}.app-install-button{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important}

/* Banner overlay app */
.app-promo{position:fixed!important;right:18px!important;bottom:18px!important;z-index:10050!important;width:min(460px,calc(100% - 36px))!important;background:#ffffff!important;color:#071326!important;border:2px solid #07162f!important;box-shadow:0 18px 44px rgba(7,19,38,.22)!important;padding:18px!important;display:grid!important;gap:12px!important}.app-promo[hidden]{display:none!important}.app-promo strong{display:block!important;color:#071326!important;font-size:20px!important;font-weight:800!important}.app-promo p{margin:4px 0 0!important;color:#172033!important}.app-promo-actions{display:flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important}.app-promo-actions .btn.red{background:#b51620!important;color:#fff!important}.app-promo-actions .btn.light{background:#07162f!important;color:#fff!important;border-color:#07162f!important}.app-promo-close{margin-left:auto!important;width:40px!important;height:40px!important;border:1px solid #cfd8e3!important;background:#fff!important;color:#071326!important;font-size:26px!important;line-height:1!important;cursor:pointer!important}

/* Admin menu */
body.admin-mode .site-header{position:sticky!important;top:0!important;background:#ffffff!important;color:#071326!important}body.admin-mode .site-header *{color:#071326!important}body.admin-mode .admin-direct,body.admin-mode .admin-nav-toggle,body.admin-mode .theme-toggle{background:#ffffff!important;color:#071326!important;border:1px solid #cfd8e3!important;border-radius:0!important;box-shadow:none!important;font-weight:700!important}body.admin-mode .admin-direct.is-current,body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,body.admin-mode .admin-nav-toggle:hover,body.admin-mode .admin-nav-toggle:focus,body.admin-mode .admin-nav-toggle[aria-expanded="true"]{background:#07162f!important;color:#ffffff!important;border-color:#07162f!important}body.admin-mode .admin-subnav{background:#ffffff!important;color:#071326!important;border:1px solid #cfd8e3!important;box-shadow:0 14px 30px rgba(7,19,38,.14)!important;border-radius:0!important}body.admin-mode .admin-subnav a{background:#ffffff!important;color:#071326!important;border-bottom:1px solid #eef2f7!important}body.admin-mode .admin-subnav a:hover,body.admin-mode .admin-subnav a:focus{background:#07162f!important;color:#ffffff!important}body.admin-mode .adminbar{position:sticky!important;top:71px!important;z-index:9998!important;background:#07162f!important;color:#ffffff!important}.admin-status-mini{background:#ffffff!important;color:#071326!important;border:1px solid #ffffff!important}.admin-status-mini *{color:#071326!important}

/* Contrasto: reset totale su bianco e nero, senza sezioni che scompaiono */
html[data-theme="contrast"],html[data-theme="contrast"] body,html[data-theme="contrast"] main{background:#ffffff!important;color:#000000!important;color-scheme:light!important}html[data-theme="contrast"] body :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,td,th,span,small,strong,b,em,a:not(.btn)){color:#000000!important}html[data-theme="contrast"] .site-header,html[data-theme="contrast"] .nav-panel,html[data-theme="contrast"] .card,html[data-theme="contrast"] .top-slab,html[data-theme="contrast"] .managed-hero,html[data-theme="contrast"] .managed-page-body,html[data-theme="contrast"] .form fieldset,html[data-theme="contrast"] .notice,html[data-theme="contrast"] .empty,html[data-theme="contrast"] .table-wrap,html[data-theme="contrast"] .table,html[data-theme="contrast"] .mag-card,html[data-theme="contrast"] .mag-featured,html[data-theme="contrast"] .article-layout,html[data-theme="contrast"] .map-card,html[data-theme="contrast"] .ad-box,html[data-theme="contrast"] .editor-toolbar,html[data-theme="contrast"] .article-pro,html[data-theme="contrast"] .hero,html[data-theme="contrast"] .mag-hero-main,html[data-theme="contrast"] .newsletter-box,html[data-theme="contrast"] .footer,html[data-theme="contrast"] .adminbar,html[data-theme="contrast"] .hero-card,html[data-theme="contrast"] .plate-hero{background:#ffffff!important;color:#000000!important;border:2px solid #000000!important;box-shadow:none!important}html[data-theme="contrast"] .hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),html[data-theme="contrast"] .mag-hero-main :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),html[data-theme="contrast"] .newsletter-box :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),html[data-theme="contrast"] .footer :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),html[data-theme="contrast"] .adminbar :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)){color:#000000!important}html[data-theme="contrast"] .links a,html[data-theme="contrast"] .theme-toggle,html[data-theme="contrast"] .menu-toggle,html[data-theme="contrast"] .subnav a,html[data-theme="contrast"] body.admin-mode .admin-direct,html[data-theme="contrast"] body.admin-mode .admin-nav-toggle,html[data-theme="contrast"] body.admin-mode .admin-subnav a{background:#ffffff!important;color:#000000!important;border:2px solid #000000!important}html[data-theme="contrast"] .links a:hover,html[data-theme="contrast"] .links a:focus,html[data-theme="contrast"] .subnav a.active,html[data-theme="contrast"] .subnav a:hover,html[data-theme="contrast"] .subnav a:focus,html[data-theme="contrast"] body.admin-mode .admin-direct.is-current,html[data-theme="contrast"] body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,html[data-theme="contrast"] body.admin-mode .admin-nav-toggle:hover,html[data-theme="contrast"] body.admin-mode .admin-subnav a:hover{background:#000000!important;color:#ffffff!important;border-color:#000000!important}html[data-theme="contrast"] .btn,html[data-theme="contrast"] .btn.red,html[data-theme="contrast"] .app-install-button{background:#000000!important;color:#ffffff!important;border:2px solid #000000!important}html[data-theme="contrast"] .btn.light,html[data-theme="contrast"] .btn.ghost,html[data-theme="contrast"] .app-install-link{background:#ffffff!important;color:#000000!important;border:2px solid #000000!important}html[data-theme="contrast"] input,html[data-theme="contrast"] select,html[data-theme="contrast"] textarea{background:#ffffff!important;color:#000000!important;-webkit-text-fill-color:#000000!important;border:2px solid #000000!important}html[data-theme="contrast"] .eyebrow,html[data-theme="contrast"] .badge{background:#ffffff!important;color:#000000!important;border:2px solid #000000!important}html[data-theme="contrast"] .brand-logo,html[data-theme="contrast"] .footer .brand-logo{border:2px solid #000000!important}html[data-theme="contrast"] .app-promo{background:#ffffff!important;color:#000000!important;border:2px solid #000000!important}


/* AMRI v15: contrasto rimosso, palette chiara stabile */
html,html[data-theme],body{background:#ffffff!important;color:#101828!important;color-scheme:light!important}
body{font-weight:500!important;line-height:1.5!important}
.site-header{position:sticky!important;top:0!important;z-index:1000!important;background:#ffffff!important;color:#101828!important;border-bottom:1px solid #d8dee9!important;box-shadow:0 2px 12px rgba(16,24,40,.05)!important}
.site-header *{color:#101828!important}.theme-toggle,[data-theme-toggle]{display:none!important}.header-inner{min-height:74px!important}.brand{gap:10px!important}.brand-logo{width:60px!important;height:60px!important;border-radius:0!important}.brand-logo img{width:54px!important;height:54px!important}.brand-text strong{font-size:22px!important;letter-spacing:.08em!important}.brand-text small{font-size:13px!important;line-height:1.15!important;color:#344054!important}.brand-text small b{display:block!important;color:#101828!important;font-size:13px!important}.brand-text small span{display:block!important;color:#475467!important;font-weight:700!important}.links a{font-weight:700!important;color:#101828!important}.links a:hover,.links a:focus{background:#f2f4f7!important;color:#101828!important}.nav-panel{background:#ffffff!important}.menu-toggle{background:#ffffff!important;color:#101828!important;border-color:#cfd8e3!important;border-radius:0!important}
main{background:#ffffff!important}.wrap{width:min(1120px,calc(100% - 40px))!important}.mag-hero{gap:24px!important}.mag-hero-main{background:#071326!important;color:#ffffff!important;padding:42px!important}.mag-hero-main h1{font-size:clamp(38px,5vw,66px)!important;color:#ffffff!important}.mag-hero-main p{color:#f2f4f7!important}.mag-hero-main .eyebrow{background:#ffffff!important;color:#8a1220!important;border:0!important}.mag-featured,.card,.top-slab,.managed-hero,.managed-page-body,.article-layout,.mag-card,.table-wrap,.form fieldset,.notice,.empty{background:#ffffff!important;color:#101828!important;border:1px solid #d8dee9!important;box-shadow:none!important}.card *,.top-slab *,.managed-hero *,.managed-page-body *,.article-layout *,.mag-card *,.table-wrap *,.form fieldset *,.notice *,.empty *{color:inherit}.mag-featured h2,.mag-card h2,.section-head h2,h1,h2,h3{font-weight:760!important;color:#101828!important}.btn{border-radius:0!important;box-shadow:none!important;font-weight:750!important}.btn.red{background:#b51620!important;border:1px solid #b51620!important;color:#ffffff!important}.btn.light,.btn.ghost{background:#ffffff!important;border:1px solid #cfd8e3!important;color:#101828!important}.app-install-button{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important}.app-install-link{background:#071326!important;color:#ffffff!important;border-color:#071326!important}.app-promo{background:#ffffff!important;color:#101828!important;border:2px solid #071326!important;box-shadow:0 18px 42px rgba(16,24,40,.18)!important}.app-promo *{color:#101828!important}.app-promo .btn.red{color:#ffffff!important}.app-promo .btn.light{background:#071326!important;color:#ffffff!important;border-color:#071326!important}.app-promo-close{background:#ffffff!important;color:#101828!important;border:1px solid #d8dee9!important}
.footer{background:#071326!important;color:#ffffff!important}.footer *{color:#ffffff!important}.footer a{text-decoration:underline!important;text-underline-offset:4px!important}.footer .btn.ghost{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}.footer .btn.red{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important}.footer-brand img{background:#ffffff!important;border:1px solid #ffffff!important}.footer-admin-link{font-size:12px!important;opacity:.82!important}
input,select,textarea{background:#ffffff!important;color:#101828!important;border:1px solid #cfd8e3!important;border-radius:0!important;-webkit-text-fill-color:#101828!important}label{font-weight:680!important;color:#101828!important}.subnav a{font-weight:700!important}.subnav a.active{background:#071326!important;color:#ffffff!important}.eyebrow,.badge{border-radius:0!important;font-weight:750!important;color:#8a1220!important;background:#fff1f1!important;border:1px solid #f0cdd1!important}.category-strip a{font-weight:680!important;color:#101828!important;background:#ffffff!important}.article-body{font-weight:500!important}.article-body strong,.article-body b{font-weight:740!important}
body.admin-mode .site-header{background:#ffffff!important}body.admin-mode .admin-nav-toggle,body.admin-mode .admin-direct,body.admin-mode .admin-subnav a{background:#ffffff!important;color:#101828!important;border:1px solid #cfd8e3!important;font-weight:720!important}body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,body.admin-mode .admin-direct.is-current,body.admin-mode .admin-nav-toggle:hover{background:#071326!important;color:#ffffff!important;border-color:#071326!important}body.admin-mode .admin-subnav{background:#ffffff!important;border:1px solid #d8dee9!important}body.admin-mode .adminbar{background:#071326!important;color:#ffffff!important}body.admin-mode .adminbar *{color:#ffffff!important}
@media(max-width:1180px){.menu-toggle{display:inline-grid!important;place-items:center!important}.nav-panel{display:none;position:absolute;left:16px;right:16px;top:72px;border:1px solid #d8dee9;padding:14px;box-shadow:0 18px 42px rgba(16,24,40,.12)!important}.nav-panel.is-open{display:block!important}.links{display:grid!important;grid-template-columns:1fr!important}.links a{padding:12px!important}.header-inner{min-height:72px!important}.brand-text small span{display:none!important}}
@media(max-width:760px){.wrap{width:min(100% - 28px,1120px)!important}.mag-hero-main{padding:28px 22px!important}.mag-hero-main h1{font-size:38px!important}.app-promo{left:14px!important;right:14px!important;bottom:14px!important;width:auto!important}.app-promo-actions{display:grid!important;grid-template-columns:1fr!important}.app-promo .btn{width:100%!important}.brand-text small b{font-size:12px!important}}


/* AMRI v16: reset finale modalità chiara, niente contrasto/dark */
html,html[data-theme],body{background:#f4f6f9!important;color:#172033!important;color-scheme:light!important}html[data-theme] *{color-scheme:light!important}body{font-weight:500!important;letter-spacing:0!important}main{background:#f4f6f9!important;color:#172033!important}a{color:#071326}.site-header{position:sticky!important;top:0!important;z-index:10000!important;background:#ffffff!important;color:#071326!important;border-bottom:1px solid #d8dee9!important;box-shadow:none!important;backdrop-filter:none!important}.site-header *{color:#071326!important}.brand-text strong{font-weight:780!important;letter-spacing:.08em!important}.brand-text small{font-weight:650!important;line-height:1.12!important}.brand-text small b{display:block;font-weight:750!important}.brand-text small span{display:block;font-weight:600!important;color:#344054!important}.brand-logo{background:#ffffff!important;border:1px solid #d8dee9!important;box-shadow:none!important;border-radius:0!important}.links a,.nav-panel a{background:#ffffff!important;color:#071326!important;text-decoration:none!important;border:1px solid transparent!important;font-weight:680!important}.links a:hover,.links a:focus,.links a.active{background:#071326!important;color:#ffffff!important}.links a.nav-logout{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important}.menu-toggle{background:#ffffff!important;color:#071326!important;border:1px solid #cbd5e1!important;border-radius:0!important}.menu-toggle span{background:#071326!important}.theme-toggle,[data-theme-toggle]{display:none!important}.wrap{width:min(1180px,calc(100% - 34px))!important}.header-inner{min-height:76px!important;gap:16px!important}.nav-panel{background:#ffffff!important;color:#071326!important}@media(max-width:1280px){.menu-toggle{display:inline-grid!important;place-items:center!important}.nav-panel{display:none!important;position:absolute!important;left:17px!important;right:17px!important;top:76px!important;border:1px solid #d8dee9!important;padding:12px!important;box-shadow:0 12px 28px rgba(7,19,38,.12)!important}.nav-panel.is-open{display:block!important}.links{display:grid!important;grid-template-columns:1fr!important;gap:6px!important}.links a{padding:12px!important;border:1px solid #e2e8f0!important}}
.card,.top-slab,.managed-hero,.managed-page-body,.form fieldset,.notice,.empty,.table-wrap,.table,.mag-card,.mag-featured,.article-layout,.article-pro,.map-card,.ad-box,.editor-toolbar,.app-page-head{background:#ffffff!important;color:#172033!important;border:1px solid #d8dee9!important;box-shadow:none!important;border-radius:0!important}.card *,.top-slab *,.managed-hero *,.managed-page-body *,.form fieldset *,.notice *,.empty *,.table *,.mag-card *,.mag-featured *,.article-layout *,.article-pro *,.map-card *,.ad-box *,.editor-toolbar *{color:inherit}.card h1,.card h2,.card h3,.top-slab h1,.top-slab h2,.top-slab h3,.managed-hero h1,.managed-page-body h1,.managed-page-body h2,.managed-page-body h3,h1,h2,h3,h4,h5,h6{color:#172033!important;font-weight:760!important}.top-slab p,.managed-hero p,p,li,td,th,label,legend,small,span{color:#27364a}.muted,.small.muted{color:#596579!important}.eyebrow,.badge{background:#fff1f1!important;color:#9f1521!important;border:1px solid #f0cdd1!important;border-radius:0!important;font-weight:750!important}input,select,textarea{background:#ffffff!important;color:#071326!important;-webkit-text-fill-color:#071326!important;border:1px solid #cbd5e1!important;border-radius:0!important}input::placeholder,textarea::placeholder{color:#667085!important;-webkit-text-fill-color:#667085!important}.table th{background:#eef2f7!important;color:#344054!important}.table td{background:#ffffff!important;color:#172033!important}.btn{border-radius:0!important;box-shadow:none!important;font-weight:760!important}.btn.red,.admin-exit,.nav-logout{background:#b51620!important;color:#ffffff!important;border:1px solid #b51620!important}.btn.navy,.btn.primary{background:#071326!important;color:#ffffff!important;border:1px solid #071326!important}.btn.light,.btn.ghost,.app-install-link{background:#ffffff!important;color:#071326!important;border:1px solid #cbd5e1!important}.btn:hover,.btn:focus{filter:brightness(.98)!important;transform:none!important}
.hero,.mag-hero-main,.newsletter-box,.footer,.adminbar,.plate-hero,.hero-card{background:#071326!important;color:#ffffff!important;border-color:#071326!important;border-radius:0!important;box-shadow:none!important}.hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),.mag-hero-main :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),.newsletter-box :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),.footer :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),.adminbar :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),.plate-hero :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)),.hero-card :where(h1,h2,h3,h4,h5,h6,p,li,label,legend,strong,b,em,span,small,a:not(.btn)){color:#ffffff!important}.hero .eyebrow,.mag-hero-main .eyebrow,.newsletter-box .eyebrow,.footer .eyebrow{background:#ffffff!important;color:#9f1521!important;border-color:#ffffff!important}.hero .btn.light,.mag-hero-main .btn.light,.newsletter-box .btn.light,.footer .btn.light,.hero .btn.ghost,.mag-hero-main .btn.ghost,.newsletter-box .btn.ghost,.footer .btn.ghost{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important}.footer a:not(.btn){color:#ffffff!important;text-decoration:underline!important;text-underline-offset:4px!important}.footer .brand-logo,.footer-brand img{background:#ffffff!important;border-color:#ffffff!important}.footer-app-actions{display:grid!important;gap:10px!important;max-width:260px!important}
body.admin-mode .site-header{background:#ffffff!important;color:#071326!important}body.admin-mode .admin-direct,body.admin-mode .admin-nav-toggle{background:#ffffff!important;color:#071326!important;border:1px solid #cfd8e3!important;border-radius:0!important;font-weight:700!important}body.admin-mode .admin-direct.is-current,body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,body.admin-mode .admin-nav-toggle:hover,body.admin-mode .admin-nav-toggle:focus,body.admin-mode .admin-nav-toggle[aria-expanded="true"]{background:#071326!important;color:#ffffff!important;border-color:#071326!important}body.admin-mode .admin-subnav{background:#ffffff!important;color:#071326!important;border:1px solid #d8dee9!important;box-shadow:0 14px 30px rgba(7,19,38,.14)!important;border-radius:0!important}body.admin-mode .admin-subnav a{background:#ffffff!important;color:#071326!important;border-bottom:1px solid #eef2f7!important;font-weight:650!important}body.admin-mode .admin-subnav a:hover,body.admin-mode .admin-subnav a:focus,body.admin-mode .admin-subnav a.is-current{background:#071326!important;color:#ffffff!important}.adminbar{position:sticky!important;top:76px!important;z-index:9999!important;background:#071326!important;color:#ffffff!important}.adminbar .wrap{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important}.adminbar .admin-status-mini,.adminbar .admin-status-mini strong{background:#ffffff!important;color:#071326!important;border:1px solid #ffffff!important;padding:6px 10px!important;display:inline-flex!important;gap:4px!important;align-items:center!important}.admin-page-head h1{font-weight:760!important}.app-promo{background:#ffffff!important;color:#172033!important;border:2px solid #071326!important;border-radius:0!important;box-shadow:0 10px 30px rgba(7,19,38,.16)!important}.app-promo *{color:#172033!important}.app-promo .btn.red{color:#ffffff!important}.app-promo .btn.navy{background:#071326!important;color:#ffffff!important}.app-promo-close{background:#ffffff!important;color:#071326!important;border:1px solid #cbd5e1!important}@media(max-width:760px){.wrap{width:min(100% - 24px,1180px)!important}.brand-logo{width:58px!important;height:58px!important}.brand-logo img{width:52px!important;height:52px!important}.brand-text strong{font-size:19px!important}.brand-text small{font-size:12px!important}.hero,.mag-hero-main{padding:28px 22px!important}.mag-hero{grid-template-columns:1fr!important}.app-promo{left:12px!important;right:12px!important;bottom:12px!important}.app-promo-actions{display:grid!important}.btn{width:100%!important}}


/* AMRI v17: correzione definitiva mobile admin, barra stati, menu e PWA */
html, body { background:#f4f6fa!important; color:#172033!important; overflow-x:hidden!important; }
body { min-width:0!important; }
*, *::before, *::after { box-sizing:border-box!important; }
main { background:#f4f6fa!important; color:#172033!important; }
.wrap { width:min(1180px, calc(100% - 32px))!important; margin-left:auto!important; margin-right:auto!important; }

/* Header pubblico e admin: più stabile */
.site-header{position:sticky!important;top:0!important;z-index:10020!important;background:#ffffff!important;color:#071326!important;border-bottom:1px solid #d9e2ee!important;box-shadow:0 1px 6px rgba(7,19,38,.05)!important;}
.site-header *{color:#071326!important;}
.header-inner{min-height:72px!important;align-items:center!important;display:flex!important;gap:14px!important;}
.brand{min-width:0!important;max-width:420px!important;}
.brand-logo{flex:0 0 auto!important;width:58px!important;height:58px!important;border-radius:0!important;}
.brand-logo img{width:52px!important;height:52px!important;}
.brand-text{min-width:0!important;}
.brand-text strong{font-size:22px!important;line-height:1!important;letter-spacing:.08em!important;font-weight:760!important;color:#071326!important;}
.brand-text small{display:block!important;margin-top:3px!important;font-size:12.5px!important;line-height:1.12!important;color:#071326!important;font-weight:600!important;}
.brand-text small b,.brand-text small span{display:block!important;color:#071326!important;font-weight:650!important;}

/* Hamburger chiaro e coerente */
.menu-toggle{background:#ffffff!important;color:#071326!important;border:1px solid #cbd5e1!important;border-radius:0!important;min-width:58px!important;min-height:58px!important;box-shadow:none!important;}
.menu-toggle span{background:#071326!important;color:#071326!important;height:3px!important;width:28px!important;margin:4px auto!important;}
.menu-toggle:focus{outline:3px solid #e4bd32!important;outline-offset:2px!important;}

/* Menu mobile/tablet: pannello scrollabile e leggibile */
@media(max-width:1320px){
  .site-header{position:sticky!important;top:0!important;}
  .header-inner{position:relative!important;}
  .nav-panel{display:none!important;position:fixed!important;left:16px!important;right:16px!important;top:82px!important;max-height:calc(100vh - 100px)!important;overflow:auto!important;background:#ffffff!important;color:#071326!important;border:1px solid #cbd5e1!important;padding:14px!important;z-index:10030!important;box-shadow:0 18px 42px rgba(7,19,38,.18)!important;}
  .nav-panel.is-open{display:block!important;}
  .links{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .links a{display:block!important;width:100%!important;padding:13px 14px!important;background:#ffffff!important;color:#071326!important;border:1px solid #d8dee9!important;text-decoration:none!important;white-space:normal!important;font-weight:650!important;}
  .links a:hover,.links a:focus{background:#eef2f7!important;color:#071326!important;}
  .links a.nav-logout{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important;}
}
@media(max-width:760px){
  .wrap{width:calc(100% - 24px)!important;}
  .header-inner{min-height:82px!important;}
  .brand{max-width:calc(100% - 76px)!important;gap:10px!important;}
  .brand-logo{width:64px!important;height:64px!important;}
  .brand-logo img{width:58px!important;height:58px!important;}
  .brand-text strong{font-size:28px!important;letter-spacing:.06em!important;}
  .brand-text small{font-size:13px!important;line-height:1.13!important;}
  .brand-text small span{display:none!important;}
  .menu-toggle{min-width:70px!important;min-height:70px!important;}
  .nav-panel{left:12px!important;right:12px!important;top:92px!important;max-height:calc(100vh - 110px)!important;}
}

/* Adminbar: niente più blocchi bianchi spezzati */
.adminbar{position:sticky!important;top:72px!important;z-index:10010!important;background:#071326!important;color:#ffffff!important;border:0!important;padding:10px 0!important;}
.adminbar *{color:#ffffff!important;}
.adminbar-inner,.adminbar .wrap{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important;}
.adminbar-title{font-weight:650!important;color:#ffffff!important;}
.admin-status-mini{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:0!important;max-width:100%!important;background:transparent!important;color:#ffffff!important;border:1px solid rgba(255,255,255,.46)!important;border-radius:0!important;padding:6px 10px!important;font-size:13px!important;font-weight:650!important;line-height:1.2!important;white-space:nowrap!important;}
@media(max-width:760px){
  .adminbar{top:82px!important;padding:12px 0!important;}
  .adminbar-inner,.adminbar .wrap{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;text-align:center!important;}
  .adminbar-title{grid-column:1 / -1!important;font-size:18px!important;text-align:center!important;}
  .admin-status-mini{width:100%!important;font-size:13px!important;background:#ffffff!important;color:#071326!important;border-color:#ffffff!important;padding:8px 10px!important;}
}

/* Menu amministratore dentro hamburger */
body.admin-mode .nav-panel{background:#ffffff!important;color:#071326!important;}
body.admin-mode .admin-nav{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;width:100%!important;}
body.admin-mode .admin-direct,body.admin-mode .admin-nav-toggle,body.admin-mode .admin-exit{display:inline-flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;background:#ffffff!important;color:#071326!important;border:1px solid #cbd5e1!important;border-radius:0!important;padding:11px 14px!important;text-decoration:none!important;font-weight:650!important;box-shadow:none!important;}
body.admin-mode .admin-direct.is-current,body.admin-mode .admin-nav-group.is-active>.admin-nav-toggle,body.admin-mode .admin-nav-toggle:hover,body.admin-mode .admin-nav-toggle:focus{background:#071326!important;color:#ffffff!important;border-color:#071326!important;}
body.admin-mode .admin-exit{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important;margin-left:0!important;}
body.admin-mode .admin-subnav{background:#ffffff!important;color:#071326!important;border:1px solid #d8dee9!important;border-radius:0!important;box-shadow:0 14px 28px rgba(7,19,38,.12)!important;}
body.admin-mode .admin-subnav a{display:block!important;background:#ffffff!important;color:#071326!important;border-bottom:1px solid #eef2f7!important;border-radius:0!important;padding:12px 14px!important;font-weight:600!important;text-decoration:none!important;}
body.admin-mode .admin-subnav a:hover,body.admin-mode .admin-subnav a:focus,body.admin-mode .admin-subnav a.is-current{background:#eef2f7!important;color:#071326!important;}
@media(max-width:1320px){
  body.admin-mode .admin-nav{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  body.admin-mode .admin-nav-group,body.admin-mode .admin-direct,body.admin-mode .admin-nav-toggle,body.admin-mode .admin-exit{width:100%!important;}
  body.admin-mode .admin-subnav{position:static!important;display:none!important;width:100%!important;min-width:0!important;margin:6px 0 0!important;box-shadow:none!important;}
  body.admin-mode .admin-nav-group.is-open .admin-subnav{display:block!important;}
}

/* Card e statistiche mobile: meno gigantismo e più ordine */
.card,.top-slab,.table-wrap,.form fieldset,.managed-hero,.managed-page-body,.mag-card,.mag-featured,.article-layout,.article-pro{background:#ffffff!important;color:#172033!important;border:1px solid #d8dee9!important;border-radius:0!important;box-shadow:none!important;}
.card *,.top-slab *,.table-wrap *,.form fieldset *,.managed-hero *,.managed-page-body *,.mag-card *,.mag-featured *,.article-layout *,.article-pro *{color:inherit;}
h1{font-weight:760!important;letter-spacing:-.035em!important;}
h2,h3{font-weight:720!important;}
.kpi{font-size:clamp(42px,12vw,58px)!important;font-weight:760!important;line-height:1!important;}
.grid,.grid2,.grid3,.grid4{gap:16px!important;}
@media(max-width:760px){
  main{padding-top:22px!important;}
  .grid2,.grid3,.grid4,.row,.mag-grid{grid-template-columns:1fr!important;}
  .card,.top-slab,.managed-hero,.managed-page-body,.form fieldset{padding:20px!important;}
  h1{font-size:clamp(42px,13vw,62px)!important;}
  h2{font-size:clamp(28px,9vw,40px)!important;}
}

/* Footer e app sempre leggibili */
.footer{background:#071326!important;color:#ffffff!important;border:0!important;}
.footer *{color:#ffffff!important;}
.footer a:not(.btn){color:#ffffff!important;text-decoration:underline!important;text-underline-offset:4px!important;}
.footer-brand img{background:#ffffff!important;border:1px solid #ffffff!important;border-radius:0!important;}
.footer-app-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;max-width:280px!important;}
.footer .btn.navy,.footer .app-install-link{background:#ffffff!important;color:#071326!important;border-color:#ffffff!important;}
.footer .btn.red,.footer .app-install-button{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important;}

/* Banner app: non copre troppo su mobile */
.app-promo{background:#ffffff!important;color:#071326!important;border:2px solid #071326!important;border-radius:0!important;box-shadow:0 14px 32px rgba(7,19,38,.18)!important;}
.app-promo *{color:#071326!important;}
.app-promo .btn.red{background:#b51620!important;color:#ffffff!important;border-color:#b51620!important;}
.app-promo .btn.navy,.app-promo .btn.light{background:#071326!important;color:#ffffff!important;border-color:#071326!important;}
@media(max-width:760px){
  .app-promo{left:12px!important;right:12px!important;bottom:12px!important;width:auto!important;max-height:45vh!important;overflow:auto!important;padding:14px!important;}
  .app-promo-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .app-promo .btn,.app-promo a.btn,.app-promo button.btn{width:100%!important;}
  .app-promo-close{width:100%!important;height:42px!important;font-size:20px!important;}
}

/* Bottoni: su mobile larghi solo nei contenuti, non nel menu */
@media(max-width:760px){
  main .btn,.footer .btn{width:100%!important;}
  .site-header .btn,.site-header .admin-direct,.site-header .admin-nav-toggle,.site-header .admin-exit{width:100%!important;}
}


/* AMRI v17: account motivati, onboarding e centro preferenze */
.auth-card{max-width:760px;margin-inline:auto}
.auth-links{display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid #d8dee9}
.choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.choice-card{display:flex;align-items:flex-start;gap:10px;min-height:150px;padding:16px;border:1px solid #cbd5e1;background:#fff;color:#172033;cursor:pointer}
.choice-card:hover,.choice-card:focus-within{border-color:#071326;box-shadow:0 0 0 2px rgba(7,19,38,.08)}
.choice-card input{flex:0 0 auto;margin-top:4px;width:20px;height:20px}
.choice-card span{display:block}.choice-card strong{display:block;margin-bottom:8px;color:#071326!important}.choice-card small{display:block;line-height:1.45;color:#4a5568!important}
.nested-fieldset{margin-top:14px!important;background:#f7f9fc!important}
.account-preferences>fieldset{margin-bottom:18px!important}
.purpose-tags{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.profile-callout{border-left:6px solid #c40018!important}
.account-entry-grid .card{min-height:210px}
.account-entry-grid h3{margin-top:0}
@media(max-width:900px){.choice-grid{grid-template-columns:1fr}.choice-card{min-height:0}.account-entry-grid .card{min-height:0}}
