:root {
  --bg: #f2f4f7;
  --header-bg: #10161f;
  --header-bg2: #1b2634;
  --accent: #2e8b57;
  --accent2: #3aa76d;
  --accent-hover: #257048;
  --text: #1a222c;
  --muted: #6b7684;
  --muted-light: #9aa4b1;
  --card-bg: #ffffff;
  --border: #e5e9ee;
  --field-bg: #f5f7f9;
  --ok: #1f8a4c;
  --ok-bg: #e7f6ed;
  --bad: #cf3b3b;
  --bad-bg: #fdecec;
  --warn: #b8790c;
  --warn-bg: #fdf1de;
  --pending: #c08a12;
  --code-bg: #10161f;
  --code-text: #c9d3dc;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(16,22,31,0.04);
  --shadow-md: 0 8px 24px rgba(16,22,31,0.08);
}

:root[data-theme="dark"] {
  --bg: #0f1319;
  --header-bg: #05070a;
  --header-bg2: #0d1218;
  --text: #e6eaef;
  --muted: #94a1ae;
  --muted-light: #64707c;
  --card-bg: #171d25;
  --border: #262e38;
  --field-bg: #1e252e;
  --ok: #4ade80;
  --ok-bg: #113322;
  --bad: #f87171;
  --bad-bg: #3a1616;
  --warn: #fbbf24;
  --warn-bg: #3a2c0d;
  --code-bg: #05070a;
  --code-text: #c9d3dc;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1319;
    --header-bg: #05070a;
    --header-bg2: #0d1218;
    --text: #e6eaef;
    --muted: #94a1ae;
    --muted-light: #64707c;
    --card-bg: #171d25;
    --border: #262e38;
    --field-bg: #1e252e;
    --ok: #4ade80;
    --ok-bg: #113322;
    --bad: #f87171;
    --bad-bg: #3a1616;
    --warn: #fbbf24;
    --warn-bg: #3a2c0d;
    --code-bg: #05070a;
    --code-text: #c9d3dc;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}

/* ---------- Header ---------- */

header.topbar {
  background:
    radial-gradient(1200px 300px at 20% -20%, rgba(46,139,87,0.25), transparent),
    linear-gradient(180deg, var(--header-bg), var(--header-bg2));
  color: #fff;
  padding: 40px 20px 46px;
  position: relative;
}

.theme-toggle {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #dfe6ec;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease;
}
.theme-toggle:hover { background: rgba(255,255,255,0.14); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

header.topbar h1 {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

header.topbar h1 span { color: #6ee7a3; }

header.topbar p {
  margin: 0;
  color: #a9b6c2;
  font-size: 14.5px;
}

/* ---------- Tool nav ---------- */

.toolnav {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 18px;
  position: relative;
  z-index: 2;
}
.toolnav a {
  color: #b7c2cc;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.toolnav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.toolnav a.active { background: rgba(46,139,87,0.28); color: #fff; }

/* ---------- Search panel ---------- */

.search-panel {
  max-width: 820px;
  margin: -26px auto 0;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(16,22,31,0.04);
}

.search-panel input[type=text] {
  flex: 1 1 320px;
  min-width: 200px;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  background: var(--field-bg);
  color: var(--text);
  transition: background .15s ease, box-shadow .15s ease;
}
.search-panel input[type=text]:focus {
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(46,139,87,0.18);
  border-color: var(--accent);
}
.search-panel input[type=text]::placeholder { color: var(--muted-light); }

.search-panel select {
  padding: 13px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  background: var(--field-bg);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.search-panel select:focus { outline: none; box-shadow: 0 0 0 3px rgba(46,139,87,0.18); }

.search-panel button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.search-panel button:hover { background: var(--accent-hover); }
.search-panel button:active { transform: scale(0.98); }
.search-panel button:disabled { opacity: .6; cursor: default; transform: none; }

/* ---------- Recent searches ---------- */

.recent-wrap {
  max-width: 820px;
  margin: 10px auto 0;
  padding: 0 16px;
}

.recent-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.recent-chip:hover { border-color: var(--accent); color: var(--text); }
.recent-chip .type { color: var(--muted-light); font-weight: 700; }

/* ---------- Page layout ---------- */

.page {
  max-width: 1200px;
  margin: 36px auto 20px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.main-col { min-width: 0; }

.side-col {
  position: sticky;
  top: 20px;
}

/* ---------- Summary / progress ---------- */

.summary {
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.summary.show { display: flex; }
.summary b { font-size: 15px; }
.type-tag {
  display: inline-block;
  background: var(--field-bg);
  color: var(--muted);
  font-weight: 700;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 5px;
  margin-left: 4px;
  vertical-align: middle;
}
.sum-favicon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.summary .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12.5px;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.dnssec.signed { background: var(--ok-bg); color: var(--ok); }
.pill.dnssec.partial { background: var(--warn-bg); color: var(--warn); }
.pill.dnssec.unsigned { background: var(--field-bg); color: var(--muted); }

.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--field-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.copy-link-btn:hover { border-color: var(--accent); }
.copy-link-btn.copied { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.sum-timing { color: var(--muted); font-size: 13px; margin-left: auto; }

.progress-wrap {
  height: 3px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
  display: none;
}
.progress-wrap.show { display: block; }
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .3s ease;
}

/* ---------- Results grid ---------- */

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px;
}

.result-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  opacity: 0;
  transform: translateY(4px);
  animation: fadeIn .3s ease forwards;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.result-card:hover { box-shadow: var(--shadow-md); border-color: #d8dee5; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

.result-card .row1 {
  display: flex;
  align-items: center;
  gap: 7px;
}
.flag { font-size: 15px; line-height: 1; }
.loc {
  flex: 1;
  min-width: 0;
}
.loc .country {
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loc .meta {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.pending { background: var(--pending); animation: pulse 1s infinite; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 2px var(--ok-bg); }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 0 2px var(--bad-bg); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.result-card .value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.result-card .value {
  flex: 1;
  min-width: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11.5px;
  background: var(--field-bg);
  border-radius: 5px;
  padding: 5px 7px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.result-card .value:hover {
  white-space: normal;
  overflow: visible;
  word-break: break-all;
}
.result-card .value.bad-text { color: var(--bad); background: var(--bad-bg); }
.result-card .ms { font-size: 10px; color: var(--muted-light); flex-shrink: 0; }

.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: var(--muted-light);
  padding: 60px 20px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-state.show { display: flex; }
.empty-state p { margin: 0; font-size: 14px; max-width: 320px; }

.info-box {
  margin-top: 26px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}
.info-box h3 { margin-top: 0; color: var(--text); font-size: 14.5px; }

/* ---------- WHOIS side panel ---------- */

.whois-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.whois-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.whois-header h2 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 800;
}
.whois-domain {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  word-break: break-all;
}

.whois-body { padding: 16px 18px 18px; }

.whois-placeholder {
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.6;
}

.whois-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.whois-error {
  color: var(--bad);
  background: var(--bad-bg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.whois-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.whois-field:last-child { border-bottom: none; }
.whois-field .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted-light);
  font-weight: 700;
}
.whois-field .v {
  font-size: 13.5px;
  color: var(--text);
  word-break: break-word;
}

.status-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.status-chip {
  background: var(--field-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

.ns-list { display: flex; flex-direction: column; gap: 3px; }
.ns-list span {
  font-family: Consolas, Menlo, monospace;
  font-size: 12.5px;
  color: var(--text);
}

.whois-toggle {
  margin-top: 14px;
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px;
  border-radius: 7px;
  cursor: pointer;
}
.whois-toggle:hover { border-color: var(--accent); }

.whois-raw {
  display: none;
  margin-top: 10px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: Consolas, Menlo, monospace;
  font-size: 11px;
  line-height: 1.6;
  padding: 12px;
  border-radius: 8px;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.whois-raw.show { display: block; }

footer {
  text-align: center;
  padding: 26px;
  color: var(--muted-light);
  font-size: 12px;
}

.error-banner {
  display: none;
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid var(--bad);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.error-banner.show { display: block; }

/* ---------- Extra check panels (email / ssl / http / dnsbl) ---------- */

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.panel-card h2 {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 800;
}
.muted-sm { color: var(--muted-light); font-weight: 500; font-size: 12px; }

.panel-placeholder {
  color: var(--muted-light);
  font-size: 13px;
}
.panel-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.panel-error {
  color: var(--bad);
  background: var(--bad-bg);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.5;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.check-row:last-child { border-bottom: none; }
.check-row .badge {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  margin-top: 1px;
}
.badge.pass { background: var(--ok-bg); color: var(--ok); }
.badge.fail { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.check-row .rt { flex: 1; min-width: 0; }
.check-row .rt .label { font-weight: 700; }
.check-row .rt .detail {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
  margin-top: 1px;
  font-family: Consolas, Menlo, monospace;
}

.http-hop {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 4px 0;
  font-family: Consolas, Menlo, monospace;
}
.http-hop .code {
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11px;
}
.http-hop .code.c2 { background: var(--ok-bg); color: var(--ok); }
.http-hop .code.c3 { background: var(--warn-bg); color: var(--warn); }
.http-hop .code.c4, .http-hop .code.c5, .http-hop .code.err { background: var(--bad-bg); color: var(--bad); }
.http-hop .u { color: var(--muted); word-break: break-all; }

.dnsbl-summary {
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 700;
}
.dnsbl-summary.clean { color: var(--ok); }
.dnsbl-summary.dirty { color: var(--bad); }

.port-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
}
.port-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 11px;
  background: var(--field-bg);
}
.port-chip.open { background: var(--ok-bg); color: var(--ok); }
.port-chip .num { font-weight: 800; font-size: 13px; }

.trace-output {
  background: var(--code-bg);
  color: var(--code-text);
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre;
}

/* ---------- Tools page ---------- */

.tabbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 24px 0 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.tool-grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 700px) { .tool-grid-5 { grid-template-columns: repeat(2, 1fr); } }

.tool-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}
.tool-check input { width: 15px; height: 15px; cursor: pointer; }

.tool-field { margin-bottom: 14px; }
.tool-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}
.tool-field input[type=text], .tool-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--field-bg);
  color: var(--text);
  font-family: Consolas, Menlo, monospace;
  font-size: 13px;
  resize: vertical;
}
.tool-field input[type=text]:focus, .tool-field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46,139,87,0.18);
  border-color: var(--accent);
}

.tool-run-btn {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.tool-run-btn:hover { background: var(--accent-hover); }

.tool-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tool-presets button {
  background: var(--field-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.tool-presets button:hover { border-color: var(--accent); }

.tool-output-wrap { position: relative; margin-top: 12px; }
.tool-output-actions { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.tool-mini-btn {
  background: var(--field-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.tool-mini-btn:hover { border-color: var(--accent); }
.tool-mini-btn.copied { background: var(--ok-bg); color: var(--ok); border-color: transparent; }

.tool-output {
  background: var(--code-bg);
  color: var(--code-text);
  font-family: Consolas, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.headers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.headers-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.headers-table td:first-child {
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  width: 200px;
}

.tool-intro {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  margin: -4px 0 18px;
  max-width: 640px;
}

.tool-notes {
  margin-top: 18px;
  padding: 13px 16px;
  background: var(--field-bg);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}
.tool-notes .tn-title {
  color: var(--text);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.tool-notes ul { margin: 4px 0 0; padding-left: 18px; }
.tool-notes li { margin-bottom: 3px; }
.tool-notes code {
  background: var(--card-bg);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: Consolas, Menlo, monospace;
  font-size: 11.5px;
}

.recipe { margin-top: 14px; }
.recipe-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.recipe .tool-output { font-size: 12px; }

.example-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 8px;
}
.example-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.example-table td:first-child {
  font-family: Consolas, Menlo, monospace;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}
.example-table td:last-child { color: var(--muted); }
.example-table tr:last-child td { border-bottom: none; }
.example-table .load-btn {
  background: var(--field-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.example-table .load-btn:hover { border-color: var(--accent); }

.regex-highlight mark {
  background: var(--ok-bg);
  color: var(--ok);
  border-radius: 3px;
  padding: 0 1px;
}

/* ---------- Compare / batch tables ---------- */

.compare-table-wrap, .batch-table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.compare-table, .batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.compare-table th, .compare-table td,
.batch-table th, .batch-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.compare-table thead th, .batch-table thead th {
  background: var(--field-bg);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.compare-table tbody th {
  font-weight: 700;
  color: var(--muted);
  font-size: 12.5px;
}
.compare-table tbody tr:last-child td, .compare-table tbody tr:last-child th,
.batch-table tbody tr:last-child td { border-bottom: none; }

@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; }
  .side-col { position: static; }
}

@media (max-width: 600px) {
  header.topbar h1 { font-size: 24px; }
  .search-panel { flex-direction: column; }
  .search-panel select, .search-panel button { width: 100%; justify-content: center; }
}
