:root {
  color-scheme: dark only;
  --bg: #121314;
  --bg-soft: #191a1b;
  --border: #292b2d;
  --text: #c9d1d9;
  --dim: #8b949e;
  --fluo: #7ee787;
  --violet: #d2a8ff;
  --cyan: #22d3ee;
  --bright: #f2f3f4;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, "SF Mono", monospace;
  font-size: 15px;
  line-height: 1.75;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 96px; position: relative; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.lang { position: absolute; top: 22px; right: 24px; font-size: 12.5px; color: var(--dim); }
.lang a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.lang a:hover { color: var(--fluo); }
.lang .cur { color: var(--text); }

.back { font-size: 13.5px; color: var(--violet); text-decoration: underline; text-underline-offset: 4px; }
.back:hover { color: var(--fluo); }

header.art { margin-top: 18px; }
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--bright);
  line-height: 1.3;
  margin-top: 10px;
}
.meta { color: var(--dim); font-size: 13px; margin-top: 10px; }
.meta .tag {
  display: inline-block;
  font-size: 11.5px;
  color: var(--cyan);
  border: 1px solid rgba(34,211,238,.3);
  border-radius: 4px;
  padding: 0 6px;
  margin-left: 6px;
  vertical-align: 1px;
}

article { margin-top: 40px; }
article p { margin: 14px 0; }
article h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--violet);
  margin: 42px 0 10px;
}
article h3 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--fluo);
  margin: 28px 0 6px;
}
article strong { color: var(--bright); }
article ul, article ol { margin: 14px 0 14px 22px; }
article li { margin: 7px 0; }
article li::marker { color: var(--fluo); }

article blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--fluo);
  background: var(--bg-soft);
  border-radius: 0 6px 6px 0;
  color: var(--bright);
}
article blockquote p { margin: 0; }
article blockquote cite { display: block; margin-top: 8px; color: var(--dim); font-style: normal; font-size: 12.5px; }

.box {
  margin: 22px 0;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 6px;
}
.box .k { color: var(--fluo); font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.stat {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 12px 14px;
  text-align: center;
}
.stat .n { display: block; color: var(--fluo); font-size: 22px; font-weight: 700; }
.stat .l { display: block; color: var(--dim); font-size: 12px; margin-top: 4px; line-height: 1.4; }

.srcnote {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  color: var(--dim);
  font-size: 12.5px;
}

footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 12.5px;
}

/* indice sezione scritti */
ul.idx { list-style: none; }
ul.idx li { padding: 14px 0; border-bottom: 1px dashed var(--border); }
ul.idx li:last-child { border-bottom: none; }
ul.idx .t { font-size: 16px; font-weight: 600; }
ul.idx .t a { color: var(--bright); }
ul.idx .t a:hover { color: var(--cyan); }
ul.idx .d { color: var(--dim); font-size: 13.5px; margin-top: 4px; }
ul.idx .when { color: var(--fluo); font-size: 12.5px; }

@media (max-width: 560px) {
  h1 { font-size: 24px; }
}
