/* Rota das Redes
   Plano: sinalização de metrô. Quatro linhas coloridas = quatro níveis; o resto fica quieto.
   Tipografia: Archivo em largura expandida para títulos; IBM Plex Mono para tudo que é CLI.
   Layout: coluna única de 1080px, trilha vertical com trilho e estações. */
:root {
  --bg: #F1F3F6;
  --surface: #FFFFFF;
  --surface2: #E8ECF1;
  --ink: #0F1B2A;
  --muted: #536174;
  --line: #D3DAE3;
  --brand: #0F1B2A;
  --on-brand: #FFFFFF;
  --focus: #FFB800;
  --l1: #12875A;
  --l2: #1F63D6;
  --l3: #D9610A; --l3t: #A94400;
  --l4: #B5235F;
  --ok: #12875A; --ok-t: #0C6B47;
  --bad: #C62828;
  --ok-bg: #E3F4EC;
  --bad-bg: #FBE8E8;
  --code-bg: #0F1B2A;
  --code-ink: #DDE7F3;
  --net: #1F63D6;
  --font-display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1219; --surface: #141C26; --surface2: #1C2733; --ink: #E7EDF5; --muted: #93A2B5; --line: #263342;
    --brand: #E7EDF5; --on-brand: #0C1219;
    --l1: #3DD598; --l2: #6EA3FF; --l3: #FF9A4D; --l3t: #FF9A4D; --l4: #FF6FA8;
    --ok: #3DD598; --ok-t: #3DD598; --bad: #FF7A7A; --ok-bg: #12301F; --bad-bg: #351A1C;
    --code-bg: #0A0F15; --code-ink: #DDE7F3; --net: #6EA3FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1219; --surface: #141C26; --surface2: #1C2733; --ink: #E7EDF5; --muted: #93A2B5; --line: #263342;
  --brand: #E7EDF5; --on-brand: #0C1219;
  --l1: #3DD598; --l2: #6EA3FF; --l3: #FF9A4D; --l3t: #FF9A4D; --l4: #FF6FA8;
  --ok: #3DD598; --ok-t: #3DD598; --bad: #FF7A7A; --ok-bg: #12301F; --bad-bg: #351A1C;
  --code-bg: #0A0F15; --code-ink: #DDE7F3; --net: #6EA3FF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; line-height: 1.1; }
.h-sm { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--on-brand); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.boot { padding: 48px 20px; color: var(--muted); }

/* ---------- barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.mark { color: var(--ink); }
/* selo discreto da versão beta (ao lado da marca) */
.beta-tag { flex: none; margin-left: -12px; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 7px; text-decoration: none; }
.beta-tag:hover { color: var(--ink); border-color: var(--muted); }
.beta-box { scroll-margin-top: 120px; }
.beta-box > * + * { margin-top: 10px; }
.beta-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-variation-settings: "wdth" 112; font-size: 1.05rem; letter-spacing: -0.01em; white-space: nowrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
/* indica que há abas escondidas à direita/esquerda (telas estreitas) */
.tabs.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.tabs.more-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); }
.tabs.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.tab { border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.95rem; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--ink); background: var(--surface2); }
.tab[aria-current="page"] { color: var(--on-brand); background: var(--brand); }
@media (max-width: 560px) { .brand-name { display: none; } }

