/* The redesign skin for every tool page (docs/site-redesign.md, tool page mockup approved 2026-10-20).
   Loaded LAST by includes/header.php, after tools.css, the family stylesheets and each tool's own tool.css, so it
   wins at equal specificity by source order. It changes colours, type, spacing and chrome only: no tool's markup,
   columns, data, formats or behaviour change (owner's rule, 2026-10-20). Step 1 of the tool page build = this file;
   step 2 = the breadcrumb and the two-column body with the rail (includes); step 3 = the per-tool pass. */

/* 1. The palette: warm neutrals and the signal red of the site; the same names tools.css and the tool files use */
:root {
    --brand-red:       #b5332c;
    --brand-red-dark:  #8c2420;
    --brand-red-light: #c4463f;
    --brand-red-soft:  #fbedeb;
    --brand-red-tint:  rgba(181, 51, 44, 0.12);
    --ink:        #1c1a19;
    --ink-900:    #141211;
    --ink-800:    #262321;
    --ink-700:    #3d3936;
    --ink-600:    #55504c;
    --ink-500:    #6f6a66;
    --ink-400:    #9b958f;
    --ink-300:    #d9d3cc;
    --ink-200:    #e6e1dc;
    --ink-100:    #f0ece8;
    --ink-50:     #f8f5f0;
    --ink-25:     #fcfbfa;
    --shadow-xs: 0 1px 2px rgba(28, 26, 25, 0.04);
    --shadow-sm: 0 1px 2px rgba(28, 26, 25, 0.04), 0 2px 6px rgba(28, 26, 25, 0.03);
    --shadow-md: 0 1px 2px rgba(28, 26, 25, 0.04), 0 8px 24px rgba(28, 26, 25, 0.05);
    --shadow-lg: 0 1px 3px rgba(28, 26, 25, 0.06), 0 12px 32px rgba(28, 26, 25, 0.08);
    --shadow-xl: 0 1px 3px rgba(28, 26, 25, 0.08), 0 20px 50px rgba(28, 26, 25, 0.12);
    --mono: "IBM Plex Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
    --link:       #7a1f1c;
    --link-dark:  #5e1512;
    --good-bg:    #e3f3ea;
    --good-fg:    #1f6f4a;
    --mid-bg:     #fbf0d6;
    --mid-fg:     #8a5a0a;
    --bad-bg:     #fbe4e2;
    --bad-fg:     #9b2a24;
    --focus-ring: 0 0 0 4px rgba(28, 26, 25, 0.08);
    --r-sm: 8px;
    --r-md: 10px;
    --r:    10px;
    --r-lg: 14px;
    --fh: "Plus Jakarta Sans", "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
    --fb: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 2. Type and ground */
body {
    font-family: var(--fb);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-700);
    background-color: var(--ink-50);
}
h1, h2, h3, h4, .results-title, .tool-info-heading, .faq-question, .history-title {
    font-family: var(--fh);
    letter-spacing: -0.015em;
}
a { color: var(--link); }
a:hover { color: var(--link-dark); }
strong, b { font-weight: 600; }
.container { max-width: 1180px; padding: 0 24px; }
.tool-main > .container, .page-hero > .container { max-width: 1180px; }

/* 3. Page hero: the tool's name and description across the full width */
.page-hero { padding: 14px 0 24px; }
.page-hero h1 {
    font-size: 42px;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--ink);
}
.page-hero h1 { display: flex; align-items: center; gap: 14px; }
.page-hero h1 .page-hero-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 11px; background: var(--brand-red-soft); color: var(--brand-red); display: flex; align-items: center; justify-content: center; }
.page-hero h1 .page-hero-icon .ke-icon { width: 22px; height: 22px; }
.page-hero h1 svg:not(.ke-icon), .page-hero h1 img { display: none; }   /* a page's own title drawing, if a non-registry page still passes one */
.page-hero-description {
    margin: 12px 0 0;
    font-size: 19px;
    line-height: 1.5;
    color: var(--ink-700);
    max-width: none;
}
.tool-main { padding: 4px 0 64px; }

