/* Stylesheet for the pages under /tools/.
 *
 * Everything down to the "Added for /tools/" marker was lifted verbatim from the
 * inline <style> of free-pinterest-keyword-tool.html, so the tool pages share its
 * header, footer, buttons, cards and forms. That page keeps its own inline copy.
 * After editing this file run `npm run stamp:css`.
 */
:root {
    --primary: #d62d49;
    --secondary: #d62d49;
    --accent: #ffb400;
    --light: #f9f7f7;
    --dark: #2d232e;
    --gray: #686d83;
    --ink: #1f2430;
    --line: #e9e6ec;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--ink);
    line-height: 1.6;
    background: #fff;
}

a {
    text-decoration: none;
    color: var(--primary);
}

/* Links inside prose need more than colour to be distinguishable (WCAG 1.4.1). */
p a:not(.btn) {
    text-decoration: underline;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
    font-size: 16px;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(230, 61, 89, 0.28);
}

.btn-primary:hover {
    background: #d1354e;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(230, 61, 89, 0.36);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-ghost:hover {
    background: rgba(230, 61, 89, 0.06);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 38px;
    font-size: 17px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
header {
    padding: 14px 0;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--line);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 24px;
    color: var(--primary);
}

.logo span {
    /* Not --secondary: same red as --primary, collapsing the lockup.
       .footer-logo span stays red - it sits on the --dark footer. */
    color: var(--dark);
}

.logo-icon {
    margin-right: 10px;
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    font-weight: 500;
    color: var(--dark);
    font-size: 15px;
    transition: color 0.2s ease;
}

nav ul li a:hover {
    color: var(--primary);
}

.nav-cta {
    padding: 10px 22px;
    font-size: 15px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 26px;
    color: var(--dark);
}

/* Section rhythm */
section {
    padding: 96px 0;
}

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px;
}

.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 14px;
}

h2 {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    letter-spacing: -0.01em;
}

.section-head p {
    font-size: 18px;
    color: var(--gray);
    margin-top: 14px;
}

.tint {
    background: linear-gradient(180deg, #fdf6f7 0%, #fbf9fb 100%);
}

/* Tool hero */
.tool-hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, #fff 0%, #fdf5f6 100%);
}

.tool-hero h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--dark);
    margin-bottom: 18px;
    text-align: center;
}

.tool-hero h1 .hl {
    color: var(--primary);
}

.tool-intro {
    font-size: 18px;
    color: var(--gray);
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
}

.tool-box {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(45, 35, 46, 0.12);
    padding: 30px 30px 26px;
}

.tool-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.tool-form {
    display: flex;
    gap: 12px;
}

.tool-form input[type="text"] {
    flex: 1;
    font-family: inherit;
    font-size: 17px;
    color: var(--ink);
    padding: 13px 18px;
    border: 2px solid var(--line);
    border-radius: 12px;
    outline: none;
    min-width: 0;
}

.tool-form input[type="text"]:focus {
    border-color: var(--primary);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--gray);
}

.chip-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.counter-line {
    margin-top: 14px;
    font-size: 13px;
    color: var(--gray);
}

.counter-cta {
    font-weight: 600;
    /* Deeper than --primary: 13px/600 needs it to clear 4.5:1 on the
       card tint (same rule as .ke-mode-pill). */
    color: #c22342;
}

/* An all-unmeasured column: names, no bars. */
.kw-pending {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.kw-pending-name {
    font-size: 13px;
    color: var(--dark);
    background: #f4f1f5;
    border-radius: 999px;
    padding: 5px 12px;
}

.tool-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray);
}

/* Result card */
.result-area {
    max-width: 860px;
    margin: 26px auto 0;
}

.sample-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    /* Deeper than --primary: 12px/600 text on this tint needs it to
       clear the 4.5:1 AA floor (same rule as .ke-mode-pill). */
    color: #c22342;
    background: rgba(230, 61, 89, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.result-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: 0 20px 50px rgba(45, 35, 46, 0.08);
}

.result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.result-head h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--dark);
}