/* ---------- páginas ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 24px 16px 56px; display: flex; flex-direction: column; gap: 28px; }
.page-title { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; font-variation-settings: "wdth" 118; letter-spacing: -0.02em; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.lead.small { font-size: 1rem; }
.eyebrow { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; }

.btn { border: 1px solid var(--line); background: var(--surface); padding: 10px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; line-height: 1.2; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn.primary:hover { opacity: 0.9; }
.btn.small { padding: 6px 10px; font-size: 0.88rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.muted { color: var(--muted); }
.err { color: var(--bad); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.8rem; font-weight: 600; background: var(--surface); }
.chip.l1 { border-color: var(--l1); color: var(--l1); }
.chip.l2 { border-color: var(--l2); color: var(--l2); }
.chip.l3 { border-color: var(--l3); color: var(--l3t); }
.chip.l4 { border-color: var(--l4); color: var(--l4); }
.chip.done { background: var(--ok-bg); border-color: var(--ok-t); color: var(--ok-t); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 8px; }
.hero h1 { font-size: clamp(2.5rem, 8vw, 4.8rem); font-weight: 800; font-variation-settings: "wdth" 125; letter-spacing: -0.035em; line-height: 0.96; margin: 10px 0 18px; }
.hero .cta { margin-top: 22px; }
.prog { display: flex; flex-direction: column; gap: 14px; }
.prog-big { display: flex; align-items: baseline; gap: 10px; }
.prog-big strong { font-family: var(--font-display); font-size: 3rem; font-weight: 800; font-variation-settings: "wdth" 118; line-height: 1; font-variant-numeric: tabular-nums; }
.prog-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; border: 0; background: transparent; padding: 4px 0; text-align: left; cursor: pointer; width: 100%; }
.prog-line span:first-child { font-weight: 600; font-size: 0.92rem; }
.prog-line .n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.status { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.status > div { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; padding: 12px 14px; font-size: 0.92rem; }
.status b { display: block; font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.02em; margin-bottom: 2px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }

/* ---------- linhas e estações ---------- */
.line { --c: var(--l1); display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 70px; }
.line-head { display: flex; align-items: center; gap: 14px; }
.badge { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; font-variation-settings: "wdth" 110; }
.line-head h2 { font-size: clamp(1.35rem, 4vw, 1.9rem); font-weight: 800; font-variation-settings: "wdth" 115; letter-spacing: -0.015em; }
.line-head .tag { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.line-head .count { margin-left: auto; font-family: var(--font-mono); font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.who { font-weight: 600; }
.note { color: var(--muted); font-size: 0.93rem; max-width: 80ch; }
.stations { position: relative; display: flex; flex-direction: column; margin-top: 6px; }
.stations::before { content: ""; position: absolute; left: 20px; top: 28px; bottom: 28px; width: 8px; border-radius: 4px; background: var(--c); }
.station { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0; position: relative; }
.rail { display: flex; justify-content: center; padding-top: 18px; position: relative; z-index: 1; }
.dot { --p: 0%; width: 26px; height: 26px; border-radius: 50%; border: 6px solid var(--c); background: linear-gradient(to top, var(--c) var(--p), var(--surface) var(--p)); box-shadow: 0 0 0 4px var(--bg); }
.dot.done { background: var(--c); position: relative; }
.dot.done::after { content: ""; position: absolute; left: 4px; top: 0px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.st-body { padding: 6px 0; min-width: 0; }
.st-head { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: grid; gap: 2px; }
.st-head:hover { border-color: var(--c); }
.st-head[aria-expanded="true"] { border-color: var(--c); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.st-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; font-variation-settings: "wdth" 108; }
.st-blurb { color: var(--muted); font-size: 0.93rem; }
.st-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.st-panel { background: var(--surface); border: 1px solid var(--c); border-top: 0; border-radius: 0 0 12px 12px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 760px) { .st-panel { grid-template-columns: 1fr; } }
.checks { border: 0; margin: 0; padding: 0; min-width: 0; }
.checks legend, .st-panel h3 { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; font-size: 0.97rem; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--c); cursor: pointer; }
.side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side p { font-size: 0.95rem; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.93rem; }
.links a { color: var(--l2); }
:root[data-theme="dark"] .links a { color: var(--l2); }

/* ---------- abas internas ---------- */
.seg { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface2); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; }
.seg-btn { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); font-size: 0.93rem; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.seg.lvl { background: var(--brand); }
.seg.lvl .seg-btn { color: var(--on-brand); font-size: 1rem; padding: 10px 20px; }
.seg.lvl .seg-btn.on { background: var(--focus); color: #0F1B2A; }
.lvinfo { margin: 8px 0 14px; max-width: 70ch; }

.field { width: 100%; max-width: 440px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font-family: var(--font-mono); font-size: 1rem; }
.field:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--focus); }
label.lbl { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* ---------- código e saídas ---------- */
.codewrap { position: relative; }
pre.code, pre.explain { margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 14px 14px; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.55; overflow-x: auto; white-space: pre; tab-size: 4; }
pre.explain { white-space: pre-wrap; word-break: break-word; font-size: 0.85rem; }
.codewrap .copy { position: absolute; top: 8px; right: 8px; }
.codewrap pre.code { padding-right: 78px; }
.copy { border: 1px solid #3A4A5E; background: #1B2736; color: #DDE7F3; border-radius: 7px; padding: 4px 10px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.copy:hover { background: #26364A; }
code.inline { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface2); padding: 1px 6px; border-radius: 5px; }

/* ---------- treino ---------- */
.stats { display: flex; gap: 22px; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-family: var(--font-display); font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats span { font-size: 0.8rem; color: var(--muted); }
.qprompt { font-size: 1.2rem; font-weight: 600; line-height: 1.4; }
.ans-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fb { border-radius: 10px; padding: 12px 14px; border: 1px solid; }
.fb.ok { background: var(--ok-bg); border-color: var(--ok); }
.fb.no { background: var(--bad-bg); border-color: var(--bad); }
.fb strong { display: block; margin-bottom: 8px; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.tbl th, .tbl td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface2); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.mono, .mono { font-family: var(--font-mono); font-size: 0.88rem; }
.tbl td { font-variant-numeric: tabular-nums; }
.bits { font-family: var(--font-mono); font-size: 0.86rem; letter-spacing: 0.02em; display: flex; flex-wrap: wrap; column-gap: 2px; }
.bits .oct { white-space: nowrap; }
.bits .n { color: var(--net); font-weight: 500; }
.bits .h { color: var(--muted); }
.bits-row { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: baseline; padding: 4px 0; }
.bits-row b { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.legend { font-size: 0.82rem; color: var(--muted); }
.legend .n { color: var(--net); font-weight: 600; }

.vrow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; gap: 8px; align-items: center; }
.vrow .field { max-width: none; }
.vrow-h { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; gap: 8px; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.x { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.x:hover { border-color: var(--bad); color: var(--bad); }

/* ---------- quiz ---------- */
.qbar { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.qbar > i { display: block; height: 100%; background: var(--ink); }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 11px 12px; cursor: pointer; }
.opt:hover:not([disabled]) { border-color: var(--ink); }
.opt .k { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.right .k { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .k { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt[disabled] { cursor: default; }
.score { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; font-variation-settings: "wdth" 118; line-height: 1; }
.rec { border-left: 5px solid var(--c, var(--ink)); padding: 10px 14px; background: var(--surface2); border-radius: 8px; }
.wlist { display: flex; flex-direction: column; gap: 14px; }
.wlist li { list-style: none; }
.wlist ul { padding: 0; margin: 0; }

/* ---------- tickets e labs ---------- */
.cards { display: flex; flex-direction: column; gap: 10px; }
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acc-h { width: 100%; text-align: left; border: 0; background: transparent; padding: 14px 16px; cursor: pointer; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.acc-h:hover { background: var(--surface2); }
.acc-h strong { font-family: var(--font-display); font-size: 1.05rem; font-variation-settings: "wdth" 108; }
.acc-h .sp { margin-left: auto; font-size: 0.82rem; color: var(--muted); font-family: var(--font-mono); }
.acc-b { padding: 4px 16px 18px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.step { display: flex; flex-direction: column; gap: 8px; }
.step h2 { font-size: 1rem; font-weight: 700; }
.step h2 span { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; color: var(--muted); margin-left: 8px; }
.callout { border-left: 4px solid var(--focus); background: var(--surface2); padding: 8px 12px; border-radius: 6px; font-size: 0.92rem; }

/* ---------- comandos ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 0.88rem; font-weight: 600; }
.chipbtn[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.cmd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); align-items: start; }
.cmd code { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500; word-break: break-word; }
.cmd p { grid-column: 1; font-size: 0.9rem; color: var(--muted); }
.cmd .copy { grid-column: 2; grid-row: 1 / span 2; background: var(--surface2); color: var(--ink); border-color: var(--line); }
.cmd .cat { font-size: 0.72rem; font-family: var(--font-mono); color: var(--muted); }

/* ---------- sobre ---------- */
.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 12px; }
.prose h2 { font-size: 1.4rem; font-weight: 800; font-variation-settings: "wdth" 112; margin-top: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

.foot { max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; display: flex; flex-direction: column; gap: 8px; }
.foot .fine { font-size: 0.8rem; }

@media (prefers-reduced-motion: no-preference) {
  .bar > i, .qbar > i { transition: width 0.35s ease; }
  .st-head, .opt, .btn, .tab { transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease; }
}

/* ======================================================================
   Segunda versão: conquistas, recompensas, topologias, recursos e PCAP
   ====================================================================== */

/* ---------- faixa de XP sob a barra superior ---------- */
.xpwrap { max-width: 1080px; margin: 0 auto; padding: 0 16px 8px; }
.xp-in { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 0.82rem; text-align: left; }
.xp-in:hover { border-color: var(--ink); }
.xp-lv { font-family: var(--font-mono); font-weight: 600; background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 0 8px; flex: none; }
.xp-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.xp-bar { flex: 1 1 60px; height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; min-width: 40px; }
.xp-bar > i { display: block; height: 100%; background: var(--l1); border-radius: 3px; }
.xp-n { font-family: var(--font-mono); color: var(--muted); white-space: nowrap; flex: none; }
.xp-day { font-family: var(--font-mono); color: var(--l3t); font-weight: 600; white-space: nowrap; flex: none; }
@media (max-width: 480px) { .xp-name { display: none; } }

/* ---------- avisos (toasts) ---------- */
.toasts { position: fixed; left: 0; right: 0; top: 108px; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { background: var(--brand); color: var(--on-brand); border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 0.95rem; box-shadow: 0 6px 20px rgba(0,0,0,0.25); max-width: 92vw; width: max-content; white-space: normal; border-left: 6px solid var(--focus); }
.toast-level { border-left-color: var(--l4); }
.toast-badge { border-left-color: var(--l1); }
.toast.out { opacity: 0; transition: opacity 0.3s ease; }

/* ---------- confete ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -14px; left: var(--x); width: 9px; height: 14px; background: var(--c); border-radius: 2px; animation: rr-fall 1.9s ease-in var(--d) forwards; }
@keyframes rr-fall { to { transform: translateY(105vh) rotate(var(--r)); opacity: 0.9; } }

/* ---------- recompensa no quiz ---------- */
.reward { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.xpgain { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; background: var(--ok-bg); color: var(--ok-t); border: 1.5px solid var(--ok); border-radius: 999px; padding: 2px 12px; }
.reward.no .xpgain { background: var(--surface2); color: var(--muted); border-color: var(--line); }
.chip.streak { border-color: var(--l3); color: var(--l3t); }
.fb .cons { margin-bottom: 8px; font-weight: 600; }
.result { text-align: left; }
.stars { display: flex; gap: 6px; }
.stars svg { width: 38px; height: 38px; fill: var(--surface2); stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; }
.stars svg.on { fill: var(--focus); stroke: #B58200; }
.verdict { font-size: 1.1rem; font-weight: 600; }
.xpsum b { font-family: var(--font-mono); font-size: 1.3rem; color: var(--ok-t); }
.rankline { display: flex; flex-direction: column; gap: 6px; }
.rankline .bar { grid-column: auto; }
.rankline .bar > i { background: var(--l1); }
.newbd { display: flex; flex-wrap: wrap; gap: 8px; }

@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rr-in 0.25s ease-out; }
  @keyframes rr-in { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
  .xpgain { animation: rr-pop 0.45s cubic-bezier(.2,1.6,.4,1); }
  @keyframes rr-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .opt.right { animation: rr-glow 0.7s ease-out; }
  @keyframes rr-glow { 0% { box-shadow: 0 0 0 0 var(--ok); } 100% { box-shadow: 0 0 0 14px transparent; } }
  .card.celebrate { animation: rr-lift 0.5s ease-out; }
  @keyframes rr-lift { 0% { transform: translateY(0); } 40% { transform: translateY(-4px); } 100% { transform: none; } }
  .stars svg.on { animation: rr-star 0.55s cubic-bezier(.2,1.6,.4,1) both; }
  .stars svg.on:nth-child(2) { animation-delay: 0.2s; }
  .stars svg.on:nth-child(3) { animation-delay: 0.4s; }
  @keyframes rr-star { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
  .xp-bar > i, .rankline .bar > i { transition: width 0.6s ease; }
}

/* ---------- conquistas ---------- */
.conq { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 110px; }
.conq h2 { font-size: 1.4rem; font-weight: 800; font-variation-settings: "wdth" 112; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.bd { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 10px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface2); border-style: dashed; }
.bd i { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--muted); display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--muted); }
.bd b { font-size: 0.9rem; }
.bd:not(.on) b { color: var(--muted); }
.bd span { font-size: 0.78rem; color: var(--muted); grid-column: 2; }
.bd.on { opacity: 1; background: var(--surface); border-color: var(--l1); }
.bd.on i { border: 2px solid var(--l1); background: var(--l1); color: #fff; }
.byline { font-size: 0.98rem; margin-top: 14px; padding: 8px 12px; border-left: 5px solid var(--l4); background: var(--surface); border-radius: 6px; max-width: 62ch; }
.byline a { font-weight: 700; }
.fine { font-size: 0.8rem; }

/* ---------- topologias ---------- */
.topofig { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.topowrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
svg.topo { display: block; width: 100%; min-width: 600px; height: auto; }
.topofig figcaption { font-size: 0.9rem; color: var(--muted); }
.topofig details { font-size: 0.9rem; }
.topofig summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.tp-zone { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 6; }
.tp-zlbl { font: 700 12px var(--font-mono); fill: var(--muted); }
.tp-node circle, .tp-node rect, .tp-node path { fill: var(--surface); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.tp-node path.ic { fill: none; stroke-linecap: round; }
.tp-node.t-router circle, .tp-node.t-router path.ic { stroke: var(--l2); }
.tp-node.t-switch rect, .tp-node.t-switch path.ic { stroke: var(--l1); }
.tp-node.t-cloud path { stroke: var(--muted); stroke-dasharray: 4 3; fill: var(--surface2); }
.tp-lbl { font: 700 14px var(--font-display); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.tp-sub { font: 500 10.5px var(--font-mono); fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.tp-if { font: 500 10.5px var(--font-mono); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.tp-net { font: 600 11px var(--font-mono); fill: var(--net); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.tp-note { font: 700 12px var(--font-mono); fill: var(--l3); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.tp-link { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.tp-link.k-trunk { stroke: var(--l3); stroke-width: 4.5; }
.tp-link.k-v10 { stroke: var(--l1); stroke-width: 3.5; }
.tp-link.k-v20 { stroke: var(--l2); stroke-width: 3.5; }
.tp-link.k-bgp { stroke: var(--l4); stroke-width: 3.5; }
.tp-link.k-api { stroke: var(--l2); stroke-dasharray: 7 5; }

/* ---------- recursos ---------- */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rcard h3 { font-size: 1.1rem; font-weight: 800; font-variation-settings: "wdth" 108; }
.rcard .by { font-size: 0.85rem; color: var(--muted); }
.rcard p { font-size: 0.93rem; }
.rtags { display: flex; flex-wrap: wrap; gap: 6px; }
.tagc { display: inline-flex; padding: 2px 9px; border-radius: 6px; font-size: 0.76rem; font-weight: 700; border: 1px solid var(--line); background: var(--surface2); }
.tagc.good { background: var(--ok-bg); border-color: var(--ok-t); color: var(--ok-t); }
.tagc.warn { background: transparent; border-color: var(--l3t); color: var(--l3t); }
.tagc.proof { font-family: var(--font-mono); font-weight: 500; color: var(--muted); }
.rcard .links a { word-break: break-word; }
.rcard .copyline { font-size: 0.88rem; }
.explain-box { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--focus); border-radius: 8px; padding: 12px 14px; font-size: 0.93rem; display: flex; flex-direction: column; gap: 6px; }

/* ---------- analisador de captura ---------- */
.drop { border: 2px dashed var(--line); border-radius: 16px; background: var(--surface); padding: 28px 18px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.drop.over { border-color: var(--l2); background: var(--surface2); }
.drop strong { font-size: 1.1rem; }
.prog-read { width: 100%; max-width: 420px; }
.sev { display: inline-flex; padding: 2px 10px; border-radius: 6px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; }
.sev.alta { background: var(--bad); }
.sev.media { background: var(--l3); }
.sev.baixa { background: var(--l2); }
.sev.info { background: var(--muted); }
:root[data-theme="dark"] .sev.alta, :root[data-theme="dark"] .sev.media, :root[data-theme="dark"] .sev.baixa { color: #0C1219; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sev.alta, :root:not([data-theme="light"]) .sev.media, :root:not([data-theme="light"]) .sev.baixa { color: #0C1219; } }
.finding { border-left: 6px solid var(--line); }
.finding.alta { border-left-color: var(--bad); }
.finding.media { border-left-color: var(--l3); }
.finding.baixa { border-left-color: var(--l2); }
.finding .ev { margin: 0; padding-left: 18px; font-family: var(--font-mono); font-size: 0.84rem; display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.finding .act { font-size: 0.93rem; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kv > div { display: flex; flex-direction: column; }
.kv b { font-family: var(--font-display); font-size: 1.3rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kv span { font-size: 0.78rem; color: var(--muted); }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 72px; gap: 8px; align-items: center; font-size: 0.88rem; padding: 3px 0; }
.hbar .tr { height: 12px; background: var(--surface2); border-radius: 6px; overflow: hidden; }
.hbar .tr i { display: block; height: 100%; background: var(--l2); border-radius: 6px; }
.hbar .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .vl { font-family: var(--font-mono); font-size: 0.82rem; text-align: right; color: var(--muted); }
svg.spark { width: 100%; height: auto; display: block; }
svg.spark rect { fill: var(--l2); }
svg.spark text { font: 500 11px var(--font-mono); fill: var(--muted); }
.noscript-note { font-size: 0.85rem; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- diagnóstico do PCAP ---------- */
.dx { border-left: 6px solid var(--l1); display: flex; flex-direction: column; gap: 10px; }
.dx.c-media { border-left-color: var(--l3); }
.dx.c-baixa, .dx.c-info { border-left-color: var(--muted); }
.conf { display: inline-flex; padding: 2px 10px; border-radius: 6px; font-size: 0.78rem; font-weight: 800; border: 1.5px solid var(--l1); color: var(--l1); }
.conf.media { border-color: var(--l3); color: var(--l3); }
.conf.baixa, .conf.info { border-color: var(--muted); color: var(--muted); }
.dx ul.why, .dx ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.94rem; }
.dx summary { cursor: pointer; font-weight: 600; }

/* ---------- progresso automático, plano de estudo e convite ao grupo ---------- */
.prog > .bar.big { --c: var(--l1); height: 12px; border-radius: 6px; }
.prog > .bar.big > i { border-radius: 6px; }
.nextup { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.95rem; }
.st-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface2); margin-top: 8px; overflow: hidden; }
.st-bar > i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.st-panel { grid-template-columns: 1fr; }
.st-panel > .row { flex-wrap: wrap; }
@media (min-width: 761px) { .st-panel .side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; } }
.sprog { background: var(--surface2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.sprog-top { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
.sprog .bar { height: 10px; background: var(--bg); }
.parts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.parts li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; font-size: 0.92rem; }
.parts .pn { font-weight: 600; }
.parts .pv { font-family: var(--font-mono); font-size: 0.85rem; }
.parts .ph { grid-column: 1 / -1; font-size: 0.85rem; }
.parts li.full .pv::before { content: "✓ "; color: var(--ok-t); }
.study h3 { margin-bottom: 6px; }
.examtag { font-size: 0.92rem; margin-bottom: 6px; }
.links.stl li { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.links.stl li .muted { font-size: 0.9rem; }
.goals { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; font-size: 0.95rem; }
.spine { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 18px; border-left: 5px solid var(--c); }
.spine h3 { font-size: 1.15rem; line-height: 1.25; }
.spine .eyebrow { margin: 0; }
.spine-steps { list-style: none; counter-reset: sp; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.spine-steps li { counter-increment: sp; display: grid; grid-template-columns: 28px 1fr; gap: 0 10px; align-items: start; }
.spine-steps li::before { content: counter(sp); grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.spine-steps li b { font-size: 0.97rem; }
.spine-steps li span { grid-column: 2; font-size: 0.9rem; color: var(--muted); }
.spine .spine-foot { font-size: 0.88rem; margin: 0; }
.group-cta { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--l4); background: var(--surface); }
.group-cta h3 { font-size: 1.05rem; margin: 0 0 4px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.group-cta p { margin: 0; font-size: 0.95rem; max-width: 56ch; }
.group-cta .btn { white-space: normal; text-align: center; }
.labcheck h2 { font-size: 1rem; margin: 0; }

/* ---------- método de estudo ---------- */
.metodo-grande { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 8px; }
.metodo-passos { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; counter-reset: mp; }
.metodo-passos li { counter-increment: mp; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 52px; position: relative; display: flex; flex-direction: column; gap: 4px; }
.metodo-passos li::before { content: counter(mp); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; display: grid; place-items: center; }
.metodo-passos li span { color: var(--muted); font-size: 0.95rem; }
.metodo-timer { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.metodo-tempo { font-family: var(--mono, monospace); font-size: 3rem; font-weight: 800; letter-spacing: 0.02em; }
.metodo-semana { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 10px 0 18px; }
.metodo-semana .card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
/* Método: seletor dos dois métodos e Fixação Ativa com IA */
.metodo-abas { margin-bottom: 20px; }
.fx-niveis li b, .fx-ciclo li b { color: var(--ink); }
.fx-det summary { cursor: pointer; font-weight: 600; }
.fx-det[open] summary { margin-bottom: 10px; }
.fx-det .codewrap pre.code { white-space: pre-wrap; max-height: 420px; overflow: auto; }
.fx-refs ol { gap: 10px; }
.fx-refs a { overflow-wrap: anywhere; }
.fx-lema { font-size: 1.15rem; font-weight: 700; border-left: 4px solid var(--focus); padding: 4px 0 4px 12px; }
.fx-gerador { display: flex; flex-direction: column; gap: 14px; }
.fx-form { display: flex; flex-direction: column; gap: 14px; }
.fx-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fx-campo .lbl { margin-bottom: 0; }
.fx-in { max-width: none; font-family: var(--font-body); font-size: 0.98rem; }
textarea.fx-in { resize: vertical; }
.fx-linha { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fx-grupo { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; min-width: 0; }
.fx-grupo legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; padding: 0; }
.fx-radio { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.fx-radio input { width: 18px; height: 18px; accent-color: var(--brand); }
.fx-grupo .fx-erro { flex-basis: 100%; }
.fx-dica { font-size: 0.85rem; color: var(--muted); margin: 0; }
.fx-erro { font-size: 0.88rem; color: var(--bad); font-weight: 600; margin: 0; }
[aria-invalid="true"].field { border-color: var(--bad); }
.fx-status:empty, .fx-avisos:empty { display: none; }
.fx-status { margin: 0; font-weight: 600; }
.fx-avisos { display: flex; flex-direction: column; gap: 8px; }
.fx-saida { display: flex; flex-direction: column; gap: 8px; }
.fx-saida[hidden] { display: none; }
.fx-saida { scroll-margin-top: 120px; }
.fx-prompt { width: 100%; min-height: 280px; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.45; resize: vertical; }
.fx-prompt:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--focus); }
.fx-ias a { font-weight: 600; }
@media (max-width: 480px) {
  .metodo-abas { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .metodo-abas .seg-btn { padding: 8px 6px; font-size: 0.88rem; }
}

/* ---------- Central de Operações (aba Central) ---------- */
.page.noc-wide { max-width: 1440px; gap: 18px; }
.noc-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; }
.noc-head .btn { margin-bottom: 8px; }
.noc-title { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 800; font-variation-settings: "wdth" 112; letter-spacing: -0.01em; }
.noc-q-id { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); margin-bottom: 2px; }
.noc-clock { font-family: var(--font-mono); font-weight: 500; color: var(--ink); background: var(--surface2); padding: 1px 6px; border-radius: 5px; }
.noc-small { font-size: 0.84rem; }
.noc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.noc-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 980px) { .noc-grid { grid-template-columns: minmax(0, 1fr); } }
.noc-ticket p + p, .noc-ticket details { margin-top: 8px; }
.noc-ticket summary, .noc-limits summary, .noc-hev summary { cursor: pointer; font-weight: 600; }
.noc-limits ul { margin: 10px 0; }
.tagc.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }

.noc-queue { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.noc-q { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--l3); border-radius: 12px; padding: 14px 16px; }
.noc-q-main { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.noc-q-side { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.noc-alerts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.noc-al { display: flex; gap: 8px; align-items: baseline; }
.noc-al .tagc { flex: none; min-width: 58px; justify-content: center; }

.noc-layers { gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 0.84rem; font-weight: 600; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.noc-topo { margin-top: 8px; }
.noc-svg { width: 100%; height: auto; display: block; background: var(--surface2); border-radius: 10px; }
.noc-svg .tl { stroke-width: 3.5; stroke-linecap: round; }
.noc-svg .tl.up { stroke: var(--ok); }
.noc-svg .tl.down { stroke: var(--bad); stroke-dasharray: 10 8; }
.noc-svg .tl.admin { stroke: var(--muted); stroke-dasharray: 3 7; }
.noc-svg .tif { font-family: var(--font-mono); font-size: 12px; fill: var(--muted); paint-order: stroke; stroke: var(--surface2); stroke-width: 4px; }
.noc-svg .tnet { fill: var(--l2); font-weight: 500; }
.noc-svg .tn { cursor: pointer; outline: none; }
.noc-svg .tshape { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.noc-svg .tshape.l3 { stroke-width: 3.5; }
.noc-svg .tshape.host { stroke-dasharray: none; }
.noc-svg .tglyph { font-family: var(--font-display); font-weight: 800; font-size: 13px; fill: var(--ink); pointer-events: none; }
.noc-svg .tlabel { font-family: var(--font-display); font-weight: 700; font-size: 14px; fill: var(--ink); paint-order: stroke; stroke: var(--surface2); stroke-width: 5px; }
.noc-svg .tn.sel .tshape { fill: var(--focus); stroke: #0F1B2A; }
.noc-svg .tn.sel .tglyph { fill: #0F1B2A; }
.noc-svg .tn:focus-visible .tshape { stroke: var(--l2); stroke-width: 5; }
.noc-svg .tn:hover .tshape { stroke-width: 4; }
.noc-svg .tadj { fill: none; stroke-width: 2.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.noc-svg .tadj.ok { stroke: var(--ok); }
.noc-svg .tadj.bad { stroke: var(--l3); }
.noc-svg .tadjl { font-family: var(--font-mono); font-size: 11.5px; paint-order: stroke; stroke: var(--surface2); stroke-width: 5px; }
.noc-svg .tadjl.ok { fill: var(--ok-t); }
.noc-svg .tadjl.bad { fill: var(--l3t); }

.noc-term { display: flex; flex-direction: column; gap: 10px; }
.noc-devs { display: flex; flex-wrap: wrap; gap: 6px; }
.term-screen { background: var(--code-bg); border-radius: 10px; height: min(58vh, 560px); min-height: 180px; max-height: 92vh; resize: vertical; overflow: hidden; }
.term-out { height: 100%; overflow: auto; padding: 12px 14px; color: var(--code-ink); font-family: var(--font-mono); font-size: var(--term-font, 0.82rem); line-height: 1.45; }
.term-out .thint { color: #9FD3F2; font-family: var(--font-body); font-style: italic; white-space: pre-wrap; }
.noc-cardhead { justify-content: space-between; align-items: center; gap: 8px; }
.noc-tview, .noc-zoom { gap: 6px; }
.noc-head-side { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.noc-save { font-size: 0.8rem; color: var(--muted); }
.noc-save.bad { color: var(--bad); font-weight: 600; }
.noc-warn { border-left: 4px solid var(--l3); }
.noc-guide summary { cursor: pointer; }
.noc-guide ol { margin: 10px 0 6px; display: flex; flex-direction: column; gap: 4px; }
.noc-inprog { color: var(--ok-t); font-weight: 600; }
.noc-modes { display: flex; flex-direction: column; gap: 8px; }
.noc-topo.zoomed { cursor: grab; touch-action: none; }
.noc-topo.zoomed:active { cursor: grabbing; }
/* ampliar terminal ou topologia: ocupa a janela; Esc restaura */
.card.noc-max { position: fixed; inset: 0; z-index: 60; border-radius: 0; margin: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; box-shadow: none; }
.noc-term.noc-max .term-screen { flex: 1 1 auto; height: auto !important; max-height: none; resize: none; }
.noc-topo-card.noc-max .noc-topo { flex: 1 1 auto; display: flex; min-height: 0; }
.noc-topo-card.noc-max .noc-svg { width: 100%; height: 100%; max-height: calc(100vh - 130px); }
.noc-dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; gap: 12px; }
.noc-dialog:not([open]) { display: none; }
.noc-dialog::backdrop { background: rgba(10, 18, 28, 0.55); }
.noc-dialog .noc-pre { font-family: var(--font-mono); font-size: 0.78rem; width: 100%; max-width: none; }
.term-out:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.term-out pre { margin: 0; white-space: pre; font: inherit; }
.term-out .tasync, .term-out .tsys { white-space: pre-wrap; word-break: break-word; }
.term-out .tsys { color: #8FA3BA; }
.term-out .tasync { color: #F2C36B; }
.tblock { position: relative; padding: 4px 0 6px; border-bottom: 1px dashed #233246; }
.tblock.err .tcmd { color: #FFB4B4; }
.tblock .pin { display: block; margin: 4px 0 0 auto; }
@media (min-width: 720px) { .tblock .pin { position: absolute; top: 4px; right: 0; margin: 0; } }
.pin { border: 1px solid #3A4A5E; background: #1B2736; color: #DDE7F3; border-radius: 7px; padding: 2px 8px; font-size: 0.74rem; font-weight: 600; cursor: pointer; font-family: var(--font-body); }
.pin:hover:not([disabled]) { background: #26364A; }
.pin[disabled] { opacity: 0.75; cursor: default; }
.term-line { display: flex; align-items: center; gap: 6px; background: var(--code-bg); border-radius: 10px; padding: 6px 10px; }
.term-prompt { font-family: var(--font-mono); color: #9FD3A8; white-space: nowrap; font-size: 0.9rem; }
.term-in { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--code-ink); font-family: var(--font-mono); font-size: 16px; padding: 6px 2px; }
.term-in:focus { outline: none; }
.term-line:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.noc-tools { gap: 6px; }

.noc-nb { display: flex; flex-direction: column; gap: 14px; }
.noc-tabs { flex-wrap: wrap; align-self: flex-start; }
.noc-panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.noc-pins { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 14px; }
.noc-pin { display: flex; flex-direction: column; gap: 6px; }
.noc-pre { max-height: 260px; overflow: auto; font-size: 0.78rem; }
.noc-note, .noc-doc { max-width: none; font-family: var(--font-body); font-size: 0.95rem; }
.noc-hyps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.noc-hyp { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.noc-hyp.st-analise { border-left-color: var(--l2); }
.noc-hyp.st-descartada { border-left-color: var(--muted); }
.noc-hyp.st-descartada > p { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.noc-hyp.st-confirmada { border-left-color: var(--ok); }
.noc-sel { max-width: 220px; font-family: var(--font-body); padding: 7px 10px; }
.noc-logs { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.noc-logs li { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.noc-logs code { font-family: var(--font-mono); font-size: 0.78rem; word-break: break-word; }
.noc-logs .pin { flex: none; }
.noc-diag { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.noc-diag legend { font-weight: 700; padding: 0 6px; }
.noc-val ul { list-style: none; padding: 0; margin: 8px 0; }
.noc-val li.ok { color: var(--ok-t); }
.noc-val li.bad { color: var(--bad); }

.noc-score { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.noc-total { display: flex; flex-direction: column; align-items: center; min-width: 96px; }
.noc-total strong { font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1; }
.noc-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.93rem; }
.noc-table th, .noc-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.noc-table td:nth-child(2) { white-space: nowrap; font-family: var(--font-mono); }
.noc-evlist { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.noc-res { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
