/* Guida estesa di AnubiView: stesse variabili del sito (css/style.css), impaginazione in stile documentazione. */
:root {
  --bg: #0E0E0F; --bg2: #151517; --panel: rgba(255,255,255,.04); --line: rgba(255,255,255,.09);
  --text: #B9BBC4; --strong: #F4F5F8; --muted: #7C7F8B; --up: #00E2FF; --down: #A27EA8; --glow: 0,226,255;
  --btn-bg: #F4F5F8; --btn-fg: #0E0E0F; --code: rgba(255,255,255,.07);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", Menlo, Consolas, monospace;
  --top: 60px;
}
[data-theme="light"] { --bg:#FFFFFF; --bg2:#F5F7FA; --panel:rgba(10,20,40,.04); --line:rgba(10,20,40,.12); --text:#3d4558; --strong:#0d1220; --muted:#7a8296; --up:#0A8F7F; --down:#8d5fa0; --glow:10,143,127; --btn-bg:#0d1220; --btn-fg:#fff; --code:rgba(10,20,40,.07); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 18px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--up); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { color: var(--strong); letter-spacing: -.02em; }
code { font-family: var(--mono); font-size: .88em; background: var(--code); padding: 2px 6px; border-radius: 6px; color: var(--strong); }
kbd { font: 500 .8em var(--mono); background: var(--panel); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--strong); white-space: nowrap; }
.grad { background: linear-gradient(100deg, var(--up), var(--down)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark { display: inline-block; width: 20px; height: 29px; background: var(--strong); -webkit-mask: url(../assets/mark.svg) center/contain no-repeat; mask: url(../assets/mark.svg) center/contain no-repeat; }

/* barra in alto */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 22px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--strong); }
.brand:hover { text-decoration: none; }
.brand .sub { font-weight: 500; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); }
.burger { display: none; background: none; border: 0; color: var(--strong); font-size: 22px; cursor: pointer; }
.search { position: relative; flex: 1; max-width: 460px; margin: 0 auto 0 18px; }
.search input { width: 100%; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--strong); padding: 0 16px; font: inherit; font-size: 14px; outline: none; }
.search input:focus { border-color: rgba(var(--glow), .6); box-shadow: 0 0 0 3px rgba(var(--glow), .15); }
.hits { position: absolute; left: 0; right: 0; top: 46px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.35); max-height: 60vh; overflow: auto; display: none; z-index: 60; }
.hits.open { display: block; }
.hits a { display: block; padding: 10px 16px; color: var(--text); border-bottom: 1px solid var(--line); }
.hits a:last-child { border: 0; }
.hits a:hover, .hits a.sel { background: var(--panel); text-decoration: none; }
.hits b { display: block; color: var(--strong); font-size: 14px; }
.hits small { color: var(--muted); font-size: 12.5px; line-height: 1.4; display: block; }
.hits mark { background: rgba(var(--glow), .25); color: var(--strong); border-radius: 3px; }
.hits .none { padding: 14px 16px; color: var(--muted); font-size: 14px; }
.end { display: flex; align-items: center; gap: 8px; }
.ic, .pill { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--strong); font: 500 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; }
.pill:hover, .ic:hover { text-decoration: none; border-color: rgba(var(--glow), .5); }
.btn { height: 34px; padding: 0 16px; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); font: 600 13px var(--font); display: inline-flex; align-items: center; }
.btn:hover { text-decoration: none; opacity: .9; }

/* tre colonne */
.wrap { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; gap: 0; max-width: 1480px; margin: 0 auto; }
.side { position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); overflow: auto; padding: 22px 14px 40px 22px; border-right: 1px solid var(--line); }
.side .g, .toc .g { font: 700 11px var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 20px 10px 6px; }
.side .g:first-child { margin-top: 0; }
.side a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--text); font-size: 14.5px; line-height: 1.3; }
.side a i { font-style: normal; width: 20px; text-align: center; filter: saturate(.8); }
.side a:hover { background: var(--panel); text-decoration: none; color: var(--strong); }
.side a.on { background: rgba(var(--glow), .12); color: var(--strong); font-weight: 600; box-shadow: inset 2px 0 0 var(--up); }
.toc { position: sticky; top: var(--top); align-self: start; max-height: calc(100vh - var(--top)); overflow: auto; padding: 28px 18px 40px 6px; }
.toc a { display: block; padding: 4px 10px; font-size: 13.5px; color: var(--muted); border-left: 1px solid var(--line); line-height: 1.35; }
.toc a:hover { color: var(--strong); text-decoration: none; }
.toc a.on { color: var(--up); border-left-color: var(--up); }

