/* ═══════════════════════════════════════════════════════════════════════════
   DNS Panopticon — Zone Analyzer
   Page-specific styles for the Zone Analyzer tool (public/analyzer/index.html).
   ═══════════════════════════════════════════════════════════════════════════ */

body.analyzer-results-active {
  height: 100vh;
  overflow: hidden;
}

/* ── Landing state overrides ──────────────────────────────────────────────── */

/* Hide the toolbar until a file is loaded */
body.analyzer-landing #topbar {
  display: none;
}

/* Remove the "file drop box" visual frame on landing — the whole area is the drop target */
body.analyzer-landing #dropzone {
  cursor: default;
}

/* ── Topbar ───────────────────────────────────────────────────────────────── */
#topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 45%, transparent);
  position: relative;
  flex-wrap: wrap;
}

#topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
  min-width: 0;
}

#zone-file-title {
  min-width: 0;
  text-align: left;
  padding: 2px 4px;
  border-radius: 6px;
  font-size: var(--text-compact);
  font-weight: 600;
  color: var(--txt-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
#zone-file-title.is-empty { display: none; }

#file-input { display: none; }

#file-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 7px;
  font-size: var(--text-compact);
  font-weight: 500;
  padding: 6px 12px;
  background: var(--primary-fill);
  color: #fff;
  border: 1px solid var(--primary);
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast);
}
#file-label:hover { background: var(--primary-dk); border-color: var(--primary-dk); }

#topbar .tbtn { font-size: 13px; }

/* ── Drop zone ────────────────────────────────────────────────────────────── */
#dropzone {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-base);
}
#dropzone:hover,
#dropzone.drag-over { background: color-mix(in srgb, var(--primary) 4%, transparent); }
#dropzone.drag-over { background: color-mix(in srgb, var(--primary) 8%, transparent); }

.dz-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary-fill);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: var(--radius-control);
  padding: 11px 22px;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  margin-bottom: 14px;
}
.dz-upload-btn:hover { background: var(--primary-dk); border-color: var(--primary-dk); }
.dz-upload-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.dz-drag-hint {
  font-size: var(--text-compact);
  color: var(--txt-4);
  margin: 0;
  line-height: 1.5;
}
.dz-drag-hint kbd {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: var(--text-caption);
  font-family: var(--font-mono);
  color: var(--txt-3);
}

.disclaimer-box {
  max-width: 520px;
  margin-top: 20px;
}

.dz-sample-btn {
  margin-top: 10px;
  background: none;
  border: 0;
  padding: 4px 6px;
  font-family: inherit;
  font-size: var(--text-compact);
  font-weight: 600;
  color: var(--primary-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.dz-sample-btn:hover { color: var(--primary-dk); }
.dz-sample-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* While the sample zone loads, keep the upload hero from flashing. */
html.analyzer-sample-boot #analyzer-landing { visibility: hidden; }

/* ── Toolbar menus ────────────────────────────────────────────────────────── */
.tb-menu { position: relative; }

.tb-menu-caret { margin-left: -1px; opacity: 0.7; }

.tb-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 240px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--txt) 12%, transparent);
}
.tb-menu-list[hidden] { display: none; }
.tb-menu-list-end { left: auto; right: 0; }

.tb-menu-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  font-family: inherit;
  text-align: left;
  color: var(--txt);
  cursor: pointer;
}
.tb-menu-item:hover:not(:disabled),
.tb-menu-item:focus-visible { background: var(--surface2); outline: none; }
.tb-menu-item:disabled { opacity: 0.45; cursor: not-allowed; }
.tb-menu-item-title { font-size: var(--text-compact); font-weight: 600; }
.tb-menu-item-desc { font-size: var(--text-compact); color: var(--txt-3); }

/* ── Zone title ───────────────────────────────────────────────────────────── */
#zone-file-title { display: flex; align-items: baseline; gap: 8px; }
#zone-file-title.is-empty { display: none; }
.zone-title-badge {
  align-self: center;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary-ink);
  font-size: var(--text-caption);
  font-weight: var(--weight-action);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.zone-title-name { color: var(--txt); font-weight: var(--weight-action); overflow: hidden; text-overflow: ellipsis; }
