/* CheckMyIP.tools – soft, friendly, responsive */
:root {
  --bg: #f7f3ff;
  --bg-2: #eefaff;
  --card: #ffffff;
  --card-soft: #fbf9ff;
  --ink: #2b2350;
  --ink-2: #5d5680;
  --muted: #8a84a8;
  --line: #e7e1f7;
  --primary: #7c5cff;
  --primary-ink: #ffffff;
  --primary-soft: #efe9ff;
  --focus: #ff7eb3;
  --shadow: 0 1px 2px rgba(43, 35, 80, .05), 0 8px 28px rgba(92, 72, 180, .09);
  --shadow-lg: 0 2px 4px rgba(43, 35, 80, .05), 0 18px 50px rgba(92, 72, 180, .14);
  --radius: 22px;
  --radius-sm: 14px;

  --pink-bg: #ffe8f1;  --pink-fg: #e0477f;
  --violet-bg: #efe9ff; --violet-fg: #6a4cf0;
  --mint-bg: #e3f8ee;  --mint-fg: #1f9a63;
  --sky-bg: #e3f3ff;   --sky-fg: #2a7fd4;
  --peach-bg: #fff0e3; --peach-fg: #d9741f;
  --lemon-bg: #fff8d9; --lemon-fg: #a98500;

  --blob-1: #e5dbff; --blob-2: #d6f3ff; --blob-3: #ffe1ee;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15122a;
    --bg-2: #121a2c;
    --card: #1f1b3a;
    --card-soft: #241f44;
    --ink: #f2efff;
    --ink-2: #c4bde6;
    --muted: #8f88b5;
    --line: #322c58;
    --primary: #9b85ff;
    --primary-ink: #15122a;
    --primary-soft: #2c2556;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .28);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 50px rgba(0, 0, 0, .35);
    --pink-bg: #3a2140;  --pink-fg: #ff8fb8;
    --violet-bg: #2c2556; --violet-fg: #b5a3ff;
    --mint-bg: #183a33;  --mint-fg: #6fe0a8;
    --sky-bg: #19304a;   --sky-fg: #79bfff;
    --peach-bg: #3b2a1e; --peach-fg: #ffb072;
    --lemon-bg: #38321a; --lemon-fg: #f2d35c;
    --blob-1: #2a2160; --blob-2: #13304a; --blob-3: #3a1d3c;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%) fixed;
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--mono); font-size: .9em; background: var(--primary-soft); padding: .1em .4em; border-radius: 6px; word-break: break-word; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.break { word-break: break-all; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }

/* Background blobs */
.bg-blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-blobs span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .8; }
.bg-blobs span:nth-child(1) { width: 480px; height: 480px; background: var(--blob-1); top: -160px; left: -140px; }
.bg-blobs span:nth-child(2) { width: 420px; height: 420px; background: var(--blob-2); top: 30%; right: -180px; }
.bg-blobs span:nth-child(3) { width: 360px; height: 360px; background: var(--blob-3); bottom: -140px; left: 20%; }