/* 4. Buttons: flat red, their own hover, never the link colour */
.primary-btn,
a.primary-btn {
    background: var(--brand-red);
    color: #fff;
    border-radius: var(--r);
    padding: 13px 22px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: none;
    transition: background-color 0.15s ease;
}
.primary-btn:hover:not(:disabled),
a.primary-btn:hover {
    background: var(--brand-red-dark);
    color: #fff;
    filter: none;
    box-shadow: none;
}
.primary-btn:active:not(:disabled) { transform: none; box-shadow: none; }
.primary-btn:disabled { background: var(--ink-300); }
.ghost-btn, .export-btn, a.ghost-btn, a.export-btn {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--ink-200);
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: none;
}
.ghost-btn:hover, .export-btn:hover, a.ghost-btn:hover, a.export-btn:hover {
    background: var(--ink-50);
    border-color: #c9c2ba;
    color: var(--ink);
    box-shadow: none;
}
.export-btn:hover .icon { color: var(--ink); }

/* 5. The form card and its controls */
.tool-form-card {
    border: 1px solid var(--ink-200);
    border-radius: var(--r-lg);
    padding: 22px 24px 20px;
    box-shadow: var(--shadow-md);
}
.mode-toggle {
    background: var(--ink-50);
    border: 1px solid var(--ink-200);
    --mode-toggle-pad: 3px;
    margin-bottom: 16px;
}
.mode-toggle::before { box-shadow: 0 1px 2px rgba(28, 26, 25, 0.12); }
.mode-btn { font-weight: 600; font-size: 14px; color: var(--ink-500); padding: 7px 18px; min-height: 36px; }
.mode-btn:hover { color: var(--ink); }
.mode-btn.is-active { color: var(--ink); }
.text-input, .textarea-input, .type-select, .search-input {
    color: var(--ink);
    border: 1.5px solid var(--ink-200);
    border-radius: var(--r);
    padding: 12px 14px;
}
.text-input { font-size: 16px; }
.text-input:hover, .textarea-input:hover, .type-select:hover, .search-input:hover { border-color: var(--ink-300); }
.text-input:focus, .textarea-input:focus, .type-select:focus, .search-input:focus {
    border-color: var(--ink);
    box-shadow: var(--focus-ring);
}
.text-input::placeholder, .textarea-input::placeholder { color: var(--ink-400); }
.textarea-input { font-family: var(--mono); font-size: 14px; }
.unique-toggle input { accent-color: var(--ink); }

/* 6. Results: the tool's table, reskinned */
.results-region {
    border: 1px solid var(--ink-200);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}
