/* Shared chrome: command palette, export bar, Turnstile host, monitor/info pages, fix-it records, print. */

/* ---------- nav "All tools" button ---------- */
.palbtn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 10px;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.palbtn:hover, .palbtn:focus-visible { color: var(--fg); border-color: rgba(51,225,255,.45); }
.palbtn kbd, .pal kbd { font: 11px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; letter-spacing: 0; }

/* ---------- command palette ---------- */
.pal { position: fixed; inset: 0; z-index: 50; background: rgba(3,4,8,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.pal-box { width: min(620px, 100%); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; background: var(--panel-solid); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.pal-in > span { color: var(--lime); font-size: 18px; }
.pal-in input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font: 15px var(--mono); color: var(--fg); }
.pal-list { list-style: none; overflow-y: auto; padding: 6px; }
.pal-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 14.5px; }
.pal-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-list li small { flex: none; font: 11.5px var(--mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.pal-list li.on { background: rgba(51,225,255,.09); outline: 1px solid rgba(51,225,255,.3); }
.pal-list li.none { color: var(--muted); cursor: default; font: 13px var(--mono); }
.pal-list li.clear { cursor: default; justify-content: flex-end; }
.pal-list li.clear button { background: none; border: 0; color: var(--muted); font: 12px var(--mono); text-decoration: underline; cursor: pointer; }

/* ---------- export bar ---------- */
.exportbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font: 12px var(--mono); }
.exportbar .eb-l { color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-right: 4px; }
.exportbar button { background: rgba(255,255,255,.03); color: var(--fg); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 11px; cursor: pointer; font: 12px var(--mono); }
.exportbar button:hover, .exportbar button:focus-visible { border-color: rgba(198,255,61,.5); color: var(--lime); }
.exportbar .eb-msg { color: var(--lime); }

/* ---------- copy-ready DNS records (fix-it) ---------- */
.rec { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rec:last-child { border-bottom: 0; }
.rec-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rec-h b { font-size: 14.5px; }
.rec-meta { font: 12px var(--mono); color: var(--muted); }
.copybtn { background: rgba(255,255,255,.03); color: var(--fg); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 10px; cursor: pointer; font: 12px var(--mono); }
.copybtn:hover, .copybtn:focus-visible { border-color: rgba(198,255,61,.5); color: var(--lime); }

/* ---------- Turnstile host (invisible unless a challenge is needed) ---------- */
.ts-box { position: fixed; right: 16px; bottom: 16px; z-index: 60; }
.ts-box:empty { display: none; }

/* ---------- monitor + info pages ---------- */
.mon-list { list-style: none; display: grid; gap: 8px; }
.mon-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font: 13.5px var(--mono); }
.prose { max-width: 760px; padding-bottom: 8vh; }
.prose h2 { font-size: 22px; letter-spacing: -0.01em; margin: 28px 0 8px; }
.prose p, .prose li { color: #b9c4dc; font-size: 15.5px; line-height: 1.7; }
.prose ul { padding-left: 20px; display: grid; gap: 4px; }
.prose p + p { margin-top: 10px; }
.ok-box { padding: 22px; border: 1px solid rgba(198,255,61,.35); border-radius: 14px; background: rgba(198,255,61,.05); }
.ok-box p + p { margin-top: 8px; }

@media (max-width: 640px) {
  .palbtn kbd { display: none; }
  .pal { padding-top: 8vh; }
}

/* ---------- print / Save as PDF ---------- */
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #111 !important; }
  #field, .sun, .horizon, .scan, .sweep, header.top, footer, .marquee, .exportbar, .tool-form, .scanform, .hint, .cta,
  #modules, .ts-box, .pal, button, .bar i { display: none !important; }
  section[data-page="home"] .hero, section[data-page="home"] .grid2 { display: none !important; }
  .panel, .card, .stat { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; backdrop-filter: none !important; break-inside: avoid; }
  .panel.glow::before { display: none !important; }
  .grad, h1.big .b { background: none !important; -webkit-text-fill-color: #111 !important; color: #111 !important; filter: none !important; }
  .tool-head h1 { font-size: 30px !important; }
  .t th, .t td, .note, .stat small, .card-h small, .empty, .code, .code-inline, .fix { color: #111 !important; }
  .code { background: #f4f4f4 !important; border-color: #ccc !important; }
  .s-pass, .pill.s-pass { color: #2c7a00 !important; } .s-warn, .pill.s-warn { color: #9a5b00 !important; }
  .s-fail, .pill.s-fail { color: #b00020 !important; } .s-info, .pill.s-info { color: #555 !important; }
  a { color: #0b57d0 !important; }
  .scroll { overflow: visible !important; }
  .rv { opacity: 1 !important; transform: none !important; }
}

/* The DNS report pulls itself up with a negative top margin; give that offset to the export bar instead so the two don't overlap. */
.exportbar:has(+ #report) { margin: -4vh 0 14px; }
.exportbar + #report { margin-top: 0; }