/* Header */
.site-header { padding: 18px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand-dot { color: var(--primary); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .header-inner { flex-direction: column; gap: 10px; }
  .nav a { padding: 6px 12px; font-size: .9rem; }
}

/* Hero */
.hero { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 24px; padding-top: 24px; padding-bottom: 12px; }
.eyebrow { margin: 0 0 6px; font-weight: 800; color: var(--primary); letter-spacing: .02em; }
.hero h1 { margin: 0 0 16px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; }
.ip-box {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 18px 22px; box-shadow: var(--shadow-lg);
}
.ip-badge { font-size: .78rem; font-weight: 800; color: var(--violet-fg); background: var(--violet-bg); padding: 4px 10px; border-radius: 999px; }
.ip-value {
  flex: 1 1 260px; min-width: 0;
  font-family: var(--mono); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(1.35rem, 4.6vw, 2.3rem); line-height: 1.2; color: var(--ink);
  word-break: break-all;
}
.hero-sub { color: var(--ink-2); margin: 14px 4px 0; max-width: 52ch; }
.hero-art { display: flex; justify-content: center; }
.mascot { width: min(300px, 100%); height: auto; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(108, 92, 231, .18)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 4px; }
  .hero-art { order: -1; }
  .mascot { width: 170px; }
  .ip-box { justify-content: center; padding: 16px; }
  .ip-value { flex-basis: 100%; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; border: 0; cursor: pointer; border-radius: 999px;
  padding: 11px 20px; min-height: 44px; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 18px rgba(124, 92, 255, .32); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(124, 92, 255, .42); }
.btn-copy { background: var(--primary-soft); color: var(--primary); }
.btn-copy:hover { background: var(--primary); color: var(--primary-ink); }
.btn-copy.copied { background: var(--mint-bg); color: var(--mint-fg); }

/* Sections */
.section { padding-top: 36px; }
.section-title { font-size: 1.35rem; margin: 0 0 6px; letter-spacing: -.01em; }
.section-sub { color: var(--ink-2); margin: 0 0 18px; }
.section > .section-title:only-of-type { margin-bottom: 16px; }

/* Detail cards */
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.detail {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); min-width: 0;
  transition: transform .2s, box-shadow .2s;
}
.detail:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.detail-icon { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; }
.detail-icon svg { width: 24px; height: 24px; }
.detail-text { display: flex; flex-direction: column; min-width: 0; }
.detail-label { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.detail-value { font-size: 1.08rem; font-weight: 800; line-height: 1.35; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.detail-sub { font-size: .88rem; color: var(--ink-2); margin-top: 2px; }
.flag { width: 24px; height: 18px; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); object-fit: cover; }
.tone-pink .detail-icon { background: var(--pink-bg); color: var(--pink-fg); }
.tone-violet .detail-icon { background: var(--violet-bg); color: var(--violet-fg); }
.tone-mint .detail-icon { background: var(--mint-bg); color: var(--mint-fg); }
.tone-sky .detail-icon { background: var(--sky-bg); color: var(--sky-fg); }
.tone-peach .detail-icon { background: var(--peach-bg); color: var(--peach-fg); }
.tone-lemon .detail-icon { background: var(--lemon-bg); color: var(--lemon-fg); }
.notice { grid-column: 1 / -1; background: var(--lemon-bg); color: var(--ink); border-radius: var(--radius); padding: 18px 20px; }

/* Key/value grid (device info + lookup) */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; }
.kv { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; min-width: 0; }
.kv dt { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.kv.wide { grid-column: 1 / -1; }
.kv.wide dd { font-family: var(--mono); font-size: .85rem; font-weight: 500; }

/* Lookup */
.lookup-card { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: 26px; box-shadow: var(--shadow-lg); }
.lookup-form { display: flex; gap: 10px; flex-wrap: wrap; }
.lookup-form input {
  flex: 1 1 260px; min-width: 0; min-height: 50px; font: inherit; font-family: var(--mono); font-size: 1rem;
  color: var(--ink); background: var(--card-soft); border: 2px solid var(--line); border-radius: 999px; padding: 10px 20px;
  transition: border-color .2s, box-shadow .2s;
}
.lookup-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.lookup-form .btn { min-height: 50px; padding: 0 26px; }
.lookup-result:not(:empty) { margin-top: 20px; }
.lookup-result .kv { background: var(--card-soft); }
.lookup-result .error { color: var(--pink-fg); background: var(--pink-bg); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 700; }
.lookup-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-weight: 800; font-size: 1.15rem; margin: 0 0 12px; word-break: break-all; }
@media (max-width: 480px) {
  .lookup-card { padding: 18px; }
  .lookup-form .btn { flex: 1 1 100%; }
}

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 20px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }

/* Ads – clean, clearly labelled, reserved space to avoid layout shift */
.ad-wrap {
  margin: 36px auto 0; max-width: 970px; min-height: 130px;
  background: var(--card-soft); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 10px 14px 14px; text-align: center; overflow: hidden;
}
.ad-label { display: block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }
.ad-wrap ins.adsbygoogle { min-height: 90px; }
.ad-wrap:has(ins[data-ad-status="unfilled"]) { display: none; }

/* Content pages */
.prose-page { padding-top: 20px; }
.prose-page.center { text-align: center; padding-top: 40px; }
.prose-page.center img { margin: 0 auto 8px; }
.prose-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
.prose-head h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.02em; }
.prose-head p { margin: 0; }
.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 28px 20px; box-shadow: var(--shadow); max-width: 820px; }
.prose h2 { font-size: 1.15rem; margin: 22px 0 6px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 22px; }
@media (max-width: 480px) { .prose { padding: 4px 18px 14px; } }

