/* ToolsForAnyone – site styles on top of Bootstrap 5.3 */

:root {
    --brand: #1d4ed8;
    --brand-2: #7c3aed;
    --brand-soft: #e8efff;
    --ink: #0f172a;
    --muted: #5b6475;
    --line: #e3e8f0;
    --surface: #ffffff;
    --surface-2: #f6f8fc;
    --ok: #15803d;
    --warn: #b45309;
    --bad: #b91c1c;
    --hero-from: #102a7a;
    --hero-to: #5b21b6;
    --radius: 14px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --bs-link-color-rgb: 29, 78, 216;
    --bs-link-hover-color-rgb: 30, 64, 175;
}

[data-bs-theme="dark"] {
    --brand: #6d9bff;
    --brand-2: #8b85ff;
    --brand-soft: #18233d;
    --ink: #e6ebf5;
    --muted: #9aa4b6;
    --line: #263049;
    --surface: #121a2b;
    --surface-2: #0c1220;
    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --hero-from: #060c1c;
    --hero-to: #172d6b;
    --bs-body-bg: #0c1220;
    --bs-body-color: #e6ebf5;
    --bs-link-color-rgb: 109, 155, 255;
    --bs-link-hover-color-rgb: 150, 182, 255;
}

html, body { overflow-x: clip; }
body {
    background: var(--surface-2);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { text-underline-offset: 2px; }
code, .mono { font-family: var(--mono); }
code { color: inherit; background: var(--brand-soft); padding: .1em .35em; border-radius: 5px; font-size: .88em; word-break: break-word; }
pre { background: #0b1220; color: #e2e8f0; padding: 1rem 1.1rem; border-radius: 10px; overflow-x: auto; font-size: .88rem; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: var(--surface); padding: .5rem 1rem; border-radius: 8px; }

/* ---------- Navigation ---------- */
.site-nav { background: var(--surface); border-bottom: 1px solid var(--line); padding: .55rem 0; }
.site-nav .navbar-brand { font-size: 1.12rem; color: var(--ink); letter-spacing: -.01em; }
.site-nav .navbar-brand strong { color: var(--brand); }
.site-nav .nav-link { color: var(--muted); font-weight: 500; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--brand); }
.nav-search input { min-width: 220px; border-radius: 999px; background: var(--surface-2); }
.theme-toggle { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; }
.mega-menu { border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); padding: 1rem 0 .5rem; margin-top: .55rem !important; width: 100%; left: 0; right: 0; }
.mega-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: .25rem 1rem .4rem; }
.mega-menu .dropdown-item { border-radius: 8px; padding: .38rem 1rem; font-size: .93rem; white-space: normal; }
.mega-menu .dropdown-item i { color: var(--brand); margin-right: .35rem; }
.mega-footer { border-top: 1px solid var(--line); margin-top: .75rem; padding: .6rem 1rem 0; font-size: .9rem; }
@media (max-width: 991.98px) {
    .mega-menu { box-shadow: none !important; border: 0; }
    .nav-search input { min-width: 0; width: 100%; }
    .nav-search { margin-top: .5rem; }
}