.vol-big {
    font-size: 30px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.vol-big small {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    margin-left: 8px;
}

.crumbs {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 18px;
}

.crumbs b {
    font-weight: 600;
    color: var(--dark);
}

.kw-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.kw-col {
    background: var(--light);
    border-radius: 12px;
    padding: 14px 18px 10px;
}

.kw-col h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray);
    margin-bottom: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e7e2e9;
}

.kw-row {
    display: grid;
    grid-template-columns: 1fr 128px;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.kw-row + .kw-row {
    border-top: 1px solid #e7e2e9;
}

.bars-note {
    font-size: 12px;
    color: var(--gray);
    margin-top: 10px;
}

.kw-name {
    font-size: 14px;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kw-vol {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kw-track {
    flex: 1;
    height: 8px;
    border-radius: 6px;
    background: #f0edf1;
    overflow: hidden;
}

.kw-fill {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: var(--gradient);
}

.kw-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    width: 44px;
    text-align: right;
}

.boards-line,
.freshness {
    font-size: 13px;
    color: var(--gray);
    margin-top: 16px;
}

.attribution {
    font-size: 12px;
    color: var(--gray);
    margin-top: 6px;
}

/* Locked panel */
.locked-card {
    margin-top: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 28px;
}

.locked-card h2 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--dark);
    margin-bottom: 6px;
}

.locked-card > p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 16px;
}

.locked-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    margin-bottom: 18px;
}

.locked-list li {
    font-size: 14px;
    color: var(--dark);
    padding-left: 24px;
    position: relative;
}

.locked-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    background: rgba(230, 61, 89, 0.08);
}

.kw-blur {
    position: relative;
    margin-bottom: 20px;
}

/* The blurred teaser washes out below AA, so its text colour is deepened
   to compensate (same rule as the homepage locked mock). */
.kw-blur .kw-rows {
    filter: blur(4px);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

.kw-blur .kw-rows .kw-name,
.kw-blur .kw-rows .kw-num {
    color: #191419;
}

.more-pill {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 30px;
    box-shadow: 0 8px 20px rgba(230, 61, 89, 0.35);
    white-space: nowrap;
}

.locked-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Gate and messages */
.gate-card {
    background: linear-gradient(180deg, #fff 0%, #fdf5f6 100%);
    border: 2px solid rgba(214, 45, 73, 0.35);
    border-radius: 16px;
    padding: 30px 28px;
    text-align: center;
}

.gate-card h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--dark);
    margin-bottom: 10px;
}

.gate-card p {
    font-size: 15px;
    color: var(--gray);
    max-width: 520px;
    margin: 0 auto 18px;
}

.gate-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.gate-note {
    font-size: 13px;
    color: var(--gray);
}

.miss-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 28px;
}

.miss-card h2 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--dark);
    margin-bottom: 8px;
}

.miss-card p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 12px;
}

.notify-form {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.notify-form .tool-label {
    margin-bottom: 6px;
}

.notify-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.notify-row input[type="email"] {
    flex: 1;
    min-width: 220px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    padding: 11px 16px;
    border: 2px solid var(--line);
    border-radius: 12px;
    outline: none;
}

.notify-row input[type="email"]:focus {
    border-color: var(--primary);
}

.consent-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 10px;
    font-size: 13px;
    color: var(--gray);
}

.consent-row input {
    margin-top: 4px;
}

.consent-row a {
    text-decoration: underline;
}

.form-msg {
    margin-top: 10px;
    font-size: 13px;
}

.form-msg.ok {
    color: #1a7a48;
}

.form-msg.err {
    color: var(--primary);
}

.error-note {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 26px;
    font-size: 15px;
    color: var(--gray);
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.step {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 32px 26px;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.step h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.step p {
    font-size: 15px;
    color: var(--gray);
}

.source-note {
    max-width: 720px;
    margin: 48px auto 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 28px;
}

.source-note h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.source-note p {
    font-size: 14px;
    color: var(--gray);
}

/* Worked example */
.example-card {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px 32px;
}

.example-card p {
    font-size: 16px;
    color: var(--gray);
}

.example-card p + p {
    margin-top: 12px;
}

.example-card b {
    color: var(--dark);
}

/* Comparison */
.cmp-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--line);
}

table.cmp {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    background: #fff;
}