/* Footer */
.site-footer { margin-top: 56px; padding: 30px 0 calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--card) 55%, transparent); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--primary); }
.footer-note { width: 100%; margin: 0; font-size: .85rem; color: var(--muted); }
.footer-note a { color: var(--muted); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 800; transition: .25s; pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 560px) {
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kv { padding: 10px 12px; }
  .kv dd { font-size: .92rem; }
}

/* =====================================================================
   Tools
   ===================================================================== */
.tone-pink   { --t-bg: var(--pink-bg);   --t-fg: var(--pink-fg); }
.tone-violet { --t-bg: var(--violet-bg); --t-fg: var(--violet-fg); }
.tone-mint   { --t-bg: var(--mint-bg);   --t-fg: var(--mint-fg); }
.tone-sky    { --t-bg: var(--sky-bg);    --t-fg: var(--sky-fg); }
.tone-peach  { --t-bg: var(--peach-bg);  --t-fg: var(--peach-fg); }
.tone-lemon  { --t-bg: var(--lemon-bg);  --t-fg: var(--lemon-fg); }

/* Tool page header */
.tool-hero { padding-top: 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.tool-hero-inner { display: flex; gap: 18px; align-items: flex-start; }
.tool-hero h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.15; letter-spacing: -.02em; }
.lead { margin: 0; color: var(--ink-2); max-width: 62ch; font-size: 1.05rem; }
.tool-icon { flex: none; width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; background: var(--t-bg, var(--primary-soft)); color: var(--t-fg, var(--primary)); }
.tool-icon svg { width: 27px; height: 27px; }
.tool-hero .tool-icon { width: 64px; height: 64px; border-radius: 20px; box-shadow: var(--shadow); }
.tool-hero .tool-icon svg { width: 32px; height: 32px; }
@media (max-width: 560px) {
  .tool-hero-inner { flex-direction: column; gap: 12px; }
  .tool-hero .tool-icon { width: 54px; height: 54px; }
}

/* Tool cards (hub, related, home) */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.tool-card {
  display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--t-fg) 35%, var(--line)); }
.tool-card .tool-icon { width: 44px; height: 44px; border-radius: 14px; }
.tool-card .tool-icon svg { width: 23px; height: 23px; }
.tool-card-text { display: flex; flex-direction: column; min-width: 0; }
.tool-card-name { font-weight: 800; line-height: 1.3; }
.tool-card-desc { font-size: .9rem; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.all-tools-link { margin: 16px 0 0; font-weight: 800; }
.all-tools-link a { text-decoration: none; }
.hub-intro { display: flex; align-items: center; gap: 20px; }
.hub-intro img { width: 120px; height: auto; flex: none; }
@media (max-width: 560px) { .hub-intro { flex-direction: column; text-align: center; } .hub-intro img { width: 100px; } }

/* Tool panel */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: 24px; box-shadow: var(--shadow-lg); }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.15rem; margin: 0 0 12px; }
.panel h3 { font-size: 1rem; margin: 18px 0 8px; }
@media (max-width: 480px) { .panel { padding: 18px; } }
.tool-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.tool-form input[type="text"], .tool-form input[type="number"], .tool-form select, .field input, .field select, .field textarea {
  flex: 1 1 240px; min-width: 0; min-height: 50px; font: inherit; font-family: var(--mono); font-size: 1rem;
  color: var(--ink); background: var(--card-soft); border: 2px solid var(--line); border-radius: 999px; padding: 10px 20px;
  transition: border-color .2s, box-shadow .2s;
}
.tool-form select, .field select { flex: 0 1 200px; font-family: var(--font); font-weight: 700; cursor: pointer; padding-right: 14px; }
.field textarea { border-radius: var(--radius-sm); min-height: 90px; width: 100%; resize: vertical; }
.tool-form input:focus, .tool-form select:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.tool-form .btn { min-height: 50px; padding: 0 26px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: var(--primary); color: var(--primary-ink); }
.btn-big { min-height: 58px; padding: 0 34px; font-size: 1.1rem; }
@media (max-width: 480px) { .tool-form .btn, .tool-form select { flex: 1 1 100%; } }
.form-hint { font-size: .88rem; color: var(--muted); margin: 10px 4px 0; }
.form-hint button { font: inherit; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.field label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Chips (port presets etc.) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--card-soft); border: 2px solid var(--line); font-weight: 700; font-size: .9rem; cursor: pointer; user-select: none; }
.chip input { accent-color: var(--primary); margin: 0; }
.chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.chip small { color: var(--muted); font-weight: 600; }

