/* pwnsy connection check: shell, then the three panels' own layers.
   Shared components come from /tools/app.css. Loaded on /tools/vpn/leak-test/,
   /tools/vpn/exit-ip/ and /tools/vpn/browser-id/. */

/* ---------- shell: snapshot bar, panel tabs ---------- */
#cc { display: grid; gap: 14px; min-width: 0; }
.cc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; min-height: 52px;
  padding: 8px 10px 8px 14px; background: #fff; border: 2px solid var(--ax-line); border-radius: 14px; }
.cc-bar.is-ok { border-color: var(--ax-ok-line); }
.cc-bar.is-bad { border-color: var(--ax-bad-line); background: var(--ax-bad-bg); }
.cc-bar-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; font-size: 13.5px; line-height: 1.45; color: #344054; overflow-wrap: break-word; }
.cc-bar-label { font-family: var(--ax-mono); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ax-dim); white-space: nowrap; }
.cc-bar-ip { font-family: var(--ax-mono); font-size: 13px; font-weight: 700; color: var(--ax-ink); overflow-wrap: break-word; min-width: 0; }
.cc-bar-at { color: var(--ax-muted); white-space: nowrap; }
.cc-bar .ax-btn { white-space: nowrap; }

.cc-tabs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 5px; background: #e9eef4; border: 2px solid var(--ax-line); border-radius: 16px; }
@media (min-width: 720px) { .cc-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cc-tabs button {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border: 2px solid transparent; border-radius: 12px;
  background: transparent; cursor: pointer; text-align: left; color: #344054; min-width: 0;
}
.cc-tabs button:hover { background: rgba(255,255,255,.6); }
.cc-tabs button[aria-selected="true"] { background: #fff; color: var(--ax-ink); border-color: var(--ax-accent); }
.cc-tabs button:focus-visible { outline: 3px solid rgba(4,120,87,.35); outline-offset: 1px; }
.cc-tab-icon { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; border: 2px solid var(--ax-line); }
.cc-tabs button[aria-selected="true"] .cc-tab-icon { color: var(--ax-accent); border-color: var(--ax-ok-line); background: var(--ax-ok-bg); }
.cc-tab-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cc-tab-text { display: grid; gap: 2px; min-width: 0; }
.cc-tab-title { font-family: var(--ax-display); font-size: 15px; font-weight: 700; line-height: 1.25; overflow-wrap: break-word; }
.cc-tab-state { display: flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.35; color: var(--ax-muted); overflow-wrap: break-word; min-width: 0; }
.cc-tab-state i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #cbd5e1; }
.cc-tab-state.is-run i { background: #94a3b8; animation: ax-pulse 1s ease-in-out infinite; }
.cc-tab-state.is-ok i { background: var(--ax-ok); }
.cc-tab-state.is-warn i { background: var(--ax-warn); }
.cc-tab-state.is-bad i { background: var(--ax-bad); }
.cc-tab-state.is-info i { background: var(--ax-info); }
.cc-tab-state span::first-letter { text-transform: uppercase; }
.cc-panel { display: grid; gap: 14px; min-width: 0; }
.cc-panel[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .cc-tab-state.is-run i { animation: none; } }

/* ---------- leaks panel ---------- */
/* Controls on the left, the six-segment progress on the right. */
.lt-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; background: #fff; border: 2px solid var(--ax-line); border-radius: 16px; }
@media (min-width: 860px) { .lt-head { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); } }
.lt-controls { display: grid; gap: 12px; min-width: 0; }
.lt-controls .ax-actions, .lt-controls .ax-note { margin: 0; }
/* Mode switch, progress, the six check rows. */
.lt-modelabel { display: block; margin: 0 0 8px; font-family: var(--ax-mono); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #344054; }
.lt-seg button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.lt-seg svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Progress: six segments, one per check. */
.lt-prog { display: grid; gap: 12px; background: rgba(255,255,255,.86); border: 2px solid var(--ax-line); border-radius: 16px; padding: 16px; }
.lt-prog-num { font-family: var(--ax-display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--ax-ink); }
.lt-prog-num small { font-family: var(--ax-mono); font-size: 13px; font-weight: 700; color: var(--ax-dim); margin-left: 6px; }
.lt-prog-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin: 0; padding: 0; list-style: none; }
.lt-prog-list li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #344054; min-width: 0; }
.lt-prog-list li i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #cbd5e1; }
.lt-prog-list li.is-pass i { background: var(--ax-ok); }
.lt-prog-list li.is-warn i { background: var(--ax-warn); }
.lt-prog-list li.is-risk i { background: var(--ax-bad); }
.lt-prog-list li.is-info i { background: var(--ax-info); }
.lt-prog-list li.is-run i { background: #94a3b8; animation: ax-pulse 1s ease-in-out infinite; }

.lt-meta { margin: 0; font-family: var(--ax-mono); font-size: 12px; line-height: 1.55; color: var(--ax-dim); }
.lt-fix ol { margin: 0; padding-left: 1.3em; font-size: 13.5px; line-height: 1.6; color: #344054; }
.lt-fix li { margin: 5px 0; }
.lt-fix li b { color: var(--ax-ink); }

/* The six checks. Each is a disclosure: the headline reads at a glance,
   the evidence is one tap away, and a problem opens itself. */
.lt-checks { display: grid; gap: 10px; }
.lt-check { background: #fff; border: 2px solid var(--ax-line); border-left: 5px solid #cbd5e1; border-radius: 14px; box-shadow: var(--ax-shadow); min-width: 0; }
.lt-check[data-s="pass"] { border-left-color: var(--ax-ok); }
.lt-check[data-s="warn"] { border-left-color: var(--ax-warn); }
.lt-check[data-s="risk"] { border-left-color: var(--ax-bad); }
.lt-check[data-s="info"] { border-left-color: var(--ax-info); }
.lt-check > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px minmax(0, 1fr) 22px; gap: 12px; align-items: start;
  padding: 14px 14px 14px 12px; border-radius: 12px; -webkit-tap-highlight-color: transparent; min-height: 44px;
}
.lt-check > summary::-webkit-details-marker { display: none; }
.lt-check > summary:hover { background: #fafbfc; }
.lt-check > summary:focus-visible { outline: 3px solid rgba(4,120,87,.35); outline-offset: 2px; }
.lt-ico { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--ax-soft); border: 1px solid var(--ax-line); color: var(--ax-ink); }
.lt-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lt-check[data-s="pass"] .lt-ico { color: var(--ax-ok-text); background: var(--ax-ok-bg); border-color: var(--ax-ok-line); }
.lt-check[data-s="warn"] .lt-ico { color: var(--ax-warn-text); background: var(--ax-warn-bg); border-color: var(--ax-warn-line); }
.lt-check[data-s="risk"] .lt-ico { color: var(--ax-bad-text); background: var(--ax-bad-bg); border-color: var(--ax-bad-line); }
.lt-check[data-s="info"] .lt-ico { color: var(--ax-info-text); background: var(--ax-info-bg); border-color: var(--ax-info-line); }
.lt-sum { display: grid; gap: 5px; min-width: 0; }
.lt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lt-name { font-family: var(--ax-display); font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--ax-ink); }
.lt-top .ax-chip { word-break: keep-all; white-space: nowrap; }
.lt-hl { font-size: 13.5px; line-height: 1.55; color: #344054; overflow-wrap: break-word; }
.lt-chev { width: 22px; height: 22px; margin-top: 9px; border-radius: 7px; background: var(--ax-soft); border: 1px solid var(--ax-line); position: relative; }
.lt-chev::before { content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 6px; border-right: 2px solid #475467; border-bottom: 2px solid #475467; transform: rotate(45deg); transition: transform .2s; }
.lt-check[open] .lt-chev::before { transform: translate(0, 3px) rotate(225deg); }
.lt-body { padding: 0 16px 16px; display: grid; gap: 10px; min-width: 0; }
.lt-body:empty { display: none; }
.lt-body .ax-kv { margin-top: 2px; }
.lt-body .ax-table-wrap { box-shadow: none; }
.lt-note { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ax-muted); overflow-wrap: break-word; }
.lt-mono { font-family: var(--ax-mono); font-size: 12px; overflow-wrap: break-word; }
.lt-sub { margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--ax-dim); overflow-wrap: break-word; }
.lt-body .ax-chip { word-break: keep-all; }
.lt-section-list { margin: 0; padding-left: 1.3em; }
/* Phones: the progress aside shrinks to one row (count + meter) so the
   verdict and tiles come up into the first screen. The per-check status
   list stays on the check rows below. */
@media (max-width: 640px) {
  .lt-prog { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; }
  .lt-prog-num { font-size: 24px; }
  .lt-prog-list { display: none; }
  /* Run lives in the sticky bottom bar on phones; the panel button
     would only push the verdict down. */
  .lt-controls .lt-actions { display: none; }
}
@media (max-width: 400px) {
  .lt-check > summary { grid-template-columns: 34px minmax(0, 1fr) 22px; gap: 10px; padding: 12px 10px; }
  .lt-ico { width: 34px; height: 34px; }
  .lt-body { padding: 0 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lt-prog-list li.is-run i { animation: none; }
  .lt-chev::before { transition: none; }
}

/* ---------- network panel ---------- */
/* Lookup form, try row, detail tabs, inline readouts. */
.ei-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.ei-try-label { font-family: var(--ax-mono); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ax-dim); margin-right: 2px; }
.ei-try .ax-chip { word-break: keep-all; white-space: nowrap; }
#ei-recent { display: contents; }
.ei-form .ax-btn { white-space: nowrap; }

.ei-svc { display: block; margin-top: 2px; font-weight: 600; color: var(--ax-muted); }
.ei-cc { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; margin-right: 6px; vertical-align: 3px;
  font-family: var(--ax-mono); font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #344054; background: var(--ax-soft); border: 1px solid var(--ax-line); border-radius: 6px; }
.ei-mono { font-family: var(--ax-mono); font-size: 12.5px; overflow-wrap: break-word; }
.ei-nores { color: var(--ax-dim); font-weight: 500; }
.ei-src { margin: 10px 0 0; font-size: 12.5px; color: var(--ax-muted); }
.ei-src b { color: var(--ax-ink); }
.ei-verdict .ax-chips { margin-top: 10px; }
.ei-verdict-ip { font-family: var(--ax-mono); font-size: .92em; }
.ei-next ol { margin: 0; padding-left: 1.3em; font-size: 13.5px; line-height: 1.6; color: #344054; }
.ei-next li { margin: 5px 0; }
.ei-next a { color: var(--ax-accent); font-weight: 600; }

/* Detail tabs: four equal buttons, two by two on a phone, so no label is
   ever cut off by a scrolling strip. */
.ei-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: #e9eef4; border: 2px solid var(--ax-line); border-radius: 14px; }
@media (min-width: 760px) { .ei-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ei-tabs button {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; font-family: var(--ax-display); font-size: 14px; font-weight: 700; line-height: 1.25; color: #344054; text-align: center;
}
.ei-tabs button svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ei-tabs button[aria-selected="true"] { background: #fff; color: var(--ax-ink); box-shadow: 0 1px 2px rgba(15,23,42,.12), inset 0 -2px 0 var(--ax-accent); }
.ei-tabs button[aria-selected="true"] svg { color: var(--ax-accent); }
.ei-tabs button:focus-visible { outline: 3px solid rgba(4,120,87,.35); outline-offset: 1px; }
.ei-panel { min-width: 0; }
.ei-panel > * + * { margin-top: 12px; }
.ei-panel-note { margin: 0; font-size: 13.5px; line-height: 1.6; color: #344054; }
.ei-meta { margin: 0; font-family: var(--ax-mono); font-size: 12px; line-height: 1.55; color: var(--ax-dim); }
.ei-kv-btn { margin-left: 8px; vertical-align: middle; }
.ei-card-load { padding: 6px 0; }
@media (max-width: 400px) { .ei-tabs button { font-size: 13px; gap: 6px; padding: 8px 6px; } }
/* Open-ports result: three tiles. Three across from 560px; below that the
   Verdict tile takes the full row so no half-width cell sits empty. */
.ax-tiles.ei-tiles3 > :last-child { grid-column: 1 / -1; }
@media (min-width: 560px) {
  .ax-tiles.ei-tiles3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ax-tiles.ei-tiles3 > :last-child { grid-column: auto; }
}

/* ---------- browser identity panel ---------- */
/* Rarity pills in the signal table. Named rar- so no shared stylesheet
   restyles them. */
.rar { display: inline-block; font-family: var(--ax-mono, monospace); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; white-space: nowrap; margin: 0 4px 4px 0; }
.rar-high { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.rar-med { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }
.rar-low { color: #475467; background: #f3f5f7; border: 1px solid #dbe2ea; }
.rar-state { color: #075985; background: #f0f9ff; border: 1px solid #bae6fd; }

/* Signal table. The value column carries the data, so it gets the width. */
.bid-table table { table-layout: fixed; }
.bid-table .bid-val { font-family: var(--ax-mono, monospace); font-size: 12.5px; color: #1f2937; overflow-wrap: break-word; }
.bid-table tr.v-row { cursor: pointer; }
.bid-table tr.v-row td:first-child { cursor: pointer; }
/* Phones: a narrower pinned Signal column leaves room for the value. */
@media (max-width: 560px) {
  .bid-table col:nth-child(1) { width: 20% !important; }
  .bid-table col:nth-child(2) { width: 52% !important; }
  .bid-table td:first-child .bid-sig { font-size: 13px; gap: 4px; }
  .ax-table-wrap.bid-table th:first-child, .ax-table-wrap.bid-table td:first-child { min-width: 0; }
}
.bid-table .bid-sig { display: flex; gap: 6px; align-items: flex-start; }
.bid-table .bid-sig svg { width: 14px; height: 14px; flex: none; margin-top: 3px; fill: none; stroke: #667085; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.bid-table tr.v-row[aria-expanded="true"] .bid-sig svg { transform: rotate(90deg); stroke: #047857; }
/* The expanded explanation row spans every column, so it is not pinned. */
.ax-table-wrap tbody tr.v-detail td { position: static; min-width: 0; box-shadow: none; font-weight: 400; color: #475467; background: #f8fafc; font-size: 13px; }
.ax-table-wrap tbody tr.v-detail td b { color: #0b1220; }
/* app.css sets display on every row inside the wrapper, which would beat
   the hidden attribute the filter and the expand toggle rely on. */
.ax-table-wrap tr[hidden], .ax-table-wrap tbody tr[hidden] { display: none; }

/* Filter row above the table. */
.bid-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.bid-tools .ax-field { flex: 1 1 260px; min-width: 0; }
.bid-count { font-family: var(--ax-mono, monospace); font-size: 12px; color: #667085; }

/* Score meter inside the first tile. */
.bid-score-meter { margin-top: 8px; }
.bid-cross { display: grid; gap: 8px; }
.bid-cross .ax-chip { white-space: normal; text-align: left; height: auto; min-height: 24px; align-items: flex-start; }
.bid-cross .ax-chip i { margin-top: .45em; }
.bid-cross .ax-chip b { margin-right: 4px; }
.bid-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin: 0; }
.bid-h h2 { margin: 0; font-family: var(--ax-display, sans-serif); font-size: 20px; color: #0b1220; }
.bid-h p { margin: 0; font-size: 13px; color: #475467; }

