/* ==========================================================================
   cowsay — tema Ghost per cowsayso.com
   Palette: latte, inchiostro (macchie), erba, naso rosa della mucca.
   ========================================================================== */

/* ---------- Font (ospitati in locale, niente servizi esterni) ---------- */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("../fonts/bricolage-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("../fonts/bricolage-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("../fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
    src: url("../fonts/jetbrains-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
    src: url("../fonts/jetbrains-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Colori ---------- */

:root {
    --bg: #fdf8ee;
    --bg-soft: #f6eddb;
    --surface: #ffffff;
    --ink: #17130f;
    --muted: #675d51;
    --line: #e5d9c4;
    --accent: #23794b;
    --accent-ink: #ffffff;
    --accent-soft: #dcf1e3;
    --nose: #ff8fab;
    --nose-soft: #ffe1e9;
    --butter: #f6c945;
    --ok: #23794b;
    --ok-soft: #dcf1e3;
    --ko: #cf3f2c;
    --ko-soft: #fde3dd;
    --meh: #b9770e;
    --meh-soft: #fbefd2;
    --spot: #17130f;
    --term-bg: #15120f;
    --term-bar: #26211b;
    --term-ink: #f2eadb;
    --term-dim: #8f857a;
    --term-green: #8fe3a5;
    --term-red: #ff8a7a;
    --term-yellow: #ffd36e;
    --shadow-hard: 5px 5px 0 var(--ink);

    --font-body: var(--gh-font-body, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    --font-heading: var(--gh-font-heading, "Bricolage Grotesque", "Inter", system-ui, sans-serif);
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --radius: 16px;
    --wrap: 1180px;
    --narrow: 720px;
    --header-h: 68px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #12100d; --bg-soft: #1a1713; --surface: #201c17; --ink: #f4ecdf; --muted: #aa9f91; --line: #342c24;
        --accent: #6fd39a; --accent-ink: #0d140f; --accent-soft: #183326;
        --nose: #ff9fb8; --nose-soft: #3a1f28; --butter: #f6c945;
        --ok: #6fd39a; --ok-soft: #183326; --ko: #ff7d68; --ko-soft: #3b1f1a; --meh: #f0b54a; --meh-soft: #382b14;
        --spot: #f4ecdf; --term-bg: #0b0a08; --term-bar: #1c1814;
        --shadow-hard: 5px 5px 0 #000;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #12100d; --bg-soft: #1a1713; --surface: #201c17; --ink: #f4ecdf; --muted: #aa9f91; --line: #342c24;
    --accent: #6fd39a; --accent-ink: #0d140f; --accent-soft: #183326;
    --nose: #ff9fb8; --nose-soft: #3a1f28; --butter: #f6c945;
    --ok: #6fd39a; --ok-soft: #183326; --ko: #ff7d68; --ko-soft: #3b1f1a; --meh: #f0b54a; --meh-soft: #382b14;
    --spot: #f4ecdf; --term-bg: #0b0a08; --term-bar: #1c1814;
    --shadow-hard: 5px 5px 0 #000;
    color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
pre, code, kbd { font-family: var(--font-mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
mark { background: none; color: inherit; }
::selection { background: var(--nose); color: #17130f; }
:focus-visible { outline: 3px solid var(--nose); outline-offset: 2px; border-radius: 6px; }

.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: calc(var(--narrow) + 32px); }
@media (min-width: 700px) { .wrap { padding: 0 28px; } .wrap-narrow { max-width: calc(var(--narrow) + 56px); } }

.prompt { color: var(--accent); font-weight: 700; }

/* ---------- Bottoni e tag ---------- */

.btn {
    display: inline-flex; align-items: center; gap: .45em;
    padding: .75em 1.3em;
    background: var(--ink); color: var(--bg);
    border: 2px solid var(--ink); border-radius: 999px;
    font-family: var(--font-heading); font-weight: 700; font-size: 1rem; text-decoration: none;
    box-shadow: 3px 3px 0 var(--nose);
    transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--nose); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--nose); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn-ghost:hover { box-shadow: 4px 4px 0 var(--ink); }

.tag {
    display: inline-block;
    font-family: var(--font-mono); font-size: .76rem; font-weight: 600;
    text-transform: lowercase; text-decoration: none;
    color: var(--accent); background: var(--accent-soft);
    padding: .2em .65em; border-radius: 6px;
}
.tag::before { content: "#"; opacity: .6; }
.tag:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- Header ---------- */

.site-header {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 2px solid var(--ink);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .55em; color: var(--ink); text-decoration: none; font-weight: 800; font-family: var(--font-heading); font-size: 1.35rem; letter-spacing: -.03em; }
.brand-logo { max-height: 38px; width: auto; }
.brand-cow {
    font-family: var(--font-mono); font-size: .9rem; font-weight: 700; letter-spacing: 0;
    background: var(--ink); color: var(--bg);
    padding: .25em .5em; border-radius: 10px;
    box-shadow: 2px 2px 0 var(--nose);
    transition: transform .15s ease;
}
.brand:hover .brand-cow { transform: rotate(-6deg) scale(1.05); }

.site-nav { flex: 1; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav .nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.site-nav .nav a { display: block; padding: .4em .8em; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav .nav a:hover, .site-nav .nav-current a { background: var(--nose-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme-toggle, .lang-switch {
    display: inline-grid; place-items: center;
    height: 40px; min-width: 40px; padding: 0 .6em;
    border: 2px solid var(--ink); border-radius: 999px;
    background: var(--surface); color: var(--ink);
    font-family: var(--font-mono); font-size: .8rem; font-weight: 700; text-decoration: none;
    cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.theme-toggle { font-size: 1.1rem; padding: 0; }
.theme-toggle:hover, .lang-switch:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }

@media (max-width: 640px) {
    :root { --header-h: 58px; }
    .header-inner { flex-wrap: wrap; gap: 6px 10px; padding-top: 8px; padding-bottom: 8px; min-height: 0; }
    .brand { font-size: 1.2rem; }
    .site-nav { order: 3; flex-basis: 100%; }
    .site-nav .nav a { padding-left: 0; padding-right: 1em; }
    .site-nav .nav a:hover, .site-nav .nav-current a { background: none; text-decoration: underline; }
    .theme-toggle, .lang-switch { height: 36px; min-width: 36px; }
}

/* ---------- Terminale (hero) ---------- */

.terminal {
    margin: 0;
    background: var(--term-bg);
    color: var(--term-ink);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: 8px 8px 0 var(--nose);
    overflow: hidden;
}
.terminal-bar {
    display: flex; align-items: center; gap: 7px;
    padding: 11px 14px;
    background: var(--term-bar);
    border-bottom: 1px solid #000;
}
.terminal-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff6b5f; }
.terminal-bar i:nth-child(2) { background: #ffc23d; }
.terminal-bar i:nth-child(3) { background: #33c957; }
.terminal-bar span { margin-left: 8px; font-family: var(--font-mono); font-size: .78rem; color: var(--term-dim); }
.terminal-body {
    margin: 0; padding: 18px 22px 22px;
    font-size: clamp(.62rem, 1.4vw, .95rem); line-height: 1.35;
    overflow-x: auto; white-space: pre;
}
.t-prompt { color: var(--term-green); font-weight: 700; }
.t-ok { color: var(--term-green); font-weight: 700; }
.t-ko { color: var(--term-red); font-weight: 700; }
.t-law { color: var(--term-yellow); font-weight: 700; }
.t-cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: text-bottom; background: var(--term-ink); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Hero ---------- */

.hero {
    position: relative; overflow: hidden;
    border-bottom: 2px solid var(--ink);
    background: var(--bg-soft);
}
.hero-spots { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--spot); opacity: .92; pointer-events: none; }
.hero-inner { position: relative; display: grid; gap: 44px; padding-top: 56px; padding-bottom: 64px; align-items: center; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 56px; padding-top: 88px; padding-bottom: 96px; } }
.hero-text { position: relative; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: .55em;
    margin: 0 0 1.2em; padding: .35em .9em;
    background: var(--surface); border: 2px solid var(--ink); border-radius: 999px;
    font-family: var(--font-mono); font-size: .8rem; font-weight: 600;
}
.kicker-dot { width: .65em; height: .65em; border-radius: 50%; background: var(--nose); box-shadow: 0 0 0 3px var(--nose-soft); }
.hero-title { font-size: clamp(2.5rem, 6.2vw, 4.4rem); margin-bottom: .35em; }
.hero-title mark {
    background: linear-gradient(transparent 58%, var(--nose) 58%, var(--nose) 90%, transparent 90%);
    padding: 0 .08em;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); margin: 0 0 1.5em; max-width: 32em; }
.hero-milk { list-style: none; padding: 0; margin: 0 0 1.8em; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-milk li {
    display: inline-flex; align-items: center; gap: .5em;
    padding: .35em .85em; border-radius: 999px;
    background: var(--surface); border: 1.5px solid var(--line);
    font-size: .88rem; font-weight: 600;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-terminal { transform: rotate(1.2deg); transition: transform .3s ease; }
.hero-terminal:hover { transform: rotate(0); }
@media (max-width: 959px) { .hero-terminal { transform: none; } }

/* ---------- La mucca nei fumetti (verdetti, CTA, errore) ---------- */

.cowsay { margin: 0; }
.cowsay .bubble {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    padding: 1em 1.25em;
    box-shadow: var(--shadow-hard);
}
.cowsay .bubble > :first-child { margin-top: 0; }
.cowsay .bubble > :last-child { margin-bottom: 0; }
.cowsay .cow {
    margin: 10px 0 0; padding: 0 0 0 .4em;
    font-size: .92rem; line-height: 1.22;
    color: var(--ink); background: none; overflow: visible; white-space: pre;
}

/* ---------- Elenco articoli ---------- */

.feed { padding-top: 56px; padding-bottom: 72px; }
.section-title { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0 0 24px; letter-spacing: 0; }

.post-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
    position: relative;
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; border-bottom: 2px solid var(--ink); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.035); }
.card-media-empty {
    display: grid; place-items: center; text-decoration: none;
    background:
        radial-gradient(ellipse 46px 30px at 22% 32%, var(--spot) 98%, transparent),
        radial-gradient(ellipse 60px 38px at 80% 72%, var(--spot) 98%, transparent),
        var(--bg-soft);
}
.card-media-empty pre { margin: 0; padding: .2em .5em; font-size: 2rem; font-weight: 700; color: var(--ink); background: var(--surface); border-radius: 10px; border: 2px solid var(--ink); }
.card-body { display: flex; flex-direction: column; gap: .55em; padding: 18px 20px 20px; flex: 1; }
.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card-title { font-size: 1.4rem; margin: .15em 0 0; line-height: 1.15; }
.card-title a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--nose), var(--nose)) 0 92% / 0 .3em no-repeat; transition: background-size .25s ease; }
.card:hover .card-title a { background-size: 100% .3em; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .tag, .card .milk { position: relative; z-index: 2; }
.card-excerpt { color: var(--muted); margin: 0; font-size: .97rem; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; font-size: .8rem; color: var(--muted); margin-top: .5em; font-family: var(--font-mono); }

.card-featured { grid-column: 1 / -1; }
@media (min-width: 1100px) {
    .card-featured { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
    .card-featured .card-media { aspect-ratio: 16 / 9; height: auto; min-width: 0; align-self: stretch; border-bottom: 0; border-right: 2px solid var(--ink); }
    .card-featured .card-media img { object-position: left center; }
    .card-featured .card-body { padding: 28px 32px; justify-content: center; min-width: 0; }
    .card-featured .card-title { font-size: clamp(1.6rem, 2.3vw, 2.1rem); }
    .card-featured .card-excerpt { font-size: 1.05rem; flex: 0; }
}
@media (min-width: 640px) and (max-width: 1099px) {
    .card-featured .card-title { font-size: 1.8rem; }
}
/* etichetta solo per articoli usciti negli ultimi 30 giorni (classe aggiunta da main.js) */
.card-featured.is-new::before {
    content: "NEW"; position: absolute; top: 14px; right: 14px; z-index: 3;
    font-family: var(--font-mono); font-size: .72rem; font-weight: 800; letter-spacing: .08em;
    background: var(--nose); color: #17130f; padding: .25em .6em; border-radius: 6px; border: 2px solid var(--ink);
}
html[lang="it"] /* etichetta solo per articoli usciti negli ultimi 30 giorni (classe aggiunta da main.js) */
.card-featured.is-new::before { content: "NUOVO"; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 44px; }
.page-number { color: var(--muted); font-size: .9rem; font-family: var(--font-mono); }

/* ---------- Livello dell'articolo: il latte ---------- */

.milk {
    display: inline-flex; align-items: center; gap: .45em;
    font-size: .8rem; font-weight: 700; color: var(--ink);
    white-space: nowrap;
}
.milk-meter { display: inline-flex; gap: 2px; align-items: flex-end; height: 1em; }
.milk-meter i { display: block; width: 5px; border-radius: 2px; background: var(--surface); border: 1.5px solid var(--ink); }
.milk-meter i:nth-child(1) { height: 45%; }
.milk-meter i:nth-child(2) { height: 72%; }
.milk-meter i:nth-child(3) { height: 100%; }
.milk-1 .milk-meter i:nth-child(-n+1),
.milk-2 .milk-meter i:nth-child(-n+2),
.milk-3 .milk-meter i:nth-child(-n+3) { background: var(--ink); }
.milk-card { padding: .2em .65em; border-radius: 6px; background: var(--bg-soft); border: 1.5px solid var(--line); }
.milk-full {
    display: inline-flex; flex-wrap: wrap; gap: .3em .6em;
    margin: 0 0 1.2em; padding: .5em 1em;
    border: 2px solid var(--ink); border-radius: 999px;
    background: var(--surface); font-size: .92rem;
    box-shadow: 3px 3px 0 var(--ink);
    white-space: normal;
}
.milk-full .milk-meter { height: 1.1em; }
.milk-full .milk-meter i { width: 6px; }
.milk-desc { font-weight: 400; color: var(--muted); }

/* ---------- Archivi (tag, autore) ---------- */

.archive-header { padding-top: 64px; padding-bottom: 8px; }
.archive-header .hero-kicker { margin-bottom: 1em; }
.archive-title { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
.archive-description { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin: 0; }
.author-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--nose); }

/* ---------- Articolo ---------- */

.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 30; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--nose); border-bottom: 1px solid var(--ink); }

.article-header { padding-top: 56px; padding-bottom: 28px; }
.article-title { font-size: clamp(2.2rem, 5.5vw, 3.5rem); margin-top: .45em; }
.article-excerpt { font-size: 1.22rem; color: var(--muted); margin: 0 0 1em; line-height: 1.55; }
.article-meta { font-size: .85rem; color: var(--muted); font-family: var(--font-mono); }
.article-meta a { color: var(--ink); font-weight: 700; text-decoration: none; }
.article-image { margin-bottom: 44px; }
.article-image img { width: 100%; border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.article-image figcaption, .gh-content figcaption { text-align: center; color: var(--muted); font-size: .88rem; margin-top: .9em; }

/* Layout contenuto con supporto card larghe/a tutta pagina */
.gh-content {
    display: grid;
    grid-template-columns:
        [full-start] minmax(16px, 1fr)
        [wide-start] minmax(0, 200px)
        [main-start] min(var(--narrow), calc(100% - 32px))
        [main-end] minmax(0, 200px)
        [wide-end] minmax(16px, 1fr)
        [full-end];
    font-size: 1.125rem;
    line-height: 1.78;
    padding-bottom: 24px;
}
.gh-content > * { grid-column: main-start / main-end; margin: 0 0 1.3em; min-width: 0; }
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.gh-content > .kg-width-full img { border-radius: 0; }
.gh-content h2 { font-size: clamp(1.6rem, 3vw, 2.05rem); margin-top: 1.7em; }
.gh-content h2::before { content: "## "; font-family: var(--font-mono); font-size: .7em; color: var(--nose); font-weight: 700; }
.gh-content h3 { font-size: 1.4rem; margin-top: 1.5em; }
.gh-content strong { font-weight: 700; }
.gh-content img { border-radius: 12px; }
.gh-content blockquote {
    border-left: 4px solid var(--nose); padding: .3em 0 .3em 1.1em;
    font-family: var(--font-heading); font-size: 1.25em; line-height: 1.45; color: var(--ink);
}
.gh-content hr { border: 0; text-align: center; margin: 2.4em 0; }
.gh-content hr::after { content: "🐄 · · · 🥛 · · · 🐄"; color: var(--muted); letter-spacing: .25em; }
.gh-content :not(pre) > code {
    font-size: .86em; background: var(--nose-soft); color: var(--ink);
    padding: .12em .4em; border-radius: 6px;
}
.gh-content pre {
    position: relative;
    background: var(--term-bg); color: var(--term-ink);
    padding: 2.6em 1.3em 1.2em; border-radius: 12px;
    border: 2px solid var(--ink);
    overflow-x: auto; font-size: .9rem; line-height: 1.6;
}
.gh-content pre::before {
    content: ""; position: absolute; top: 12px; left: 14px;
    width: 10px; height: 10px; border-radius: 50%;
    background: #ff6b5f; box-shadow: 16px 0 0 #ffc23d, 32px 0 0 #33c957;
}
.gh-content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.gh-content table { border-collapse: collapse; width: 100%; font-size: .94rem; display: block; overflow-x: auto; }
.gh-content th, .gh-content td { border: 1.5px solid var(--line); padding: .55em .8em; text-align: left; vertical-align: top; }
.gh-content th { background: var(--ink); color: var(--bg); border-color: var(--ink); font-family: var(--font-heading); }
.gh-content tr:nth-child(even) td { background: var(--bg-soft); }
.gh-content li { margin-bottom: .35em; }
.gh-content li::marker { color: var(--nose); font-weight: 700; }

.article-footer { padding-bottom: 40px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.cta-cow { margin: 12px 0 44px; }
.cta-cow .btn { margin-top: 1em; }
.read-next { padding-top: 24px; padding-bottom: 80px; border-top: 2px solid var(--ink); }
.read-next .section-title { margin-top: 44px; }

/* ---------- Verdetti della mucca (callout con 🐄) ---------- */

.gh-content > .cow-verdict { margin: 2em 0 2.2em; }
.cow-verdict .verdict-label {
    display: inline-block; margin-bottom: .7em;
    font-family: var(--font-mono); font-size: .8rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .05em;
    padding: .3em .75em; border-radius: 8px;
    background: var(--ink); color: var(--bg);
    border: 2px solid var(--ink);
    transform: rotate(-1.5deg);
}
.cow-verdict .bubble { font-size: 1.06rem; line-height: 1.6; }
.cow-verdict.v-giusto .bubble { background: var(--ok-soft); }
.cow-verdict.v-giusto .verdict-label { background: var(--ok); color: var(--accent-ink); }
.cow-verdict.v-sbagliato .bubble { background: var(--ko-soft); }
.cow-verdict.v-sbagliato .verdict-label { background: var(--ko); color: #fff; }
.cow-verdict.v-dipende .bubble { background: var(--meh-soft); }
.cow-verdict.v-dipende .verdict-label { background: var(--butter); color: #17130f; }
.cow-verdict.v-dice .bubble { background: var(--nose-soft); }
.cow-verdict.v-dice .verdict-label { background: var(--nose); color: #17130f; }

/* ---------- Footer ---------- */

.site-footer { margin-top: auto; background: var(--term-bg); color: var(--term-ink); border-top: 2px solid var(--ink); }
.footer-inner { display: grid; gap: 28px; padding-top: 48px; padding-bottom: 48px; align-items: end; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: auto 1fr; gap: 64px; } }
.footer-cow { margin: 0; font-size: .85rem; line-height: 1.22; color: var(--term-green); white-space: pre; overflow-x: auto; }
.footer-text { font-size: .93rem; color: var(--term-dim); }
.footer-text p { margin: 0 0 .5em; }
.footer-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; color: var(--term-ink); letter-spacing: -.03em; }
.footer-text .nav { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: .8em 0; }
.footer-text a { color: var(--term-ink); }
.footer-copy { font-size: .82rem; font-family: var(--font-mono); }

/* ---------- Lingua (inglese di default, italiano sotto /it/) ---------- */

html:not([lang="it"]) .t-it { display: none !important; }
html[lang="it"] .t-en { display: none !important; }
html:not([lang="it"]) .nav-chi-siamo,
html[lang="it"] .nav-about { display: none; }

/* ---------- Errore ---------- */

.error-template { display: grid; place-items: center; min-height: 100vh; }
.error-page { max-width: 560px; padding-top: 40px; padding-bottom: 40px; }
.error-code { font-family: var(--font-heading); font-size: 4rem; font-weight: 800; line-height: 1; }
.error-page .btn { margin-top: 1em; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .hero-terminal { transform: none; }
}
