/***********************************************************
*     ######  ######   ######  ######  ######  #######
*     ##   ## ##   ## ##      ##    ## ##   ## ##
*     ######  ######  ##      ##    ## ##   ## #####
*     ##   ## ##   ## ##      ##    ## ##   ##
*     ##   ## ######   ######  ######  ######  #######
*
************************************************************
* Copyright (C) 2007-2026 Renato Brunetti - Tutti i diritti riservati
* Nome file  : app.css
* Descrizione: Design system responsive per la knowledge base pubblica.
* Autore     : Renato Brunetti
* Sito web   : https://www.renato-brunetti.it
* E-mail     : sviluppo@oceweb.it
************************************************************
* Data creazione: 18/08/2026
* Data modifica : 23/08/2026
***********************************************************/

:root {
    --kb-ink: #202122;
    --kb-text: #202122;
    --kb-muted: #54595d;
    --kb-line: #c8ccd1;
    --kb-paper: #ffffff;
    --kb-surface: #ffffff;
    --kb-soft: #f8f9fa;
    --kb-accent: #36c;
    --kb-accent-dark: #0645ad;
    --kb-code: #6b1d1d;
    --kb-shadow: 0 6px 18px rgba(32, 33, 34, .08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: var(--kb-paper); color: var(--kb-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; }
main { flex: 1 0 auto; width: 100%; }
a { color: var(--kb-accent-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--kb-ink); }
button, input { font: inherit; }
.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { background: var(--kb-ink); color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.kb-header { min-height: 78px; display: grid; grid-template-columns: 240px minmax(260px, 1fr) auto; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #a2a9b1; color: #36c; font-weight: 700; letter-spacing: -.08em; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-size: 1rem; letter-spacing: -.02em; }
.brand-copy small { margin-top: 4px; color: #54595d; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.header-search { display: flex; min-width: 0; border: 1px solid #a2a9b1; background: #fff; }
.header-search input { width: 100%; min-width: 0; border: 0; padding: 10px 14px; color: var(--kb-ink); outline: 0; }
.header-search input::placeholder { color: #72777d; }
.header-search:focus-within { outline: 3px solid rgba(54,102,204,.18); border-color: #36c; }
.header-search button { border: 0; border-left: 1px solid var(--kb-line); padding: 0 14px; background: #fff; color: var(--kb-accent-dark); cursor: pointer; font-size: .82rem; font-weight: 700; }
.header-search button:hover { background: var(--kb-soft); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: #202122; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a:focus-visible { color: #36c; }

.page-shell { padding: 42px 0 76px; }
.page-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 46px; align-items: start; }
.content-column { min-width: 0; max-width: 860px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; color: var(--kb-muted); font-size: .82rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb span::before { content: "/"; margin-right: 8px; color: #72777d; }
h1, h2, h3, h4 { color: var(--kb-ink); line-height: 1.18; letter-spacing: -.025em; }
h1 { margin: 0 0 14px; font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { margin: 0 0 10px; font-size: 1.45rem; }
h3 { margin: 0 0 8px; font-size: 1.05rem; }
p { margin: 0 0 16px; }
.lede { max-width: 720px; margin-bottom: 28px; color: var(--kb-muted); font-size: 1.08rem; }
.section-label { margin: 0 0 13px; color: var(--kb-muted); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.text-muted { color: var(--kb-muted); }

.kb-sidebar { position: sticky; top: 24px; }
.kb-sidebar h2 { margin-bottom: 14px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--kb-muted); }
.category-nav { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--kb-line); }
.category-nav li { border-bottom: 1px solid var(--kb-line); }
.category-nav a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0 12px 13px; color: var(--kb-text); text-decoration: none; border-left: 3px solid var(--kb-accent); }
.category-nav a:hover { background: var(--kb-soft); color: var(--kb-accent-dark); padding-left: 17px; }
.category-nav small { color: var(--kb-muted); font-variant-numeric: tabular-nums; }
.sidebar-note { margin-top: 28px; padding: 16px; border-top: 3px solid var(--kb-accent); background: var(--kb-soft); color: var(--kb-muted); font-size: .86rem; }

.directory-list { border-top: 1px solid var(--kb-line); }
.directory-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--kb-line); }
.directory-marker { width: 6px; min-height: 62px; background: var(--kb-accent); }
.directory-row h2 { margin-bottom: 5px; font-size: 1.3rem; }
.directory-row h2 a { color: var(--kb-ink); text-decoration: none; }
.directory-row h2 a:hover { color: var(--kb-accent-dark); }
.directory-row p { max-width: 640px; margin-bottom: 0; color: var(--kb-muted); font-size: .94rem; }
.directory-count { color: var(--kb-muted); font-size: .82rem; text-align: right; white-space: nowrap; }
.directory-count strong { display: block; color: var(--kb-ink); font-size: 1.2rem; }
.directory-arrow { margin-left: 8px; color: var(--kb-accent); font-size: 1.3rem; }

.category-head { border-bottom: 1px solid var(--kb-line); padding-bottom: 28px; }
.category-head-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--kb-muted); font-size: .88rem; }
.category-head-meta strong { color: var(--kb-ink); }
.group-filter { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0 32px; }
.group-filter a { padding: 6px 10px; border: 1px solid var(--kb-line); color: var(--kb-text); background: #fff; font-size: .82rem; text-decoration: none; }
.group-filter a:hover, .group-filter a[aria-current="true"] { border-color: var(--kb-accent); color: var(--kb-accent-dark); background: var(--kb-soft); }
.group-filter small { color: var(--kb-muted); }
.article-index { border-top: 1px solid var(--kb-line); }
.article-group { margin-top: 31px; }
.article-group:first-child { margin-top: 0; }
.article-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 0 0 12px; }
.article-group-heading h2 { margin: 0; font-size: 1.15rem; }
.article-group-heading a { font-size: .78rem; }
.article-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 22px; gap: 18px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--kb-line); }
.article-row a { text-decoration: none; }
.article-row h3 { margin: 0 0 4px; font-size: 1.05rem; }
.article-row h3 a { color: var(--kb-ink); }
.article-row h3 a:hover { color: var(--kb-accent-dark); }
.article-row p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--kb-muted); font-size: .88rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-code { color: var(--kb-code); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem; overflow-wrap: anywhere; }
.article-arrow { color: var(--kb-accent); font-size: 1.25rem; }
.empty-state { padding: 26px 0; border-top: 1px solid var(--kb-line); color: var(--kb-muted); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 34px 0 0; }
.pagination a, .pagination span { display: grid; min-width: 38px; min-height: 38px; place-items: center; padding: 6px 10px; border: 1px solid var(--kb-line); background: #fff; color: var(--kb-text); font-size: .86rem; text-decoration: none; }
.pagination a:hover, .pagination .current { border-color: var(--kb-accent); background: var(--kb-soft); color: var(--kb-accent-dark); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 48px; align-items: start; }
.article-head { border-bottom: 1px solid var(--kb-line); padding-bottom: 24px; }
.article-head h1 { margin-bottom: 14px; font-size: clamp(2rem, 4vw, 3rem); }
.article-code-label { display: inline-block; margin-bottom: 16px; color: var(--kb-code); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; font-weight: 700; }
.article-summary { margin: 0; color: var(--kb-text); font-size: 1.12rem; line-height: 1.65; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; color: var(--kb-muted); font-size: .8rem; }
.article-section { padding: 29px 0 0; scroll-margin-top: 20px; }
.article-section h2 { margin-bottom: 13px; font-size: 1.35rem; }
.article-section > p { max-width: 760px; }
.toc { position: sticky; top: 24px; border-left: 1px solid var(--kb-line); padding-left: 20px; }
.toc strong { display: block; margin-bottom: 12px; color: var(--kb-ink); font-size: .85rem; }
.toc a { display: block; padding: 5px 0; color: var(--kb-muted); font-size: .84rem; text-decoration: none; }
.toc a:hover { color: var(--kb-accent-dark); }
.detail-list { margin: 0; padding-left: 20px; }
.detail-list li { margin-bottom: 9px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.detail-panel { border-top: 2px solid var(--kb-line); padding: 16px 0 2px; }
.detail-panel h3 { font-size: 1rem; }
.detail-panel p { color: var(--kb-muted); font-size: .92rem; }
.cause-probability { color: var(--kb-code); font-size: .78rem; font-weight: 700; }
.command-block { margin: 12px 0; padding: 12px 14px; overflow-x: auto; border: 1px solid var(--kb-line); background: var(--kb-soft); color: var(--kb-ink); font: .82rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.command-block small { display: block; margin-bottom: 5px; color: var(--kb-muted); font: .72rem/1.2 Inter, ui-sans-serif, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.command-block pre { margin: 0; padding: 0; background: transparent; color: inherit; font: inherit; white-space: inherit; }
.solution-panel { border-top: 3px solid var(--kb-accent); }
.solution-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; color: var(--kb-muted); font-size: .8rem; }
.warning-box { border-left: 3px solid var(--kb-code); padding: 12px 14px; background: #fff8f6; color: var(--kb-code); }
.source-list, .related-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.source-list a, .related-list a { font-size: .9rem; }
.source-type { color: var(--kb-muted); font-size: .78rem; }

.search-head { border-bottom: 1px solid var(--kb-line); padding-bottom: 24px; }
.search-form { display: flex; max-width: 680px; margin: 24px 0 34px; border: 1px solid var(--kb-line); background: #fff; }
.search-form input { flex: 1; min-width: 0; border: 0; padding: 12px 14px; outline: 0; }
.search-form button { border: 0; padding: 0 18px; background: var(--kb-accent); color: #fff; font-weight: 700; cursor: pointer; }
.search-form button:hover { background: var(--kb-accent-dark); }
.search-result-context { margin: 0 0 18px; color: var(--kb-muted); font-size: .9rem; }

.home-intro { padding: 70px 0 58px; border-bottom: 1px solid var(--kb-line); }
.home-intro h1 { max-width: 760px; margin-bottom: 17px; }
.home-intro .lede { max-width: 700px; }
.home-search { display: flex; max-width: 720px; margin-top: 28px; border: 1px solid var(--kb-ink); background: #fff; box-shadow: var(--kb-shadow); }
.home-search input { flex: 1; min-width: 0; border: 0; padding: 15px 16px; outline: 0; }
.home-search button { border: 0; padding: 0 22px; background: var(--kb-ink); color: #fff; font-weight: 700; cursor: pointer; }
.home-search button:hover { background: var(--kb-accent-dark); }
.home-section { padding: 48px 0 68px; }
.home-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.home-section-head h2 { margin: 0; }
.home-section-head a { font-size: .86rem; }
.home-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 46px; }
.home-note { padding: 18px; border-top: 3px solid var(--kb-accent); background: var(--kb-soft); color: var(--kb-muted); font-size: .9rem; }

.site-footer { flex: 0 0 auto; border-top: 1px solid var(--kb-line); background: var(--kb-soft); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 42px; padding: 30px 0 24px; }
.footer-grid strong { color: var(--kb-ink); }
.footer-grid p { max-width: 320px; margin: 8px 0 0; color: var(--kb-muted); font-size: .86rem; }
.footer-grid h2 { margin: 0 0 8px; color: var(--kb-muted); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-grid a { display: block; width: fit-content; color: var(--kb-text); font-size: .86rem; text-decoration: none; }
.footer-bottom { display: flex; justify-content: left; gap: 20px; padding: 12px 0 18px; border-top: 1px solid var(--kb-line); color: var(--kb-muted); font-size: .75rem; }

@media (max-width: 900px) {
    .kb-header { grid-template-columns: 1fr auto; gap: 14px 24px; padding: 14px 0; }
    .header-search { grid-column: 1 / -1; grid-row: 2; }
    .page-grid, .home-grid { grid-template-columns: 1fr; gap: 32px; }
    .kb-sidebar { position: static; }
    .page-grid > .content-column, .home-grid > div { order: 1; }
    .page-grid > .kb-sidebar, .home-grid > .home-note { order: 2; }
    .category-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
    .article-layout { grid-template-columns: 1fr; gap: 32px; }
    .toc { position: static; order: -1; border: 1px solid var(--kb-line); padding: 14px 16px; background: #fff; }
    .toc a { display: inline-block; margin-right: 16px; }
}
@media (max-width: 620px) {
    .container { width: min(100% - 30px, 1180px); }
    .site-nav { gap: 13px; }
    .site-nav a { font-size: .8rem; }
    .brand-copy small { display: none; }
    .page-shell { padding: 30px 0 52px; }
    .directory-row { grid-template-columns: 8px minmax(0, 1fr); gap: 13px; }
    .directory-count { grid-column: 2; text-align: left; }
    .directory-arrow { display: none; }
    .category-nav { grid-template-columns: 1fr; }
    .article-row { grid-template-columns: minmax(0, 1fr) 18px; gap: 10px; }
    .article-code { grid-column: 1; grid-row: 2; }
    .article-arrow { grid-column: 2; grid-row: 1 / span 2; }
    .detail-grid, .footer-grid { grid-template-columns: 1fr; gap: 22px; }
    .footer-bottom { display: block; }
    .footer-bottom span { display: block; margin-top: 4px; }
    .home-intro { padding: 46px 0 42px; }
    .home-search, .search-form { display: block; }
    .home-search input, .search-form input { width: 100%; }
    .home-search button, .search-form button { width: 100%; padding: 12px; }
}

/* pagina statistiche pubbliche */
.statistics-head { max-width: 900px; margin-bottom: 2.5rem; }
.statistics-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.statistics-summary div { border-top: 3px solid #36c; padding-top: .7rem; }
.statistics-summary strong { display: block; color: #202122; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 400; line-height: 1; }
.statistics-summary span { display: block; margin-top: .35rem; color: #54595d; font-size: .78rem; }
.statistics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.statistics-card { min-width: 0; border: 1px solid #c8ccd1; background: #fff; padding: 1.25rem; box-shadow: 0 2px 8px rgba(32, 33, 34, .04); }
.statistics-card-wide { grid-column: 1 / -1; }
.statistics-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.statistics-card-head .section-label { margin-bottom: .4rem; }
.statistics-card-head h2 { margin: 0; font-size: 1.25rem; }
.statistics-card-head > span { color: #54595d; font-size: .75rem; white-space: nowrap; }
.statistics-canvas { position: relative; min-height: 260px; margin: 0 0 1.25rem; }
.statistics-canvas-short { min-height: 300px; }
.statistics-canvas-medium { min-height: 280px; }
.statistics-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.statistics-chart-fallback { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 1rem; border: 1px dashed #c8ccd1; color: #54595d; font-size: .86rem; text-align: center; }
.statistics-chart-fallback.is-hidden { display: none; }
.statistics-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.statistics-table th, .statistics-table td { border-top: 1px solid #eaecf0; padding: .55rem .35rem; text-align: left; vertical-align: top; }
.statistics-table thead th { color: #54595d; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.statistics-table tbody th { color: #202122; font-weight: 600; }
.statistics-table tbody th a { color: #202122; text-decoration: none; }
.statistics-table tbody th a:hover { color: #0645ad; text-decoration: underline; }
.statistics-table td { color: #54595d; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.statistics-table small { display: block; margin-top: .15rem; color: #54595d; font-size: .72rem; font-weight: 400; }
.statistics-table-search th:first-child { width: 60%; }
@media (max-width: 900px) {
    .statistics-card-wide { grid-column: auto; }
}
@media (max-width: 620px) {
    .statistics-summary { grid-template-columns: 1fr; gap: 1rem; }
    .statistics-grid { grid-template-columns: 1fr; gap: 1rem; }
    .statistics-card { padding: 1rem; }
    .statistics-card-head { display: block; }
    .statistics-card-head > span { display: block; margin-top: .35rem; }
    .statistics-canvas, .statistics-canvas-short, .statistics-canvas-medium { min-height: 240px; }
    .statistics-table { font-size: .78rem; }
}

/* tema wiki bootstrap */
body { background: #fff; color: #202122; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .9375rem; line-height: 1.6; }
a { color: #36c; }
a:hover { color: #0645ad; }
.site-header { background: #fff; color: #202122; border-bottom: 1px solid #a2a9b1; }
.site-header .navbar { min-height: 58px; padding-top: .45rem; padding-bottom: .45rem; }
.site-header .navbar-brand { color: #202122; font-size: 1.1rem; }
.site-header .navbar-brand:hover { color: #0645ad; }
.site-header .nav-link { color: #202122; }
.site-header .nav-link:hover, .site-header .nav-link:focus { color: #36c; }
.site-header .navbar-toggler { border-color: #a2a9b1; border-radius: 2px; }
.header-search { border: 0; background: transparent; }
.header-search input { width: min(360px, 100%); border: 1px solid #a2a9b1; border-radius: 2px; padding: .375rem .75rem; color: #202122; }
.site-header .header-search button { border: 1px solid #a2a9b1; border-radius: 2px; background: #fff; color: #202122; }
.site-header .header-search button:hover,
.site-header .header-search button:focus-visible { border-color: #0645ad; background-color: #0645ad; color: #fff; }
main { background: #fff; }
.page-shell { padding: 1.5rem 0 3rem; }
.page-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; }
.content-column { max-width: none; }
.breadcrumb { margin-bottom: 1rem; font-size: .8125rem; }
.breadcrumb a { text-decoration: none; }
.section-label { color: #54595d; font-size: .75rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
h1, h2, h3, h4 { color: #202122; font-weight: 600; letter-spacing: 0; }
h1 { margin-bottom: .75rem; font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
.lede { max-width: 800px; margin-bottom: 1.5rem; color: #54595d; font-size: 1rem; }
.kb-sidebar { position: sticky; top: 1rem; border: 1px solid #a2a9b1; padding: 1rem; background: #f8f9fa; }
.kb-sidebar h2 { margin-bottom: .75rem; font-size: 1rem; font-weight: 600; }
.category-nav { border-top: 1px solid #c8ccd1; }
.category-nav li { border-bottom: 1px solid #c8ccd1; }
.category-nav a { display: flex; padding: .45rem 0; border-left: 0; color: #36c; }
.category-nav a:hover { padding-left: 0; background: transparent; color: #0645ad; text-decoration: underline; }
.category-nav small { color: #54595d; }
.sidebar-note { margin: 1rem 0 0; border-top: 1px solid #a2a9b1; padding: .75rem 0 0; background: transparent; color: #54595d; font-size: .8125rem; }
.directory-list { border-top: 1px solid #a2a9b1; }
.directory-row { grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: .75rem 0; background: #fff; }
.directory-marker { display: none; }
.directory-row h2 { margin-bottom: .1rem; font-size: 1rem; }
.directory-row h2 a { color: #36c; text-decoration: none; }
.directory-row h2 a:hover { text-decoration: underline; }
.directory-row p { color: #202122; font-size: .875rem; }
.directory-count { color: #54595d; font-size: .8125rem; }
.directory-count strong { display: inline; color: #202122; font-size: .8125rem; font-weight: 600; }
.directory-arrow { color: #36c; }
.category-head { padding-bottom: 1rem; border-bottom: 1px solid #a2a9b1; }
.category-head-meta { color: #54595d; font-size: .8125rem; }
.category-head-meta strong { color: #202122; }
.group-filter { gap: .35rem; margin: 1rem 0 1.5rem; }
.group-filter a { border: 1px solid #a2a9b1; border-radius: 2px; padding: .25rem .55rem; color: #36c; background: #f8f9fa; font-size: .8125rem; }
.group-filter a:hover, .group-filter a[aria-current="true"] { border-color: #72777d; background: #eaecf0; color: #0645ad; }
.article-index { border-top: 1px solid #a2a9b1; }
.article-group { margin-top: 1.25rem; }
.article-group-heading { margin-bottom: .25rem; padding-bottom: .25rem; border-bottom: 1px solid #c8ccd1; }
.article-group-heading h2 { font-size: 1rem; }
.article-row { grid-template-columns: minmax(0, 1fr) 180px 18px; gap: 1rem; padding: .65rem 0; }
.article-row h3 { margin-bottom: .15rem; font-size: .95rem; }
.article-row h3 a { color: #36c; }
.article-row p { color: #54595d; font-size: .8125rem; }
.article-code { color: var(--kb-code); font-size: .75rem; }
.article-arrow { color: #36c; }
.pagination { margin-top: 1.5rem; }
.pagination a, .pagination span { min-width: 2.25rem; min-height: 2.25rem; border-radius: 2px; padding: .25rem .55rem; }
.pagination a:hover, .pagination .current { border-color: #36c; background: #eaecf0; color: #0645ad; }
.article-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: 2rem; }
.article-head { padding-bottom: 1rem; }
.article-head h1 { font-size: 2rem; }
.article-code-label { margin-bottom: .75rem; color: var(--kb-code); font-size: .8125rem; }
.article-summary { font-size: 1rem; }
.article-meta { color: #54595d; font-size: .75rem; }
.article-section { padding-top: 1.5rem; }
.article-section h2 { margin-bottom: .6rem; border-bottom: 1px solid #a2a9b1; padding-bottom: .25rem; font-size: 1.35rem; }
.detail-panel { border-top: 0; padding: .5rem 0; }
.detail-grid > .detail-panel:only-child { grid-column: 1 / -1; }
.detail-panel h3 { font-weight: 600; }
.detail-panel p { color: #202122; font-size: .875rem; }
.command-block { border: 1px solid #c8ccd1; border-radius: 2px; background: #f8f9fa; color: #202122; }
.command-block small { color: #54595d; }
.solution-panel { border-top: 2px solid #36c; }
.warning-box { border-left-color: var(--kb-code); background: #fff8f6; }
.toc { top: 1rem; border-left: 1px solid #a2a9b1; padding-left: 1rem; }
.toc strong { font-size: .875rem; }
.toc a { color: #36c; font-size: .8125rem; }
.search-head { padding-bottom: 1rem; }
.search-form { border: 1px solid #a2a9b1; border-radius: 2px; }
.search-form button { border-radius: 0; background: #f8f9fa; color: #202122; }
.search-form button:hover { background: #eaecf0; color: #0645ad; }
.search-result-context { color: #54595d; font-size: .8125rem; }
.home-intro { padding: 2rem 0; border-bottom: 1px solid #a2a9b1; background: #f8f9fa; }
.home-intro h1 { max-width: 800px; font-size: 2rem; }
.home-search { max-width: 720px; border: 1px solid #a2a9b1; border-radius: 2px; box-shadow: none; }
.home-search button { background: #f8f9fa; color: #202122; }
.home-search button:hover { background: #eaecf0; color: #0645ad; }
.home-section { padding: 2rem 0 3rem; }
.home-note { border-top: 1px solid #a2a9b1; background: #f8f9fa; color: #54595d; }
.home-section-head { margin-bottom: .75rem; }
.site-footer { border-top: 1px solid #a2a9b1; background: #f8f9fa; }
.footer-grid { padding: 1.5rem 0 1rem; }
.footer-grid p, .footer-grid a { color: #54595d; }
.footer-grid a:hover { color: #36c; }
.footer-bottom { border-top: 1px solid #c8ccd1; }
@media (max-width: 900px) {
    .page-grid, .home-grid { grid-template-columns: 1fr; }
    .page-grid > .content-column, .home-grid > div { order: 1; }
    .page-grid > .kb-sidebar, .home-grid > .home-note { order: 2; }
    .kb-sidebar { position: static; }
    .article-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .toc { position: static; order: -1; border: 1px solid #a2a9b1; padding: .75rem 1rem; background: #fff; }
    .toc a { display: inline-block; margin-right: 1rem; }
}
@media (max-width: 620px) {
    .container { width: 100%; padding-right: 15px; padding-left: 15px; }
    h1, .article-head h1, .home-intro h1 { font-size: 1.65rem; }
    .directory-row { display: block; }
    .directory-count { margin-top: .35rem; text-align: left; }
    .directory-arrow { margin-left: .25rem; }
    .article-row { grid-template-columns: minmax(0, 1fr) 18px; }
    .article-code { grid-column: 1; grid-row: 2; }
    .article-arrow { grid-column: 2; grid-row: 1 / span 2; }
    .header-search input { width: 100%; }
}

/* home editoriale moderna */
.home-intro { padding: 4rem 0 3.5rem; background: #f8f9fa; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 3rem; align-items: end; }
.home-hero-copy { min-width: 0; }
.home-intro h1 { max-width: 760px; margin-bottom: 1rem; font-size: clamp(2.15rem, 4vw, 3.25rem); line-height: 1.1; letter-spacing: -.02em; }
.home-intro .lede { max-width: 700px; margin-bottom: 1.5rem; font-size: 1.05rem; }
.home-search { max-width: 760px; margin-top: 1.75rem; border-color: #72777d; }
.home-search input { min-height: 3.25rem; padding: .75rem 1rem; }
.home-search button { min-height: 3.25rem; padding: 0 1.25rem; background: #36c; color: #fff; }
.home-search button:hover { background: #0645ad; color: #fff; }
.home-scope { border-left: 1px solid #a2a9b1; padding-left: 1.5rem; }
.home-scope-title { margin-bottom: 1rem; color: #202122; font-size: .875rem; font-weight: 700; }
.home-scope-item { border-top: 1px solid #c8ccd1; padding: .8rem 0 .7rem; }
.home-scope-item strong { display: block; color: #36c; font-family: Georgia, "Times New Roman", serif; font-size: 2.8rem; font-weight: 400; line-height: 1; }
.home-scope-item span { display: block; margin-top: .35rem; color: #54595d; font-size: .8125rem; }
.home-section { padding: 3rem 0 4rem; }
.home-note { border: 1px solid #c8ccd1; border-top: 3px solid #36c; padding: 1.25rem; background: #f8f9fa; }
.home-note-label { margin-bottom: .75rem; color: #54595d; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.home-note strong { display: block; color: #202122; font-size: 1rem; line-height: 1.4; }
.home-note p:not(.home-note-label) { margin: .75rem 0 1rem; }
.home-section-head { margin-bottom: 1rem; }
.home-section-head h2 { font-size: 1.6rem; }
.directory-row { min-height: 4.25rem; align-items: center; }
.directory-row h2 { font-size: 1.05rem; }
.directory-row p { max-width: 700px; }
@media (max-width: 900px) {
    .home-hero { grid-template-columns: 1fr; gap: 2rem; }
    .home-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; border-top: 1px solid #a2a9b1; border-left: 0; padding: 1rem 0 0; }
    .home-scope-title { grid-column: 1 / -1; margin-bottom: .25rem; }
}
@media (max-width: 620px) {
    .home-intro { padding: 2.75rem 0 2.5rem; }
    .home-intro h1 { font-size: 2rem; }
    .home-intro .lede { font-size: .95rem; }
    .home-search { display: grid; grid-template-columns: 1fr; }
    .home-search button { width: 100%; }
    .home-scope { gap: 0 1rem; }
    .home-scope-item strong { font-size: 2.35rem; }
    .home-section { padding: 2.25rem 0 3rem; }
}

/* topbar sticky e responsive */
html { scroll-padding-top: 4.5rem; }
.site-header { position: sticky; top: 0; z-index: 1030; box-shadow: 0 1px 0 rgba(32, 33, 34, .08); }
.site-header .navbar { min-height: 102px; padding-top: .3rem; padding-bottom: .3rem; }
.site-header .navbar > .container { min-width: 0; }
.site-header .navbar-brand { display: flex; align-items: center; height: 96px; margin-right: 1.5rem; padding: 0; white-space: nowrap; }
.site-logo { display: block; width: auto; height: 92px; max-width: min(280px, 42vw); object-fit: contain; }
.header-search { min-width: 0; }
.header-search input { min-width: 0; }
@media (max-width: 991.98px) {
    .site-header .navbar { min-height: 84px; }
    .site-header .navbar-brand { height: 78px; }
    .site-logo { height: 72px; max-width: 220px; }
    .site-header .navbar-collapse { border-top: 1px solid #eaecf0; padding-top: .5rem; }
    .header-search { width: 100%; margin-top: .75rem !important; margin-bottom: .75rem !important; }
    .header-search input { flex: 1 1 auto; width: auto; }
    .site-header .navbar-nav .nav-link { padding-top: .55rem; padding-bottom: .55rem; }
}
@media (max-width: 575.98px) {
    .site-header .navbar { min-height: 74px; }
    .site-header .navbar-brand { height: 68px; }
    .site-logo { height: 62px; max-width: 185px; }
    .header-search { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
    .header-search input { width: 100%; }
    .header-search button { margin-left: 0 !important; }
}

/* palette unica e home casuale */
.home-intro { padding: 4.25rem 0 3.5rem; border-bottom: 1px solid #c8ccd1; background: #f8f9fa; }
.home-search-layout { max-width: 920px; }
.home-intro h1 { max-width: 760px; margin-bottom: 1.25rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; }
.home-search { max-width: 820px; margin-top: 1.75rem; border: 1px solid #72777d; box-shadow: 0 2px 5px rgba(32, 33, 34, .08); }
.home-search input { min-height: 3.5rem; padding: .8rem 1rem; }
.home-search button { min-height: 3.5rem; padding: 0 1.35rem; background: #36c; color: #fff; }
.home-search button:hover, .home-search button:focus { background: #0645ad; color: #fff; }
.home-random-section { padding: 3rem 0 4rem; }
.home-random-section .home-section-head { align-items: end; margin-bottom: 1rem; }
.home-random-section h2 { margin: 0; font-size: 1.55rem; }
.home-random-note { color: #54595d; font-size: .8125rem; }
.home-random-list { border-top: 1px solid #a2a9b1; }
.random-error-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px 18px; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid #c8ccd1; }
.random-error-row:hover { background: #f8f9fa; }
.random-error-main { min-width: 0; }
.random-error-meta { margin: 0 0 .15rem; color: #54595d; font-size: .75rem; }
.random-error-row h3 { margin: .1rem 0 .2rem; font-size: 1rem; }
.random-error-row h3 a { color: #36c; text-decoration: none; }
.random-error-row h3 a:hover, .random-error-row h3 a:focus { color: #0645ad; text-decoration: underline; }
.random-error-row p:not(.random-error-meta) { display: -webkit-box; margin: 0; overflow: hidden; color: #54595d; font-size: .875rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.random-error-code { color: #6b1d1d; font: .75rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.random-error-arrow { color: #36c; font-size: 1.15rem; text-decoration: none; }
.random-error-arrow:hover, .random-error-arrow:focus { color: #0645ad; }
.category-nav a { border-left-color: #36c; }
.directory-marker { background-color: #36c; }
.category-nav a:hover { background: #f8f9fa; color: #0645ad; }
.directory-row:hover { background: #f8f9fa; }
.article-row:hover { background: #f8f9fa; }
.article-row h3 a:hover, .article-arrow:hover { color: #0645ad; }
.footer-grid a:hover { color: #0645ad; text-decoration: underline; }
.site-footer { background: #f8f9fa; }

@media (max-width: 620px) {
    .home-intro { padding: 2.75rem 0 2.5rem; }
    .home-intro h1 { font-size: 2rem; }
    .home-search { display: grid; grid-template-columns: 1fr; }
    .home-search button { width: 100%; }
    .home-random-section { padding: 2.25rem 0 3rem; }
    .home-random-section .home-section-head { display: block; }
    .home-random-note { display: block; margin-top: .5rem; }
    .random-error-row { grid-template-columns: minmax(0, 1fr) 18px; gap: .5rem 1rem; }
    .random-error-code { grid-column: 1; grid-row: 2; }
    .random-error-arrow { grid-column: 2; grid-row: 1 / span 2; }
}