.zone-title-detail { color: var(--txt-3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

/* ── Sample "Try" chips (in the filter bar) ───────────────────────────────── */
.sample-try {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
.sample-try[hidden] { display: none; }

.sample-try-label { font-size: 12px; font-weight: 600; color: var(--txt-3); }

.sample-try-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--txt-2);
  padding: 3px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.sample-try-chip:hover { border-color: var(--primary); color: var(--primary-ink); }
.sample-try-chip[aria-pressed="true"] {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary-ink);
}
.sample-try-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── Guided tips ──────────────────────────────────────────────────────────── */
.analyzer-tip {
  position: fixed;
  z-index: 60;
  width: min(320px, calc(100vw - 16px));
  padding: 12px 14px;
  background: var(--txt);
  color: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 30px color-mix(in srgb, #000 25%, transparent);
}
.analyzer-tip[hidden] { display: none; }
.analyzer-tip-arrow {
  position: absolute;
  top: -6px;
  left: var(--tip-arrow-left, 20px);
  width: 12px;
  height: 12px;
  background: var(--txt);
  transform: rotate(45deg);
}
.analyzer-tip.is-floating .analyzer-tip-arrow { display: none; }
.analyzer-tip.is-above .analyzer-tip-arrow { top: auto; bottom: -6px; }
.analyzer-tip p { margin: 0; }
.analyzer-tip-step { font-size: var(--text-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.analyzer-tip-title { margin-top: 2px !important; font-size: var(--text-small); font-weight: var(--weight-action); }
.analyzer-tip-text { margin-top: 4px !important; font-size: var(--text-compact); line-height: 1.5; opacity: 0.85; }
.analyzer-tip-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 10px; }
.analyzer-tip-skip {
  background: none;
  border: 0;
  padding: 4px 6px;
  font-family: inherit;
  font-size: var(--text-compact);
  font-weight: 600;
  color: inherit;
  opacity: 0.75;
  cursor: pointer;
}
.analyzer-tip-skip:hover { opacity: 1; }
.analyzer-tip-skip[hidden] { display: none; }
.analyzer-tip :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (max-width: 720px) {
  .zone-title-detail { display: none; }
  .sample-try { padding-left: 0; border-left: 0; }
}

/* ── Grid wrapper ─────────────────────────────────────────────────────────── */
main#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.analyzer-results-active main#main-content {
  overflow: hidden;
  padding-bottom: 0;
}

#grid-wrapper { flex: 1; display: none; flex-direction: column; overflow: hidden; min-height: 0; }

/* ── Filter bar ───────────────────────────────────────────────────────────── */
#filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

#filter-label { font-size: var(--text-compact); color: var(--txt-3); display: flex; align-items: center; gap: 4px; white-space: nowrap; }

.fpill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--txt-3);
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: var(--text-compact);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  user-select: none;
}
.fpill:hover { border-color: var(--primary); color: var(--pill-active); background: color-mix(in srgb, var(--primary) 5%, transparent); }
.fpill.active { border-color: var(--primary); color: var(--pill-active); background: color-mix(in srgb, var(--primary) 9%, transparent); }

.fpill[data-type].is-on  { border-color: var(--green); color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.fpill[data-type].is-off { border-color: var(--red); color: var(--red); background: color-mix(in srgb, var(--red) 11%, transparent); }
.fpill.pill-amber { border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: var(--amber); }
.fpill.pill-amber:hover { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.fpill.pill-green { border-color: color-mix(in srgb, var(--green) 35%, transparent); color: var(--green); }
.fpill.pill-green:hover { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, transparent); }
.fpill:disabled { opacity: 0.55; cursor: not-allowed; }

#filter-info { margin-left: auto; font-size: var(--text-compact); color: var(--txt-3); white-space: nowrap; }
#filter-info-visible, #filter-info-total { font-weight: 600; color: var(--txt-2); }

#filter-dynamic-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: middle;
}

#filter-dynamic-icon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  padding: 2px;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 40%, transparent);
  transition: box-shadow 0.2s;
}

#filter-dynamic-icon i {
  width: 2px;
  border-radius: 2px;
  background: var(--green);
  display: inline-block;
}

#filter-dynamic-icon i:nth-child(1) { height: 4px; }
#filter-dynamic-icon i:nth-child(2) { height: 7px; }
#filter-dynamic-icon i:nth-child(3) { height: 10px; }

#filter-dynamic-indicator.syncing #filter-dynamic-icon {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 28%, transparent);
}