.results-header {
    background: #fff;
    border-bottom: 1px solid var(--ink-100);
    padding: 14px 24px;
}
.results-title { font-size: 18px; font-weight: 700; color: var(--ink); gap: 8px; }
.results-title::before { display: none; }
.results-badge {
    background: var(--ink-50);
    border: 1px solid var(--ink-200);
    color: var(--ink-700);
    font-family: var(--fb);
    font-size: 12.5px;
    letter-spacing: 0;
    padding: 2px 8px;
}
.search-input { font-size: 14px; border-radius: 8px; padding: 8px 12px 8px 34px; min-height: 36px; }
.results-table { font-size: 14px; font-variant-numeric: tabular-nums; }
.results-table th, .results-table td { padding: 13px 12px; border-bottom: 1px solid var(--ink-100); }
.results-table th:first-child, .results-table td:first-child { padding-left: 24px; }
.results-table th:last-child, .results-table td:last-child { padding-right: 24px; }
.results-table thead th {
    font-family: var(--fb);
    color: var(--ink-500);
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    background: var(--ink-25);
    border-bottom: 1px solid var(--ink-200);
    box-shadow: none;
    padding-top: 10px;
    padding-bottom: 10px;
}
.results-table th.th-num { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; text-align: right; padding-left: 8px; padding-right: 8px; white-space: normal; }
.results-table td.td-num { text-align: right; font-weight: 600; color: var(--ink); }
.results-table tbody tr:nth-child(even) { background: transparent; }
.results-table tbody tr:hover { background: var(--ink-25); }
.results-footer {
    background: var(--ink-25);
    border-top: 1px solid var(--ink-100);
    padding: 12px 24px;
    font-size: 13px;
    letter-spacing: 0;
}
.results-pagesize select { border: 1.5px solid var(--ink-200); border-radius: 6px; padding: 4px 8px; color: var(--ink); font-size: 13px; }
.page-btn {
    border: 1.5px solid var(--ink-200);
    border-radius: 6px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
}
.page-btn:hover:not(:disabled) { background: var(--ink-50); border-color: #c9c2ba; color: var(--ink); }
.page-btn.is-active {
    background: var(--ink-50);
    color: var(--ink);
    border-color: #c9c2ba;
}

/* 7. The quota row: quiet text, state colours from the warm palette */
.quota-banner {
    border: 1px solid var(--ink-200);
    border-radius: var(--r);
    background: #fff;
    color: var(--ink-500);
    font-size: 13.5px;
}
.quota-banner.is-good   { --qb-state: var(--good-fg); border-color: var(--ink-200); }
.quota-banner.is-fair   { --qb-state: var(--ink); border-color: var(--ink-200); }
.quota-banner.is-warn   { --qb-state: var(--mid-fg); border-color: #efd9a8; }
.quota-banner.is-danger { --qb-state: var(--bad-fg); border-color: #efc6c2; }
.quota-banner-cta { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.quota-banner-cta:hover { color: var(--brand-red); }

/* 8. The explanatory blocks and the FAQ: hairline sections instead of cards, a 68-character measure */
.tool-info { margin-top: 48px; padding: 8px 0 8px; border-top: 0; max-width: 760px; }
.tool-info-block {
    background: transparent;
    border: 0;
    border-top: 1px solid var(--ink-200);
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 32px 0 36px;
    overflow: visible;
}
.tool-info-block:first-child { border-top: 0; padding-top: 0; }
.tool-info-block--static > .tool-info-heading, .tool-info-heading {
    padding: 0;
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}
.tool-info-block--static > .tool-info-body, .tool-info-body {
    padding: 0;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--ink-700);
    max-width: 68ch;
}
.tool-info-body strong, .tool-info-glossary dt { color: var(--ink); }
.tool-info-body code { background: var(--ink-50); border: 1px solid var(--ink-100); border-radius: 5px; font-family: var(--mono); font-size: 13.5px; }
.tool-info-glossary dt { font-size: 15.5px; margin-top: 16px; }
.tool-info-glossary dd { color: var(--ink-700); }
.tool-info-faq { padding: 0; }
.tool-info-faq .faq-item { border-top: 1px solid var(--ink-100); padding: 16px 0 18px; }
.tool-info-faq .faq-item:first-of-type { border-top: 0; padding-top: 0; }
.tool-info-faq .faq-question { padding: 0; margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.tool-info-faq .faq-answer { padding: 0; font-size: 15px; line-height: 1.65; max-width: 66ch; }
.tool-info-faq .faq-answer a { color: var(--link); border-bottom: 0; text-decoration: underline; text-underline-offset: 3px; }
.tool-info-faq .faq-answer a:hover { color: var(--link-dark); }

/* 9. Shared chrome around the tool: related tools, history, nudges */
.related-tools { background: #fff; border-top: 1px solid var(--ink-200); }
.history-region { border-color: var(--ink-200); }

@media (max-width: 991.98px) {
    .page-hero h1 { font-size: 34px; }
    .page-hero-description { font-size: 17px; }
    .tool-info-block--static > .tool-info-heading, .tool-info-heading { font-size: 23px; }
}
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .page-hero h1 { font-size: 30px; gap: 10px; }
    .page-hero h1 .page-hero-icon { width: 36px; height: 36px; border-radius: 9px; }
    .page-hero h1 .page-hero-icon .ke-icon { width: 18px; height: 18px; }
    .page-hero-description { font-size: 16.5px; }
    .tool-form-card { padding: 16px; }
    .results-header, .results-footer { padding-left: 16px; padding-right: 16px; }
    .results-table th:first-child, .results-table td:first-child { padding-left: 16px; }
    .results-table th:last-child, .results-table td:last-child { padding-right: 16px; }
    .tool-info-block--static > .tool-info-heading, .tool-info-heading { font-size: 22px; }
    .tool-info-faq .faq-question { font-size: 16px; }
}

/* 10. The family templates (calc, gen, ng, rw, platform): one neutral accent instead of a colour per tool, and
   selected states in weight and grey, never an accent (owner's rule, 2026-10-14). The family pages inject their
   accents as :root variables in the head; this file loads later, so these win. */
:root {
    --calc-accent: #1c1a19;
    --calc-accent-dark: #1c1a19;
    --calc-accent-tint: #f0ece8;
    --gen-accent: #b5332c;
    --gen-accent-dark: #8c2420;
    --gen-accent-tint: #fbedeb;
    --ng-accent: #b5332c;
    --ng-accent-dark: #8c2420;
    --ng-accent-tint: #fbedeb;
    --pt-accent: #1c1a19;
    --pt-accent-dark: #1c1a19;
    --pt-accent-tint: #f0ece8;
    --pt-accent-tint-soft: #f8f5f0;
    --pp-h1: #1c1a19;
    --pp-ink: #1c1a19;
    --pp-muted: #6f6a66;
    --pp-link: #7a1f1c;
    --kt-brand: #1c1a19;
    --kt-brand-tint: #f0ece8;
    --wf-accent: #1c1a19;
    --wf-accent-dark: #1c1a19;
    --wf-accent-tint: #f0ece8;
    --gt-accent: #1c1a19;
    --gt-accent-dark: #1c1a19;
    --gt-accent-tint: #f0ece8;
    --tt-accent: #1c1a19;
    --tt-accent-dark: #1c1a19;
    --tt-accent-tint: #f0ece8;
    --it-accent: #1c1a19;
    --it-accent-dark: #1c1a19;
    --it-accent-tint: #f0ece8;
}
.gen-pill, .ng-style-pill, .pt-mode-pill {
    border: 1.5px solid var(--ink-200);
    background: #fff;
    color: var(--ink-700);
    font-weight: 500;
}
.gen-pill:hover, .ng-style-pill:hover, .pt-mode-pill:hover { border-color: var(--ink); color: var(--ink); }
.gen-pill.is-active, .ng-style-pill.is-active, .pt-mode-pill.is-selected {
    background: var(--ink-50);
    border-color: var(--ink);
    color: var(--ink);
    font-weight: 600;
}
.gen-pill-label, .calc-field-label, .calc-currency label, .calc-primary-label, .ng-field-label, .pt-field-label { color: var(--ink); }
.calc-result { border: 1px solid var(--ink-200); background: var(--ink-50); border-radius: var(--r-lg); }
.calc-primary-value { color: var(--ink); font-family: var(--fh); font-weight: 800; letter-spacing: -0.02em; }
.calc-breakdown { border-top-color: var(--ink-200); }
.calc-breakdown dt { color: var(--ink-500); }
.calc-breakdown dd { color: var(--ink); font-weight: 600; }
.calc-copy-btn, .calc-copy-btn:hover { color: #fff; }
.calc-copy-btn { background: var(--brand-red); border-color: var(--brand-red); }
.calc-copy-btn:hover { background: var(--brand-red-dark); border-color: var(--brand-red-dark); }
.calc-hub-link a, .calc-hub-link a:hover { color: var(--ink); }
.calc-input-box, .calc-currency-sel { border: 1.5px solid var(--ink-200); border-radius: var(--r); }
.calc-input-box:focus-within, .calc-currency-sel:focus { outline: 0; border-color: var(--ink); box-shadow: var(--focus-ring); }
.calc-adv-checkbox { accent-color: var(--ink); }
.ng-submit-row .primary-btn { background: var(--brand-red); border-color: var(--brand-red); }
.ng-submit-row .primary-btn:hover { background: var(--brand-red-dark); border-color: var(--brand-red-dark); }

/* 11. The upgrade banner and the sign-in nudge: flat white, the icon in the soft red tile */
.upgrade-banner {
    background: #fff;
    border: 1px solid var(--ink-200);
    box-shadow: none;
    padding: 16px 20px;
}
.upgrade-banner-icon { background: var(--brand-red-soft); color: var(--brand-red); border-radius: 10px; }
.upgrade-banner-text strong { color: var(--ink); }
.upgrade-banner-text span { color: var(--ink-500); }
.signin-nudge { background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: var(--r); }
.signin-nudge-link, .signin-hint-link, .signin-nudge-link:hover, .signin-hint-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* 12. Step 2: the breadcrumb and facts row in the hero, and the two-column body with the rail (built by
   assets/js/tool-rail.js from the explanatory blocks and the related-tools cards) */
.page-hero-crumbs { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink-500); margin: 0 0 14px; }
.page-hero-crumbs a { color: var(--ink-500); text-decoration: none; }
.page-hero-crumbs a:hover { color: var(--ink); }
.tool-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; margin-top: 44px; }
.tool-body > .tool-info { margin-top: 0; max-width: 760px; }
.tool-rail { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 20px; min-width: 0; }   /* no inner scrollbar: a rail taller than the window pins its top and the rest shows as the page scrolls on */
.tool-rail-h { font-family: var(--fb); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); margin: 0 0 10px; font-weight: 600; }
.tool-rail-link { display: block; font-size: 14.5px; color: var(--ink-700); text-decoration: none; padding: 6px 0 6px 12px; border-left: 2px solid var(--ink-200); }
.tool-rail-link:hover { color: var(--ink); border-color: var(--ink); }
.tool-rail-cards { display: flex; flex-direction: column; gap: 8px; }
.tool-rail-cards .related-tool-card { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; padding: 12px 14px; border: 1px solid var(--ink-200); border-radius: var(--r); background: #fff; text-decoration: none; color: var(--ink-700); margin: 0; box-shadow: none; }
.tool-rail-cards .related-tool-card:hover { border-color: var(--ink); color: var(--ink-700); box-shadow: none; transform: none; }
.tool-rail-cards .related-tool-icon { grid-row: 1 / 3; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; background: var(--brand-red-soft); color: var(--brand-red); display: flex; align-items: center; justify-content: center; font-size: 16px; margin: 0; }
.tool-rail-cards .related-tool-name { grid-column: 2; font-family: var(--fb); font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.3; }
.tool-rail-cards .related-tool-description { grid-column: 2; font-size: 13px; color: var(--ink-500); margin: 2px 0 0; line-height: 1.45; }
.tool-rail-cards .related-tool-cta { display: none; }
.tool-rail-promo { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 16px 18px; }
.tool-rail-promo-h { color: #fff; font-size: 16px; margin: 0 0 4px; font-weight: 700; }
.tool-rail-promo-p { font-size: 13.5px; color: #cfc9c3; margin: 0 0 12px; line-height: 1.45; }
.tool-rail-promo-cta { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.tool-rail-promo-cta:hover { background: var(--ink-50); color: var(--ink); }
@media (max-width: 991.98px) {
    .tool-body { grid-template-columns: 1fr; gap: 36px; margin-top: 32px; }
    .tool-rail { position: static; }
}

/* 13. The icon set (assets/img/ke-icons.svg via ke_tool_icon()) and THE card: the tools home, the related-tools rail,
   the platform hubs (tools home mockup approved 2026-10-20) */
.ke-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; flex: 0 0 auto; }
.tools-cats { background: transparent; border: 0; padding: 0; margin: 0; }
.tools-cats > .container { max-width: 1180px; }
.tools-cats-head { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.tools-cats-label { display: flex; flex-direction: column; gap: 2px; }
.tools-cats-eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--ink-500); }
.tools-cats-total { font-size: 13.5px; color: var(--ink-500); }
.tools-cats .hero-search { flex: 0 1 380px; min-width: 220px; max-width: none; margin: 0; }
.tools-cats .hero-search-input { width: 100%; height: 52px; padding: 0 44px 0 42px; border: 1.5px solid var(--ink-200); border-radius: var(--r); font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
.tools-cats .hero-search-input:focus { outline: 0; border-color: var(--ink); box-shadow: var(--focus-ring); }
.tools-cats .hero-search-icon { left: 14px; }
.tools-cats-list { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; margin: 0; padding: 0; }
.tools-cat-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--ink-200); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.tools-cat-pill:hover { border-color: var(--ink); color: var(--ink); }
.tools-cat-pill .ke-icon { color: var(--brand-red); width: 16px; height: 16px; }
.tools-cat-pill i { font-style: normal; color: var(--ink-500); font-weight: 400; font-size: 13px; }
.tools-section { padding: 0; }
.tools-section > .container { max-width: 1180px; }
.tool-category { padding: 40px 0 8px; margin: 0; border: 0; background: transparent; }
.tool-category-header { display: flex; align-items: center; gap: 14px; padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px solid var(--ink-200); background: transparent; }
.tool-category-num { font-size: 12px; letter-spacing: .08em; color: var(--ink-500); font-variant-numeric: tabular-nums; font-weight: 600; }
.tool-category-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-red-soft); color: var(--brand-red); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 0; margin: 0; }
.tool-category-icon .ke-icon { width: 20px; height: 20px; }
.tool-category-name { font-size: 24px; font-weight: 700; flex: 1 1 auto; margin: 0; color: var(--ink); letter-spacing: -0.015em; }
.tool-category-count { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); font-weight: 600; white-space: nowrap; background: transparent; border: 0; padding: 0; margin-left: auto; }
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tools-grid .tool-card, .platform-grid .tool-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; align-items: start; padding: 16px 18px 18px; border: 1px solid var(--ink-200); border-radius: 12px; background: #fff; color: var(--ink-700); text-decoration: none; min-width: 0; box-shadow: none; transform: none; transition: border-color .15s ease, box-shadow .15s ease; }
.tools-grid .tool-card:hover, .platform-grid .tool-card:hover { border-color: var(--ink); color: var(--ink-700); box-shadow: 0 8px 24px -16px rgba(28, 26, 25, .25); transform: none; }
.tools-grid .tool-header, .platform-grid .tool-header { display: contents; }
.tools-grid .tool-icon, .platform-grid .tool-icon { grid-row: 1; width: 36px; height: 36px; border-radius: 9px; background: var(--brand-red-soft); color: var(--brand-red); display: flex; align-items: center; justify-content: center; margin: 0; font-size: 0; }
.tools-grid .tool-name, .platform-grid .tool-name { grid-column: 2; font-family: var(--fh); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); line-height: 1.2; margin: 0; display: flex; align-items: center; gap: 6px; min-height: 36px; }
.tools-grid .tool-description, .platform-grid .tool-description { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13.5px; color: var(--ink-500); line-height: 1.45; }
.tools-grid .tool-cta--soon { grid-column: 1 / -1; font-size: 12px; color: var(--ink-400); margin-top: 6px; }
.tools-grid .tool-card--disabled { opacity: .7; }
/* the rail reuses the card */
.tool-rail-cards .related-tool-card { grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; padding: 14px 16px 16px; border-radius: 12px; }
.tool-rail-cards .related-tool-icon { grid-row: 1; width: 36px; height: 36px; border-radius: 9px; font-size: 0; }
.tool-rail-cards .related-tool-name { font-family: var(--fh); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; display: flex; align-items: center; min-height: 36px; }
.tool-rail-cards .related-tool-description { grid-column: 1 / -1; margin-top: 4px; }
@media (max-width: 991.98px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tools-cats .hero-search { flex: 1 1 100%; } }
@media (max-width: 640px) { .tools-grid { grid-template-columns: 1fr; } .tools-cats-list, .tools-cats-total { display: none; } .tool-category-num { display: none; } .tool-category-name { font-size: 21px; } }

