/* CODEX SUBTERRANEUS — visual layer for Archivium Abyssi 2.2. No CDN. */
:root{--codex-ink:#efe7d8;--codex-brass:#c7a879;--codex-silver:#b7aecb;--codex-night:#0b0d15;--codex-edge:#74617f;--codex-tint:#c5b5ef;--codex-deep:#10111e;--codex-rule:#a68c674f;--codex-font:Georgia,'Times New Roman',serif}
html{scroll-padding-top:156px}
body:not([data-page=overlay]){background:radial-gradient(ellipse at 98% 0,#30214338,transparent 42rem),radial-gradient(ellipse at 0 45%,#19474515,transparent 45rem),#0b0d15}
body[data-page=personaggi],body[data-page=atlante],body[data-page=monologhi],body[data-page=monologo]{--codex-tint:#98cbbf}
body[data-page=profilo]{--codex-tint:var(--accent,#bda6dd)}
body[data-page=compendio],body[data-page=bestiario],body[data-page=fazioni],body[data-page=oggetti],body[data-page=tecniche],body[data-page=giuramenti]{--codex-tint:#dcb17e}
body[data-page=misteri],body[data-page=filorosso],body[data-page=memoria],body[data-page=teorie],body[data-page=tribunale],body[data-page=ombre]{--codex-tint:#c2a0e9}
body[data-page=halloffame],body[data-page=quiz],body[data-page=statistiche],body[data-page=taverna],body[data-page=carte],body[data-page=cinema],body[data-page=live],body[data-page=aggiornamenti]{--codex-tint:#e0bd83}
.codex-top{position:sticky;top:0;z-index:50;overflow:visible;background:linear-gradient(110deg,#10151cfb,#14121ffc 65%,#1d1526fa);border-bottom:1px solid #8a729c88;box-shadow:0 9px 35px #0005;backdrop-filter:blur(18px);isolation:isolate}
.codex-top:before{content:'';position:absolute;inset:0;pointer-events:none;z-index:-1;background:linear-gradient(90deg,transparent 0%,#c0a27c0c 48%,transparent 80%),repeating-linear-gradient(125deg,transparent 0 42px,#c1a1e504 43px 44px,transparent 45px 82px)}
.codex-top .codex-wrap{overflow:visible;position:relative}
.codex-brandbar{min-height:83px;display:flex;align-items:center;justify-content:space-between;gap:22px;padding:9px 0;position:relative;border-bottom:1px solid #a58aab2b}
.codex-brand{display:inline-flex;align-items:center;gap:13px;text-decoration:none!important;color:var(--codex-ink);min-width:0}
.codex-brand img{display:block;width:56px;height:56px;flex:0 0 56px;filter:drop-shadow(0 0 11px #ab88e440)}
.codex-brand>span{display:flex;flex-direction:column;gap:1px;line-height:1.05;min-width:0}
.codex-brand small{color:#c9b5d6;font-size:9px;letter-spacing:.2em;font-weight:650;line-height:1.5}
.codex-brand strong{font:normal 29px/1 var(--codex-font);letter-spacing:-.025em;color:#f0d5a6}
.codex-brand em{font:normal 10px/1.65 var(--sans);text-transform:uppercase;letter-spacing:.22em;color:#b7becd}
.codex-edition{display:flex;gap:12px;align-items:center;text-align:right;color:#dac8a8;white-space:nowrap}
.codex-edition>span:last-child{display:flex;flex-direction:column;gap:4px}
.codex-edition strong{font-size:10px;font-weight:650;letter-spacing:.22em}
.codex-edition small{font-size:9px;letter-spacing:.17em;color:#ae9fb9}
.codex-edition-mark{font:35px/1 var(--codex-font);color:#b5a0d9;text-shadow:0 0 14px #ac8ad0;display:inline-block}
.codex-nav{display:flex;align-items:stretch;gap:clamp(5px,1.25vw,19px);padding:8px 0 9px;min-width:0;overflow:visible;white-space:normal}
.codex-nav>.codex-link,.codex-group>summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:8px 12px;border:1px solid transparent;border-radius:3px;font-size:13px;color:#cfc7d8;line-height:1.25;white-space:nowrap;cursor:pointer;text-decoration:none;user-select:none;transition:background .18s,border-color .18s,color .18s}
.codex-nav>.codex-link{flex:0 1 auto}
.codex-nav>.codex-link:last-child{margin-left:auto}
.codex-nav>.codex-link strong{font-weight:500}
.codex-icon{display:block;width:21px;height:21px;flex:0 0 auto;color:var(--codex-brass);filter:drop-shadow(0 0 3px #a894b42a)}
.codex-group{position:relative;margin:0;padding:0;min-width:0;border:0;background:none;--group-tint:#bda2e4}
.codex-group[data-group=compagnia]{--group-tint:#9acfc4}.codex-group[data-group=cronache]{--group-tint:#c5b5ef}.codex-group[data-group=mondo]{--group-tint:#dcb17e}.codex-group[data-group=indagini]{--group-tint:#bf9bef}.codex-group[data-group=tavolo]{--group-tint:#e0bd83}
.codex-group>summary{list-style:none;font-weight:550;min-width:0}
.codex-group>summary::-webkit-details-marker{display:none}
.codex-group>summary .codex-icon{color:var(--group-tint)}
.codex-group .codex-chevron{width:6px;height:6px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg) translateY(-2px);margin:0 1px 0 1px;opacity:.72;flex-shrink:0}
.codex-group[open] .codex-chevron{transform:rotate(225deg) translateY(-1px)}
.codex-group>summary:hover,.codex-group[open]>summary,.codex-nav>.codex-link:hover{background:#a98fbd15;color:#f1e3c9;border-color:#a78aba55}
.codex-group.is-current>summary,.codex-nav>.codex-link[aria-current]{background:linear-gradient(135deg,#9e79b32b,#a68c6811);border-color:#bca2dc69;color:#f2e0bb;box-shadow:inset 0 -2px var(--group-tint,var(--codex-brass))}
.codex-nav .codex-link:focus-visible,.codex-group>summary:focus-visible,.codex-toggle:focus-visible,.codex-gates a:focus-visible,.codex-entry:focus-visible{outline:2px solid #d9bcf8;outline-offset:3px}
.codex-dropdown{position:absolute;top:calc(100% + 5px);left:0;z-index:60;width:300px;max-width:calc(100vw - 32px);padding:10px;background:linear-gradient(140deg,#211d30,#121520 70%);border:1px solid #a98dbb8a;box-shadow:inset 0 0 0 3px #0c0f18,0 20px 60px #000b;border-radius:4px}
.codex-group:not([open])>.codex-dropdown{display:none}
.codex-group[data-group=indagini] .codex-dropdown,.codex-group[data-group=tavolo] .codex-dropdown{left:auto;right:0}
.codex-dropdown-head{padding:10px 12px 12px;border-bottom:1px solid #bfa6d42b;display:grid;gap:3px}
.codex-dropdown-head>span{font:normal 19px/1.1 var(--codex-font);color:var(--group-tint)}
.codex-dropdown-head small{font-size:11px;color:#b7afc2;line-height:1.4}
.codex-dropdown-links{display:grid;gap:2px;margin-top:5px;max-height:none;overflow:visible}
.codex-dropdown-links .codex-link{display:flex;align-items:center;gap:11px;padding:9px 10px;border:1px solid transparent;text-decoration:none;line-height:1.3;min-width:0;color:#e4dcec;border-radius:3px}
.codex-dropdown-links .codex-link .codex-icon{width:24px;height:24px;color:var(--group-tint)}
.codex-dropdown-links .codex-link span{display:flex;flex-direction:column;min-width:0;gap:3px}
.codex-dropdown-links .codex-link strong{font-size:13px;font-weight:600}
.codex-dropdown-links .codex-link small{font-size:11px;color:#b7afc4}
.codex-dropdown-links .codex-link:hover,.codex-dropdown-links .codex-link[aria-current]{background:#c5a6ef16;border-color:#baa3d347;color:#ffe6bc}
.codex-dropdown-links .codex-link[aria-current]{box-shadow:inset 2px 0 var(--group-tint)}
.codex-toggle[hidden],.codex-nav[hidden]{display:none!important}
.codex-toggle{display:none;align-items:center;justify-content:center;gap:8px;color:#f2debd;background:linear-gradient(150deg,#31263c,#181b26);border:1px solid #997bab88;border-radius:3px;padding:10px 11px;font:600 12px/1.25 var(--sans);cursor:pointer}
.codex-hamburger{width:19px;display:flex;flex-direction:column;gap:4px}.codex-hamburger i{height:1px;width:100%;background:currentColor}
.codex-toggle[aria-expanded=true] .codex-hamburger i:first-child{transform:translateY(5px) rotate(45deg)}.codex-toggle[aria-expanded=true] .codex-hamburger i:nth-child(2){opacity:0}.codex-toggle[aria-expanded=true] .codex-hamburger i:last-child{transform:translateY(-5px) rotate(-45deg)}
/* The page becomes a named chapter of the same subterranean codex. */
#hero .hero:not(.cinematic){min-height:300px;padding:60px 0 50px;background:linear-gradient(90deg,#080b13f7 0%,#0a0c14e3 32%,#0a0c1473 66%,#0b0d141c 100%),linear-gradient(0deg,#0b0d14e8,transparent 65%),var(--scene) center 43%/cover no-repeat;border-bottom:1px solid var(--codex-rule);box-shadow:inset 0 -20px 45px #0b0d1540}
#hero .hero:not(.cinematic):before{content:'';position:absolute;inset:12px clamp(14px,3.5vw,55px);pointer-events:none;z-index:0;border:1px solid #a98bb455;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 0,1px 20%,1px calc(100% - 1px),calc(100% - 1px) calc(100% - 1px),calc(100% - 1px) 1px,1px 1px,1px 20%);opacity:.72}
#hero .hero:not(.cinematic):after{content:'';position:absolute;z-index:0;right:clamp(25px,8vw,145px);top:50%;transform:translateY(-50%);width:clamp(100px,14vw,210px);aspect-ratio:1;background:url('codex-seal.svg') center/contain no-repeat;opacity:.30;pointer-events:none;filter:drop-shadow(0 0 25px #c3a7eb80)}
#hero .hero .eyebrow{color:var(--codex-tint);letter-spacing:.19em;font-size:11px}
#hero .hero:not(.cinematic) h1{font-family:var(--codex-font);font-weight:normal;letter-spacing:-.03em;color:#f6e6cf;font-size:clamp(36px,4.8vw,76px);text-wrap:balance;max-width:900px}
#hero .hero:not(.cinematic) p{max-width:740px;color:#d4cbd9;text-shadow:0 1px 6px #0008}
body[data-page=profilo] #hero .hero:not(.cinematic) h1{color:var(--accent,var(--codex-ink))}
/* Homepage: an illustrated entrance, not a dashboard. */
#hero .hero.cinematic{padding:clamp(30px,4.5vw,64px) 0 24px;min-height:clamp(560px,48vw,735px);background:linear-gradient(90deg,#090b13f0 0%,#0b0d17d0 27%,#0a0c1452 59%,#090b1321 100%),linear-gradient(0deg,#0b0d15 0%,#0b0d144d 19%,transparent 48%),var(--scene) center 50%/cover no-repeat}
#hero .hero.cinematic:before{content:'';position:absolute;inset:12px 20px;pointer-events:none;border:1px solid #bd9dd245;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 0,1px 1px,1px calc(100% - 1px),calc(100% - 1px) calc(100% - 1px),calc(100% - 1px) 1px,1px 1px);z-index:0}
.hero.cinematic .hero-copy{max-width:660px;padding:0 0 25px}
.codex-masthead{display:flex;align-items:center;gap:15px;margin-bottom:20px;color:#d5b6e9}
.codex-masthead>img{width:74px;height:74px;filter:drop-shadow(0 0 14px #c4a7f05c)}
.codex-masthead>.eyebrow{display:grid;gap:6px;font-size:11px!important;line-height:1.4;letter-spacing:.22em!important;color:#e1c3e5!important}
.codex-masthead .eyebrow span{font-size:10px;color:#d9b883;letter-spacing:.21em}
#hero .hero.cinematic h1{font-family:var(--codex-font);font-weight:400;line-height:.85;font-size:clamp(64px,8.3vw,119px);letter-spacing:-.045em;margin:18px 0 22px;color:#f5e6ce;text-shadow:0 6px 30px #07060ddd}
#hero .hero.cinematic h1>span{color:#e2c18b;display:inline-block}
#hero .hero.cinematic h1 em{font-size:clamp(27px,3.4vw,45px);letter-spacing:.02em;margin-top:22px;color:#e4d7e7}
.hero.cinematic .hero-motto{margin:22px 0 13px;font-size:clamp(18px,2vw,25px);color:#decce9}
#hero .hero.cinematic .hero-foot{border-top-color:#bba1cb70;color:#d1bfdd;padding:15px 0 0;position:relative;letter-spacing:.18em}
#hero .hero.cinematic .hero-foot:before{content:'◇';color:#e5c38d;position:absolute;left:50%;transform:translate(-50%,-28px);font-size:19px;background:#10131c;padding:0 7px}
/* Carved access seals link the navigation categories to the home chapters. */
.codex-gates{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:20px 0 26px;margin-bottom:10px;border-bottom:1px solid #a98bb433}
.codex-gates a{display:flex;align-items:center;gap:10px;position:relative;min-width:0;padding:14px 11px;color:var(--codex-ink);text-decoration:none;background:radial-gradient(ellipse at 15% 0,color-mix(in srgb,var(--gate-tint) 16%,transparent),transparent 80%),linear-gradient(155deg,#1a1e2a,#131621);border:1px solid color-mix(in srgb,var(--gate-tint) 43%,transparent);box-shadow:inset 0 0 0 3px #0c0e1750,0 8px 20px #0003;clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px)}
.codex-gates a:hover{border-color:var(--gate-tint);background:linear-gradient(155deg,#302941,#171b24)}
.codex-gates .codex-icon{width:30px;height:30px;color:var(--gate-tint)}
.codex-gates a>span:nth-child(2){display:flex;flex-direction:column;gap:4px;min-width:0}.codex-gates small{font-size:9px;letter-spacing:.12em;color:var(--gate-tint)}.codex-gates strong{font:normal 18px/1.15 var(--codex-font)}
.codex-gates .gate-arrow{color:var(--gate-tint);margin-left:auto;font-size:20px;line-height:1;opacity:.7}
.codex-vault{scroll-margin-top:12px;margin:0 0 48px!important;--gate-tint:var(--codex-tint)}
.codex-vault-banner{position:relative;display:flex;align-items:center;gap:22px;min-height:145px;isolation:isolate;overflow:hidden;padding:22px 26px;margin:0 0 14px;background:linear-gradient(90deg,#111521fc,#141622e8 35%,#0b0d1640 80%),var(--gate-art) center 46%/cover;border:1px solid color-mix(in srgb,var(--gate-tint) 46%,transparent);border-radius:4px;box-shadow:inset 0 0 0 4px #0c0e1766,0 10px 28px #0003}
.codex-vault-banner:before,.codex-vault-banner:after{content:'';position:absolute;width:20px;height:20px;border-color:var(--gate-tint);opacity:.8;pointer-events:none}.codex-vault-banner:before{top:6px;left:6px;border-left:1px solid;border-top:1px solid}.codex-vault-banner:after{bottom:6px;right:6px;border-right:1px solid;border-bottom:1px solid}
.codex-vault-mark{width:76px;height:76px;flex:0 0 76px;position:relative;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--gate-tint) 80%,transparent);background:linear-gradient(135deg,#111622,#252237);clip-path:polygon(22% 0,78% 0,100% 22%,100% 78%,78% 100%,22% 100%,0 78%,0 22%);box-shadow:inset 0 0 0 5px #0e111a,0 0 25px #0004}
.codex-vault-mark .codex-icon{width:36px;height:36px;color:var(--gate-tint);transform:translateY(-5px)}.codex-vault-mark>span{position:absolute;bottom:7px;font:normal 11px/1 var(--codex-font);color:var(--gate-tint);letter-spacing:.13em}
.codex-vault-banner .eyebrow{font-size:10px;color:var(--gate-tint);letter-spacing:.19em}
.codex-vault-banner h2{font:normal clamp(29px,3vw,44px)/1.03 var(--codex-font);color:#f3e7d7;letter-spacing:-.025em;margin:6px 0 5px}
.codex-vault-banner p{margin:0;color:#d5cad9;font-size:13px}.codex-vault-count{margin-left:auto;align-self:flex-end;white-space:nowrap;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--gate-tint);background:#0e111bc9;padding:5px 9px;border:1px solid #bba2d14d}
.codex-vault .vault-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.codex-entry.tile{position:relative;isolation:isolate;display:flex;flex-direction:column;min-height:220px;overflow:hidden;border:1px solid color-mix(in srgb,var(--gate-tint) 36%,transparent);border-radius:4px;background:#181924;box-shadow:inset 0 0 0 4px #0e101980,0 10px 24px #0004;padding:15px 17px 14px;text-decoration:none!important;transition:border-color .18s,box-shadow .18s,transform .18s;min-width:0}
.codex-entry>.scenic-art{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;opacity:.52;filter:saturate(.75);margin:0;transition:opacity .22s,transform .35s}
.codex-entry:before{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#090c15fb 0%,#10121de8 36%,#14142196 76%,#1717223b 100%);z-index:-1;pointer-events:none}
.codex-entry:after{content:'';position:absolute;inset:5px;border:1px solid #cab1df1c;pointer-events:none;z-index:3}
.codex-entry:hover{border-color:var(--gate-tint);transform:translateY(-2px);box-shadow:inset 0 0 0 4px #0d0f1855,0 10px 27px #0007,0 0 15px color-mix(in srgb,var(--gate-tint) 12%,transparent)}
.codex-entry:hover>.scenic-art{opacity:.8;transform:scale(1.035)}
.codex-entry-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:14px;min-height:45px}
.codex-entry-glyph{width:45px;height:45px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--gate-tint) 65%,transparent);background:#0c101de8;clip-path:polygon(19% 0,81% 0,100% 19%,100% 81%,81% 100%,19% 100%,0 81%,0 19%)}
.codex-entry-glyph .codex-icon{width:25px;height:25px;color:var(--gate-tint);filter:drop-shadow(0 0 7px color-mix(in srgb,var(--gate-tint) 35%,transparent))}
.codex-entry-top .number{margin:0;background:#0c101be0;color:var(--gate-tint);font:normal 17px/1 var(--codex-font);padding:5px 6px;border:1px solid #b3a1cb45}
.codex-entry .tile-copy{padding:0;flex:1;display:flex;flex-direction:column;gap:6px;position:relative;z-index:1}
.codex-entry h3{font:normal 23px/1.1 var(--codex-font);color:#f6e8d5;margin:0}
.codex-entry p{font-size:12px;color:#d6cfdf;line-height:1.5;margin:0}
.codex-entry .arrow{display:flex;justify-content:space-between;gap:8px;margin-top:auto;padding:12px 0 0;border-top:1px solid #cfb9dd30;color:var(--gate-tint);font-size:10px;font-weight:650;letter-spacing:.09em;text-transform:uppercase}
.codex-echo{position:relative;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:24px;align-items:center;margin:0 0 40px;padding:26px;border:1px solid #8e77ac70;background:radial-gradient(ellipse at 15% 0,#6843893b,transparent 72%),linear-gradient(115deg,#121522f5,#151321bc),url('art/profondita-sm.webp') center/cover;box-shadow:inset 0 0 0 4px #0c10197a;border-radius:4px}
.codex-echo h2{font:italic normal 25px/1.3 var(--codex-font);margin:5px 0 0;color:#e4d1f0}.codex-echo .eyebrow{color:#c7a7ee;font-size:10px;letter-spacing:.14em}.codex-echo-links{display:flex;gap:7px;flex-wrap:wrap}.codex-echo-links a{font-size:12px;padding:7px 9px;border:1px solid #a68ac25e;border-radius:3px;background:#1e1b2ddb;text-decoration:none;color:#e5d1f2}.codex-echo-links a:hover{background:#3c2e52;border-color:#c4a3e7}
/* Architectural detailing for existing illustrations, cards and archive sheets. The charts retain their original CSS. */
body:not([data-page=overlay]) .opening-ledger .stat{padding:12px 14px 10px;border-left:1px solid #ad90c264;background:linear-gradient(135deg,#191b2c8a,transparent 85%)}
body:not([data-page=overlay]) .opening-ledger .stat strong{font-family:var(--codex-font);color:#e3c38e}
body:not([data-page=overlay]) .latest-chapter{border:1px solid #aa91c25b;box-shadow:inset 0 0 0 4px #0c101a80,0 14px 40px #0004;border-radius:4px}
body:not([data-page=overlay]) .party-card{border-radius:3px;box-shadow:inset 0 0 0 3px #0c10188c,0 9px 21px #0006}
body:not([data-page=overlay]) .party-card:before{content:'';position:absolute;inset:5px;border:1px solid #cdb9df55;z-index:2;pointer-events:none}
body:not([data-page=overlay]) .world-card{border-radius:3px;box-shadow:0 8px 24px #0005}
body:not([data-page=overlay]) .world-card:before{content:'';position:absolute;inset:6px;border:1px solid #dec9ed55;z-index:2;pointer-events:none}
body:not([data-page=overlay]) .section-label h2{font-family:var(--codex-font);font-weight:normal;letter-spacing:-.015em}
body:not([data-page=overlay]) .section-label{position:relative;padding-bottom:13px;border-bottom:1px solid #a68ab733}
body:not([data-page=overlay]) .section-label:after{content:'';position:absolute;bottom:-1px;left:0;width:75px;height:1px;background:var(--codex-tint);box-shadow:0 0 8px var(--codex-tint)}
body:not([data-page=overlay]) .portrait-card,body:not([data-page=overlay]) .profile-art,body:not([data-page=overlay]) .shadow-card,body:not([data-page=overlay]) .ep-row{border-color:#9c86b450;border-radius:4px;box-shadow:inset 0 0 0 3px #0b0d1544,0 6px 16px #0002}
body:not([data-page=overlay]) .footer{border-top:1px solid #a78ebc59;background:linear-gradient(150deg,#151322,#0c0f16);padding-top:24px;padding-bottom:24px}
body:not([data-page=overlay]) .footer .wrap{position:relative;padding-left:44px}
body:not([data-page=overlay]) .footer .wrap:before{content:'';position:absolute;width:32px;height:32px;top:0;left:0;background:url('codex-seal.svg') center/contain no-repeat;opacity:.8}
/* Mobile: a real accordion, no clipped or horizontally scrolling link rows. */
@media(max-width:1100px){.codex-nav{gap:4px}.codex-nav>.codex-link,.codex-group>summary{padding:8px 9px;font-size:12px;gap:6px}.codex-nav>.codex-link:last-child{margin-left:auto}.codex-gates a{padding:12px 9px;gap:8px}.codex-gates .codex-icon{width:25px;height:25px}.codex-gates strong{font-size:16px}}
@media(max-width:880px){html{scroll-padding-top:92px}.codex-brandbar{min-height:72px;border-bottom:0;gap:12px;padding:8px 0}.codex-brand img{width:48px;height:48px;flex-basis:48px}.codex-brand strong{font-size:26px}.codex-brand small{font-size:8px}.codex-brand em{font-size:9px}.codex-edition{display:none}.codex-toggle:not([hidden]){display:flex}.codex-nav{border-top:1px solid #bda5d23b;display:grid;grid-template-columns:1fr;gap:4px;padding:7px 0 12px;max-height:min(73vh,calc(100dvh - 84px));overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.codex-nav>.codex-link,.codex-group>summary{width:100%;justify-content:flex-start;padding:11px 12px;font-size:14px;min-height:46px;background:#161a2580;border-color:#7f6d9438}.codex-nav>.codex-link:last-child{margin:0}.codex-group>summary .codex-chevron{margin-left:auto}.codex-dropdown{position:static;max-width:none;width:auto;box-shadow:inset 0 0 0 3px #0c0e16a0;margin:5px 0 3px;padding:7px;border-color:#a88dc46a}.codex-dropdown-head{display:none}.codex-dropdown-links{margin-top:0;max-height:none;overflow:visible}.codex-dropdown-links .codex-link{padding:10px 11px}.codex-gates{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.codex-vault .vault-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.codex-echo{grid-template-columns:1fr;gap:16px}.codex-entry.tile{min-height:220px}.codex-vault-banner{padding:19px 20px;gap:15px}.codex-vault-mark{width:63px;height:63px;flex-basis:63px}}
@media(max-width:520px){.codex-brandbar{gap:8px}.codex-brand{gap:8px}.codex-brand img{width:39px;height:39px;flex-basis:39px}.codex-brand strong{font-size:23px}.codex-brand small{font-size:7px;letter-spacing:.13em}.codex-brand em{font-size:8px;letter-spacing:.14em}.codex-toggle{padding:10px 9px;gap:6px}.codex-hamburger{width:16px}.codex-toggle span:last-child{font-size:11px}.codex-masthead{gap:11px;margin-bottom:14px}.codex-masthead>img{width:55px;height:55px}.codex-masthead>.eyebrow{font-size:8px!important;letter-spacing:.13em!important}.codex-masthead .eyebrow span{font-size:8px;letter-spacing:.14em}#hero .hero.cinematic{min-height:540px;padding:30px 0 22px;background:linear-gradient(90deg,#090b13df,#090b13a0 65%,#090b1340),linear-gradient(0deg,#0b0d15,transparent 55%),var(--scene) 58% center/cover no-repeat}#hero .hero.cinematic:before{inset:7px 8px}#hero .hero.cinematic h1{font-size:clamp(52px,14vw,75px)}#hero .hero.cinematic h1 em{font-size:27px}#hero .hero.cinematic .hero-foot{font-size:8px;letter-spacing:.08em}#hero .hero:not(.cinematic){min-height:230px;padding:34px 0 27px}#hero .hero:not(.cinematic):after{opacity:.15;right:12px;width:100px}#hero .hero:not(.cinematic) h1{font-size:clamp(32px,10vw,45px);overflow-wrap:anywhere}#hero .hero:not(.cinematic):before{inset:7px}#hero .hero .eyebrow{font-size:9px;letter-spacing:.14em}.codex-gates{grid-template-columns:repeat(2,minmax(0,1fr));padding:15px 0}.codex-gates a:last-child{grid-column:1/-1}.codex-gates a>span:nth-child(2){gap:2px}.codex-gates strong{font-size:17px}.codex-gates small{font-size:8px}.codex-gates .codex-icon{width:24px;height:24px}.codex-vault .vault-grid{grid-template-columns:1fr}.codex-vault-banner{min-height:120px;padding:14px;gap:12px}.codex-vault-mark{width:51px;height:51px;flex-basis:51px}.codex-vault-mark .codex-icon{width:26px;height:26px}.codex-vault-mark>span{font-size:9px;bottom:4px}.codex-vault-banner .eyebrow{font-size:8px;letter-spacing:.1em}.codex-vault-banner h2{font-size:29px}.codex-vault-banner p{font-size:11px}.codex-vault-count{display:none}.codex-entry.tile{min-height:185px;padding:14px 16px}.codex-entry-top{margin-bottom:10px}.codex-entry h3{font-size:23px}.codex-echo{padding:17px}.codex-echo h2{font-size:22px}.codex-echo-links a{font-size:11px}.codex-vault{margin-bottom:32px!important}}
@media(prefers-reduced-motion:reduce){.codex-top *,.codex-entry,.codex-entry>.scenic-art{transition:none!important}.codex-entry:hover,.codex-entry:hover>.scenic-art{transform:none!important}html{scroll-behavior:auto}}
@media print{.codex-top{display:none!important}}

/* 3.2.1 — Refinement. A single scroll surface; desktop panels share the nav's containing block. */
.codex-dropdown,.codex-nav{scrollbar-width:thin;scrollbar-color:#8c779f #151522}
.codex-dropdown::-webkit-scrollbar,.codex-nav::-webkit-scrollbar{width:8px;height:8px}
.codex-dropdown::-webkit-scrollbar-track,.codex-nav::-webkit-scrollbar-track{background:#151522}
.codex-dropdown::-webkit-scrollbar-thumb,.codex-nav::-webkit-scrollbar-thumb{background:#8c779f;border-radius:8px;border:2px solid #151522}
.codex-dropdown-links{max-height:none;overflow:visible;overscroll-behavior:auto}
.codex-dropdown-links .codex-link{min-height:51px;align-items:center;gap:10px;padding:9px 10px;overflow-wrap:anywhere}
.codex-dropdown-links .codex-link .codex-icon{flex:0 0 24px}
.codex-dropdown-links .codex-link strong,.codex-dropdown-links .codex-link small{white-space:normal}
@media(min-width:881px){
 .codex-nav{position:relative;overflow:visible}
 .codex-group{position:static}
 .codex-group>.codex-dropdown{width:min(610px,100%);max-width:100%;left:var(--codex-left,0px);right:auto;top:calc(100% + 5px);max-height:min(620px,var(--codex-room,calc(100vh - 160px)));overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:10px;scroll-padding:8px}
 .codex-group[data-group=indagini]>.codex-dropdown,.codex-group[data-group=tavolo]>.codex-dropdown{left:var(--codex-left,auto);right:var(--codex-right,0px)}
 .codex-dropdown-head{padding:10px 12px 12px;gap:4px}
 .codex-dropdown-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px;margin-top:8px}
 .codex-dropdown-links .codex-link{border-bottom-color:#bfa6d416}
}
@media(max-width:880px){
 .codex-nav{max-height:min(73dvh,var(--codex-mobile-room,calc(100dvh - 84px)));overflow-x:hidden;overflow-y:auto;scroll-padding:8px}
 .codex-group>.codex-dropdown{max-height:none;overflow:visible;overscroll-behavior:auto;position:static;width:auto;max-width:none}
 .codex-dropdown-links{grid-template-columns:minmax(0,1fr);max-height:none;overflow:visible;gap:2px}
}