#myGrid { flex: 1; width: 100%; min-height: 0; }

/* ── Status bar ───────────────────────────────────────────────────────────── */
#statusbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 12px;
  flex-shrink: 0;
  height: 32px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid var(--border);
  color: var(--txt-3);
}
.stat-item:last-of-type { border-right: none; }
.stat-item svg { color: var(--txt-4); }
.stat-item strong { color: var(--txt-2); font-weight: 600; }

#stat-hint { margin-left: auto; color: var(--txt-4); font-size: var(--text-compact); display: flex; align-items: center; gap: 6px; }
#stat-hint kbd {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 5px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--txt-3);
}

.grid-cell-micro {
  font-family: inherit;
  font-size: 13px;
}

/* ── Hostname cell right-click indicator ─────────────────────────────────── */
.hostname-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  cursor: context-menu;
}

.hostname-cell-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hostname-rc-hint {
  opacity: 0;
  color: var(--txt-4);
  font-size: var(--text-compact);
  line-height: 1;
  transition: opacity var(--t-fast);
  flex-shrink: 0;
  user-select: none;
}

.ag-row:hover .hostname-rc-hint {
  opacity: 0.5;
}

.grid-type-badge {
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.grid-cell-tone-muted {
  color: #5f7097;
}

.grid-cell-tone-subtle {
  color: #64748b;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .grid-cell-tone-muted {
    color: #9db0d0;
  }

  html:not([data-theme="light"]) .grid-cell-tone-subtle {
    color: #94a3b8;
  }
}

[data-theme="dark"] .grid-cell-tone-muted {
  color: #9db0d0;
}

[data-theme="dark"] .grid-cell-tone-subtle {
  color: #94a3b8;
}

/* ── Record type colors (shared --rtype-* tokens) ───────────────────────── */
.type-A     { color: var(--rtype-a-fg); }
.type-AAAA  { color: var(--rtype-aaaa-fg); }
.type-CNAME { color: var(--rtype-cname-fg); }
.type-MX    { color: var(--rtype-mx-fg); }
.type-TXT   { color: var(--rtype-txt-fg); }
.type-PTR   { color: var(--rtype-ptr-fg); }
.type-NS    { color: var(--rtype-ns-fg); }
.type-SOA   { color: var(--rtype-soa-fg); }
.type-SRV   { color: var(--rtype-srv-fg); }
.type-CAA   { color: var(--rtype-caa-fg); }

/* ── Advanced filter panel ────────────────────────────────────────────────── */
#adv-panel {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#adv-panel.open { display: flex; }

.fp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fp-label { font-size: var(--text-compact); color: var(--txt-3); white-space: nowrap; font-weight: 500; }

#type-exclude-wrap { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.exc-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: color-mix(in srgb, var(--red) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  color: var(--red);
  padding: 2px 5px 2px 7px;
  border-radius: 4px;
  font-size: var(--text-compact);
  font-family: inherit;
  font-weight: 600;
}

.exc-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0 1px;
  line-height: 1;
  opacity: 0.6;
  font-size: var(--text-small);
}
.exc-tag button:hover { opacity: 1; }

#type-exclude-input {
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt);
  font-size: var(--text-body);
  font-family: inherit;
  width: 110px;
  outline: none;
  text-transform: uppercase;
}
#type-exclude-input:focus { border-color: var(--border-hi); }
#type-exclude-input::placeholder { text-transform: none; font-family: inherit; font-size: inherit; opacity: 0.7; }

.fp-sep { width: 1px; height: 16px; background: var(--border); flex-shrink: 0; }

/* ── Filter rule builder ──────────────────────────────────────────────────── */
#filter-rules-wrap { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }

.filter-rule { display: flex; align-items: center; gap: 5px; min-height: 28px; flex-wrap: nowrap; }

.rule-connector { font-size: var(--text-compact); font-weight: 700; color: var(--txt-4); width: 44px; text-align: right; flex-shrink: 0; letter-spacing: 0.04em; }

.rule-condition-toggle {
  width: 44px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt-3);
  font-size: var(--text-compact);
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0;
  outline: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.rule-condition-toggle:hover { border-color: var(--border-hi); color: var(--txt); }
.rule-condition-toggle.is-or { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: var(--accent); color: var(--accent); }