.doc { padding: 34px 48px 80px; min-width: 0; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: var(--muted); }
.doc h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; margin: 0 0 22px; display: flex; align-items: center; gap: 14px; }
.hico { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 25px; flex: none; }
.body > p:first-child { font-size: 18px; color: var(--strong); line-height: 1.6; }
.body h2 { font-size: 24px; margin: 46px 0 12px; padding-top: 6px; }
.body p { margin: 0 0 14px; }
.body ul, .body ol { padding-left: 22px; margin: 0 0 16px; }
.body li { margin: 5px 0; }
.body li::marker { color: var(--up); }
.body b { color: var(--strong); }
.body .muted { color: var(--muted); font-size: 14px; }
.tbl { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.tbl th, .tbl td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border: 0; }
.tbl th { color: var(--strong); background: var(--panel); font-weight: 600; }
.code-inline, pre { font-family: var(--mono); font-size: 13.5px; background: var(--code); border-radius: 12px; padding: 14px 16px; overflow: auto; color: var(--strong); }
figure { margin: 26px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg2); box-shadow: 0 20px 60px rgba(0,0,0,.28); }
figure img { display: block; width: 100%; height: auto; }
figure a:hover { text-decoration: none; }
figcaption { padding: 11px 18px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 60px; }
.pn a { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; color: var(--strong); font-weight: 600; background: var(--panel); }
.pn a:hover { border-color: rgba(var(--glow), .5); text-decoration: none; }
.pn small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.pn .r { text-align: right; }

/* indice */
.hero { position: relative; text-align: center; padding: 70px 22px 56px; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 60% 100% at 50% 0, rgba(var(--glow), .14), transparent 70%); }
.hero h1 { font-size: clamp(32px, 5.4vw, 58px); line-height: 1.05; margin: 0 auto 14px; max-width: 900px; }
.hero p { max-width: 640px; margin: 0 auto 28px; font-size: 18px; }
.search.big { max-width: 600px; margin: 0 auto; }
.search.big input { height: 52px; font-size: 16px; padding: 0 24px; }
.search.big .hits { text-align: left; top: 60px; }
.cards { max-width: 1180px; margin: 0 auto; padding: 24px 22px 50px; }
.cards h2 { font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 38px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; color: var(--text); transition: .2s; }
.card:hover { transform: translateY(-3px); border-color: rgba(var(--glow), .5); text-decoration: none; box-shadow: 0 18px 40px rgba(0,0,0,.3); }
.card .th { aspect-ratio: 16 / 9; background: var(--bg2) center top / cover; border-bottom: 1px solid var(--line); }
.card .th.ph { display: grid; place-items: center; font-size: 38px; background: linear-gradient(135deg, rgba(var(--glow), .10), rgba(162,126,168,.10)); }
.card b { color: var(--strong); padding: 14px 16px 2px; font-size: 16px; }
.card small { padding: 0 16px 16px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.foot { text-align: center; padding: 30px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); }

@media (max-width: 1180px) { .wrap { grid-template-columns: 250px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 860px) {
  .burger { display: block; }
  .brand .sub, .btn { display: none; }
  .wrap { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 45; left: 0; top: var(--top); width: min(300px, 86vw); background: var(--bg); transform: translateX(-102%); transition: transform .25s; box-shadow: 18px 0 50px rgba(0,0,0,.4); }
  .side.open { transform: none; }
  .doc { padding: 24px 18px 60px; }
  .top { padding: 0 12px; gap: 10px; }
  .search { margin-left: 0; }
}

.search.big { display: block; width: 100%; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
figure.clip video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--bg); object-fit: cover; }