/* 14. Consolidation (audit of all 244 tools, 2026-10-20): the recurring per-tool control patterns, unified by their
   shape so no tool needs its own edit. Tab strips become the segmented control of .mode-toggle; option pills and chips
   get one outline look with a grey selected state; badges, hints and notes one type size; result cards one border. */
.tool-main [role="tablist"]:not(.mode-toggle) { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.tool-main [role="tablist"]:not(.mode-toggle) > button, .tool-main [role="tablist"]:not(.mode-toggle) > a { border: 0; background: transparent; color: var(--ink-500); padding: 7px 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 36px; line-height: 1.2; box-shadow: none; text-decoration: none; }
.tool-main [role="tablist"]:not(.mode-toggle) > button:hover, .tool-main [role="tablist"]:not(.mode-toggle) > a:hover { color: var(--ink); background: transparent; }
.tool-main [role="tablist"]:not(.mode-toggle) > .is-active, .tool-main [role="tablist"]:not(.mode-toggle) > [aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(28, 26, 25, .12); }
.tool-main button[class$="-pill"], .tool-main label[class$="-pill"], .tool-main button[class$="-chip"], .tool-main label[class$="-chip"], .tool-main a[class$="-pill"], .tool-main a[class$="-chip"] { border: 1.5px solid var(--ink-200); background: #fff; color: var(--ink-700); border-radius: 999px; font-weight: 500; box-shadow: none; }
.tool-main button[class$="-pill"]:hover, .tool-main label[class$="-pill"]:hover, .tool-main button[class$="-chip"]:hover, .tool-main label[class$="-chip"]:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.tool-main [class$="-pill"].is-active, .tool-main [class$="-pill"].is-selected, .tool-main [class$="-pill"][aria-pressed="true"], .tool-main [class$="-pill"][aria-checked="true"], .tool-main [class$="-chip"].is-active, .tool-main [class$="-chip"].is-selected, .tool-main [class$="-chip"][aria-pressed="true"] { background: var(--ink-50); border-color: var(--ink); color: var(--ink); font-weight: 600; }
.tool-main [class$="-badge"]:not(.results-badge) { font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 2px 8px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.tool-main [class$="-hint"], .tool-main [class$="-note"], .tool-main .form-hint, .tool-main .field-hint { font-size: 13px; line-height: 1.45; color: var(--ink-500); }
.tool-main [class$="-card"]:not(.tool-form-card):not(.tool-card):not(.related-tool-card) { border: 1px solid var(--ink-200); border-radius: 12px; background: #fff; box-shadow: none; }

/* ---------- 15. Hub pages (includes/hub-page.php: Free SEO Tools, the platform hubs, Marketing Calculators; 2026-10-20) ---------- */
.ke-hub .tools-section { padding: 0 0 56px; }
.ke-hub .tools-section > .container { max-width: 1180px; }
.ke-hub .tool-category { padding: 36px 0 8px; }
.ke-hub .tool-category:first-of-type { padding-top: 8px; }
.ke-hub .tools-cat-pill i { font-style: normal; color: var(--ink-500); font-weight: 400; font-size: 13px; }
.hub-all-tools { margin: 34px 0 0; padding: 18px 20px; border: 1px dashed var(--ink-200); border-radius: 12px; color: var(--ink-500); font-size: 14.5px; text-align: center; }
.hub-all-tools a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.hub-all-tools a:hover { color: var(--link-dark); }
.ke-hub .tool-info, .hub-info { max-width: none; }                            /* owner 2026-10-20: the text runs the full width on hubs */
.ke-hub .tool-info-faq .faq-answer { max-width: none; }
.page-hero-description strong { color: var(--ink); font-weight: 600; }

/* ---------- 16. Sign-in page (login/index.php; 2026-10-20) ---------- */
.ke-signin .container { max-width: 1180px; }
.signin { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 380px); gap: 32px; justify-content: center; align-items: start; padding: 24px 0 40px; }
.signin-card { background: #fff; border: 1px solid var(--ink-200); border-radius: 14px; padding: 30px 32px 28px; }
.signin-title { font-size: 30px; font-weight: 800; line-height: 1.15; margin: 0; }
.signin-sub { margin: 8px 0 22px; font-size: 15.5px; color: var(--ink-700); line-height: 1.5; }
.signin-error { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #e9c7c3; background: #fdf3f2; border-radius: var(--r); font-size: 14px; color: var(--link); }
.signin-form { margin: 0; }
.signin-row { display: flex; gap: 10px; align-items: flex-end; }
.signin-field { flex: 1 1 auto; min-width: 0; }
.signin-label { display: block; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; color: var(--ink-500); margin: 0 0 6px; }
.signin-input { width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--ink-200); border-radius: var(--r); font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
.signin-input::placeholder { color: var(--ink-400); }
.signin-input:focus { outline: 0; border-color: var(--ink); box-shadow: var(--focus-ring); }
.signin-btn { height: 50px; white-space: nowrap; flex: 0 0 auto; }
.signin-btn .icon { width: 16px; height: 16px; }
.signin-or { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; color: var(--ink-500); font-size: 13px; }
.signin-or::before, .signin-or::after { content: ""; flex: 1; height: 1px; background: var(--ink-200); }
.signin-fine { margin: 16px 0 0; font-size: 13px; color: var(--ink-500); }
.signin-fine a { color: var(--ink-500); text-decoration: underline; text-underline-offset: 3px; }
.signin-side { padding: 4px 0; }
.signin-side-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.signin-perks { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.signin-perks li { display: flex; gap: 10px; font-size: 15px; color: var(--ink-700); line-height: 1.45; }
.signin-perks .ke-icon { flex: 0 0 auto; width: 18px; height: 18px; color: var(--brand-red); margin-top: 3px; }
.signin-side p { font-size: 14.5px; color: var(--ink-500); line-height: 1.55; margin: 0 0 10px; }
.signin-side a { color: var(--link); }
@media (max-width: 991.98px) { .signin { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .signin-card { padding: 22px 18px; } .signin-title { font-size: 25px; } .signin-row { flex-direction: column; align-items: stretch; } .signin-btn { width: 100%; } }
.ke-hub .tool-info-body, .ke-hub .tool-info-body p, .ke-hub .tool-info-faq .faq-answer { max-width: none; }   /* owner 2026-10-20: full width on hubs */
