/* NexusSec Tools - shared styles for /tools and every tool page.
   Light theme, matching the site's tokens. No gradients beyond the site's own buttons. */
:root {
  --bg: #eef3f9; --card: #fff; --card2: #f4f7fc; --border: #dbe3ee; --border-strong: #7d8a9e;
  --text: #101a2b; --text2: #46536a; --text3: #5b6472;
  --brand: #2563eb; --brand-strong: #1d4ed8; --brand-soft: #e9f0fa;
  --navy: #0c1f42; --ok: #067647; --ok-soft: #ecfdf3; --warn: #8a5a00; --warn-soft: #fff7e6;
  --danger: #b42318; --danger-soft: #fef3f2;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px; font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
main a { color: var(--brand-strong); }
[hidden] { display: none !important; }
.tl-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.tl-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Page header band */
.tl-hero { background: var(--navy); color: #fff; padding: 92px 0 30px; }
.tl-hero .crumbs { font-size: 13px; color: rgba(255,255,255,.66); margin-bottom: 18px; }
.tl-hero .crumbs a { color: rgba(255,255,255,.82); text-decoration: none; }
.tl-hero .crumbs a:hover { text-decoration: underline; }
.tl-kicker { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: #a9c4ff; margin-bottom: 8px; }
.tl-hero h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; max-width: 26ch; }
.tl-sub { color: rgba(255,255,255,.82); font-size: 17px; max-width: 62ch; margin-top: 12px; }
.tl-hero a:focus-visible { outline-color: #fff; }
.tl-hero .crumbs .sep { margin: 0 6px; }
.tl-hero-note { color: rgba(255,255,255,.75); font-size: 14.5px; margin-top: 10px; max-width: 62ch; }

.tl-body { padding: 28px 16px 8px; }

/* Tool card */
.tl-app { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px 22px; }
.tl-app h2 { font-size: 19px; letter-spacing: -.01em; margin-bottom: 4px; }
.tl-app-note { color: var(--text2); font-size: 14.5px; margin-bottom: 16px; }
.tl-grid { display: grid; gap: 14px; }
.tl-field { min-width: 0; }
.tl-field > label, .tl-field legend, .tl-label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.tl-hint { font-size: 13.5px; color: var(--text2); margin-top: 5px; }
fieldset { border: 0; min-width: 0; }
input[type=text], input[type=search], input[type=number], select, textarea {
  display: block; width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text);
  background: #fff; border: 1.5px solid var(--border-strong); border-radius: 10px;
}
input[type=search] { -webkit-appearance: none; appearance: none; }
.tl-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px; }
.tl-time { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tl-time label { display: block; font-size: 13.5px; color: var(--text2); margin-bottom: 4px; }
textarea { min-height: 170px; resize: vertical; font-family: var(--mono); font-size: 14.5px; line-height: 1.5; }
.tl-mono, input.tl-mono { font-family: var(--mono); }
select { -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2346536a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { outline: 2px solid transparent; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.25); }
input[aria-invalid=true], textarea[aria-invalid=true], select[aria-invalid=true] { border-color: var(--danger); }
input[type=range] { width: 100%; accent-color: var(--brand-strong); min-height: 32px; }
.tl-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.tl-check input { width: 19px; height: 19px; accent-color: var(--brand-strong); flex: none; }
.tl-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2px 16px; }

/* Buttons */
.tl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tl-btn, .tl-btn-ghost, .tl-btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  font-family: inherit; font-size: 15px; font-weight: 600; border-radius: 10px; cursor: pointer; text-decoration: none; border: 1.5px solid transparent;
}
.tl-btn { background: var(--brand-strong); color: #fff; }
.tl-btn:hover { background: #1e40af; }
.tl-btn-ghost { background: #fff; color: var(--brand-strong); border-color: var(--brand-strong); }
.tl-btn-ghost:hover { background: var(--brand-soft); }
.tl-btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; background: #fff; color: var(--brand-strong); border-color: var(--border-strong); }
.tl-btn-sm:hover { border-color: var(--brand-strong); }
button[disabled] { opacity: .55; cursor: not-allowed; }

/* Tabs (mode switch) */
.tl-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tl-tab { font-family: inherit; font-size: 15px; font-weight: 600; color: var(--text2); background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px; min-height: 44px; cursor: pointer; margin-bottom: -1px; }
.tl-tab[aria-selected=true] { color: var(--brand-strong); border-bottom-color: var(--brand-strong); }

/* Output */
.tl-output { margin-top: 18px; }
.tl-output-box { display: flex; align-items: stretch; gap: 8px; }
.tl-output-box output, .tl-output-box .tl-value { flex: 1; min-width: 0; font-family: var(--mono); font-size: 18px; padding: 12px 14px; background: var(--card2); border: 1px solid var(--border); border-radius: 10px; overflow-wrap: anywhere; word-break: break-all; }
.tl-output-box output { min-height: calc(1.6em + 26px); }
.tl-strength { min-height: 1.6em; }
.tl-meter { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.tl-meter span { display: block; height: 100%; background: var(--brand-strong); width: 0; }
.tl-kv { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.tl-kv dt, .tl-kv dd { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.tl-kv dt { background: var(--card2); font-size: 14px; font-weight: 600; color: var(--text2); }
.tl-kv dd { font-family: var(--mono); font-size: 15px; overflow-wrap: anywhere; }
.tl-kv dt:last-of-type, .tl-kv dd:last-of-type { border-bottom: 0; }
.tl-bits { font-family: var(--mono); font-size: 14px; line-height: 1.9; overflow-x: auto; white-space: nowrap; padding: 10px 14px; background: var(--card2); border: 1px solid var(--border); border-radius: 10px; }
.tl-bits .net { color: var(--brand-strong); font-weight: 700; }
.tl-bits .host { color: var(--text3); }
.tl-msg { margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: 14.5px; }
.tl-msg.err { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--text); }
.tl-msg.warn { background: var(--warn-soft); border: 1px solid #e8c37a; color: var(--text); }
.tl-msg.ok { background: var(--ok-soft); border: 1px solid #8fd3ad; color: var(--text); }
.tl-msg ul { margin: 6px 0 0 18px; }
.tl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.tl-stat { background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.tl-stat b { display: block; font-size: 20px; font-family: var(--mono); overflow-wrap: anywhere; }
.tl-stat span { font-size: 13px; color: var(--text2); }
.tl-tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; }
.tl-tablewrap:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.tl-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tl-table th, .tl-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tl-table th { background: var(--card2); font-weight: 600; color: var(--text2); font-size: 13px; }
.tl-table td { font-family: var(--mono); }
.tl-table tr:last-child td { border-bottom: 0; }
.tl-note-small { font-size: 13.5px; color: var(--text3); margin-top: 8px; }

/* Explanatory content */
.tl-content { max-width: 780px; margin: 34px 0 0; }
.tl-content h2 { font-size: 24px; letter-spacing: -.02em; margin: 34px 0 8px; }
.tl-content h3 { font-size: 18px; margin: 22px 0 6px; }
.tl-content p, .tl-content li { color: var(--text2); font-size: 16.5px; }
.tl-content p { margin: 10px 0; }
.tl-content ul, .tl-content ol { margin: 10px 0 10px 22px; }
.tl-content li { margin: 6px 0; }
.tl-content strong { color: var(--text); }
.tl-content code { font-family: var(--mono); font-size: 14.5px; background: var(--card2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.tl-faq details { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.tl-faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.tl-faq details p { margin: 10px 0 2px; }

/* Related tools and service link */
.tl-related { margin: 36px 0 56px; display: grid; gap: 14px; }
.tl-related h2 { font-size: 20px; }
.tl-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tl-card { position: relative; display: flex; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-decoration: none; color: var(--text); transition: border-color .15s; }
.tl-card:hover { border-color: var(--brand-strong); }
.tl-card:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.tl-card a { color: var(--text); text-decoration: none; font-weight: 600; }
.tl-card a::after { content: ''; position: absolute; inset: 0; }
.tl-card a:focus-visible { outline: none; }
.tl-card h3 { font-size: 16.5px; line-height: 1.35; }
.tl-card p { font-size: 14.5px; color: var(--text2); margin-top: 4px; }
.tl-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); display: flex; align-items: center; justify-content: center; }
.tl-icon svg { width: 22px; height: 22px; }
.tl-cat { display: inline-block; font-size: 12px; font-weight: 600; color: var(--text3); margin-top: 6px; }
.tl-service { background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--brand-strong); border-radius: 12px; padding: 16px 18px; color: var(--text2); margin-top: 32px; max-width: 780px; }
.tl-noscript { margin: 0 0 16px; }
.tl-service strong { color: var(--text); }

/* Hub */
.tl-search { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 4px 0 6px; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chip { font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text2); background: #fff; border: 1.5px solid var(--border-strong); border-radius: 999px; padding: 0 14px; min-height: 40px; cursor: pointer; }
.tl-chip:hover { border-color: var(--brand-strong); color: var(--brand-strong); }
.tl-chip[aria-pressed=true] { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.tl-section-title { font-size: 21px; letter-spacing: -.01em; margin: 30px 0 12px; }
.tl-count { font-size: 14px; color: var(--text2); margin-top: 8px; }
.tl-empty { background: #fff; border: 1px dashed var(--border-strong); border-radius: 12px; padding: 22px; color: var(--text2); text-align: center; }

@media (min-width: 700px) {
  .tl-wrap { padding: 0 24px; }
  .tl-body { padding: 34px 24px 8px; }
  .tl-app { padding: 26px 26px 28px; }
  .tl-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .tl-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .tl-search { grid-template-columns: minmax(260px, 420px) 1fr; align-items: center; }
}
@media (max-width: 520px) {
  .tl-kv { grid-template-columns: 1fr; }
  .tl-kv dt { border-bottom: 0; padding-bottom: 2px; }
  .tl-kv dd { padding-top: 2px; }
}
@media print {
  .tl-actions, .tl-related, .sc-header, .sc-footer { display: none !important; }
}
