/* pwnsy Tools: app layer (ax-*). Link it AFTER tool.css, tool-modern.css and any
   vpn.css / antispy.css on the page. Every class here is prefixed ax- so it never
   collides with the !important card rules in tool-modern.css. Look derived from
   /tools/ad-block-test/. Light theme only. Text wraps at spaces, never truncates. */

:root {
  --ax-ink: #0b1220;
  --ax-text: #1f2937;
  --ax-muted: #475467;
  --ax-dim: #667085;
  --ax-soft: #f6f8fa;
  --ax-line: #dbe2ea;
  --ax-line-2: #c3cddb;
  --ax-accent: #047857;
  --ax-accent-2: #059669;
  --ax-accent-bg: #ecfdf5;

  --ax-ok: #059669;   --ax-ok-text: #065f46;   --ax-ok-bg: #ecfdf5;   --ax-ok-line: #a7f3d0;
  --ax-bad: #dc2626;  --ax-bad-text: #991b1b;  --ax-bad-bg: #fef2f2;  --ax-bad-line: #fecaca;
  --ax-warn: #d97706; --ax-warn-text: #92400e; --ax-warn-bg: #fffbeb; --ax-warn-line: #fde68a;
  --ax-info: #0284c7; --ax-info-text: #075985; --ax-info-bg: #f0f9ff; --ax-info-line: #bae6fd;

  --ax-radius: 16px;
  --ax-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(15,23,42,.06), 0 12px 30px -24px rgba(15,23,42,.45);
  --ax-shadow-lift: 0 1px 2px rgba(15,23,42,.06), 0 18px 36px -22px rgba(4,120,87,.45);
  --ax-sticky-h: 76px;
  --ax-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ax-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Shared icon sizing: any inline <svg> inside an ax- icon slot is a 24-unit
   stroke icon. Draw a glyph for the subject; never leave a placeholder. */
.ax-head-icon svg, .ax-btn svg, .ax-verdict-icon svg, .ax-card-icon svg, .ax-empty-icon svg,
.ax-error-icon svg, .ax-tile-icon svg, .ax-note svg, .ax-links a svg, .ax-section-head svg,
.ax-toast svg, .ax-field-icon svg, .ax-chip svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none;
}

/* ---------- Page container ---------- */
.ax-app { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 18px 16px 64px; min-width: 0; }
.ax-app > * + * { margin-top: 14px; }
/* App stage: the working part of the tool sits on a full-bleed solid band; the notes below stay on the page background.
   The band is a 100vw pseudo-element (body has overflow-x: clip), so fixed children such as .ax-sticky are never clipped. */
:root { --ax-stage: #d8e6df; --ax-stage-line: #b9cfc3; }
.ax-stage { position: relative; isolation: isolate; margin-top: -18px; padding: 22px 0 30px; min-width: 0; }
.ax-stage::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background: var(--ax-stage); border-bottom: 1px solid var(--ax-stage-line);
}
.ax-stage > * + * { margin-top: 14px; }
/* Suite pages: run the band up under the rail so no white strip shows between them. */
.railwrap ~ .ax-app .ax-stage::before { top: -14px; }
.ax-stage + .ax-section { margin-top: 34px; }
@media (max-width: 640px) { .ax-stage { padding: 16px 0 24px; } }
.ax-app :where(p, li, dd, td, h1, h2, h3, h4, b, strong, span, a, code) { overflow-wrap: break-word; }
.ax-stack { display: grid; gap: 14px; min-width: 0; }
.ax-stack > * { min-width: 0; }