/* Results */
.result:not(:empty) { margin-top: 20px; }
.result .error, .error-box, .panel .error { color: var(--pink-fg); background: var(--pink-bg); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 700; margin: 0; }
.info-box { background: var(--sky-bg); color: var(--ink); border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0 0; }
.result .kv { background: var(--card-soft); }
.mono { font-family: var(--mono); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--primary-soft); color: var(--primary); }
.pill.ok { background: var(--mint-bg); color: var(--mint-fg); }
.pill.bad { background: var(--pink-bg); color: var(--pink-fg); }
.pill.warn { background: var(--lemon-bg); color: var(--lemon-fg); }
.pill.dim { background: var(--card-soft); color: var(--muted); border: 1px solid var(--line); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.rtable { width: 100%; border-collapse: collapse; font-size: .94rem; }
.rtable th, .rtable td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rtable th { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--card-soft); white-space: nowrap; }
.rtable tr:last-child td { border-bottom: 0; }
.rtable td.mono, .rtable .mono { word-break: break-all; }
.rtable td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rtable .flag { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.rtable .sub { display: block; font-size: .82rem; color: var(--muted); }

.verdict { display: flex; gap: 16px; align-items: center; border-radius: var(--radius); padding: 18px 20px; background: var(--card-soft); border: 1px solid var(--line); }
.verdict .v-icon { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; }
.verdict h3, .verdict .v-title { margin: 0; font-size: 1.2rem; font-weight: 800; }
.verdict p { margin: 2px 0 0; color: var(--ink-2); }
.verdict.ok { background: var(--mint-bg); border-color: transparent; } .verdict.ok .v-icon { background: var(--card); color: var(--mint-fg); }
.verdict.bad { background: var(--pink-bg); border-color: transparent; } .verdict.bad .v-icon { background: var(--card); color: var(--pink-fg); }
.verdict.warn { background: var(--lemon-bg); border-color: transparent; } .verdict.warn .v-icon { background: var(--card); color: var(--lemon-fg); }
.verdict.info { background: var(--sky-bg); border-color: transparent; } .verdict.info .v-icon { background: var(--card); color: var(--sky-fg); }

.checklist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; background: var(--card-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }
.checklist .c-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.checklist .c-mark.ok { background: var(--mint-bg); color: var(--mint-fg); }
.checklist .c-mark.bad { background: var(--pink-bg); color: var(--pink-fg); }
.checklist .c-mark.warn { background: var(--lemon-bg); color: var(--lemon-fg); }
.checklist .c-mark.dim { background: var(--line); color: var(--muted); }
.checklist strong { display: block; }
.checklist span.c-detail { color: var(--ink-2); font-size: .92rem; overflow-wrap: anywhere; }

/* Big numbers (ping, screen, DNS leak) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.stat { background: var(--card-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.stat-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-unit { font-size: .95rem; font-weight: 700; color: var(--ink-2); margin-left: 4px; }
.stat-sub { font-size: .85rem; color: var(--ink-2); }
.stat.active { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.progress { height: 10px; background: var(--primary-soft); border-radius: 999px; overflow: hidden; margin: 16px 0 6px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--focus)); border-radius: inherit; transition: width .2s; }
.center-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Streaming output (ping/traceroute) */
.live { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-2); }
.live::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mint-fg); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Code / raw output */
pre.raw { margin: 10px 0 0; max-height: 420px; overflow: auto; background: var(--card-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; font-family: var(--mono); font-size: .82rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
details.more { margin-top: 14px; }
details.more summary { cursor: pointer; font-weight: 800; color: var(--primary); }
.copy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copy-row .mono { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.ua-box { font-family: var(--mono); font-size: 1rem; line-height: 1.5; background: var(--card-soft); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; overflow-wrap: anywhere; }

/* Explainer prose under each tool */
.explain { max-width: none; }
.explain h2:first-child { margin-top: 14px; }

/* Screen visualiser */
.screen-vis { position: relative; margin: 18px auto 4px; max-width: 520px; aspect-ratio: 16 / 10; border-radius: 16px; background: var(--card-soft); border: 3px solid var(--ink-2); overflow: hidden; }
.screen-vis .win { position: absolute; left: 0; top: 0; background: var(--primary-soft); border: 2px dashed var(--primary); border-radius: 8px; display: grid; place-items: center; font-weight: 800; color: var(--primary); font-size: .85rem; text-align: center; transition: width .2s, height .2s; }

/* Footer tools row */
.footer-tools { width: 100%; padding-bottom: 6px; }
.footer-tools a { font-weight: 600; font-size: .92rem; }
.rtable th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink-2); background: transparent; white-space: normal; }
.rtable .btn { min-height: 34px; padding: 4px 14px; font-size: .85rem; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value { display: flex; align-items: baseline; flex-wrap: wrap; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat { padding: 12px 14px; } }

/* =====================================================================
   Error pages (404 and friends)
   ===================================================================== */
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

.err-hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 28px; padding-top: 28px; }
.err-hero h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 4.4vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em; }
.err-msg { margin: 0 0 18px; color: var(--ink-2); font-size: 1.08rem; max-width: 52ch; }
.err-path { word-break: break-all; }
.err-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.err-suggest {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 20px;
  padding: 12px 18px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink);
  background: var(--card); border: 2px solid var(--primary-soft); box-shadow: var(--shadow); font-weight: 800;
  transition: border-color .2s, transform .2s;
}
.err-suggest:hover { border-color: var(--primary); transform: translateY(-2px); }
.err-suggest-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.err-suggest-name { color: var(--primary); }
.err-art { position: relative; display: grid; place-items: center; min-height: 280px; }
.err-code {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(6rem, 18vw, 11rem); font-weight: 900; letter-spacing: -.06em; line-height: 1;
  color: var(--primary); opacity: .13; user-select: none;
}
.err-mascot { position: relative; width: min(240px, 70%); height: auto; animation: err-wobble 4s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(108, 92, 231, .2)); }
@keyframes err-wobble { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-10px); } }
@media (max-width: 760px) {
  .err-hero { grid-template-columns: 1fr; text-align: center; padding-top: 0; gap: 8px; }
  .err-art { order: -1; min-height: 190px; }
  .err-mascot { width: 160px; }
  .err-msg { margin-left: auto; margin-right: auto; }
  .err-actions { justify-content: center; }
}

