/* Security tool stack page styles. Reuses tokens from styles.css. */

.tools-hero { padding-bottom: 36px; }
.privacy-banner {
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 760px; margin: 22px auto 0;
  background: var(--sky, #EAF0FA);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
  color: var(--heading); font-size: 0.97rem;
}
.privacy-banner .i { color: var(--red-text); flex: none; width: 22px; height: 22px; margin-top: 2px; }

.tool-card { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.field-label { display: block; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.help-note { font-size: 0.85rem; color: var(--muted); margin: 10px 0 0; }
.help-note code { background: var(--bg-alt, #F3F6FB); padding: 1px 5px; border-radius: 4px; }

/* IOC pivot */
.ioc-row { display: flex; gap: 10px; flex-wrap: wrap; }
#ioc-input, #port-input {
  flex: 1 1 320px; min-width: 0; border: 1px solid var(--field-border); border-radius: 10px;
  padding: 12px 14px; font-size: 1rem; color: var(--text); background: var(--input-bg);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
#ioc-input:focus-visible, #port-input:focus-visible { outline: 3px solid var(--red-light, #FF8FA3); outline-offset: 2px; }
.ioc-type { margin: 14px 0 6px; color: var(--heading); font-size: 0.95rem; }
.ioc-type.unknown { color: var(--amber, #B45309); }
.ioc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ioc-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: var(--sky, #EAF0FA); color: var(--heading); font-weight: 600; font-size: 0.92rem;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); }
.ioc-link:hover { background: var(--blue-strong); color: #fff; border-color: var(--blue-strong); }
.ioc-link span { font-size: 0.8em; opacity: 0.7; }

/* Directory */
.dir-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .dir-grid { grid-template-columns: repeat(2, 1fr); } }
.dir-col { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.dir-col h3 { margin: 0 0 12px; font-size: 1rem; color: var(--heading); }
.dir-col ul { list-style: none; margin: 0; padding: 0; }
.dir-col li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.dir-col li:last-child { border-bottom: 0; }
.dir-col a { font-weight: 600; text-decoration: none; color: var(--link); }
.dir-col a:hover { text-decoration: underline; }
.dir-desc { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* Port reference */
.port-results { margin-top: 14px; overflow-x: auto; }
.port-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.port-table th, .port-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.port-table th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.port-table .pnum { font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.port-table tr.risky .pnum { color: #FF6B6B; }
.port-table tr.risky td { background: rgba(220, 38, 38, 0.12); }

/* Automatic checks */
.auto-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 8px; }
.auto-toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--heading); cursor: pointer; }
.auto-toggle input { width: 18px; height: 18px; accent-color: var(--red, #B31942); }
.auto-status { margin: 4px 0 10px; font-weight: 600; color: var(--muted); min-height: 1.4em; }
.auto-status.has-hit { color: #FF8A8A; font-size: 1.1rem; }
.auto-status.has-notice { color: #FBBF24; }

.auto-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chk { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border: 1px solid var(--line);
  border-left-width: 4px; border-radius: 10px; background: var(--surface); }
.chk .chip { flex: none; min-width: 6.4em; text-align: center; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
  background: #24385E; color: #C9D6EC; }
.chk-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.chk-body strong { color: var(--heading); font-size: 0.95rem; }
.chk .sum { color: var(--text); font-size: 0.9rem; overflow-wrap: anywhere; }
.chk-link { flex: none; font-size: 0.85rem; font-weight: 600; text-decoration: none; align-self: center; }
.chk-link:hover { text-decoration: underline; }

.chk.hit { border-left-color: #EF4444; background: rgba(239, 68, 68, 0.12); }
.chk.hit .chip { background: rgba(239, 68, 68, 0.22); color: #FFB4B4; }
.chk.notice { border-left-color: #F59E0B; }
.chk.notice .chip { background: rgba(245, 158, 11, 0.20); color: #FCD34D; }
.chk.clear { border-left-color: #22C55E; }
.chk.clear .chip { background: rgba(34, 197, 94, 0.18); color: #86EFAC; }
.chk.info { border-left-color: #64748B; }
.chk.error { border-left-style: dashed; border-left-color: #94A3B8; }
.chk.error .sum, .chk.skip .sum { color: var(--muted); }
.chk.skip { border-left-color: var(--line-strong); }
.chk.pending { border-left-color: var(--line-strong); }
.chk.pending .sum { color: var(--muted); }
.chk.pending .chip { animation: chkpulse 1.2s ease-in-out infinite; }
@keyframes chkpulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .chk.pending .chip { animation: none; } }

.links-label { margin: 18px 0 6px; font-weight: 600; color: var(--heading); font-size: 0.9rem; }

/* Author styles like .btn { display: ... } would otherwise override the hidden attribute. */
[hidden] { display: none !important; }

/* Phones: chip and Open link share a line; the explanation gets the full width below. */
@media (max-width: 520px) {
  .chk { flex-wrap: wrap; row-gap: 6px; }
  .chk .chip { order: 1; min-width: 0; }
  .chk-link { order: 2; margin-left: auto; align-self: center; }
  .chk-body { order: 3; flex: 1 1 100%; }
}

#ioc-input::placeholder, #port-input::placeholder { color: #8091AD; opacity: 1; }

/* Auto-detect panel: "open in our tools" links under a search box */
.kit-routes { margin: 14px 0 4px; }
.kit-routes-head { margin: 10px 0 4px; color: var(--heading); font-weight: 600; font-size: 0.95rem; }
.kit-routes-head.also { color: var(--muted); font-weight: 500; font-size: 0.88rem; }