.rule-select {
  height: 26px;
  padding: 0 4px 0 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt);
  font-size: var(--text-compact);
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.rule-select:focus { border-color: var(--border-hi); }
.rule-col-select { min-width: 130px; }
.rule-op-select  { min-width: 158px; }

.rule-value-input {
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  flex: 1;
  min-width: 80px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt);
  font-size: var(--text-compact);
  font-family: inherit;
  outline: none;
}
.rule-value-input:focus { border-color: var(--border-hi); }
.rule-value-input:disabled { opacity: 0.3; cursor: not-allowed; }

.rule-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--txt-4);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  transition: background var(--t-fast), color var(--t-fast);
}
.rule-remove:hover { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }

.rule-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: 1px dashed var(--border);
  color: var(--txt-3);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: var(--text-compact);
  font-weight: 500;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  margin-top: 2px;
  white-space: nowrap;
}
.rule-add-btn:hover { border-color: var(--primary); color: var(--primary); }

.fp-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 5px;
  font-size: var(--text-compact);
  font-weight: 500;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt-2);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.fp-btn:hover { border-color: var(--border-hi); color: var(--txt); }
#fp-copy-msg { font-size: var(--text-compact); color: var(--green); }

/* ── Hostname context menu ─────────────────────────────────────────────────── */
#hostname-tools-context-menu {
  position: fixed;
  min-width: 320px;
  max-width: min(92vw, 440px);
  max-height: min(72vh, 560px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.24);
  padding: 8px;
  z-index: 1200;
  display: none;
}
#hostname-tools-context-menu.open { display: block; }

.hostname-menu-title {
  font-size: 12px;
  color: var(--txt-3);
  margin: 0 2px 8px;
  line-height: 1.4;
}
.hostname-menu-title strong {
  color: var(--txt-2);
  font-family: var(--font-mono);
  font-size: 12px;
}

.hostname-tool-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface2) 52%, transparent);
  margin-bottom: 6px;
  overflow: hidden;
}
.hostname-tool-group:last-child { margin-bottom: 0; }

.hostname-tool-group summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 10px;
  font-size: var(--text-compact);
  font-weight: 600;
  color: var(--txt-2);
  user-select: none;
}
.hostname-tool-group summary::-webkit-details-marker { display: none; }
.hostname-tool-group[open] summary {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface2-hi) 65%, transparent);
  color: var(--txt);
}

.hostname-tool-item {
  width: calc(100% - 8px);
  margin: 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 8px;
  text-align: left;
  font-size: var(--text-compact);
  background: transparent;
  color: var(--txt-2);
  cursor: pointer;
}
.hostname-tool-item:hover {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--txt);
}

.hostname-open-primary {
  width: calc(100% - 4px);
  margin: 0 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 9px;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--txt-2);
  font-size: var(--text-compact);
  font-weight: 600;
  cursor: pointer;
}
.hostname-open-primary:hover {
  border-color: var(--border-hi);
  color: var(--txt);
  background: color-mix(in srgb, var(--primary) 13%, var(--surface));
}
.hostname-open-primary svg { flex-shrink: 0; }

/* ── Topbar actions ───────────────────────────────────────────────────────── */
#topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #topbar { gap: 8px; }
  #zone-file-title { width: 100%; min-width: 0; padding-left: 0; padding-right: 0; }
  #topbar-actions { width: 100%; }
}

@media (max-width: 768px) {
  #topbar { padding: 8px 10px; }
  #topbar-actions { gap: 6px; justify-content: flex-start; }
  .tbtn, #file-label { font-size: var(--text-compact); padding: 5px 10px; }
  .tbtn-icon { width: 28px; height: 28px; }
  #filter-bar { padding: 8px 10px; }
  #filter-info { width: 100%; margin-left: 0; }
  #statusbar { height: auto; min-height: 32px; padding: 6px 10px; flex-wrap: wrap; gap: 4px 0; }
  .stat-item { padding-right: 10px; margin-right: 10px; }
  #stat-hint { width: 100%; margin-left: 0; }
}

@media (max-width: 640px) {
  #zone-file-title { font-size: var(--text-compact); }
  #filter-bar { gap: 6px; }
  .fpill { font-size: var(--text-compact); padding: 3px 8px 3px 7px; }
  #filter-rules-wrap { overflow-x: auto; padding-bottom: 4px; }
}

@media (max-width: 480px) {
  body.analyzer-landing .landing-subtitle-shared { margin-bottom: 32px; }
}