/* ---------- App header ---------- */
.ax-head {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center;
  background:
    radial-gradient(1200px 300px at 85% -10%, rgba(16,185,129,.16), transparent 60%),
    radial-gradient(600px 240px at -10% 120%, rgba(14,165,233,.10), transparent 60%),
    #fff;
  border: 1.5px solid var(--ax-line); border-radius: 22px; padding: 24px 22px; overflow: hidden;
  box-shadow: var(--ax-shadow); text-align: left;
}
.ax-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.ax-head > * { position: relative; min-width: 0; }
@media (min-width: 860px) {
  .ax-head { padding: 30px 34px; }
  .ax-head--split { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); }
}
.ax-head-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.ax-head-icon {
  width: 48px; height: 48px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; color: var(--ax-accent);
  background: linear-gradient(180deg, #fff, var(--ax-accent-bg)); border: 1.5px solid var(--ax-ok-line);
  box-shadow: 0 6px 16px -10px rgba(4,120,87,.55);
}
.ax-head-icon svg { width: 26px; height: 26px; stroke-width: 1.9; }
.ax-head .ax-title, .ax-title {
  margin: 14px 0 8px; font-family: var(--ax-display); font-weight: 800; color: var(--ax-ink);
  font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.04; letter-spacing: -.02em; text-align: left;
}
.ax-title em {
  font-style: normal; color: transparent;
  background: linear-gradient(90deg, #047857, #0e7490); -webkit-background-clip: text; background-clip: text;
}
.ax-lede { margin: 0; font-size: 14.5px; line-height: 1.6; color: #344054; }
.ax-head-aside { justify-self: stretch; }
@media (min-width: 860px) { .ax-head-aside { justify-self: center; } }

/* Live / local badge with a pulsing dot. */
.ax-badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--ax-mono); font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; line-height: 1.3;
  color: var(--ax-ok-text); background: var(--ax-ok-bg); border: 1px solid var(--ax-ok-line); border-radius: 999px; padding: 4px 11px;
}
.ax-badge i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ax-ok); animation: ax-ping 1.6s infinite; }
.ax-badge--local { color: var(--ax-info-text); background: var(--ax-info-bg); border-color: var(--ax-info-line); }
.ax-badge--local i { background: var(--ax-info); animation-name: ax-ping-info; }
.ax-badge--data { color: #344054; background: var(--ax-soft); border-color: var(--ax-line); }
.ax-badge--data i { background: #64748b; animation: none; }

/* Privacy or method line under the actions. */
.ax-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ax-muted); text-align: left; }
.ax-note svg { width: 16px; height: 16px; margin-top: 1px; color: var(--ax-accent); }