/* ---------- Guides & long-form content ---------- */
.nav { flex-wrap: wrap; justify-content: center; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.guide-card {
  display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--t-fg) 35%, var(--line)); }
.guide-card .tool-icon { width: 44px; height: 44px; border-radius: 14px; }
.guide-card .tool-icon svg { width: 23px; height: 23px; }
.guide-meta { font-size: .8rem; font-weight: 800; color: var(--muted); margin-top: 6px; }
.article-title { max-width: 26ch; }
.article-meta { margin: 10px 0 0; font-size: .9rem; font-weight: 700; color: var(--muted); }
.article-wrap { margin-top: 18px; }
.article { padding: 14px 32px 26px; line-height: 1.7; }
.prose h3 { font-size: 1.02rem; margin: 18px 0 4px; }
.prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose pre { background: var(--card-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; font-family: var(--mono); font-size: .88rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; word-break: normal; }
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 12px 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--card-soft); }
.callout { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 12px 16px; margin: 16px 0; color: var(--ink); }
.callout p { margin: 0; color: var(--ink); }
.callout.warn { background: var(--peach-bg); }
.tool-guide { margin-top: 0; }
.tool-guide .faq-list { margin-top: 10px; }
.toc { background: var(--card-soft); border-radius: var(--radius-sm); padding: 10px 18px; margin: 12px 0 4px; }
.toc p { margin: 4px 0; font-weight: 800; color: var(--ink); }
.toc ol { margin: 4px 0 6px; }
@media (max-width: 480px) { .article { padding: 8px 18px 18px; } }
@media (max-width: 480px) { .nav { flex-wrap: nowrap; gap: 2px; } .nav a { padding: 6px 9px; font-size: .86rem; white-space: nowrap; } }
@media (max-width: 350px) { .nav a { padding: 5px 6px; font-size: .8rem; } }