table.cmp th,
table.cmp td {
    padding: 16px 18px;
    text-align: center;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

table.cmp th {
    font-weight: 600;
    color: var(--dark);
    background: #faf8fb;
}

table.cmp thead th.ours {
    background: var(--primary);
    color: #fff;
    font-size: 16px;
}

table.cmp td:first-child,
table.cmp th:first-child {
    text-align: left;
    color: var(--dark);
    font-weight: 500;
}

table.cmp td.ours {
    background: rgba(230, 61, 89, 0.05);
    font-weight: 600;
    color: var(--dark);
}

.yes {
    color: #1a9d5a;
    font-weight: 700;
}

.no {
    color: #c0bcc5;
    font-weight: 700;
}

/* FAQ */
.faq-wrap {
    max-width: 780px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--line);
}

.faq-q {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 22px 40px 22px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    position: relative;
    font-family: inherit;
}

.faq-q::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 400;
    color: var(--primary);
    transition: transform 0.2s ease;
}

.faq-item.open .faq-q::after {
    content: '−';
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.28s ease;
}

.faq-item.open .faq-a {
    visibility: visible;
}

.faq-a p {
    padding: 0 0 22px;
    font-size: 15px;
    color: var(--gray);
}

/* Author card */
.author-card {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 28px;
}

