:root { color-scheme: light dark; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  line-height: 1.45;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(127,127,127,.35);
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.8);
}
@media (prefers-color-scheme: dark) {
  .topbar { background: rgba(16,16,16,.75); }
}

.brand a { font-weight: 700; }

.topnav ul {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.topnav li { margin: 0; padding: 0; }

.page {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 58px);
}

.sidebar {
  border-right: 1px solid rgba(127,127,127,.35);
  padding: 16px;
}
.sidebar .title {
  font-weight: 600;
  margin-bottom: 10px;
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar li { margin: 6px 0; }
.sidebar a.active { font-weight: 700; }

.content {
  padding: 18px 18px 30px;
  max-width: 980px;
}

.page-title { margin: 0 0 12px; }

.article img { max-width: 100%; height: auto; }
.article pre { overflow: auto; padding: 12px; border: 1px solid rgba(127,127,127,.35); border-radius: 8px; }
.article code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

.footer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(127,127,127,.35);
  opacity: .75;
  font-size: 0.95rem;
}

@media (max-width: 920px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid rgba(127,127,127,.35); }
}

/* Sidebar look */
.vr-sidebar {
  position: sticky;
  top: 80px; /* sotto la navbar */
}

.vr-sidebar-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.95rem;   /* un filo più piccolo */
  line-height: 1.35;
}

.vr-sidebar-list li {
  margin: 6px 0;
}

.vr-sidebar-list a.active {
  font-weight: 700;
  text-decoration: underline;
}


/* Content typography */

.article h1,
.article h2,
.article h3,
.article h4 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

@media (prefers-color-scheme: dark) {
  .article h2 {
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
}

.article {
  font-size: 1.05rem;

  margin: auto;
}

.article p {
  margin: 0.8rem 0;
  line-height: 1.6;
  margin: 1rem 0;
}
/* Tabelle stile Luigi */

.article table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article th,
.article td {
  border: 1px solid #dee2e6;
  padding: 0.5rem 0.6rem;
}

.article th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #212529;
}

@media (prefers-color-scheme: dark) {
  .article th,
  .article td {
    border-color: #555;
  }

  .article th {
    background-color: #2a2a2a;
    color: #f1f1f1;
  }
}

.article ul,
.article ol {
  margin: 0.8rem 0 0.8rem 1.4rem;
}

.article li {
  margin: 0.3rem 0;
}


.vr-news { /* su desktop la rendiamo sticky */
  position: static;
}

@media (min-width: 992px) {
  .vr-news {
    position: sticky;
    top: 80px;
  }
}

.vr-news-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

.vr-news-list li {
  margin: 10px 0;
}

.vr-news-date {
  font-size: 0.85rem;
  opacity: 0.7;
}

body.has-bottom-ad { padding-bottom: 0; }

.vr-bottom-ad {

}

@media (prefers-color-scheme: dark) {
  .vr-bottom-ad {
    background: #2b2b2b;
  }
}

.vr-bottom-ad{
  position: static;     /* oppure: relative */
  border-top: 1px solid rgba(127,127,127,.35);
   background: #f1f3f5;
  backdrop-filter: blur(8px);
  padding: 8px 10px;
  z-index: auto;
  box-shadow: 0 -3px 10px rgba(0,0,0,.15);
}

/* centered inner container */
.vr-bottom-ad-inner {
  max-width: 980px;     /* centro, non full width */
  margin: 0 auto;
  position: relative;
}

/* optional close button */
.vr-ad-close {
  position: absolute;
  right: 6px;
  top: 2px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
}
.vr-ad-close:hover { opacity: 1; }

@media (prefers-color-scheme: dark) {
  .article blockquote {
    background: rgba(255,255,255,0.05);
    border-left-color: #adb5bd;
  }
}

.article blockquote {
  margin: 1.2rem 0;
  padding: 0.6rem 1rem;
  border-left: 4px solid #6c757d;
  background: rgba(0,0,0,0.03);
  font-style: italic;
}

.article blockquote p {
  margin: 0.4rem 0;
}

.article blockquote {
  position: relative;
}

.article blockquote::before {
  content: "“";
  font-size: 3rem;
  position: absolute;
  left: -10px;
  top: -10px;
  opacity: 0.15;
}


