/* Shared tool-page components (overview, dmarc, phishing, subdomains, takeover,
   lookalike, dnshealth, emailheader; ja + en). Loaded after site.v1.css and before
   each page's own <style>, so a page can still override any rule here.
   Same cache rule as site.v1.css: bump the file name, not a ?v= query. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 56px; }

/* Page title */
h1 { font-size: clamp(22px, 6vw, 32px); font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: -0.03em; }
.tagline { color: var(--muted); margin: 10px 0 24px; font-size: 15px; }

/* Search card */
.search-card { background: var(--card); border: 1px solid #d4d4da; border-radius: 14px; padding: 12px; box-shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 8px 24px rgba(16, 16, 24, .06); margin-bottom: 4px; transition: border-color .15s, box-shadow .15s; }
.search-card:focus-within { border-color: var(--btn); box-shadow: 0 0 0 4px var(--ok-bg), 0 8px 24px rgba(16, 16, 24, .06); }
.field { display: flex; gap: 8px; }
input[type="text"] { flex: 1; font-family: var(--mono); font-size: 15px; color: var(--ink); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f6f6f8; min-width: 0; }
input[type="text"]::placeholder { color: #a1a1aa; }
input[type="text"]:focus { outline: none; border-color: var(--btn); background: var(--card); }
button.go { border: none; background: var(--btn); color: var(--btn-text); font-family: var(--sans); font-size: 15px; font-weight: 600; padding: 0 22px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
button.go:hover { filter: brightness(1.08); }
button.go:disabled { opacity: .55; cursor: default; filter: none; }

/* Results */
.result { margin-top: 28px; }
.err { color: var(--crit); font-size: 15px; margin-top: 20px; }
.badge { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 2px 8px; border: 1px solid transparent; border-radius: 999px; white-space: nowrap; margin-top: 2px; }
.badge.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.badge.info { color: var(--info); background: #f4f4f6; border-color: var(--line); }
.badge.warning { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.badge.critical { color: var(--crit); background: var(--crit-bg); border-color: var(--crit-line); }
ul.f li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; display: flex; gap: 12px; align-items: flex-start; }

/* "About this tool" block under the results */
.tool-about { margin-top: 64px; }
.tool-about h2 { font-size: 22px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.025em; line-height: 1.35; padding-top: 40px; border-top: 1px solid #d4d4da; }
.tool-about h2:first-child { border-top: none; padding-top: 0; }
.tool-about p, .tool-about li { font-size: 15px; color: var(--muted); line-height: 1.8; }
.tool-about ol, .tool-about ul { padding-left: 1.5em; margin: 0 0 12px; }
.tool-about p { margin: 0 0 14px; }
.faq { display: flex; flex-direction: column; gap: 0; margin-bottom: 14px; border-top: 1px solid #d4d4da; }
.faq > * { border-bottom: 1px solid #d4d4da; }
.faq-q { font-size: 15px; font-weight: 600; color: var(--ink); margin: 16px 0 6px; }
.faq-a { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.related-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.related-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--ink); text-decoration: none; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.related-link:last-child:nth-child(odd) { grid-column: 1 / -1; }
.related-link::after { content: "→"; color: var(--muted); flex-shrink: 0; }
.related-link:hover { border-color: var(--ok-line); box-shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 8px 24px rgba(16, 16, 24, .06); }
.related-link:hover::after { color: var(--btn); }
@media (max-width: 600px) {
  .related-links { grid-template-columns: 1fr; }
}

/* ---- approximate-location maps (ipmap.js): header analyzer route, DNS health servers */
.ipmap-slot { margin-top: 12px; position: relative; }
.map-overlay { position: absolute; top: 8px; left: 8px; right: 56px; z-index: 2; width: fit-content; max-width: calc(100% - 64px); box-sizing: border-box; padding: 5px 9px; border: 1px solid var(--line); border-left: 3px solid #15803d; border-radius: 6px; background: rgba(255, 255, 255, .94); font-size: 12px; line-height: 1.5; color: var(--ink, #1d1d24); pointer-events: none; }
.ipmap { height: 260px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f2f3f0; }
@media (max-width: 600px) { .ipmap { height: 220px; } }
.mappin { display: inline-block; min-width: 22px; height: 22px; padding: 0 5px; box-sizing: border-box; border-radius: 11px; border: 2px solid #fff; background: #15803d; color: #fff; font: 600 12px/18px var(--sans); text-align: center; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.35); cursor: default; }
.mappin.receiver { background: #fff; color: #15803d; border-color: #15803d; }
.mappin.claimed { background: #fff; color: #63636d; border: 2px dashed #8a8a93; }
.mappin.mx { background: #1d4ed8; }
.route-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.route-key { display: inline-flex; align-items: center; gap: 6px; }
.route-key .mappin { min-width: 14px; height: 14px; padding: 0; box-shadow: none; }
.route-key .mappin.origin, .route-key .mappin.ns { border-color: #15803d; }
.route-key .mappin.mx { border-color: #1d4ed8; }
.map-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
#ph-web .reg-grid dt { font-family: var(--mono); color: var(--ink); }
#ph-web .reg-grid dd { font-family: var(--sans); word-break: normal; overflow-wrap: anywhere; }
#ph-web .web-place { font-size: 12.5px; color: var(--muted); }
#ph-web .tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.sd-map { margin: 14px 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.sd-map-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.sd-map-title { font-size: 13px; font-weight: 600; color: var(--muted); }
.sd-map-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.sd-map-btn:disabled { opacity: .55; cursor: default; }
.sd-map-body:empty { display: none; }
.sd-map-body .map-note { overflow-wrap: anywhere; }
.mappin.self { background: #1d4ed8; }
.mappin.ll-high { background: var(--crit, #be123c); }
.mappin.ll-medium { background: var(--warn, #b45309); }
.mappin.ll-low { background: #63636d; }
.mappin.ll-own { background: #fff; color: #63636d; border: 2px dashed #8a8a93; }
.mappin.with-self { box-shadow: 0 0 0 2px #1d4ed8, 0 1px 3px rgba(0,0,0,.35); }
.route-key .mappin.self { border-color: #1d4ed8; }
.route-key .mappin.ll-high { border-color: var(--crit, #be123c); }
.route-key .mappin.ll-medium { border-color: var(--warn, #b45309); }
.route-key .mappin.ll-low { border-color: #63636d; }
