/* base.css — variabili, tema chiaro/scuro, toggle, banner cookie (condiviso) */
:root{
  --bg:#f4f5f7; --panel:#ffffff; --ink:#161a22; --muted:#77808f; --line:#e4e7ec;
  --blue:#2894ff; --poly:#9aa3b2; --cage:#cf3a3a; --hole:#5b6472; --holeacc:#1f5fa8; --tech:"Michroma","Arial Narrow",sans-serif;
  --body:"Chakra Petch","Segoe UI",Arial,sans-serif; --ease:cubic-bezier(.2,.7,.2,1);
}
:root[data-theme="dark"]{
  --bg:#060708; --panel:#101319; --ink:#e9edf6; --muted:#8b94a4; --line:#20242c; --blue:#3aa0ff; --poly:#79839a; --cage:#e04a42; --hole:#8b94a4; --holeacc:#3aa0ff;
}
*{box-sizing:border-box;margin:0;padding:0}

/* toggle tema */
.theme-tog{position:fixed;top:15px;right:15px;z-index:70;display:inline-flex;align-items:center;gap:7px;
  font-family:var(--tech);font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
  background:transparent;border:1px solid var(--line);border-radius:999px;padding:7px 12px;cursor:pointer;
  transition:color .25s,border-color .25s}
.theme-tog:hover{color:var(--ink);border-color:var(--muted)}
.theme-tog .ic{width:13px;height:13px}
.theme-tog .ic-sun,:root[data-theme="dark"] .theme-tog .ic-moon{display:none}
:root[data-theme="dark"] .theme-tog .ic-sun{display:inline}
.theme-tog .lbl-light,:root[data-theme="dark"] .theme-tog .lbl-dark{display:none}
:root[data-theme="dark"] .theme-tog .lbl-light{display:inline}

/* banner cookie */
.cookie{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:60;
  width:min(680px,calc(100% - 24px));background:var(--panel);border:1px solid var(--line);
  border-radius:14px;box-shadow:0 18px 50px rgba(20,30,60,.22);padding:16px 18px;
  display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.cookie[hidden]{display:none}
.ck-txt{font-size:13px;line-height:1.5;color:var(--ink);opacity:.85;flex:1 1 300px}
.ck-txt a{color:var(--blue)}
.ck-actions{display:flex;gap:10px;margin-left:auto}
.ck-btn{font-family:var(--body);font-size:13px;border-radius:9px;padding:10px 16px;cursor:pointer;border:1px solid transparent}
.ck-btn.primary{background:var(--blue);color:#fff}
.ck-btn.ghost{background:transparent;color:var(--ink);border-color:var(--line)}
.ck-btn:hover{filter:brightness(1.05)}

/* ===== mobile ===== */
.theme-tog{top:calc(12px + env(safe-area-inset-top,0px));right:calc(12px + env(safe-area-inset-right,0px))}
@media(max-width:560px){
  .cookie{left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px));transform:none;width:auto;
    padding:14px;flex-direction:column;align-items:stretch;gap:12px}
  .ck-txt{flex:none}
  .ck-actions{margin-left:0;gap:10px}
  .ck-btn{flex:1;padding:13px}
}

/* ===== tablet ===== */
@media(min-width:601px) and (max-width:1024px){
  .cookie{width:min(620px,calc(100% - 40px));padding:16px 18px}
  .ck-txt{font-size:14px}
  .ck-btn{padding:12px 20px;font-size:14px}
  .theme-tog{padding:9px 14px;font-size:10px}
}
/* touch: aree di tocco più generose */
@media(hover:none) and (pointer:coarse){
  .ck-btn{min-height:46px}
  .theme-tog{min-height:40px}
}