.author-avatar {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.author-card p {
    margin: 0 0 6px;
    font-size: 15px;
    color: var(--gray);
}

.author-card p.author-name {
    font-weight: 600;
    color: var(--dark);
}

.author-card p.author-updated {
    font-size: 13px;
    margin: 0;
}

/* Final CTA */
.final {
    background: var(--gradient);
    color: #fff;
    text-align: center;
}

.final h2 {
    color: #fff;
    font-size: 38px;
}

.final p {
    font-size: 19px;
    opacity: 0.94;
    margin: 16px 0 30px;
}

.final .btn-primary {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.final .btn-primary:hover {
    background: #fff;
}

.final .final-note {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 18px;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--secondary);
}

.footer-description {
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 20px;
    font-size: 15px;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer-column h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    font-size: 15px;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    font-size: 14px;
    opacity: 0.7;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    font-size: 14px;
    color: white;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-bottom-links a:hover {
    opacity: 1;
}

/* Sticky mobile CTA */
.mobile-cta {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
}

.section-foot {
    max-width: 780px;
    margin: 36px auto 0;
    text-align: center;
    font-size: 16px;
    color: var(--gray);
}

.section-foot b {
    color: var(--dark);
}

/* Keyword examples by niche */
.ex-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.ex-tab {
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--dark);
    cursor: pointer;
}

.ex-tab[aria-selected="true"] {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.ex-panel {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px 32px;
}

/* Until the tab script runs every panel shows, stacked. */
.ex-panel + .ex-panel {
    margin-top: 24px;
}

.ex-panel h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.ex-panel > p {
    font-size: 16px;
    color: var(--gray);
}

.ex-panel b {
    color: var(--dark);
}

.ex-table-wrap {
    margin: 20px 0 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

table.ex-table {
    width: 100%;
    border-collapse: collapse;
}

table.ex-table th,
table.ex-table td {
    padding: 11px 16px;
    text-align: left;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
}

table.ex-table tbody tr:last-child td {
    border-bottom: none;
}

table.ex-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray);
    background: #faf8fb;
}

table.ex-table th:last-child,
table.ex-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

table.ex-table td:last-child {
    font-weight: 600;
    color: var(--dark);
}

.ex-open {
    font-family: inherit;
    cursor: pointer;
}

.ex-panel > p.ex-related {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Finding search volume */
.method-list {
    max-width: 780px;
    margin: 0 auto;
    list-style: none;
    counter-reset: method;
}

.method-list li {
    counter-increment: method;
    position: relative;
    padding: 22px 26px 22px 78px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.method-list li + li {
    margin-top: 14px;
}

.method-list li::before {
    content: counter(method);
    position: absolute;
    left: 24px;
    top: 22px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-list h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.method-list p {
    font-size: 15px;
    color: var(--gray);
}

/* Using keywords */
.use-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.use-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 24px;
}

.use-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.use-card p {
    font-size: 15px;
    color: var(--gray);
}

.checker {
    margin-top: 48px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(45, 35, 46, 0.06);
}

.checker h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.checker-intro {
    font-size: 15px;
    color: var(--gray);
    margin: 6px 0 22px;
}

.checker-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
}

.checker-fields .tool-label {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}

.checker-fields .tool-label:first-child {
    margin-top: 0;
}

.chk-count {
    font-weight: 500;
    color: var(--gray);
}

.chk-count.over {
    color: var(--primary);
}

.checker-fields input,
.checker-fields textarea {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: var(--dark);
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: 12px;
    outline: none;
    resize: vertical;
}

.checker-fields input:focus,
.checker-fields textarea:focus {
    border-color: var(--primary);
}

.checker-out {
    background: var(--light);
    border-radius: 14px;
    padding: 20px 22px;
}

.chk-score {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
}

.chk-list {
    list-style: none;
}

.chk-list li {
    position: relative;
    padding: 7px 0 7px 30px;
    font-size: 14px;
    color: var(--dark);
}

.chk-list li + li {
    border-top: 1px solid #e7e2e9;
}

.chk-list li::before {
    position: absolute;
    left: 0;
    top: 7px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chk-list li.ok::before {
    content: "✓";
    background: #1a9d5a;
}

.chk-list li.warn::before {
    content: "!";
    background: #b86e00;
}

.chk-list li.bad::before {
    content: "✕";
    background: var(--primary);
}

table.cmp.cmp-text td,
table.cmp.cmp-text th {
    text-align: left;
}

table.cmp.cmp-text tbody th {
    font-weight: 600;
    color: var(--dark);
}

table.cmp.cmp-text td.ours {
    font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .faq-a,
    .btn,
    .chip-btn {
        transition: none;
    }
}

@media (pointer: coarse) {
    .chip-btn {
        padding: 11px 16px;
    }
}

/* Responsive */
@media (max-width: 991px) {
    section {
        padding: 76px 0;
    }
    h2 {
        font-size: 28px;
    }
    .tool-hero h1 {
        font-size: 34px;
    }
    .steps {
        grid-template-columns: 1fr;
    }
    .kw-cols {
        grid-template-columns: 1fr;
    }
    .locked-list {
        grid-template-columns: 1fr;
    }
    .use-grid {
        grid-template-columns: 1fr 1fr;
    }
    .checker-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .use-grid {
        grid-template-columns: 1fr;
    }
    .ex-panel,
    .checker {
        padding: 22px 18px;
    }
    .method-list li {
        padding: 20px 18px 20px 66px;
    }
    .method-list li::before {
        left: 16px;
    }
}

@media (max-width: 767px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 62px;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
        gap: 0;
        padding: 8px 0;
    }
    nav ul li {
        text-align: center;
        border-bottom: 1px solid var(--line);
    }
    nav ul li:last-child {
        border-bottom: none;
    }
    nav ul li a {
        display: block;
        padding: 14px;
    }
    .nav-cta {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .tool-hero {
        padding: 112px 0 60px;
    }
    .tool-hero h1 {
        font-size: 28px;
    }
    .tool-form {
        flex-direction: column;
    }
    .mobile-cta {
        display: block;
    }
    /* The fixed bar must not cover the last footer links. */
    body {
        padding-bottom: 76px;
    }
    .footer-column {
        flex: 100%;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Added for /tools/
   ========================================================================== */

/* A <button> does not inherit the page font by default. */
button.btn {
    font-family: inherit;
}

/* The tool's own action button. Deliberately not .btn-primary: on a tool page
   that class is reserved for the install CTA. */
.btn-tool {
    background: var(--dark);
    color: #fff;
}

.btn-tool:hover {
    background: #1d161e;
    transform: translateY(-2px);
}

.btn-tool:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

/* Breadcrumb, above the H1 */
.breadcrumb {
    font-size: 13px;
    color: var(--gray);
    text-align: center;
    margin-bottom: 18px;
}

.breadcrumb ol {
    list-style: none;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.breadcrumb li + li::before {
    content: "\203A";
    margin-right: 6px;
}

.breadcrumb a {
    color: var(--gray);
    text-decoration: underline;
}

/* Tool cards: the hub grid and the related-tools grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tool-card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 24px 22px;
    color: var(--ink);
    transition: all 0.2s ease;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(45, 35, 46, 0.10);
}

.tool-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 12px 0 6px;
}

.tool-card p {
    font-size: 14px;
    color: var(--gray);
}

/* Deeper than --primary: 11px/600 on a tint of itself needs it to clear
   4.5:1 (same rule as .counter-cta). */
.tool-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c22342;
    background: #fdeef1;
    border-radius: 999px;
    padding: 4px 10px;
}

.tool-badge.local {
    color: #1a5d7a;
    background: #e9f4f8;
}

/* Prose sections on tool pages */
.prose {
    max-width: 760px;
    margin: 0 auto;
}

.prose p {
    font-size: 16px;
    color: var(--gray);
}

.prose p + p {
    margin-top: 14px;
}

.prose h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--dark);
    margin: 28px 0 8px;
}

.prose ul {
    margin: 12px 0 0 20px;
    color: var(--gray);
}

.prose li + li {
    margin-top: 6px;
}

.prose b {
    color: var(--dark);
    font-weight: 600;
}

.example-load {
    margin-top: 20px;
    text-align: center;
}

/* The fixed header would otherwise cover the top of the app after a
   scrollIntoView. */
.tool-app {
    scroll-margin-top: 90px;
}

.result-area > * + * {
    margin-top: 20px;
}

/* Board name rows */
.bn-group + .bn-group {
    margin-top: 22px;
}

.bn-group h3 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
    padding-bottom: 8px;
    border-bottom: 1px solid #e7e2e9;
}

.bn-row {
    display: grid;
    /* Fixed side columns: each row is its own grid, so only fixed widths keep
       the header row aligned with the rows under it. */
    grid-template-columns: 1fr 136px 140px 72px;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.bn-row + .bn-row {
    border-top: 1px solid #e7e2e9;
}

.bn-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
    overflow-wrap: anywhere;
}

.bn-vol {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    text-align: right;
}

.bn-vol.pending {
    font-weight: 400;
    color: var(--gray);
}

/* A link, not a number: it needs more than colour (WCAG 1.4.1). */
a.bn-vol {
    color: #c22342;
    text-decoration: underline;
}

.bn-len {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 12px;
    color: var(--gray);
    text-align: right;
}

/* Column labels above the rows */
.bn-head {
    padding: 8px 0 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
}

.bn-head .bn-vol {
    font-size: 11px;
    color: var(--gray);
    white-space: nowrap;
}

/* A fixed-width count keeps the meters in one straight column. */
.bn-count {
    min-width: 36px;
    white-space: nowrap;
}

.bn-head .bn-len {
    display: block;
    font-size: 11px;
}

/* How much of the board name limit a name uses */
.bn-meter {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #e7e2e9;
    overflow: hidden;
}

.bn-meter i {
    display: block;
    height: 100%;
    background: var(--gray);
}

.bn-len.over .bn-meter i {
    background: #c22342;
}

.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;
}

.bn-len.over {
    color: #c22342;
    font-weight: 600;
}

.copy-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* What the website leaves out, and where to find it */
.bn-more {
    font-size: 14px;
    color: var(--dark);
    background: #fdeef1;
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
}

.bn-more a {
    color: #c22342;
    font-weight: 600;
    text-decoration: underline;
}

.bn-note {
    font-size: 13px;
    color: var(--gray);
    margin-top: 14px;
}

/* Where the mobile "email me the install link" form is mounted. */
.install-slot {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.install-slot:empty {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .tool-card,
    .copy-btn {
        transition: none;
    }
}

@media (pointer: coarse) {
    .copy-btn {
        padding: 11px 16px;
    }
}

@media (max-width: 991px) {
    .tool-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .bn-row {
        grid-template-columns: 1fr auto auto;
        row-gap: 4px;
    }

    .bn-name {
        grid-column: 1 / -1;
    }

    .bn-head {
        display: none;
    }

    /* No column labels on a phone, so the count names its unit. */
    .bn-count::after {
        content: " chars";
    }

    .bn-vol,
    .bn-len {
        text-align: left;
    }
}
