/* Techclick Pro Layer — additive polish. Light theme only, by design.
   Inherits each tool's existing --accent / --ink / --line tokens when present. */
:root {
  --tcpro-accent: var(--accent, #0f5f8f);
  --tcpro-ink: var(--ink, #17212b);
  --tcpro-muted: var(--muted, #5a6c7d);
  --tcpro-line: var(--line, #d9e2ea);
  --tcpro-panel: var(--panel, #ffffff);
}

/* --- focus visibility (was missing fleet-wide) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--tcpro-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- skip link --- */
.tcpro-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--tcpro-accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  text-decoration: none;
}
.tcpro-skip:focus {
  left: 0;
}

/* --- "All tools" button in the topbar nav --- */
.tcpro-all {
  font: inherit;
  font-weight: 600;
  color: var(--tcpro-accent);
  background: transparent;
  border: 1px solid var(--tcpro-line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.tcpro-all:hover {
  background: var(--tcpro-accent);
  border-color: var(--tcpro-accent);
  color: #fff;
}

/* --- command palette --- */
.tcpro-pal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(23, 33, 43, 0.38);
  display: grid;
  align-items: start;
  justify-items: center;
  padding: clamp(40px, 10vh, 120px) 16px 16px;
}
.tcpro-pal[hidden] { display: none; }

.tcpro-pal-box {
  width: min(560px, 100%);
  background: var(--tcpro-panel);
  border: 1px solid var(--tcpro-line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 32, 48, 0.28);
  overflow: hidden;
}

.tcpro-pal-in {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--tcpro-line);
  padding: 16px 18px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--tcpro-ink);
  background: transparent;
}
.tcpro-pal-in:focus { outline: none; }

.tcpro-pal-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(50vh, 360px);
  overflow-y: auto;
}

.tcpro-pal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.tcpro-pal-item.is-sel,
.tcpro-pal-item:hover {
  background: color-mix(in srgb, var(--tcpro-accent) 12%, #fff);
}
.tcpro-pal-name { font-weight: 600; color: var(--tcpro-ink); }
.tcpro-pal-cat {
  font-size: 0.78rem;
  color: var(--tcpro-muted);
  border: 1px solid var(--tcpro-line);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.tcpro-pal-empty {
  padding: 18px 12px;
  color: var(--tcpro-muted);
  text-align: center;
}
.tcpro-pal-foot {
  border-top: 1px solid var(--tcpro-line);
  padding: 9px 14px;
  font-size: 0.78rem;
  color: var(--tcpro-muted);
}
.tcpro-pal-foot kbd {
  font: inherit;
  border: 1px solid var(--tcpro-line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 2px;
  background: #f7fafc;
}

/* --- toast --- */
.tcpro-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  z-index: 95;
  background: var(--tcpro-ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(15, 32, 48, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  max-width: min(90vw, 460px);
  text-align: center;
}
.tcpro-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- offline badge --- */
.tcpro-off {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 94;
  background: #9c5a05;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 32, 48, 0.24);
}

/* --- print: give every tool a clean paper report --- */
@media print {
  .topbar, .tcpro-pal, .tcpro-toast, .tcpro-off, .tcpro-skip,
  .tcpro-all, button, nav, footer { display: none !important; }
  body { background: #fff; color: #000; }
  main { padding: 0 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #444; }
}

@media (prefers-reduced-motion: reduce) {
  .tcpro-toast { transition: none; }
}
