/* lab.html: la CSP del sito non ammette stili inline */
*, *::before, *::after { box-sizing: border-box; }
/* Solo tema chiaro, colori delle landing di arx, missus e nomina.
   Layout: a single wide topology figure (one VPS, every path the traffic can take), then three short reference blocks underneath. */
:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --group: #f3f5f9;
  --fg: #1a2035;
  --muted: #5a6680;
  --line: #cfd6e3;
  --brand-a: #5b8af5;
  --brand-b: #20b2aa;
  --c-direct: #2f62d8;
  --c-cf: #d9661a;
  --c-mail: #0f8a80;
  --c-dns: #7a4fc4;
  --c-admin: #5a6680;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.55; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; padding-block: 48px 64px; display: grid; gap: 48px; }

header { display: grid; gap: 12px; max-width: 760px; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; letter-spacing: .04em; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5vw, 54px); line-height: 1.02; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
h1 span { background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 18px; color: var(--muted); margin: 0; max-width: 64ch; }

figure { margin: 0; display: grid; gap: 14px; }
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; padding: 12px; }
.diagram svg { display: block; width: 100%; min-width: 900px; height: auto; color: var(--fg); }
figcaption { color: var(--muted); font-size: 14.5px; max-width: 80ch; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 0; margin: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 26px; height: 0; border-top: 2.5px solid; display: inline-block; }

/* SVG paint, all from tokens so both themes work */
.g  { fill: var(--group); stroke: var(--line); stroke-width: 1.2; }
.gv { fill: none; stroke: var(--fg); stroke-width: 1.6; }
.n  { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; }
.nd { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 4 3; }
.t  { font-family: var(--body); font-size: 13.5px; font-weight: 600; fill: var(--fg); }
.ts { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.gl { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); }
.vl { font-family: var(--display); font-size: 15px; font-weight: 800; fill: var(--fg); }
.el { font-family: var(--mono); font-size: 11.5px; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.w  { fill: none; stroke-width: 2; }
.wi { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.direct { stroke: var(--c-direct); } .cf { stroke: var(--c-cf); } .mail { stroke: var(--c-mail); } .dns { stroke: var(--c-dns); } .adm { stroke: var(--c-admin); }
.f-direct { fill: var(--c-direct); } .f-cf { fill: var(--c-cf); } .f-mail { fill: var(--c-mail); } .f-dns { fill: var(--c-dns); } .f-adm { fill: var(--c-admin); } .f-mut { fill: var(--muted); }
.dash { stroke-dasharray: 6 4; }
.tag { fill: var(--surface); stroke-width: 1.4; }
.tagt { font-family: var(--mono); font-size: 11px; font-weight: 500; text-anchor: middle; }

h2 { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
section { display: grid; gap: 18px; }
.sub { color: var(--muted); margin: 0; max-width: 68ch; }

.demos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: grid; gap: 8px; align-content: start; color: inherit; text-decoration: none; min-width: 0; }
.demo:hover { border-color: var(--brand-a); }
.demo .sw { margin-right: 0; }
.demo .via { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.demo .host { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--c-direct); overflow-wrap: anywhere; }
.demo p { margin: 0; font-size: 15px; }
.demo code { font-family: var(--mono); font-size: .88em; }
.demo .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.demo .badges img { height: 20px; width: auto; max-width: 100%; }
.demo pre { margin: 0; font-family: var(--mono); font-size: 12px; background: var(--group); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.product h3 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.product .role { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.product ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; }
.product code, td code, .sub code { font-family: var(--mono); font-size: .88em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
td:first-child { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.facts div { padding: 14px 4px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.facts b { font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--muted); }
.facts span { font-variant-numeric: tabular-nums; }

footer { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.crumbs { font-family: var(--mono); font-size: 13px; display: flex; gap: 10px; align-items: center; color: var(--muted); }
.crumbs .lang-tog { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang-tog button { background: none; border: 0; color: var(--muted); padding: 3px 10px; font: inherit; font-size: 12px; letter-spacing: .08em; cursor: pointer; }
.lang-tog button.active { background: var(--brand-a); color: var(--surface); }
.lang-tog button:focus-visible { outline: 2px solid var(--brand-a); outline-offset: 2px; }
.crumbs a { color: var(--brand-a); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
footer a { color: var(--brand-a); }
.k-direct { color: var(--c-direct); } .k-cf { color: var(--c-cf); } .k-mail { color: var(--c-mail); } .k-dns { color: var(--c-dns); } .k-admin { color: var(--c-admin); }
.b-direct { background: var(--c-direct); } .b-dns { background: var(--c-dns); } .b-cf { background: var(--c-cf); } .b-admin { background: var(--c-admin); } .b-mail { background: var(--c-mail); }

