[hidden]{display:none!important}
:root{
  --bg:#E8EEEC; --surface:#F7FAF9; --surface-2:#D9E6E2; --ink:#12302A; --muted:#4F655E;
  --line:#9BB5AE; --accent:#0E6B5C; --accent-ink:#F7FAF9;
  --hl:#C98200; --hl-soft:#FBE3B0; --hl-ink:#3F2A00;
  --sans:"Barlow","Roboto","Helvetica Neue",Arial,sans-serif;
  --cond:"Barlow Condensed","Roboto Condensed","Arial Narrow",sans-serif;
  color-scheme:light;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0F1F1C; --surface:#16302B; --surface-2:#1F433C; --ink:#E3EFEC; --muted:#9DB8B1;
    --line:#3E6159; --accent:#4CB9A2; --accent-ink:#0B1A17;
    --hl:#F5B53A; --hl-soft:#4A3812; --hl-ink:#FFE3A8;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0F1F1C; --surface:#16302B; --surface-2:#1F433C; --ink:#E3EFEC; --muted:#9DB8B1;
  --line:#3E6159; --accent:#4CB9A2; --accent-ink:#0B1A17;
  --hl:#F5B53A; --hl-soft:#4A3812; --hl-ink:#FFE3A8;
  color-scheme:dark;
}
html{scroll-padding-top:env(safe-area-inset-top,0px);-webkit-text-size-adjust:100%}
*,*::before,*::after{box-sizing:inherit}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:1rem;line-height:1.5}
main{max-width:46rem;margin:0 auto;padding:1.75rem 1rem 3rem}
.brand{display:flex;align-items:center;gap:.7rem;margin:0 0 1.1rem}
.brand img{width:3.5rem;height:3.5rem;border-radius:50%;flex:none;box-shadow:0 0 0 1px var(--line)}
.brand span{font-family:var(--cond);font-weight:700;font-size:1.3rem;line-height:1.1}
h1{font-family:var(--cond);font-weight:700;font-size:clamp(2.3rem,9vw,3.4rem);line-height:.95;letter-spacing:-.01em;margin:0 0 .6rem}
.lede{margin:0 0 1.6rem;color:var(--muted);max-width:34rem}
.search label[for="q"]{display:block;font-weight:600;margin-bottom:.35rem}
.field{display:flex;gap:.5rem}
.field input{flex:1;min-width:0;font:700 1.35rem var(--cond);padding:.5rem .8rem;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink)}
.field input::placeholder{color:var(--muted);font-weight:600}
.field input:focus-visible{outline:2px solid var(--hl);outline-offset:1px;border-color:var(--hl)}
.field button{font:600 1rem var(--sans);padding:0 1.15rem;border-radius:10px;border:0;background:var(--accent);color:var(--accent-ink);cursor:pointer}
.row{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.45rem;min-height:1.6em}
.esito{margin:0;color:var(--muted)}
.toggle{display:inline-flex;align-items:center;gap:.5rem;font-size:.95rem;cursor:pointer;white-space:nowrap;margin-left:auto}
.toggle input{appearance:none;-webkit-appearance:none;width:2.2rem;height:1.3rem;border-radius:1rem;background:var(--line);position:relative;margin:0;cursor:pointer;transition:background .15s}
.toggle input::after{content:"";position:absolute;top:.15rem;left:.15rem;width:1rem;height:1rem;border-radius:50%;background:var(--surface);transition:transform .15s}
.toggle input:checked{background:var(--accent)}
.toggle input:checked::after{transform:translateX(.9rem)}
.toggle input:focus-visible{outline:2px solid var(--hl);outline-offset:2px}
.panel{margin-top:.6rem;background:var(--surface);border:1px solid var(--line);border-radius:14px}
.panel-head{padding:.9rem 1rem .1rem}
.panel h2{font-family:var(--cond);font-weight:700;font-size:1.7rem;line-height:1.1;margin:0}
.meta{margin:.1rem 0 0;color:var(--muted);font-size:.92rem}
.legend{margin:.3rem 0 0;font-size:.85rem;color:var(--muted);display:flex;align-items:center;gap:.45rem}
.legend svg{flex:none}
.tree-wrap{overflow-x:auto;padding:.6rem .6rem .9rem}
.tree{display:block}
.tree text{font-family:var(--cond);font-size:14px;font-weight:600;fill:var(--ink);text-anchor:middle}
.tree .dt{font-family:var(--sans);font-size:10px;font-weight:500;fill:var(--muted)}
.tree .e{fill:none;stroke:var(--line);stroke-width:1.25}
.tree .e.g{stroke-dasharray:4 3}
.tree .e.on{stroke:var(--hl);stroke-width:2.75}
.tree .nd{cursor:pointer;outline:none}
.tree .leaf rect{fill:var(--surface);stroke:var(--line);stroke-width:1}
.tree .mg rect{fill:var(--surface-2);stroke:none}
.tree .mg.g rect{fill:var(--surface);stroke:var(--muted);stroke-width:1.25;stroke-dasharray:3 3}
.tree .rt rect{fill:var(--accent);stroke:none}
.tree .rt text{fill:var(--accent-ink);font-size:15px;font-weight:700}
.tree .unk rect{fill:none;stroke:var(--muted);stroke-width:1.25;stroke-dasharray:3 3}
.tree .unk text{fill:var(--muted)}
.tree .on rect{fill:var(--hl-soft);stroke:var(--hl);stroke-width:2}
.tree .on text{fill:var(--hl-ink)}
.tree .rt.on rect{fill:var(--accent);stroke:var(--hl);stroke-width:2.75}
.tree .rt.on text{fill:var(--accent-ink)}
.tree .unk.on rect,.tree .mg.g.on rect{fill:var(--hl-soft);stroke:var(--hl)}
.tree .rt.unk.on text{fill:var(--hl-ink)}
.tree .nd:focus-visible rect{stroke:var(--hl);stroke-width:2.5}
.info{position:sticky;bottom:0;margin:0;padding:.75rem 1rem calc(.75rem + env(safe-area-inset-bottom,0px));background:var(--surface);border-top:1px solid var(--line);border-radius:0 0 14px 14px;font-size:.97rem}
section.index{margin-top:2.2rem}
section.index h2,details summary{font-family:var(--cond);font-weight:700;font-size:1.4rem;line-height:1.2;margin:0}
.hint{margin:.1rem 0 .75rem;color:var(--muted);font-size:.92rem}
.chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(3.5rem,1fr));gap:.4rem}
.chip{display:flex;flex-direction:column;gap:.3rem;padding:.4rem .55rem .5rem;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:700 1.15rem/1.1 var(--cond);cursor:pointer;text-align:left}
.chip .bar{display:block;height:3px;border-radius:2px;background:var(--accent);opacity:.6}
.chip[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.chip[aria-pressed="true"] .bar{background:var(--accent-ink)}
.never{margin:.9rem 0 0;color:var(--muted);font-size:.92rem}
details.missing{margin-top:2.2rem}
details summary{cursor:pointer}
details p{margin:.5rem 0 0;max-width:40rem}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
button:focus-visible,summary:focus-visible{outline:2px solid var(--hl);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.toggle input,.toggle input::after{transition:none}}
/* ---- shared header, language switch, page tabs ---- */
.top{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin:0 0 1.1rem}
.top .brand{margin:0;min-width:0}
.lang{display:inline-flex;flex:none;border:1.5px solid var(--line);border-radius:999px;overflow:hidden;background:var(--surface)}
.lang button{font:600 .9rem var(--sans);letter-spacing:.03em;padding:.3rem .75rem;border:0;background:transparent;color:var(--muted);cursor:pointer}
.lang button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.tabs{display:flex;gap:.4rem;margin:0 0 1.4rem;flex-wrap:wrap}
.tabs a{font:600 .95rem var(--sans);padding:.35rem .85rem;border-radius:999px;border:1px solid var(--line);color:var(--ink);text-decoration:none;background:var(--surface)}
.tabs a[aria-current="page"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.tabs a:focus-visible,.lang button:focus-visible{outline:2px solid var(--hl);outline-offset:2px}
/* ---- cluster page ---- */
.groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:.7rem;margin-top:1rem}
.group{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:.75rem .85rem .9rem}
.group.on{border-color:var(--hl);box-shadow:0 0 0 2px var(--hl)}
.group h2{font-family:var(--cond);font-weight:700;font-size:1.6rem;line-height:1;margin:0;display:flex;align-items:center;gap:.5rem}
.group .badge{font:600 .75rem var(--sans);padding:.1rem .5rem;border-radius:999px;border:1px dashed var(--muted);color:var(--muted)}
.group .count{margin:.2rem 0 .55rem;color:var(--muted);font-size:.88rem}
.srv{display:flex;flex-wrap:wrap;gap:.35rem;margin:0;padding:0;list-style:none}
.srv a,.srv span{display:inline-block;min-width:2.9rem;text-align:center;padding:.2rem .45rem;border-radius:7px;border:1px solid var(--line);font:700 1.05rem/1.2 var(--cond);color:var(--ink);text-decoration:none;background:var(--bg)}
.srv a:hover{border-color:var(--accent)}
.srv a:focus-visible{outline:2px solid var(--hl);outline-offset:1px}
.srv .on{background:var(--hl-soft);border-color:var(--hl);color:var(--hl-ink)}
.note{margin:1.4rem 0 0;color:var(--muted);font-size:.9rem;max-width:40rem}
/* flags in the language switch, ? badge */
.lang button{display:inline-flex;align-items:center;padding:.35rem .55rem;opacity:.5;transition:opacity .15s}
.lang button[aria-pressed="true"]{background:var(--surface-2);opacity:1}
.lang button:hover{opacity:1}
.flag{display:block;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.18)}
.group .badge{display:inline-grid;place-items:center;width:1.5rem;height:1.5rem;padding:0;font:700 .95rem var(--sans);border-radius:50%;border:1.5px dashed var(--muted);color:var(--muted)}
@media (prefers-reduced-motion:reduce){.lang button{transition:none}}
/* cluster: plain (non-clickable) server numbers, nicer ? badge */
.srv span{cursor:default}
.group .badge{width:auto;min-width:1.6rem;height:1.6rem;padding:0 .35rem;border:0;border-radius:999px;background:var(--hl-soft);color:var(--hl-ink);font:700 1.2rem/1 var(--cond);letter-spacing:0;box-shadow:inset 0 0 0 1.5px var(--hl)}
/* narrow screens (phones, Telegram window): keep the brand from running under the flags */
.top .brand span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:420px){
  .top .brand img{width:2.6rem;height:2.6rem}
  .top .brand span{font-size:1.1rem}
  .lang button{padding:.3rem .4rem}
  .lang .flag{width:24px;height:16px}
}
/* the ? after an unconfirmed group name: same font and size as "G4" */
.group .badge{all:unset;font:inherit;color:inherit;margin-left:.1rem;cursor:help}
.group h2{gap:.2rem}
/* Telegram: logo link, button next to the tabs, invitation at the bottom */
a.brand{color:inherit;text-decoration:none;border-radius:999px}
a.brand img{transition:box-shadow .15s}
a.brand:hover img,a.brand:focus-visible img{box-shadow:0 0 0 2px var(--tg)}
a.brand:focus-visible{outline:2px solid var(--hl);outline-offset:3px}
:root{--tg:#1A7DB8;--tg-hover:#156A9C}
.tg{display:inline-flex;align-items:center;gap:.45rem;font:600 .95rem var(--sans);padding:.35rem .95rem .35rem .8rem;border-radius:999px;background:var(--tg);color:#fff;text-decoration:none;white-space:nowrap;transition:background .15s}
.tg:hover{background:var(--tg-hover)}
.tg:focus-visible{outline:2px solid var(--hl);outline-offset:2px}
.tg-ico{flex:none}
.tabs .tg{margin-left:auto}
.community{margin-top:2.6rem;padding:1.3rem 1.2rem 1.4rem;border-radius:14px;background:var(--surface);border:1px solid var(--line);border-top:4px solid var(--tg)}
.community h2{font-family:var(--cond);font-weight:700;font-size:1.6rem;line-height:1.1;margin:0}
.community p{margin:.45rem 0 1rem;color:var(--muted);max-width:34rem}
.tg.big{padding:.6rem 1.3rem .6rem 1.1rem;font-size:1.02rem}
@media (prefers-reduced-motion:reduce){.tg,a.brand img{transition:none}}
.tabs a.tg{background:var(--tg);color:#fff;border-color:var(--tg);padding:.35rem .95rem .35rem .8rem}
.tabs a.tg:hover{background:var(--tg-hover);border-color:var(--tg-hover)}
/* smaller invitation banner and Telegram buttons */
.community{margin-top:2.2rem;padding:.9rem 1rem 1rem;border-top-width:3px}
.community h2{font-size:1.3rem}
.community p{margin:.3rem 0 .75rem;font-size:.92rem}
.tg.big{padding:.45rem 1rem .45rem .85rem;font-size:.95rem}
.tabs a.tg{padding:.35rem .8rem .35rem .7rem}
.tg-ico{width:16px;height:16px}
/* cluster: section titles, server path, history */
h2.sec{font-family:var(--cond);font-weight:700;font-size:1.4rem;line-height:1.2;margin:1.6rem 0 0}
.path{list-style:none;margin:.2rem 0 0;padding:.6rem .8rem;display:flex;flex-wrap:wrap;gap:.35rem .9rem;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.path li{display:flex;flex-direction:column;line-height:1.15}
.path li.pt{flex-basis:100%;color:var(--muted);font-size:.88rem}
.path .d{font-size:.78rem;color:var(--muted)}
.path b{font:700 1.2rem var(--cond)}
.path b.no{color:var(--muted);font:500 .9rem var(--sans);padding-top:.15rem}
.hist{margin-top:2.2rem}
.hist h2.sec{margin-top:0}
.tl{list-style:none;margin:.4rem 0 0;padding:0;display:grid;gap:.5rem}
.tl details{background:var(--surface);border:1px solid var(--line);border-radius:14px}
.tl summary{display:flex;align-items:baseline;flex-wrap:wrap;gap:.2rem .6rem;padding:.65rem .9rem;cursor:pointer;font-family:var(--sans);font-size:1rem}
.tl summary .d{font:700 1.3rem/1.1 var(--cond)}
.tl summary .sm{color:var(--muted);font-size:.88rem;margin-left:auto}
.tl .cur{font:600 .75rem var(--sans);padding:.05rem .5rem;border-radius:999px;background:var(--accent);color:var(--accent-ink);align-self:center}
.tl details[open] summary{border-bottom:1px solid var(--surface-2)}
.tl .note{margin:.6rem .9rem 0}
.hgs{list-style:none;margin:0;padding:.3rem .9rem .8rem}
.hg{display:grid;grid-template-columns:2.6rem minmax(0,1fr);column-gap:.5rem;align-items:start;padding:.45rem 0;border-bottom:1px solid var(--surface-2)}
.hg:last-child{border-bottom:0}
.hg > b{font:700 1.15rem/1.6 var(--cond);white-space:nowrap}
.hg .srv{gap:.25rem}
.hg .srv span{min-width:2.5rem;padding:.1rem .3rem;font-size:.98rem}
.hg .srv .in{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:var(--surface)}
.chg{grid-column:2;margin:.3rem 0 0;font-size:.85rem;color:var(--muted)}
.chg span{font:600 .95rem var(--cond);color:var(--ink);margin-right:.15rem}
.chg span.on{background:var(--hl-soft);color:var(--hl-ink);padding:0 .25rem;border-radius:4px}
.hg.on > b{color:var(--hl)}
.hg .srv .on{background:var(--hl-soft);border-color:var(--hl);color:var(--hl-ink)}
.hg .badge{color:var(--muted);margin-left:.1rem;cursor:help;font:inherit}
.chg{margin:.3rem 0 0;font-size:.85rem;color:var(--muted)}
.hg .chg{grid-column:2}
.group .chg + .chg{margin-top:.1rem}
.srv .in{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
/* phones: page tabs in two columns of equal buttons, Join AOAG across the last row */
@media (max-width:560px){
  .tabs{display:grid;grid-template-columns:1fr 1fr;gap:.45rem}
  .tabs a.tg{grid-column:1 / -1}
  .tabs a,.tabs a.tg{display:flex;align-items:center;justify-content:center;text-align:center;margin:0;padding:.5rem .4rem;border-radius:10px;white-space:nowrap}
}
/* small invitation at the bottom: one line, title and button */
.community{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem .8rem;margin-top:2rem;padding:.6rem .8rem;border-top-width:1px;border-left:3px solid var(--tg)}
.community h2{font-size:1.05rem;font-family:var(--sans);font-weight:600}
.community p{display:none}
.tg.big{padding:.35rem .85rem .35rem .7rem;font-size:.9rem}
/* cluster: G1 on its own row (it also has New / Left) */
#g-G1{grid-column:1 / -1}
.path{display:grid;grid-template-columns:repeat(auto-fill,minmax(6.6rem,1fr))}
.path li.pt{grid-column:1 / -1}

/* cluster facts, between the current groups and the history */
.facts{margin-top:2.2rem}
.facts h2.sec{margin-top:0}
.fx{list-style:none;margin:.6rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:.6rem}
.fx li{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:.7rem .85rem .8rem;display:flex;flex-direction:column;gap:.3rem}
.fx b{font:700 1.7rem/1 var(--cond);color:var(--accent)}
.fx span{font-size:.92rem;line-height:1.4}

/* home: page cards and the G1 cards, each one a link */
.hgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(13.5rem,1fr));gap:.6rem;margin-top:.7rem}
.hc{display:flex;flex-direction:column;gap:.15rem;min-width:0;padding:.8rem .95rem .9rem;border-radius:12px;background:var(--surface);border:1px solid var(--line);color:var(--ink);text-decoration:none}
.hc:hover{border-color:var(--accent)}
.hc:focus-visible{outline:2px solid var(--hl);outline-offset:2px}
.hc-t,.hc-s{display:flex;justify-content:space-between;gap:.5rem}
.hc-t{font:700 1.45rem/1.15 var(--cond)}
.hc-s{font:700 1.05rem/1.2 var(--cond);color:var(--accent)}
.hc-t span:last-child{color:var(--accent)}
.hc-k{margin-top:.3rem;font-size:.85rem;color:var(--muted)}
.hc-v{font:700 1.75rem/1.1 var(--cond);overflow-wrap:anywhere}
.hc-d{font-size:.9rem;color:var(--muted)}
.hc-f{margin-top:auto;padding-top:.4rem;font:600 .85rem var(--sans);color:var(--accent)}
