/* FSP Security Tools: shared stylesheet for all five subdomains. Accent comes from body[data-site]. */
:root {
  --bg: #f6f7f9; --panel: #fff; --ink: #14171c; --muted: #5b6472; --line: #e3e6eb;
  --accent: #2f6df6; --accent-ink: #fff; --soft: #eef3ff;
  --good: #12805c; --warn: #b86e00; --bad: #c62b3a;
  --good-bg: #e7f6ef; --warn-bg: #fff4e0; --bad-bg: #fdecee;
  --r: 14px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1116; --panel: #161a21; --ink: #e9edf3; --muted: #9aa4b2; --line: #262c36; --soft: #1a2233;
    --good-bg: #0f2a20; --warn-bg: #2d2210; --bad-bg: #331419; --good: #3ccf97; --warn: #f0a83a; --bad: #ff6b78; }
}
body[data-site="password"]  { --accent: #2f6df6; }
body[data-site="leakcheck"] { --accent: #d4364a; }
body[data-site="secret"]    { --accent: #7a4cf0; }
body[data-site="dmarc"]     { --accent: #0f8a73; }
body[data-site="linkcheck"] { --accent: #e0662a; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

header.top { border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
header.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 58px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand small { font-weight: 500; color: var(--muted); }
nav.tools { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.tools a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 6px 10px; border-radius: 8px; }
nav.tools a:hover { background: var(--soft); color: var(--ink); }
nav.tools a[aria-current] { color: var(--accent); background: var(--soft); font-weight: 600; }

.hero { padding: 40px 0 8px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; margin: 0 0 12px; letter-spacing: -.02em; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 22px; max-width: 680px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); margin: 16px 0 0; padding: 0; list-style: none; }
.trust li::before { content: "✓ "; color: var(--good); font-weight: 700; }

.tool { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04); }
.tool + .tool { margin-top: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 260px; min-width: 0; }
label.lbl { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
input[type=text], input[type=url], input[type=password], input[type=number], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button.ghost, .btn.ghost { background: var(--soft); color: var(--ink); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mono, .out { font-family: var(--mono); }
.out { font-size: clamp(18px, 3.4vw, 26px); word-break: break-all; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; min-height: 64px; display: flex; align-items: center; user-select: all; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; }
.checks label { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; }
.tabs { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 3px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 8px; }
.tabs button[aria-selected=true] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.small { font-size: 14px; color: var(--muted); }
.hidden { display: none !important; }

.meter { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 12px 0 6px; }
.meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .25s, background .25s; }
.verdict { border-radius: 12px; padding: 16px 18px; margin-top: 16px; border: 1px solid transparent; }
.verdict b { display: block; font-size: 19px; margin-bottom: 2px; }
.v-good { background: var(--good-bg); color: var(--good); }
.v-warn { background: var(--warn-bg); color: var(--warn); }
.v-bad  { background: var(--bad-bg);  color: var(--bad); }
.v-good p, .v-warn p, .v-bad p { color: var(--ink); margin: 4px 0 0; }

.grade { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; font-size: 34px; font-weight: 800; color: #fff; flex: none; }
.g-A { background: #12805c; } .g-B { background: #4a8f1f; } .g-C { background: #b88a00; } .g-D { background: #d0661a; } .g-F { background: #c62b3a; }
.results { margin-top: 18px; }
.check { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 10px; background: var(--panel); }
.check h3 { margin: 0; font-size: 16px; display: flex; gap: 10px; align-items: center; }
.check p { margin: 6px 0 0; }
.check pre { margin: 8px 0 0; white-space: pre-wrap; word-break: break-all; font: 13px/1.5 var(--mono); background: var(--bg); border-radius: 8px; padding: 10px; }
.pill { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 9px; text-transform: uppercase; letter-spacing: .03em; }
.p-pass { background: var(--good-bg); color: var(--good); }
.p-warn { background: var(--warn-bg); color: var(--warn); }
.p-fail { background: var(--bad-bg); color: var(--bad); }
.p-info { background: var(--soft); color: var(--accent); }
.chain { list-style: none; padding: 0; margin: 8px 0 0; counter-reset: hop; }
.chain li { counter-increment: hop; font: 13px/1.5 var(--mono); padding: 6px 0 6px 34px; position: relative; word-break: break-all; border-top: 1px dashed var(--line); }
.chain li::before { content: counter(hop); position: absolute; left: 0; top: 6px; width: 24px; height: 20px; border-radius: 6px; background: var(--soft); color: var(--accent); font-weight: 700; text-align: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

section.content { padding: 36px 0 0; }
section.content h2 { font-size: 26px; letter-spacing: -.01em; margin: 34px 0 10px; line-height: 1.25; }
section.content h3 { font-size: 18px; margin: 20px 0 6px; }
section.content p, section.content li { color: var(--ink); }
section.content ul, section.content ol { padding-left: 22px; }
section.content table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 10px 0; }
section.content th, section.content td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 6px; vertical-align: top; }
section.content code { font-family: var(--mono); font-size: .9em; background: var(--soft); padding: 1px 5px; border-radius: 5px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq details p { margin: 8px 0 0; }

.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 14px 0 0; }
.related a { display: block; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.related a:hover { border-color: var(--accent); }
.related b { display: block; }
.related span { font-size: 14px; color: var(--muted); }

footer.foot { margin: 56px 0 0; padding: 26px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.foot .wrap { display: flex; gap: 10px 22px; flex-wrap: wrap; }
footer.foot a { color: var(--muted); }
#install { position: fixed; right: 16px; bottom: 16px; z-index: 9; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
#ioshint { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 40px 12px 14px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
#ioshint button { position: absolute; right: 6px; top: 6px; background: transparent; color: var(--muted); padding: 4px 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 14px; z-index: 10; }
@media (max-width: 640px) {
  nav.tools { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
  nav.tools a { white-space: nowrap; }
  header.top { position: static; }
  .tool { padding: 16px; }
}
.mt { margin-top: 12px; }
select.inline { width: auto; padding: 5px 8px; }
.tool-h { font-size: 20px; margin: 0 0 14px; }
.big { font-size: 20px; }
.results-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.results-table th, .results-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.signals { list-style: none; padding: 0; margin: 8px 0 0; }
.signals li { padding: 7px 0; border-top: 1px dashed var(--line); display: flex; gap: 10px; align-items: baseline; }
.signals li .pill { flex: none; }