/* ---------- Home hero ---------- */
.home-hero {
    background: radial-gradient(1200px 400px at 80% -10%, rgba(99, 102, 241, .45), transparent 60%),
                linear-gradient(135deg, var(--hero-from), var(--hero-to));
    color: #fff;
    padding: 2.6rem 0 2.8rem;
}
.hero-kicker { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #c7d7ff; margin-bottom: .6rem; }
.hero-label { margin: 0 0 .25rem; color: #dbe5ff; }
.ip-display { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.ip-value { font-family: var(--mono); font-weight: 700; font-size: clamp(1.6rem, 5.4vw, 3.3rem); line-height: 1.15; word-break: break-all; letter-spacing: -.02em; }
.btn-copy-lg { border-radius: 999px; font-weight: 600; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.badge-soft { background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); color: #fff; border-radius: 999px; padding: .3rem .8rem; font-size: .9rem; }
.dual-stack { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.1rem; max-width: 640px; }
.stack-item { background: rgba(0, 0, 0, .18); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: .55rem .8rem; min-width: 0; }
.stack-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #c7d7ff; }
.stack-value { font-family: var(--mono); font-size: .92rem; word-break: break-all; }
.stack-item.ok .stack-label::after { content: " ✓"; color: #86efac; }
.stack-item.missing .stack-value { color: #c7d7ff; font-family: inherit; }
.stack-item .btn-copy { color: #dbe5ff; }
.hero-search { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); padding: 1.2rem; }
.hero-search .form-label { color: #dbe5ff; font-size: .95rem; }
.hero-quick { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.hero-quick a { color: #fff; text-decoration: none; font-size: .85rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: .2rem .7rem; }
.hero-quick a:hover { background: rgba(255, 255, 255, .15); }
@media (max-width: 575.98px) { .dual-stack { grid-template-columns: 1fr; } }
/* Search-first hero: the toolbox headline and search, then the visitor's IP. */
.hero-center { max-width: 920px; margin: 0 auto; text-align: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: #dbe5ff;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: .25rem .8rem; margin-bottom: .9rem; }
.hero-title { font-size: clamp(1.8rem, 4.6vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; margin-bottom: .7rem; }
.hero-title-sub { display: block; font-size: .62em; font-weight: 700; color: #fde68a; margin-top: .35rem; }
.hero-lead { color: #dbe5ff; font-size: 1.08rem; max-width: 760px; margin: 0 auto 1.4rem; }
.home-search { position: relative; max-width: 760px; margin: 0 auto; text-align: left; }
.home-search-box { display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 999px; padding: .35rem .35rem .35rem 1.1rem;
    box-shadow: 0 14px 40px rgba(2, 6, 23, .35); }
.home-search-box > .bi-search { color: #64748b; font-size: 1.15rem; }
.home-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #0f172a; font-size: 1.1rem; padding: .55rem .2rem; }
.home-search-box input::placeholder { color: #94a3b8; }
.home-search-box .btn { border-radius: 999px; font-weight: 700; padding: .6rem 1.4rem; }
.home-suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + .45rem); list-style: none; margin: 0; padding: .35rem;
    background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); border-radius: 16px;
    box-shadow: 0 18px 44px rgba(2, 6, 23, .3); max-height: 420px; overflow-y: auto; }
.home-suggest a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 10px; color: inherit; text-decoration: none; }
.home-suggest a.active, .home-suggest a:hover { background: var(--bs-tertiary-bg); }
.home-suggest .bi { color: var(--brand, #1d4ed8); font-size: 1.1rem; }
.home-suggest strong { display: block; font-size: .96rem; }
.home-suggest small { color: var(--bs-secondary-color); }
.home-suggest .sg-cat { margin-left: auto; font-size: .75rem; color: var(--bs-secondary-color); white-space: nowrap; }
.hero-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.3rem; }
.hero-cats a { display: inline-flex; align-items: center; gap: .4rem; color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; padding: .45rem .8rem; }
.hero-cats a:hover { background: rgba(255, 255, 255, .2); }
.hero-cats small { background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }
.hero-popular { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .8rem; margin: .9rem auto 0; font-size: .88rem; color: #c7d7ff; }
.hero-popular a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; white-space: nowrap; }
.ip-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: center; max-width: 1100px;
    margin: 2rem auto 0; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.ip-panel .ip-value { font-size: clamp(1.5rem, 4.4vw, 2.6rem); }
.ip-panel .dual-stack { margin-top: 0; }
@media (max-width: 767.98px) {
    .ip-panel { grid-template-columns: 1fr; padding: 1.1rem; }
    .home-search-box { padding-left: .8rem; }
    .home-search-box .btn { padding: .55rem .9rem; }
    .hero-lead { font-size: 1rem; }
    .hero-cats { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-left: -12px; margin-right: -12px; padding: 0 12px .2rem; }
    .hero-cats::-webkit-scrollbar { display: none; }
    .hero-cats a { flex: 0 0 auto; }
    .hero-popular { display: none; }
    .ip-panel { margin-top: 1.3rem; }
    .home-hero .hero-badges .badge-soft { font-size: .82rem; }
}

/* ---------- Cards and details ---------- */
.card, .details-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: .9rem 1.2rem; }
.detail-grid { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; margin: 0; }
.detail-grid dt, .detail-grid dd { padding: .5rem .2rem; border-bottom: 1px solid var(--line); margin: 0; }
.detail-grid dt { color: var(--muted); font-weight: 500; }
.detail-grid dt i { color: var(--brand); width: 1.2rem; display: inline-block; }
.detail-grid dd { word-break: break-word; }
.flag { vertical-align: -1px; border-radius: 2px; }
.map { height: 100%; min-height: 360px; border-radius: 12px; border: 1px solid var(--line); z-index: 0; }
.field-note { color: var(--muted); font-size: .88rem; margin-top: .9rem; }
.field-note i { color: var(--warn); }

.mini-card { position: relative; display: flex; gap: .8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; height: 100%; }
.mini-card > i { font-size: 1.5rem; color: var(--brand); }
.mini-card small { display: block; color: var(--muted); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; }
.section-head h2 { margin: 0; font-size: 1.5rem; }
.tool-cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 1.1rem 0 .6rem; font-weight: 700; }
.tool-card { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1rem 1.05rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.tool-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(29, 78, 216, .1); color: var(--ink); }
.tool-card > i { font-size: 1.35rem; color: var(--brand); margin-bottom: .25rem; }
.tool-card small { color: var(--muted); line-height: 1.35; }

.btn-copy { background: none; border: 0; padding: 0 .3rem; color: var(--muted); cursor: pointer; line-height: 1; }
.btn-copy:hover { color: var(--brand); }

/* ---------- Tool pages ---------- */
.tool-hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #fff; padding: 1.6rem 0 2rem; }
.tool-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; letter-spacing: -.02em; }
.tool-hero h1 i { opacity: .8; }
.tool-hero .lead { color: #dbe5ff; max-width: 780px; }
.tool-hero .breadcrumb { margin-bottom: .6rem; font-size: .85rem; }
.tool-hero .breadcrumb a { color: #c7d7ff; }
.tool-hero .breadcrumb-item.active, .tool-hero .breadcrumb-item + .breadcrumb-item::before { color: #9fb6ef; }
.tool-form { max-width: 820px; }
.tool-form .form-select, .tool-form .form-control { border: 0; }
.tool-form label { color: #dbe5ff; }
.form-examples { margin-top: .55rem; font-size: .85rem; color: #c7d7ff; }
.form-examples a { color: #fff; }
.tool-body { padding-top: 1.6rem; padding-bottom: 3rem; }

.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.25rem; overflow: hidden; }
.result-card > .rc-head { padding: .85rem 1.15rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.result-card > .rc-head h2, .result-card > .rc-head h3 { font-size: 1.05rem; margin: 0; font-weight: 650; }
.result-card > .rc-body { padding: 1rem 1.15rem; }
.result-card .table { margin: 0; --bs-table-bg: transparent; }
.result-card .table th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.result-card .table td { vertical-align: top; word-break: break-word; }
.table-mono td { font-family: var(--mono); font-size: .9rem; }
.kv { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; }
.kv > div { padding: .55rem 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.kv > div:nth-child(odd) { color: var(--muted); font-weight: 500; padding-right: 1rem; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 575.98px) {
    .kv { grid-template-columns: 1fr; }
    .kv > div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; font-size: .85rem; }
}
.empty-note { color: var(--muted); font-style: italic; }

.status-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.pill-ok { background: rgba(21, 128, 61, .12); color: var(--ok); }
.pill-warn { background: rgba(180, 83, 9, .12); color: var(--warn); }
.pill-bad { background: rgba(185, 28, 28, .12); color: var(--bad); }
.pill-info { background: var(--brand-soft); color: var(--brand); }

.big-verdict { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; }
.big-verdict i { font-size: 2.2rem; }
.big-verdict.ok i { color: var(--ok); }
.big-verdict.warn i { color: var(--warn); }
.big-verdict.bad i { color: var(--bad); }
.big-verdict strong { display: block; font-size: 1.2rem; }

.grade { display: inline-grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 12px; font-size: 1.6rem; font-weight: 800; color: #fff; }
.grade-A { background: #15803d; } .grade-B { background: #4d7c0f; } .grade-C { background: #b45309; } .grade-D { background: #c2410c; } .grade-F { background: #b91c1c; }

.issue-list { list-style: none; padding: 0; margin: 0; }
.issue-list li { padding: .45rem 0 .45rem 1.7rem; position: relative; }
.issue-list li::before { position: absolute; left: 0; font-family: "bootstrap-icons"; }
.issue-list .bad::before { content: "\F622"; color: var(--bad); }
.issue-list .warn::before { content: "\F33B"; color: var(--warn); }
.issue-list .ok::before { content: "\F26B"; color: var(--ok); }

.record-raw { font-family: var(--mono); font-size: .88rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; word-break: break-all; }
details.raw summary { cursor: pointer; color: var(--brand); font-weight: 500; }
details.raw pre { max-height: 420px; margin-top: .6rem; }

.port-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.port-chips a { font-size: .82rem; border: 1px solid rgba(255, 255, 255, .3); color: #fff; border-radius: 999px; padding: .15rem .6rem; text-decoration: none; }
.port-chips a:hover { background: rgba(255, 255, 255, .15); }

/* ---------- Prose (guides and tool explainers) ---------- */
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem; line-height: 1.72; font-size: 1.03rem; }
.prose h2 { font-size: 1.45rem; margin: 2rem 0 .8rem; letter-spacing: -.01em; scroll-margin-top: 80px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
.prose .lead { font-size: 1.15rem; color: var(--muted); }
.prose table { font-size: .93rem; }
.prose .table { --bs-table-bg: transparent; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .3rem; }
.callout { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: .9rem 1.1rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0; }
.callout-warn { border-left-color: var(--warn); background: rgba(180, 83, 9, .08); }
@media (max-width: 575.98px) { .prose { padding: 1.2rem 1.1rem; } }
.prose .table-responsive, .prose table { display: block; overflow-x: auto; }

.faq .accordion-button { font-weight: 600; }
.faq .accordion-item { background: var(--surface); }

/* ---------- Sidebar ---------- */
.side-card, .toc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.25rem; }
.toc-card { top: 84px; }
.side-heading { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; margin-bottom: .7rem; }
.side-list { list-style: none; padding: 0; margin: 0 0 .6rem; }
.side-list a { display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.side-list li:last-child a { border-bottom: 0; }
.side-list a:hover strong { color: var(--brand); }
.side-list i { color: var(--brand); font-size: 1.1rem; margin-top: .1rem; }
.side-list strong { display: block; font-weight: 600; font-size: .95rem; }
.side-list small { color: var(--muted); }
#toc { padding-left: 1.1rem; margin: 0; font-size: .92rem; }
#toc li { margin-bottom: .35rem; }

/* ---------- Articles ---------- */
.article-hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #fff; padding: 1.8rem 0 2.2rem; }
.article-hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 750; letter-spacing: -.02em; max-width: 900px; }
.article-hero .breadcrumb a { color: #c7d7ff; }
.article-hero .breadcrumb-item.active, .article-hero .breadcrumb-item + .breadcrumb-item::before { color: #9fb6ef; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; color: #c7d7ff; font-size: .9rem; margin: 0; }
.article-layout { padding-top: 2rem; padding-bottom: 3rem; }
.article-cta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-top: 1.5rem; }
.guide-card { display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.guide-card:hover { border-color: var(--brand); color: var(--ink); }
.guide-card small, .guide-cat { color: var(--muted); font-size: .8rem; }
.guide-cat { text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }

/* ---------- Generic page hero ---------- */
.page-hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #fff; padding: 2rem 0 2.3rem; }
.page-hero h1 { font-weight: 750; letter-spacing: -.02em; }
.page-hero .lead { color: #dbe5ff; max-width: 760px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 2.6rem 0 1.4rem; margin-top: 2rem; font-size: .93rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-brand { color: var(--ink) !important; font-size: 1.05rem; }
.footer-brand strong { color: var(--brand); }
.footer-heading { font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink); font-weight: 700; margin-bottom: .7rem; }
.site-footer li { margin-bottom: .35rem; }
.footer-guides .list-inline-item { margin: 0 .9rem .35rem 0; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1.1rem; color: var(--muted); font-size: .85rem; }

.toast { background: var(--ink); color: var(--surface); }
.container.narrow { max-width: 1140px; }

/* ---------- Extension promo ---------- */
.ext-banner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.2rem; }
.ext-shot { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.feature-list { list-style: none; padding: 0; }
.feature-list li { display: flex; gap: .8rem; padding: .6rem 0; }
.feature-list i { color: var(--brand); font-size: 1.3rem; }

/* ---------- Speed test ---------- */
.gauge { width: 100%; max-width: 320px; }
.gauge-track, .gauge-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.gauge-track { stroke: var(--line); }
.gauge-fill { stroke: url(#none); stroke: var(--brand); transition: stroke-dasharray .25s ease-out; }
.gauge-readout { margin-top: -78px; margin-bottom: 18px; }
.gauge-value { font-size: 2.6rem; font-weight: 800; font-family: var(--mono); line-height: 1; }
.gauge-unit { color: var(--muted); font-weight: 600; }
.gauge-phase { color: var(--muted); font-size: .9rem; margin-top: .3rem; min-height: 1.4em; }
.speed-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.speed-tile small { display: block; color: var(--muted); }
.speed-tile strong { font-size: 2rem; font-family: var(--mono); margin-right: .3rem; }
.speed-tile span { color: var(--muted); }

/* ---------- Audit reports ---------- */
.grade-lg { width: 4.2rem; height: 4.2rem; font-size: 2.2rem; border-radius: 16px; }
.finding { padding: .85rem 1.15rem; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.finding:last-child { border-bottom: 0; }
.finding-high { border-left-color: var(--bad); }
.finding-medium { border-left-color: var(--warn); }
.finding-low { border-left-color: var(--brand); }
.finding-info { border-left-color: var(--line); }
.finding-ok { border-left-color: var(--ok); }
.sev { font-size: .7rem; font-weight: 800; letter-spacing: .06em; padding: .15rem .5rem; border-radius: 6px; color: #fff; white-space: nowrap; }
.sev-high { background: var(--bad); } .sev-medium { background: #c2410c; } .sev-low { background: var(--brand); } .sev-info { background: #64748b; }
.serp { max-width: 620px; font-family: Arial, sans-serif; }
.serp-title { color: #1a0dab; font-size: 1.25rem; line-height: 1.3; }
[data-bs-theme="dark"] .serp-title { color: #8ab4f8; }
.serp-desc { color: var(--muted); }
.heading-line { padding: .15rem 0 .15rem calc((var(--lvl) - 1) * 1.1rem); }
.waterfall { display: grid; gap: .5rem; }
.wf-row { display: grid; grid-template-columns: 130px 1fr 70px; align-items: center; gap: .7rem; font-size: .9rem; }
.wf-row b { text-align: right; font-family: var(--mono); font-weight: 600; }
.wf-bar { background: var(--surface-2); border-radius: 6px; height: 14px; overflow: hidden; }
.wf-bar i { display: block; height: 100%; min-width: 3px; border-radius: 6px; }
.wf-redirect { background: #94a3b8; } .wf-dns { background: #0ea5e9; } .wf-connect { background: #f59e0b; }
.wf-tls { background: #a855f7; } .wf-server { background: #22c55e; } .wf-download { background: #2563eb; }
@media (max-width: 575.98px) { .wf-row { grid-template-columns: 95px 1fr 60px; } }

@media print {
    .site-nav, .site-footer, .tool-hero .tool-form, .tool-hero .breadcrumb, .no-print, .tool-body aside, .tool-body .prose, .toast-container, .skip-link, .article-cta, .toc-card { display: none !important; }
    .tool-hero { background: none !important; color: #000; padding: 0 0 1rem; }
    .tool-hero .lead { display: none; }
    body { background: #fff; }
    .result-card, .mini-card { break-inside: avoid; box-shadow: none; }
    a { color: inherit; text-decoration: none; }
}

/* ---------- Developer tools ---------- */
.devtool { margin-bottom: 1.5rem; }
.dt-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.dt-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.dt-options { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.dt-options label { display: flex; flex-direction: column; gap: .2rem; color: var(--muted); }
.dt-options label:has(input[type=checkbox]) { flex-direction: row; align-items: center; gap: .35rem; }
.dt-options .form-select, .dt-options .form-control { min-width: 8rem; }
.dt-panes { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 991.98px) { .dt-panes { grid-template-columns: 1fr; } }
.dt-pane { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.dt-pane-head { display: flex; justify-content: space-between; align-items: center; padding: .35rem .5rem .35rem .9rem; border-bottom: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); }
.dt-pane-tools .btn { font-size: .8rem; padding: .1rem .4rem; text-decoration: none; }
.dt-input, .dt-output { width: 100%; min-height: 420px; border: 0; padding: .9rem; font-size: .86rem; line-height: 1.5; background: var(--surface); color: var(--ink); resize: vertical; tab-size: 4; white-space: pre; overflow: auto; }
.dt-input:focus, .dt-output:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.dt-output { background: var(--surface-2); }
.dt-short { min-height: 140px; border: 1px solid var(--line); border-radius: var(--radius); white-space: pre-wrap; }
textarea.dt-output:not(.dt-pane textarea) { border: 1px solid var(--line); border-radius: var(--radius); min-height: 260px; }
.dt-preview { padding: .9rem 1.1rem; min-height: 420px; overflow: auto; }
.dt-status { margin-top: .6rem; font-size: .88rem; color: var(--muted); min-height: 1.4em; }
.dt-status.dt-ok { color: var(--ok); }
.dt-status.dt-err { color: var(--bad); font-weight: 600; }
.dt-status.dt-warn { color: var(--warn); }
.dt-pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); color: var(--ink); padding: 1rem; border-radius: 0 0 var(--radius) var(--radius); font-size: .86rem; }
.rx-highlight mark { background: rgba(250, 204, 21, .55); color: inherit; border-radius: 3px; padding: 0 1px; }
.ts-now { font-size: 2rem; font-weight: 700; }
.prose-lite h1, .prose-lite h2, .prose-lite h3 { margin-top: 1rem; }
.prose-lite table { border-collapse: collapse; } .prose-lite td, .prose-lite th { border: 1px solid var(--line); padding: .3rem .6rem; }
.prose-lite pre { background: #0b1220; color: #e2e8f0; padding: .8rem; border-radius: 8px; }
.prose-lite blockquote { border-left: 4px solid var(--line); padding-left: .9rem; color: var(--muted); }
.mega-menu-dev .dropdown-item i { color: #7c3aed; }

/* ---------- Share location ---------- */
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.qr-box { width: 148px; height: 148px; background: #fff; border-radius: 10px; padding: 4px; flex: none; }
.qr-box svg { width: 100%; height: 100%; }
.pw-main { display: flex; gap: .5rem; }
.pw-main input { font-size: 1.25rem; letter-spacing: .02em; }
.pw-meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.pw-bar { height: 100%; width: 0; border-radius: 99px; transition: width .2s, background .2s; }
.pw-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .4rem 1rem; font-size: .92rem; }
.pw-options label { display: flex; gap: .4rem; align-items: center; }
@media (max-width: 575.98px) { .pw-main { flex-wrap: wrap; } .pw-main input { flex-basis: 100%; } }

/* ---------- Online compilers ---------- */
.compiler { --pane-height: 460px; --code-font: 14px; }
.compiler-panes .CodeMirror { height: var(--pane-height); font-size: var(--code-font); border: 0; }
.compiler-panes .dt-input { min-height: var(--pane-height); font-size: var(--code-font); }
.compiler-panes.stacked { grid-template-columns: 1fr; }
.compiler-panes.stacked .compiler-output { max-height: calc(var(--pane-height) * .6); min-height: 200px; }
.pane-resizer { height: 10px; margin: 2px 0; cursor: ns-resize; border-radius: 6px; background: linear-gradient(var(--line), var(--line)) center / 48px 3px no-repeat; touch-action: none; }
.pane-resizer:hover { background-color: var(--brand-soft); }
.compiler.fullscreen { position: fixed; inset: 0; z-index: 1080; background: var(--surface-2); padding: .75rem 1rem; display: flex; flex-direction: column; overflow: auto; }
.compiler.fullscreen .compiler-panes { flex: 1; min-height: 0; }
.compiler.fullscreen .compiler-panes .CodeMirror { height: calc(100vh - 150px); }
.compiler.fullscreen .compiler-panes.stacked .CodeMirror { height: calc(60vh - 80px); }
.compiler.fullscreen .compiler-output { max-height: calc(100vh - 150px); }
.compiler.fullscreen .compiler-panes.stacked .compiler-output { max-height: calc(40vh - 60px); }
.compiler.fullscreen .pane-resizer, .compiler.fullscreen ~ .mt-3 { display: none; }
body.compiler-full { overflow: hidden; }
.compiler-output { margin: 0; min-height: 300px; max-height: var(--pane-height); font-size: var(--code-font); overflow: auto; padding: .9rem; background: #0b1220; color: #e2e8f0; border-radius: 0; white-space: pre-wrap; word-break: break-word; font-size: .86rem; flex: 1; }
.compiler-output .out-err { color: #fca5a5; }
.compiler-output .out-muted { color: #94a3b8; font-style: italic; }
.compiler-output .sql-result { color: #e2e8f0; --bs-table-bg: transparent; --bs-table-color: #e2e8f0; border-color: #334155; }
.compiler-output .sql-result th { color: #93c5fd; }
.compiler-stdin { border: 0; padding: .6rem .9rem; background: var(--surface); color: var(--ink); resize: vertical; font-size: .86rem; }
.compiler-stdin:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- File tools ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 2.4rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone > i { font-size: 2.6rem; color: var(--brand); }
.dropzone strong { font-size: 1.15rem; }
.dropzone.has-files { padding: 1.2rem 1rem; }
.dropzone.has-files > i { font-size: 1.6rem; }
.file-list, .result-list { list-style: none; padding: 0; margin: 0; }
.file-list li { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; padding: .45rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .35rem; min-width: 0; }
.file-tools .btn { padding: 0 .35rem; text-decoration: none; }
.ft-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem 1rem; margin-top: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ft-option { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--muted); }
.ft-option.ft-check { flex-direction: row; align-items: center; color: var(--ink); }
.result-list li { display: flex; gap: .8rem; align-items: center; padding: .75rem 1.15rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.result-list li:last-child { border-bottom: 0; }
.result-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.min-w-0 { min-width: 0; }
.doc-preview { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.docx-render { position: absolute; left: -10000px; top: 0; width: 700px; background: #fff; color: #000; font-family: Calibri, Arial, sans-serif; font-size: 14px; line-height: 1.45; }
.docx-render img { max-width: 100%; }
.docx-render table { border-collapse: collapse; } .docx-render td, .docx-render th { border: 1px solid #999; padding: 4px; }

/* ---------- Navigation (reorganised) ---------- */
.mega-cols { columns: 2; column-gap: .5rem; }
.mega-cols .dropdown-item { break-inside: avoid; }
.mega-menu-files .dropdown-item i { color: #dc2626; }
.mega-menu-zip .dropdown-item i { color: #b45309; }
.mega-menu-web .dropdown-item i { color: #0f766e; }
.compilers-menu .dropdown-item i { color: #16a34a; }
.site-nav .nav-link { padding-left: .6rem; padding-right: .6rem; }
@media (min-width: 1200px) and (max-width: 1399.98px) { .nav-search input { min-width: 150px; } }
@media (max-width: 1199.98px) {
    .mega-menu { box-shadow: none !important; border: 0; }
    .nav-search input { min-width: 0; width: 100%; }
    .nav-search { margin-top: .5rem; }
    .mega-cols { columns: 1; }
}

/* ---------- Command palette & menu filters ---------- */
.palette-trigger { display: flex; align-items: center; gap: .5rem; min-width: 250px; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .85rem; text-align: left; }
.palette-trigger:hover { border-color: var(--brand); color: var(--ink); }
.palette-trigger span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-trigger kbd, .palette-head kbd, .palette-foot kbd { font-size: .7rem; background: var(--surface); color: var(--muted); border: 1px solid var(--line); box-shadow: none; padding: .05rem .35rem; }
@media (min-width: 1200px) and (max-width: 1399.98px) { .palette-trigger { min-width: 0; } .palette-trigger span { display: none; } }
@media (max-width: 1199.98px) { .palette-trigger { width: 100%; margin-top: .5rem; } }
.palette-dialog { margin-top: 8vh; }
.palette-dialog .modal-content { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.palette-head { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.palette-head i { color: var(--muted); font-size: 1.1rem; }
.palette-head input { border: 0; box-shadow: none !important; font-size: 1.1rem; background: transparent; padding: .3rem 0; }
.palette-results { list-style: none; margin: 0; padding: .4rem; max-height: 60vh; }
.palette-item { display: flex; align-items: center; gap: .8rem; padding: .55rem .7rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.palette-item > i { font-size: 1.15rem; color: var(--brand); width: 1.4rem; text-align: center; }
.palette-item.active { background: var(--brand-soft); }
.palette-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.palette-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-text small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-cat { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .5rem; white-space: nowrap; }
.palette-empty { padding: 1.2rem; color: var(--muted); text-align: center; }
.palette-foot { display: flex; justify-content: space-between; padding: .5rem 1rem; border-top: 1px solid var(--line); }
.mega-filter { max-width: 320px; margin: 0 1rem .75rem; }

/* ZIP & archive tools */
.archive-table { max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.archive-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.archive-table td { font-size: .9rem; }
.zip-edit-list { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: .4rem; }
.zip-edit-row { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .25rem .35rem; }
.zip-edit-row.removed input[type=text], .zip-edit-row.removed .form-control { text-decoration: line-through; opacity: .5; }
.ft-option .input-group { flex-wrap: nowrap; }
.site-nav .nav-link { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .site-nav .navbar-nav .nav-link { padding-left: .42rem; padding-right: .42rem; font-size: .95rem; }
    .site-nav .navbar-brand { font-size: 1.1rem; margin-right: .5rem; }
    #paletteBtn kbd { display: none; }
}
.compiler-plot { display: block; max-width: 100%; height: auto; background: #fff; border-radius: 6px; margin: .4rem 0; }
.hero-speed { font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.ai-menu .dropdown-item i { color: #7c3aed; margin-right: .35rem; }

/* AI detectors */
.ai-textarea { font-size: .95rem; line-height: 1.55; }
.ai-gauge { display: flex; gap: 1.1rem; align-items: center; padding: 1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.ai-gauge-num { font-size: 2.4rem; font-weight: 800; min-width: 5.2rem; text-align: center; line-height: 1; }
.ai-gauge-label { font-weight: 700; font-size: 1.1rem; }
.ai-gauge > div:last-child { flex: 1; min-width: 0; }
.ai-meter { height: 10px; border-radius: 6px; background: var(--line); margin: .45rem 0 .35rem; overflow: hidden; }
.ai-meter span { display: block; height: 100%; border-radius: 6px; background: currentColor; }
.ai-v-high { color: #b91c1c; } .ai-v-mid { color: #c2410c; } .ai-v-mixed { color: #a16207; } .ai-v-low { color: #15803d; } .ai-v-human { color: #15803d; }
.ai-gauge .ai-gauge-label, .ai-gauge .small { color: var(--ink); } .ai-gauge .small.text-body-secondary { color: var(--muted) !important; }
.ai-highlighted { white-space: pre-wrap; line-height: 1.7; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-height: 560px; overflow: auto; }
.ai-highlighted mark, .ai-legend mark { padding: 0 .1em; border-radius: 3px; color: inherit; }
.ai-hl-high { background: rgba(239, 68, 68, .32); } .ai-hl-mid { background: rgba(249, 115, 22, .26); } .ai-hl-low { background: rgba(234, 179, 8, .22); }
.ai-para { background: rgba(234, 179, 8, .3); border-bottom: 2px dotted #a16207; }
.ai-src-0 { background: rgba(239, 68, 68, .3); } .ai-src-1 { background: rgba(59, 130, 246, .3); } .ai-src-2 { background: rgba(168, 85, 247, .3); }
.ai-src-3 { background: rgba(16, 185, 129, .3); } .ai-src-4 { background: rgba(236, 72, 153, .3); } .ai-src-5 { background: rgba(14, 165, 233, .3); }
.ai-src-dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; vertical-align: -.05em; }
.ai-signals th { width: 40%; font-weight: 600; }
.ai-checks { list-style: none; padding: 0; } .ai-checks li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.ai-claims li { margin-bottom: .35rem; }
.ai-image-preview { margin-top: 1rem; text-align: center; } .ai-image-preview img { max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--line); }
.ai-ela { display: block; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #000; }

/* Home: platform overview */
.platform-lead { max-width: 920px; color: var(--muted); margin-bottom: 1rem; }
.platform-card { height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.platform-title { display: flex; align-items: center; gap: .45rem; font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--ink); }
.platform-title i { color: var(--brand); font-size: 1.25rem; }
.platform-title .badge { margin-left: auto; font-weight: 600; }
.platform-card p { font-size: .88rem; color: var(--muted); margin: .4rem 0 .5rem; }
.platform-card ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.platform-card li { padding: .12rem 0; }
.sitemap-cols { columns: 3 220px; column-gap: 2rem; padding-left: 1.1rem; } .sitemap-cols li { break-inside: avoid; margin-bottom: .25rem; }

/* Nav utilities (search, language, theme) live outside the collapsible menu so they are always visible */
.site-nav .container { flex-wrap: wrap; }
.site-nav .nav-utils { margin-left: auto; order: 2; }
.site-nav .navbar-toggler { order: 3; margin-left: .5rem; }
.site-nav .navbar-collapse { order: 4; }
@media (min-width: 1200px) {
    .site-nav.navbar-expand-xl .container { flex-wrap: nowrap; }
    .site-nav.navbar-expand-xl .navbar-collapse { order: 1; }
    .site-nav.navbar-expand-xl .nav-utils { order: 2; margin-left: .5rem; }
}
.site-nav .nav-utils .nav-search span, .site-nav .nav-utils .nav-search kbd { display: none; }
.site-nav.nav-compact .navbar-collapse { flex-basis: 100%; }
.site-nav .nav-utils .dropdown-menu { position: absolute; }
.site-nav .nav-utils .nav-search { margin-top: 0; }
@media (min-width: 1200px) { .site-nav > .container { max-width: min(1680px, 100%); } }
.site-nav .nav-utils .nav-search { width: 38px; height: 38px; min-width: 0; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.site-nav .nav-utils .nav-search i { margin: 0; }
.site-nav .container { flex-wrap: nowrap; }
.site-nav.nav-compact .container, .site-nav .container:has(.navbar-collapse.show), .site-nav .container:has(.navbar-collapse.collapsing) { flex-wrap: wrap; }
@media (max-width: 1199.98px) { .site-nav .container { flex-wrap: wrap; } .site-nav .navbar-brand { margin-right: auto; } .site-nav .nav-utils { margin-left: 0; } }
@media (max-width: 479.98px) {
    .site-nav .navbar-brand { font-size: 1rem; gap: .35rem !important; }
    .site-nav .navbar-brand img { width: 26px; height: 26px; }
    .site-nav #themeToggle, .site-nav .nav-utils .bi-translate { display: none; }
    .site-nav .nav-utils { gap: .35rem !important; }
    .site-nav .navbar-toggler { padding: .25rem .45rem; margin-left: .35rem; }
}
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { padding: .35rem 0; }
.feature-list i { color: var(--brand); margin-right: .3rem; }
.tool-card.compact { padding: .7rem .9rem; }
.tool-card.compact small { font-size: .78rem; }
.compiler-features .feature-list li { display: block; grid-template-columns: none; }

/* Home: every tool, grouped (crawlable overview of the whole toolbox) */
.all-tools-cols { column-width: 230px; column-gap: 1.6rem; }
.all-tools-group { break-inside: avoid; margin-bottom: 1.2rem; }
.all-tools-group h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.all-tools-group h3 a { color: inherit; text-decoration: none; }
.all-tools-group ul { list-style: none; padding: 0; margin: 0; }
.all-tools-group li a { display: block; padding: .12rem 0; font-size: .9rem; text-decoration: none; }
.all-tools-group li a:hover { text-decoration: underline; }

/* Favourite tools (stored in the browser) */
.tool-title { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.tool-title h1 { margin-bottom: 0; }
.fav-btn { display: inline-flex; align-items: center; gap: .35rem; background: rgba(255, 255, 255, .12); color: #fff;
    border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: .3rem .85rem; font-size: .88rem; font-weight: 600; }
.fav-btn:hover { background: rgba(255, 255, 255, .22); }
.fav-btn.on { background: #fde68a; border-color: #fde68a; color: #1e293b; }
.fav-btn.on i { color: #b45309; }
.tool-hero .lead { margin-top: .6rem; }
.hero-favs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem; margin-top: 1.1rem; }
.hero-favs-label { color: #fde68a; font-weight: 700; font-size: .9rem; margin-right: .2rem; }
.hero-favs-list { display: contents; }
.fav-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 999px; box-shadow: 0 4px 14px rgba(2, 6, 23, .25); }
.fav-chip a { color: #0f172a; text-decoration: none; font-weight: 600; font-size: .9rem; padding: .35rem .2rem .35rem .8rem; }
.fav-chip a .bi { color: #1d4ed8; }
.fav-remove { border: 0; background: transparent; color: #64748b; font-size: 1.05rem; line-height: 1; padding: .3rem .65rem .35rem .4rem; border-radius: 999px; }
.fav-remove:hover { color: #dc2626; }
@media (max-width: 767.98px) {
    .hero-favs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -12px; margin-right: -12px; padding: 0 12px .2rem; }
    .hero-favs::-webkit-scrollbar { display: none; }
    .fav-chip, .hero-favs-label { flex: 0 0 auto; }
}
.scan-consent { color: #dbe5ff; }
.scan-consent a { color: #fde68a; }

/* Contact form */
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-card { border-radius: var(--radius); }

/* Home hero v2: the IP answer first, then the toolbox headline and search */
.ip-answer { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.2rem 1.6rem; align-items: center;
    max-width: 1100px; margin: 0 auto 2.4rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius); padding: 1.2rem 1.5rem; }
.ip-answer-label { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #c7d7ff; margin: 0 0 .3rem; }
.ip-answer .ip-value { font-size: clamp(1.6rem, 4.6vw, 2.8rem); }
.ip-answer .hero-badges { margin-top: .7rem; }
.ip-answer .dual-stack { margin-top: 0; }
.home-hero .hero-center .hero-title { font-size: clamp(1.8rem, 4.4vw, 3rem); margin-bottom: .6rem; }
@media (max-width: 767.98px) {
    .ip-answer { grid-template-columns: 1fr; padding: 1rem; margin-bottom: 1.6rem; }
    .ip-answer-side .dual-stack { display: none; }        /* the IP is already shown above */
    .ip-answer-side .d-flex { margin-top: 0 !important; flex-wrap: nowrap !important; }
    .ip-answer-side .btn { flex: 1 1 0; font-size: .9rem; padding: .45rem .5rem; white-space: nowrap; }
    .ip-answer .hero-badges { gap: .35rem; }
    .ip-answer .badge-soft { font-size: .8rem; padding: .2rem .6rem; }
}

/* Collaborative editor */
.collab-status { margin: .75rem 0 .4rem; font-size: .92rem; color: var(--bs-secondary-color); }
.collab-people { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.collab-person { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; border-radius: 999px;
    padding: .15rem .65rem; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.collab-person::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); }
.collab-editor { border: 1px solid var(--bs-border-color); border-radius: 12px; overflow: hidden; }
.collab-editor .CodeMirror { height: 62vh; min-height: 360px; font-family: var(--mono); font-size: 14px; }
.remote-caret { position: absolute; border-left-style: solid; border-left-width: 2px; height: 1em; }
.remote-caret > div { position: relative; top: -1.05em; font-size: 11px; font-family: system-ui, sans-serif; line-height: normal;
    user-select: none; color: #fff; padding: 0 4px; border-radius: 3px; white-space: nowrap; z-index: 3; }

#collabPanel.fullscreen { position: fixed; inset: 0; z-index: 2000; background: var(--bs-body-bg); padding: .8rem 1rem; overflow: auto; }
#collabPanel.fullscreen .collab-editor .CodeMirror { height: calc(100vh - 11rem); }
body.collab-full { overflow: hidden; }

/* Home: collaborative editor spotlight */
.collab-spot-wrap { margin-top: 2rem; }
.collab-spot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand, #1d4ed8) 9%, var(--bs-body-bg)), var(--bs-body-bg));
    border: 1px solid color-mix(in srgb, var(--brand, #1d4ed8) 25%, var(--bs-border-color)); border-radius: 20px; padding: 2rem; }
.collab-spot h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; margin: .5rem 0 .6rem; }
.collab-spot p { color: var(--bs-secondary-color); font-size: 1.05rem; }
.collab-spot-badge { display: inline-flex; gap: .3rem; align-items: center; font-size: .8rem; font-weight: 700; color: #b45309;
    background: #fef3c7; border-radius: 999px; padding: .2rem .7rem; }
.collab-spot-points { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .35rem; }
.collab-spot-points i { color: var(--brand, #1d4ed8); margin-right: .35rem; }
.collab-spot-demo { background: #0f172a; border-radius: 14px; box-shadow: 0 18px 40px rgba(2, 6, 23, .25); overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: .35rem; padding: .55rem .8rem; background: #1e293b; color: #94a3b8; font-size: .8rem; }
.demo-bar > span { width: .6rem; height: .6rem; border-radius: 50%; background: #475569; }
.demo-bar em { font-style: normal; margin-left: .5rem; }
.demo-people { margin-left: auto; display: flex; }
.demo-people i { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--c); color: #fff; font-style: normal; font-size: .7rem;
    display: grid; place-items: center; margin-left: -.3rem; border: 2px solid #1e293b; }
.demo-code { margin: 0; padding: 1rem 1rem 1.3rem; color: #e2e8f0; font-family: var(--mono); font-size: .9rem; line-height: 1.9; white-space: pre; overflow: hidden; }
.demo-code .ln { display: inline-block; width: 1.6rem; color: #475569; }
.demo-code .kw { color: #c084fc; } .demo-code .fn { color: #60a5fa; } .demo-code .st { color: #86efac; }
.demo-caret { position: relative; border-left: 2px solid var(--c); margin-left: 1px; animation: demo-blink 1.1s steps(2) infinite; }
.demo-caret b { position: absolute; left: -2px; top: -1.25em; background: var(--c); color: #fff; font: 600 .62rem/1.3 system-ui, sans-serif;
    padding: 0 .3rem; border-radius: 3px; white-space: nowrap; }
@keyframes demo-blink { 50% { border-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .demo-caret { animation: none; } }
@media (max-width: 991.98px) { .collab-spot { grid-template-columns: 1fr; padding: 1.4rem; } }

/* Home v3: toolbox first; the IP answer is its own section below the spotlight */
.ip-section { margin-top: 1.5rem; }
.ip-answer-card { margin: 0 auto; max-width: none; color: #fff;
    background: radial-gradient(900px 300px at 85% -20%, rgba(99, 102, 241, .45), transparent 60%), linear-gradient(135deg, var(--hero-from), var(--hero-to)); border: 0; }
.home-hero .hero-center { padding-top: .6rem; }

/* Home: popular tools as colourful chips */
.hero-popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin: 1.2rem auto 0; max-width: 1000px; }
.hero-popular-label { color: #fde68a; font-weight: 700; font-size: .9rem; margin-right: .2rem; }
.hero-popular .pop-chip { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .86rem; text-decoration: none; margin: 0;
    color: #0f172a; background: var(--pc-bg); border-radius: 999px; padding: .32rem .8rem; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(2, 6, 23, .22); transition: transform .12s ease, box-shadow .12s ease; }
.hero-popular .pop-chip i { color: var(--pc-fg); }
.hero-popular .pop-chip:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(2, 6, 23, .3); color: #0f172a; }
.pc-amber { --pc-bg: #fde68a; --pc-fg: #b45309; }
.pc-green { --pc-bg: #a7f3d0; --pc-fg: #047857; }
.pc-sky { --pc-bg: #bae6fd; --pc-fg: #0369a1; }
.pc-pink { --pc-bg: #fbcfe8; --pc-fg: #be185d; }
.pc-violet { --pc-bg: #ddd6fe; --pc-fg: #6d28d9; }
.pc-orange { --pc-bg: #fed7aa; --pc-fg: #c2410c; }
@media (max-width: 767.98px) {
    .hero-popular { display: flex; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
        margin-left: -12px; margin-right: -12px; padding: .2rem 12px .5rem; }
    .hero-popular::-webkit-scrollbar { display: none; }
    .hero-popular-label, .hero-popular .pop-chip { flex: 0 0 auto; }
}

/* Collaborative editor toolbar */
.collab-fields { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.collab-field { display: flex; align-items: center; gap: .45rem; margin: 0; }
.collab-field input { width: 12rem; }
.collab-field select { width: auto; }

/* ---------- Phones: adaptive tweaks ---------- */
@media (max-width: 575.98px) {
    /* iOS Safari zooms into any focused field under 16px */
    input.form-control, input.form-control-sm, select.form-select, select.form-select-sm, textarea.form-control,
    .home-search-box input, .lookup-form input { font-size: 16px; }
    .tool-hero { padding: 1.1rem 0 1.4rem; }
    .tool-hero h1 { font-size: 1.5rem; }
    .tool-hero .lead { font-size: 1rem; margin-top: .4rem; }
    .tool-hero .breadcrumb { font-size: .8rem; }
    .fav-btn { padding: .3rem .6rem; }
    .fav-btn .fav-label { display: none; }
    .prose { padding: 1.1rem 1rem; font-size: 1rem; line-height: 1.65; }
    .prose h2 { font-size: 1.25rem; margin-top: 1.6rem; }
    .prose h3 { font-size: 1.07rem; }
    .prose .lead { font-size: 1.05rem; }
    #processBtn, .tool-body > .btn-lg { width: 100%; }
    .article-hero h1 { font-size: 1.55rem; }
    .collab-fields, .collab-field, .collab-actions { width: 100%; }
    .collab-field > span { flex: 0 0 5.5rem; }
    .collab-field input, .collab-field select { flex: 1; width: auto; }
    .collab-actions .btn { flex: 1; }
    .section-head h2, .platform h2 { font-size: 1.35rem; }
}

/* Phones: categories as a 2-column grid and popular chips wrapping onto several lines (no sideways scrolling) */
@media (max-width: 767.98px) {
    .hero-cats { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; overflow: visible; margin: 1rem 0 0; padding: 0; }
    .hero-cats a { justify-content: center; padding: .5rem .4rem; font-size: .84rem; text-align: center; min-width: 0; }
    .hero-cats a small { margin-left: .1rem; }
    .hero-popular { flex-wrap: wrap; justify-content: center; overflow: visible; margin: 1rem 0 0; padding: 0; gap: .4rem; }
    .hero-popular-label { width: 100%; text-align: center; margin: 0 0 .1rem; }
    .hero-popular .pop-chip { font-size: .8rem; padding: .3rem .65rem; }
}
@media (max-width: 359.98px) { .hero-cats { grid-template-columns: 1fr; } }
@media (max-width: 767.98px) { .hero-cats a:last-child:nth-child(odd) { grid-column: 1 / -1; } .hero-cats a { white-space: nowrap; } }

/* "Code together" (compiler pages): colourful entry point to the collaborative editor */
.btn-invite { color: #fff; font-weight: 600; border: 0; background: linear-gradient(135deg, #7c3aed, #db2777);
    box-shadow: 0 4px 14px rgba(124, 58, 237, .35); }
.btn-invite:hover, .btn-invite:focus { color: #fff; background: linear-gradient(135deg, #6d28d9, #be185d); }

/* ToolsForAnyone brand: blue-to-violet like the logo */
.site-nav .navbar-brand strong, .footer-brand strong {
    background: linear-gradient(90deg, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-bs-theme="dark"] .site-nav .navbar-brand strong, [data-bs-theme="dark"] .footer-brand strong {
    background: linear-gradient(90deg, #93c5fd, #c4b5fd); -webkit-background-clip: text; background-clip: text; }
.home-hero { background: radial-gradient(1200px 420px at 85% -10%, rgba(236, 72, 153, .32), transparent 60%),
    radial-gradient(900px 380px at -10% 110%, rgba(56, 189, 248, .22), transparent 60%),
    linear-gradient(135deg, var(--hero-from), var(--hero-to)); }

/* ATS CV checker */
.ats-label { color: #dbe5ff; font-weight: 700; }
.ats-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; text-align: center; cursor: pointer;
    min-height: 168px; border: 2px dashed rgba(255, 255, 255, .45); border-radius: 16px; background: rgba(255, 255, 255, .08); color: #fff; padding: 1rem; }
.ats-drop:hover, .ats-drop.dragging { background: rgba(255, 255, 255, .16); }
.ats-drop .bi { font-size: 2.2rem; color: #fde68a; }
.ats-drop span { font-size: .88rem; color: #c7d7ff; }
.ats-drop em { font-style: normal; font-weight: 700; color: #a7f3d0; word-break: break-all; }
.ats-form details summary { color: #c7d7ff; cursor: pointer; }
.ats-private { color: #c7d7ff; }
.ats-gauge { --p: 0; --c: #16a34a; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; position: relative;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--bs-tertiary-bg) 0); }
.ats-gauge::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface, var(--bs-body-bg)); }
.ats-gauge span, .ats-gauge small { position: relative; }
.ats-gauge span { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.ats-gauge small { margin-top: -1.6rem; color: var(--bs-secondary-color); }
.ats-gauge.ats-ok { --c: #d97706; } .ats-gauge.ats-low { --c: #dc2626; }
.ats-bar { display: grid; grid-template-columns: 11rem 1fr 3rem; gap: .6rem; align-items: center; font-size: .88rem; margin-bottom: .35rem; }
.ats-bar .progress { height: .55rem; }
.ats-bar b { text-align: right; }
.ats-check { display: flex; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line, var(--bs-border-color)); }
.ats-check .bi { font-size: 1.05rem; margin-top: .1rem; }
.ats-check strong { display: block; font-size: .95rem; }
.ats-check small { color: var(--bs-secondary-color); }
.ats-pass .bi { color: #16a34a; } .ats-warn .bi { color: #d97706; } .ats-fail .bi { color: #dc2626; }
.ats-kws { display: flex; flex-wrap: wrap; gap: .35rem; }
.ats-kw { font-size: .82rem; font-weight: 600; border-radius: 999px; padding: .2rem .65rem; background: #dcfce7; color: #166534; }
.ats-missing .ats-kw { background: #fee2e2; color: #991b1b; }
.ats-text summary { list-style: none; cursor: pointer; }
.ats-text pre { max-height: 360px; overflow: auto; white-space: pre-wrap; }
@media (max-width: 575.98px) { .ats-bar { grid-template-columns: 7.5rem 1fr 2.6rem; font-size: .8rem; } .ats-gauge { width: 112px; height: 112px; } }