/* ---------- Buttons ---------- */
.ax-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.ax-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 12px 18px;
  font-family: var(--ax-display); font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  color: #fff !important; background: var(--ax-ink); border: 1.5px solid var(--ax-ink); border-radius: 13px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .12s, box-shadow .12s, background .15s, border-color .15s;
}
.ax-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(11,18,32,.65); }
.ax-btn:active { transform: translateY(1px); box-shadow: none; }
.ax-btn svg { width: 18px; height: 18px; }
.ax-btn--accent { background: var(--ax-accent); border-color: #065f46; }
.ax-btn--accent:hover { background: #065f46; box-shadow: 0 10px 22px -12px rgba(4,120,87,.8); }
.ax-btn--ghost { color: var(--ax-ink) !important; background: #fff; border-color: var(--ax-line-2); }
.ax-btn--ghost:hover { border-color: var(--ax-accent); color: var(--ax-accent) !important; box-shadow: 0 8px 18px -14px rgba(15,23,42,.5); }
.ax-btn--danger { background: #b91c1c; border-color: #991b1b; }
.ax-btn--sm { min-height: 44px; padding: 9px 14px; font-size: 13.5px; border-radius: 11px; }
.ax-btn--block { display: flex; width: 100%; }
.ax-btn[disabled], .ax-btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.ax-btn.is-busy { cursor: progress; opacity: .85; pointer-events: none; }
.ax-btn.is-busy::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: ax-spin .8s linear infinite;
}
.ax-btn.is-busy svg { display: none; }
@media (max-width: 520px) {
  .ax-actions > .ax-btn { flex: 1 1 auto; }
}

/* ---------- Form fields ---------- */
.ax-form { display: grid; gap: 14px; min-width: 0; }
.ax-form--row { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .ax-form--row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .ax-form--row > .ax-btn { margin-top: 28px; }
}
.ax-field { display: grid; gap: 7px; align-content: start; min-width: 0; margin: 0; }
.ax-label { font-family: var(--ax-display); font-size: 14px; font-weight: 700; color: var(--ax-ink); }
.ax-label small { font-family: var(--ax-mono); font-size: 11.5px; font-weight: 600; color: var(--ax-dim); margin-left: 6px; }
.ax-hint { font-size: 12.5px; line-height: 1.5; color: var(--ax-dim); }
.ax-hint:empty { display: none; }
.ax-field input, .ax-field select, .ax-field textarea, .ax-input {
  display: block; width: 100%; min-height: 50px; margin: 0; padding: 12px 14px;
  font-family: var(--ax-mono); font-size: 16px; line-height: 1.4; color: var(--ax-ink) !important;
  background: #fff !important; border: 2px solid #8796ab !important; border-radius: 13px;
  outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.ax-field textarea { min-height: 120px; resize: vertical; }
.ax-field select {
  padding-right: 40px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475467' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px 18px !important;
}
.ax-field input::placeholder, .ax-field textarea::placeholder { color: #8a94a6; }
.ax-field input:focus, .ax-field select:focus, .ax-field textarea:focus, .ax-input:focus {
  border-color: var(--ax-accent) !important; outline: none !important; box-shadow: 0 0 0 4px rgba(4,120,87,.18);
}
.ax-field.is-invalid input, .ax-field.is-invalid select, .ax-field.is-invalid textarea { border-color: var(--ax-bad) !important; }
.ax-field.is-invalid .ax-hint { color: var(--ax-bad-text); }
/* Input with a leading icon: wrap the input in .ax-field-wrap with a .ax-field-icon span. */
.ax-field-wrap { position: relative; min-width: 0; }
.ax-field-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ax-dim); display: inline-flex; pointer-events: none; }
.ax-field-icon svg { width: 18px; height: 18px; }
.ax-field-wrap input { padding-left: 44px; }
.ax-form--row .ax-btn { min-height: 50px; }

/* Segmented choice (filters, modes). Buttons use aria-pressed. */
.ax-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #e9eef4; border: 1.5px solid var(--ax-line); border-radius: 14px; max-width: 100%; }
.ax-seg button {
  min-height: 40px; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  font-family: var(--ax-display); font-size: 14px; font-weight: 700; color: #344054;
}
.ax-seg button[aria-pressed="true"] { background: #fff; color: var(--ax-ink); box-shadow: 0 1px 2px rgba(15,23,42,.12), inset 0 -2px 0 var(--ax-accent); }

/* ---------- Sticky phone action bar ---------- */
.ax-sticky { display: none; }
@media (max-width: 640px) {
  .ax-sticky {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--ax-line); box-shadow: 0 -10px 24px -18px rgba(15,23,42,.45);
  }
  .ax-sticky > .ax-btn { flex: 1 1 0; min-width: 0; }
  .ax-sticky > .ax-btn--ghost { flex: 0 1 auto; }
  body.ax-has-sticky, body:has(.ax-sticky) { padding-bottom: calc(var(--ax-sticky-h) + env(safe-area-inset-bottom)); }
}

/* ---------- Verdict ---------- */
.ax-verdict {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start;
  background: #fff; border: 1.5px solid var(--ax-line); border-left: 5px solid #94a3b8; border-radius: var(--ax-radius);
  padding: 18px; box-shadow: var(--ax-shadow);
}
.ax-verdict-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--ax-soft); color: #475467; }
.ax-verdict-icon svg { width: 22px; height: 22px; }
.ax-verdict-title, .ax-verdict h2, .ax-verdict h3 { margin: 0 0 4px; font-family: var(--ax-display); font-size: 18px; line-height: 1.25; color: var(--ax-ink); }
.ax-verdict p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.6; color: #344054; }
.ax-verdict--good { border-left-color: var(--ax-ok); }
.ax-verdict--good .ax-verdict-icon { background: var(--ax-ok-bg); color: var(--ax-ok); }
.ax-verdict--mid { border-left-color: var(--ax-warn); }
.ax-verdict--mid .ax-verdict-icon { background: var(--ax-warn-bg); color: var(--ax-warn); }
.ax-verdict--bad { border-left-color: var(--ax-bad); }
.ax-verdict--bad .ax-verdict-icon { background: var(--ax-bad-bg); color: var(--ax-bad); }
.ax-verdict--info { border-left-color: var(--ax-info); }
.ax-verdict--info .ax-verdict-icon { background: var(--ax-info-bg); color: var(--ax-info); }
@media (max-width: 400px) {
  .ax-verdict { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 15px 14px; }
  .ax-verdict-icon { width: 38px; height: 38px; }
  .ax-verdict-title, .ax-verdict h2, .ax-verdict h3 { font-size: 16.5px; }
}

/* ---------- Stat tiles ---------- */
.ax-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; min-width: 0; }
.ax-tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .ax-tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ax-tile {
  position: relative; display: grid; gap: 6px; align-content: start; min-width: 0;
  background: #fff; border: 1.5px solid var(--ax-line); border-radius: 14px; padding: 14px 15px; box-shadow: var(--ax-shadow);
  transition: border-color .3s, background .3s;
}
.ax-tile > * { min-width: 0; }
.ax-tile-label { display: flex; align-items: center; gap: 7px; font-family: var(--ax-mono); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #344054; }
.ax-tile-icon { display: inline-flex; color: var(--ax-dim); }
.ax-tile-icon svg { width: 15px; height: 15px; }
.ax-tile-value { font-family: var(--ax-display); font-size: clamp(1.35rem, 3.6vw, 1.75rem); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; color: var(--ax-ink); overflow-wrap: break-word; }
.ax-tile-value small { font-family: var(--ax-mono); font-size: 12px; font-weight: 600; color: var(--ax-dim); margin-left: 4px; letter-spacing: 0; }
.ax-tile-value--mono { font-family: var(--ax-mono); font-size: clamp(1rem, 2.6vw, 1.2rem); letter-spacing: 0; }
.ax-tile-sub { font-size: 12px; line-height: 1.45; color: var(--ax-dim); }
.ax-tile--ok { border-color: var(--ax-ok-line); background: linear-gradient(180deg, #fff, #f5fcf9); }
.ax-tile--ok .ax-tile-value, .ax-tile--ok .ax-tile-icon { color: var(--ax-ok-text); }
.ax-tile--bad { border-color: var(--ax-bad-line); background: linear-gradient(180deg, #fff, #fff7f7); }
.ax-tile--bad .ax-tile-value, .ax-tile--bad .ax-tile-icon { color: var(--ax-bad-text); }
.ax-tile--warn { border-color: var(--ax-warn-line); background: linear-gradient(180deg, #fff, #fffcf2); }
.ax-tile--warn .ax-tile-value, .ax-tile--warn .ax-tile-icon { color: var(--ax-warn-text); }
.ax-tile--info { border-color: var(--ax-info-line); background: linear-gradient(180deg, #fff, #f5fbff); }
.ax-tile--info .ax-tile-value, .ax-tile--info .ax-tile-icon { color: var(--ax-info-text); }
@media (max-width: 400px) {
  .ax-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ax-tiles--1 { grid-template-columns: minmax(0, 1fr); }
  .ax-tile { padding: 12px; }
  .ax-tile-value { font-size: 1.3rem; }
  .ax-tile-value--mono { font-size: .98rem; }
}

/* ---------- Segmented meter ---------- */
.ax-meter-wrap { display: grid; gap: 8px; min-width: 0; }
.ax-meter-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ax-meter-head b { font-family: var(--ax-display); font-size: 14px; color: var(--ax-ink); }
.ax-meter-head span { font-family: var(--ax-mono); font-size: 12px; font-weight: 700; color: var(--ax-muted); }
.ax-meter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.ax-meter > i { display: block; height: 9px; border-radius: 3px; background: #e6ebf1; transition: background .3s; }
.ax-meter > i.is-ok { background: var(--ax-ok); }
.ax-meter > i.is-bad { background: var(--ax-bad); }
.ax-meter > i.is-warn { background: var(--ax-warn); }
.ax-meter > i.is-info { background: var(--ax-info); }
.ax-meter > i.is-wait { background: linear-gradient(90deg, #e6ebf1, #f5f7fa, #e6ebf1); background-size: 200% 100%; animation: ax-shimmer 1.1s linear infinite; }
.ax-meter--lg > i { height: 14px; border-radius: 4px; }
/* Continuous bar: <div class="ax-meter ax-meter--fill"><i style="width:62%"></i></div> */
.ax-meter--fill { display: block; height: 10px; border-radius: 999px; background: #e6ebf1; overflow: hidden; }
.ax-meter--fill > i { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ax-ok), var(--ax-accent)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.ax-meter--fill.is-bad > i { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.ax-meter--fill.is-warn > i { background: linear-gradient(90deg, #f59e0b, #b45309); }

/* ---------- Status chips ---------- */
.ax-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ax-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  font-family: var(--ax-mono); font-size: 12px; font-weight: 700; line-height: 1.35;
  color: #344054; background: var(--ax-soft); border: 1px solid var(--ax-line); border-radius: 999px; padding: 4px 11px;
}
.ax-chip > i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; }
.ax-chip svg { width: 14px; height: 14px; }
.ax-chip--ok { color: var(--ax-ok-text); background: var(--ax-ok-bg); border-color: var(--ax-ok-line); }
.ax-chip--bad { color: var(--ax-bad-text); background: var(--ax-bad-bg); border-color: var(--ax-bad-line); }
.ax-chip--warn { color: var(--ax-warn-text); background: var(--ax-warn-bg); border-color: var(--ax-warn-line); }
.ax-chip--info { color: var(--ax-info-text); background: var(--ax-info-bg); border-color: var(--ax-info-line); }
button.ax-chip { min-height: 40px; padding: 7px 14px; cursor: pointer; background: #fff; border-width: 1.5px; border-color: var(--ax-line-2); }
button.ax-chip[aria-pressed="true"] { color: #fff; background: var(--ax-accent); border-color: #065f46; }

/* ---------- Card grid and cards ---------- */
.ax-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; min-width: 0; }
.ax-grid--2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .ax-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ax-grid--3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .ax-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .ax-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ax-grid > * { min-width: 0; }

.ax-card {
  position: relative; display: grid; gap: 8px; align-content: start; min-width: 0;
  background: #fff; border: 1.5px solid var(--ax-line); border-radius: var(--ax-radius); padding: 16px;
  box-shadow: var(--ax-shadow); color: inherit; text-decoration: none; text-align: left;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
a.ax-card, button.ax-card, .ax-card--link { cursor: pointer; font: inherit; }
a.ax-card:hover, button.ax-card:hover, .ax-card--link:hover { transform: translateY(-2px); border-color: var(--ax-accent); box-shadow: var(--ax-shadow-lift); }
.ax-card-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ax-card-top > :last-child { min-width: 0; }
.ax-card-icon { width: 38px; height: 38px; flex: none; 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); }
.ax-card-icon svg { width: 20px; height: 20px; stroke-width: 1.9; }
.ax-card-title { margin: 0; font-family: var(--ax-display); font-size: 15.5px; font-weight: 700; line-height: 1.25; color: var(--ax-ink); }
.ax-card-text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ax-muted); }
.ax-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-family: var(--ax-mono); font-size: 11.5px; color: var(--ax-dim); }
.ax-card--ok { border-left: 4px solid var(--ax-ok); }
.ax-card--bad { border-left: 4px solid var(--ax-bad); }
.ax-card--warn { border-left: 4px solid var(--ax-warn); }
.ax-card--info { border-left: 4px solid var(--ax-info); }
.ax-card--soft { background: var(--ax-soft); box-shadow: none; }

/* Key/value list for result details. */
.ax-kv { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--ax-line); }
.ax-kv dt, .ax-kv dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--ax-line); font-size: 13px; line-height: 1.5; overflow-wrap: break-word; }
.ax-kv dt { padding-right: 14px; font-family: var(--ax-mono); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #344054; }
.ax-kv dd { color: var(--ax-ink); font-weight: 600; }
@media (max-width: 520px) {
  .ax-kv { grid-template-columns: minmax(0, 1fr); }
  .ax-kv dt { padding-bottom: 0; border-bottom: 0; }
  .ax-kv dd { padding-top: 3px; }
}

/* ---------- Tables: horizontal scroll, pinned first column, sticky header ---------- */
.ax-table-wrap {
  position: relative; overflow: auto; max-height: min(70vh, 640px); min-width: 0;
  background: #fff; border: 1.5px solid var(--ax-line); border-radius: 14px; box-shadow: var(--ax-shadow);
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.ax-table-wrap--short { max-height: none; }
.ax-table-wrap table {
  display: table; width: 100%; min-width: var(--ax-table-min, 680px); margin: 0;
  border-collapse: separate; border-spacing: 0; font-size: 13px;
}
/* Undo tool.css's phone card collapse inside the wrapper: this table scrolls. */
.ax-table-wrap thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.ax-table-wrap tbody { display: table-row-group; }
.ax-table-wrap tr, .ax-table-wrap tbody tr { display: table-row; position: static; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.ax-table-wrap th, .ax-table-wrap td, .ax-table-wrap tbody td { display: table-cell; }
.ax-table-wrap tbody td::before { content: none; }
.ax-table-wrap thead th {
  position: sticky; top: 0; z-index: 2; padding: 10px 12px; text-align: left; vertical-align: bottom;
  font-family: var(--ax-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; word-break: keep-all; background: #eef2f6; border-bottom: 1.5px solid #b6c2d0;
}
.ax-table-wrap tbody td {
  padding: 10px 12px; text-align: left; vertical-align: top; line-height: 1.5;
  background: #fff; border-bottom: 1px solid #e6ebf1; overflow-wrap: break-word; word-break: normal;
}
.ax-table-wrap tbody tr:last-child td { border-bottom: 0; }
.ax-table-wrap tbody tr:hover td { background: #f3faf7; }
.ax-table-wrap tbody tr.is-hl td { background: #ecfdf5; }
.ax-table-wrap tbody tr.is-bad td { background: #fff5f5; }
.ax-table-wrap tbody tr.is-hl:hover td { background: #e0f7ee; }
.ax-table-wrap tbody tr.is-bad:hover td { background: #feeceb; }
.ax-table-wrap th:first-child, .ax-table-wrap td:first-child {
  position: sticky; left: 0; z-index: 1; min-width: 9.5rem;
  box-shadow: 1px 0 0 var(--ax-line), 8px 0 10px -8px rgba(15,23,42,.22);
}
.ax-table-wrap thead th:first-child { z-index: 3; }
.ax-table-wrap td:first-child { font-weight: 700; color: var(--ax-ink); }
.ax-table-wrap .ax-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-table-wrap code, .ax-table-wrap .ax-code { font-family: var(--ax-mono); font-size: 12px; white-space: nowrap; }

/* ---------- Loading ---------- */
.ax-skeleton {
  display: block; min-height: 14px; border-radius: 8px;
  background: linear-gradient(90deg, #e9eef3 0%, #f6f8fa 40%, #e9eef3 80%); background-size: 200% 100%;
  animation: ax-shimmer 1.2s linear infinite; color: transparent !important; user-select: none;
}
.ax-skeleton--text { height: 12px; margin: 6px 0; }
.ax-skeleton--title { height: 22px; width: 60%; margin: 4px 0 10px; }
.ax-skeleton--value { height: 30px; width: 55%; }
.ax-skeleton--block { height: 96px; border-radius: 14px; }
.ax-skeleton--w40 { width: 40%; } .ax-skeleton--w70 { width: 70%; } .ax-skeleton--w90 { width: 90%; }
.ax-pulse { display: inline-block; width: 9px; height: 9px; flex: none; border-radius: 50%; background: #94a3b8; vertical-align: middle; animation: ax-pulse 1s ease-in-out infinite; }
.ax-pulse--ok { background: var(--ax-ok); }
.ax-loading { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ax-muted); }
.ax-spin { display: inline-block; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2.5px solid #d5dce4; border-top-color: var(--ax-accent); animation: ax-spin .8s linear infinite; vertical-align: middle; }

/* ---------- Empty and error states ---------- */
.ax-empty, .ax-error {
  display: grid; justify-items: center; gap: 8px; text-align: center; padding: 34px 20px;
  border-radius: var(--ax-radius); min-width: 0;
}
.ax-empty { background: rgba(255,255,255,.7); border: 1.5px dashed var(--ax-line-2); }
.ax-error { background: var(--ax-bad-bg); border: 1.5px solid var(--ax-bad-line); }
.ax-empty-icon, .ax-error-icon { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; }
.ax-empty-icon { background: #fff; border: 1.5px solid var(--ax-line); color: var(--ax-dim); }
.ax-error-icon { background: #fff; border: 1.5px solid var(--ax-bad-line); color: var(--ax-bad); }
.ax-empty-icon svg, .ax-error-icon svg { width: 26px; height: 26px; stroke-width: 1.9; }
.ax-empty h3, .ax-error h3 { margin: 4px 0 0; font-family: var(--ax-display); font-size: 17px; line-height: 1.3; color: var(--ax-ink); }
.ax-error h3 { color: var(--ax-bad-text); }
.ax-empty p, .ax-error p { margin: 0; width: 100%; font-size: 13px; line-height: 1.6; color: var(--ax-muted); }
.ax-error p { color: #7f1d1d; }
.ax-empty .ax-btn, .ax-error .ax-btn { margin-top: 8px; }

/* ---------- Explanatory content below the app ---------- */
.ax-section { margin-top: 30px; min-width: 0; }
.ax-app > .ax-section { margin-top: 30px; }
.ax-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1.5px solid var(--ax-line); }
.ax-section-head h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-family: var(--ax-display); font-size: 21px; line-height: 1.25; letter-spacing: -.01em; color: var(--ax-ink); }
.ax-section-head h2 svg { width: 20px; height: 20px; color: var(--ax-accent); }
.ax-section-aside { font-family: var(--ax-mono); font-size: 12px; color: var(--ax-dim); }
.ax-prose { font-size: 14px; line-height: 1.7; color: #344054; }
.ax-prose p { margin: 0 0 12px; color: #344054; }
.ax-prose p:last-child { margin-bottom: 0; }
.ax-prose b, .ax-prose strong { color: var(--ax-ink); }
.ax-prose a { color: var(--ax-accent); font-weight: 600; }
.ax-prose ul, .ax-prose ol { margin: 0 0 12px; padding-left: 1.3em; }
.ax-prose li { margin: 4px 0; }

/* ---------- FAQ ---------- */
.ax-faq { display: grid; gap: 10px; }
.ax-faq details { background: #fff; border: 1.5px solid var(--ax-line); border-radius: 14px; box-shadow: var(--ax-shadow); }
.ax-faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 52px; padding: 13px 16px; font-family: var(--ax-display); font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ax-ink);
  border-radius: 14px; -webkit-tap-highlight-color: transparent;
}
.ax-faq summary::-webkit-details-marker { display: none; }
.ax-faq summary::after {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 7px; background-color: var(--ax-soft); border: 1px solid var(--ax-line);
  background-image: linear-gradient(#344054, #344054), linear-gradient(#344054, #344054);
  background-size: 10px 2px, 2px 10px; background-position: center; background-repeat: no-repeat; transition: transform .2s;
}
.ax-faq details[open] > summary::after { background-size: 10px 2px, 0 0; background-color: var(--ax-accent-bg); border-color: var(--ax-ok-line); }
.ax-faq summary:hover { background: #fafbfc; }
.ax-faq-body { padding: 0 16px 15px; font-size: 13.5px; line-height: 1.65; color: #344054; }
.ax-faq-body p { margin: 0 0 9px; color: #344054; }
.ax-faq-body p:last-child { margin-bottom: 0; }
.ax-faq-body a { color: var(--ax-accent); font-weight: 600; }

/* ---------- Related tools and guides ---------- */
.ax-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 22px; }
@media (min-width: 760px) { .ax-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ax-links-group { background: #fff; border: 1.5px solid var(--ax-line); border-radius: 14px; padding: 6px 6px 8px; box-shadow: var(--ax-shadow); min-width: 0; }
.ax-links h3, .ax-links h4 { margin: 8px 10px 4px; font-family: var(--ax-mono); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ax-dim); }
.ax-links ul { list-style: none; margin: 0; padding: 0; }
.ax-links a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 10px; border-radius: 10px;
  font-family: var(--ax-display); font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--ax-ink) !important; text-decoration: none;
}
.ax-links a svg { width: 18px; height: 18px; color: var(--ax-accent); }
.ax-links a::after {
  content: ""; flex: none; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid #98a2b3; border-top: 2px solid #98a2b3; transform: rotate(45deg); transition: transform .15s, border-color .15s;
}
.ax-links a:hover { background: var(--ax-accent-bg); color: var(--ax-accent) !important; }
.ax-links a:hover::after { border-color: var(--ax-accent); transform: translateX(2px) rotate(45deg); }
.ax-foot { margin-top: 22px; font-size: 12px; line-height: 1.55; color: var(--ax-dim); text-align: left; }

/* ---------- Toast ---------- */
.ax-toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 120;
  display: inline-flex; align-items: center; gap: 9px; width: max-content; max-width: calc(100vw - 32px);
  padding: 11px 16px; border-radius: 13px; background: var(--ax-ink); color: #fff;
  font-family: var(--ax-display); font-size: 14px; font-weight: 600; line-height: 1.35;
  box-shadow: 0 16px 34px -14px rgba(11,18,32,.6);
  opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.ax-toast svg { width: 18px; height: 18px; color: #6ee7b7; }
.ax-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ax-toast--bad svg { color: #fca5a5; }
@media (max-width: 640px) {
  body.ax-has-sticky .ax-toast, body:has(.ax-sticky) .ax-toast { bottom: calc(var(--ax-sticky-h) + 12px + env(safe-area-inset-bottom)); }
}

/* ---------- Motion ---------- */
@keyframes ax-ping { 0% { box-shadow: 0 0 0 0 rgba(5,150,105,.55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(5,150,105,0); } }
@keyframes ax-ping-info { 0% { box-shadow: 0 0 0 0 rgba(2,132,199,.5); } 80%, 100% { box-shadow: 0 0 0 8px rgba(2,132,199,0); } }
@keyframes ax-pulse { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes ax-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes ax-spin { to { transform: rotate(360deg); } }
@keyframes ax-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ax-rise { animation: ax-rise .35s ease both; }
@media (prefers-reduced-motion: reduce) {
  [class*="ax-"], [class*="ax-"]::before, [class*="ax-"]::after { animation: none !important; transition: none !important; }
  .ax-btn:hover, .ax-card:hover, a.ax-card:hover { transform: none; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .ax-app { padding: 12px 16px 48px; }
  .ax-head { padding: 20px 16px; border-radius: 18px; gap: 16px; }
  .ax-head-icon { width: 44px; height: 44px; border-radius: 13px; }
  .ax-head .ax-title, .ax-title { margin-top: 12px; }
  .ax-section-head h2 { font-size: 19px; }
}
@media (max-width: 400px) {
  .ax-head .ax-title, .ax-title { font-size: 1.75rem; }
  .ax-lede { font-size: 14px; }
  .ax-btn { padding: 12px 14px; font-size: 14.5px; }
  .ax-card { padding: 14px; }
  .ax-table-wrap th:first-child, .ax-table-wrap td:first-child { min-width: 8rem; }
}
