/* ============================================================
   Word & Character Counter - page specific styles
   Loaded only by word-counter.html (and localized variants).
   ============================================================ */

/* ---- Quick scenario buttons ---- */
.quick-scenarios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -4px 0 16px;
}

.quick-scenarios-label {
    margin-right: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.scenario-btn {
    padding: 7px 14px;
    border: 1.5px solid #1a73e8;
    border-radius: 999px;
    background: #fff;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.scenario-btn:hover,
.scenario-btn:focus-visible {
    background: #1a73e8;
    color: #fff;
    outline: none;
}

/* ---- Inline code inside answer / FAQ / long-form content ---- */
.geo-direct-answer code,
.faq-list code,
.seo-content code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #eef3fb;
    color: #0b4ea2;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.92em;
    word-break: break-word;
}

/* Long inline code must wrap rather than overflow the answer box, so the
   inherited word-break from the shared rule above is left to do its job. */

/* ---- Reference tables ---- */
.seo-table td.wc-num,
.seo-table th.wc-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.seo-table td.wc-num strong {
    color: #0b4ea2;
}

/* ---- Autosave hint ---- */
.wc-autosave-hint {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #5f6368;
}

/* ---- No-JS notice ---- */
.noscript-notice {
    margin: 0;
    padding: 14px 18px;
    background: #fff4e5;
    border-bottom: 1px solid #ffd7a8;
    color: #7a4a00;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .scenario-btn {
        padding: 6px 11px;
        font-size: 12px;
    }

    .seo-table td.wc-num,
    .seo-table th.wc-num {
        text-align: left;
    }
}

/* ---- Stats grid: 4 x 2 instead of an uneven auto-fit row ---- */
#wcStats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 768px) {
    #wcStats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* The pages card makes it nine stats, so the grid becomes 3 x 3 there.
   Scoped to the class so pages without the card keep their 4 x 2 layout. */
#wcStats.has-pages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
    #wcStats.has-pages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- In-card hints (CJK notice, live limit) ---- */
/* Reserved line keeps the card height stable when a hint appears/disappears. */
.word-stat-hint {
    min-height: 1.4em;
    margin-top: 4px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #5f6368;
}

.word-stat-hint.is-over {
    color: #b3261e;
    font-weight: 700;
}

.word-stat-hint.is-ok {
    color: #188038;
}

.word-stat-hint.is-cjk {
    color: #0b4ea2;
}

#wcInput.is-dragover {
    border-color: #1a73e8;
    background: #f3f8ff;
}

/* ---- Compare & target module ---- */
.wc-limits {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.wc-limits-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.wc-limit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 180px;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #333;
}

.wc-limit-field select,
.wc-limit-field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 400;
}

.wc-limit-field select:focus,
.wc-limit-field input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, .12);
}

.wc-progress {
    margin-top: 12px;
}

.wc-progress[hidden] {
    display: none;
}

.wc-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: #e3e8f0;
    overflow: hidden;
}

.wc-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #1a73e8;
    transition: width .18s ease, background .18s ease;
}

.wc-progress.is-complete .wc-progress-bar span {
    background: #188038;
}

.wc-progress-text {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: #5f6368;
    font-variant-numeric: tabular-nums;
}

/* ---- Preset word targets ---- */
.wc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px;
}

.wc-preset-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.wc-presets-label {
    font-size: 12px;
    font-weight: 700;
    color: #5f6368;
}

.wc-preset {
    padding: 4px 10px;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-family: inherit;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.wc-preset:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.wc-preset:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.wc-preset.is-active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}

.wc-preset.is-active:hover {
    color: #fff;
}

/* ---- Undo bar ---- */
.wc-undo {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 2147482000;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    font-size: 13.5px;
}

.wc-undo[hidden] {
    display: none;
}

.wc-undo-btn {
    padding: 5px 12px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.wc-undo-btn:hover,
.wc-undo-btn:focus-visible {
    background: #e8f0fe;
    color: #0b4ea2;
    outline: none;
}

/* ---- Small screens: usable counter ---- */
@media (max-width: 768px) {
    #wcInput {
        min-height: 180px;
    }

    .container-home .dev-tool-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .container-home .dev-tool-actions .dev-tool-btn {
        width: 100%;
        margin: 0;
    }

    .wc-limits-row {
        gap: 10px;
    }

    .wc-undo {
        left: 12px;
        right: 12px;
        bottom: 16px;
        transform: none;
        justify-content: space-between;
    }
}

@media (max-width: 420px) {
    .container-home .dev-tool-actions {
        grid-template-columns: 1fr;
    }
}

/* ---- Grammar check panel (external tools) ---- */
.wc-grammar {
    margin-top: 12px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #1a73e8;
    border-radius: 10px;
}

.wc-grammar > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
    list-style: none;
}

.wc-grammar > summary::-webkit-details-marker {
    display: none;
}

.wc-grammar > summary::after {
    content: '+';
    margin-left: auto;
    font-size: 17px;
    line-height: 1;
    color: #1a73e8;
}

.wc-grammar[open] > summary::after {
    content: '−';
}

.wc-grammar-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #e8f0fe;
    color: #1a73e8;
    font-size: 11px;
    font-weight: 700;
}

.wc-grammar-tag,
.wc-dupes-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef1f5;
    color: #5f6368;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wc-grammar-body {
    padding-bottom: 14px;
}

.wc-grammar-body p {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.65;
    color: #3c4043;
}

.wc-grammar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.wc-grammar .wc-grammar-go,
.wc-grammar .wc-grammar-alt {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.wc-grammar .wc-grammar-go {
    background: #1a73e8;
    color: #fff;
}

.wc-grammar .wc-grammar-go:hover,
.wc-grammar .wc-grammar-go:focus-visible {
    background: #1557b0;
    color: #fff;
}

.wc-grammar .wc-grammar-alt {
    background: #fff;
    border: 1px solid #d2d9e3;
    color: #1a2a6c;
}

.wc-grammar .wc-grammar-alt:hover,
.wc-grammar .wc-grammar-alt:focus-visible {
    border-color: #1a73e8;
    color: #1a73e8;
}

.wc-grammar .wc-grammar-go:focus-visible,
.wc-grammar .wc-grammar-alt:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.wc-grammar-note {
    margin: 0;
    font-size: 12.5px;
    color: #5f6368;
}

@media (max-width: 480px) {
    .wc-grammar-actions {
        flex-direction: column;
    }

    .wc-grammar .wc-grammar-go,
    .wc-grammar .wc-grammar-alt {
        justify-content: center;
        width: 100%;
    }
}

/* ---- Keyword density panel ---- */
.wc-keywords {
    margin-top: 12px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.wc-keywords > summary {
    display: block;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
    list-style: none;
}

.wc-keywords > summary::-webkit-details-marker {
    display: none;
}

.wc-keywords > summary::after {
    content: '+';
    float: right;
    font-size: 17px;
    line-height: 1;
    color: #1a73e8;
}

.wc-keywords[open] > summary::after {
    content: '−';
}

.wc-keywords-note {
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #5f6368;
}

.wc-keywords-body {
    padding: 0 0 14px;
}

.wc-keywords-empty {
    margin: 0;
    font-size: 13px;
    color: #5f6368;
}

.wc-kw-warning {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #9a6700;
}

/* ---- Style flags panel ---- */
.wc-style-body {
    padding: 0 0 14px;
}

.wc-style-summary {
    margin: 0 0 6px;
    font-size: 12.5px;
    color: #5f6368;
    font-variant-numeric: tabular-nums;
}

.wc-style-list {
    border-top: 1px solid #eef1f5;
}

.wc-style-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 7px 0;
    border-bottom: 1px solid #eef1f5;
}

.wc-style-count {
    flex: 0 0 auto;
    min-width: 30px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #fef3e2;
    color: #9a6700;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.wc-style-term {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.wc-style-hint {
    margin-inline-start: auto;
    font-size: 12px;
    color: #5f6368;
}

.wc-style-more {
    margin: 8px 0 0;
    font-size: 12px;
    color: #5f6368;
}

.wc-vocab {
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #d2e3fc;
    border-radius: 8px;
}

.wc-vocab-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.wc-vocab-pct {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.05;
    color: #1a73e8;
    font-variant-numeric: tabular-nums;
}

.wc-vocab-label {
    font-size: 13px;
    font-weight: 600;
    color: #3c4043;
}

.wc-vocab-count {
    margin: 2px 0 4px;
    font-size: 13px;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.wc-vocab-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #80868b;
}

.wc-kw-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
}

.wc-kw-group h4 {
    margin: 0 0 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #5f6368;
}

.wc-kw-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wc-kw-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #eef1f6;
    font-size: 13px;
}

.wc-kw-list li:last-child {
    border-bottom: 0;
}

.wc-kw-term {
    flex: 0 1 auto;
    max-width: 55%;
    font-weight: 600;
    color: #1f2937;
    overflow-wrap: anywhere;
}

.wc-kw-bar {
    flex: 1 1 40px;
    min-width: 24px;
    height: 4px;
    border-radius: 999px;
    background: #e3e8f0;
    overflow: hidden;
}

.wc-kw-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #1a73e8;
}

.wc-kw-meta {
    flex: 0 0 auto;
    font-size: 12px;
    color: #5f6368;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Panels toggle with the hidden attribute; a display rule on these blocks would
   silently outrank it, so the guard is explicit rather than global. */
.wc-kw-cjk[hidden],
.wc-read-result[hidden],
.wc-read-body [hidden],
.wc-keywords-body [hidden] {
    display: none !important;
}

/* The same guard for every other panel: a future display rule on a child (for
   example flex on .wc-wpm-result) would otherwise outrank the hidden attribute
   and leave stale controls visible. */
.wc-grammar [hidden],
.wc-dupes [hidden],
.wc-wpm [hidden],
.wc-style [hidden],
.wc-sent [hidden],
.wc-vocab [hidden] {
    display: none !important;
}

/* ---- CJK note inside the keyword / readability panels ---- */
.wc-kw-cjk {
    margin: 0 0 12px;
    padding: 8px 10px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #7a4b00;
    background: #fff8e6;
    border-left: 3px solid #f2b705;
    border-radius: 0 6px 6px 0;
}

/* ---- Readability panel ---- */
.wc-readability {
    margin-top: 12px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.wc-readability > summary {
    display: block;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
    list-style: none;
}

.wc-readability > summary::-webkit-details-marker {
    display: none;
}

.wc-readability > summary::after {
    content: '+';
    float: right;
    font-size: 17px;
    line-height: 1;
    color: #1a73e8;
}

.wc-readability[open] > summary::after {
    content: '−';
}

.wc-read-body {
    padding: 0 0 14px;
}

.wc-read-score {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 4px;
}

.wc-read-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.wc-read-scale {
    font-size: 13px;
    color: #80868b;
}

.wc-read-band {
    font-size: 13px;
    font-weight: 600;
    color: #1a73e8;
}

.wc-read-metrics {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #5f6368;
}

/* ---- Sentence length mix inside the readability panel ---- */
.wc-sent {
    margin-top: 12px;
}

.wc-sent-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin: 0 0 7px;
    font-size: 12.5px;
    line-height: 1.5;
}

.wc-sent-title {
    font-weight: 700;
    color: #1f2937;
}

.wc-sent-avg {
    color: #5f6368;
    font-variant-numeric: tabular-nums;
}

.wc-sent-bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    background: #e3e8f0;
    overflow: hidden;
}

.wc-sent-seg {
    display: block;
    width: 0;
    height: 100%;
    flex: 0 0 auto;
    transition: width .18s ease;
}

.wc-sent-short {
    background: #188038;
}

.wc-sent-mid {
    background: #f2b705;
}

.wc-sent-long {
    background: #d93025;
}

.wc-sent-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #5f6368;
    font-variant-numeric: tabular-nums;
}

.wc-sent-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wc-sent-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
}

/* ---- Repeated sentences / paragraphs panel ---- */
.wc-dupes {
    margin-top: 12px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.wc-dupes > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
    list-style: none;
}

.wc-dupes > summary::-webkit-details-marker {
    display: none;
}

.wc-dupes > summary::after {
    content: '+';
    margin-left: auto;
    font-size: 17px;
    line-height: 1;
    color: #1a73e8;
}

.wc-dupes[open] > summary::after {
    content: '−';
}

.wc-dupes-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
}

.wc-dupes-stale {
    font-size: 12.5px;
    line-height: 1.5;
    color: #9a6700;
}

.wc-dupes-controls .dev-tool-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.wc-dupes-body {
    padding: 0 0 14px;
}

.wc-dupes-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
}

.wc-dupes-groups.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.wc-dupes-group h4 {
    margin: 0 0 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #5f6368;
}

.wc-dup-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wc-dup-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #eef1f6;
    font-size: 13px;
    line-height: 1.5;
}

.wc-dup-row:last-child {
    border-bottom: 0;
}

.wc-dup-count {
    flex: 0 0 auto;
    min-width: 30px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #fef7e0;
    color: #9a6700;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.wc-dup-text {
    color: #1f2937;
    overflow-wrap: anywhere;
}

.wc-dup-more {
    margin: 6px 0 0;
    font-size: 12px;
    color: #5f6368;
}

/* ---- Writing speed timer panel ---- */
.wc-wpm {
    margin-top: 12px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.wc-wpm > summary {
    display: block;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
    list-style: none;
}

.wc-wpm > summary::-webkit-details-marker {
    display: none;
}

.wc-wpm > summary::after {
    content: '+';
    float: right;
    font-size: 17px;
    line-height: 1;
    color: #1a73e8;
}

.wc-wpm[open] > summary::after {
    content: '−';
}

.wc-wpm-body {
    padding: 0 0 14px;
}

.wc-wpm-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin: 0 0 12px;
}

.wc-wpm-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12.5px;
    color: #5f6368;
}

.wc-wpm-field input {
    width: 96px;
    padding: 8px 10px;
    border: 1px solid #d2d9e3;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
}

.wc-wpm-field input:focus-visible {
    border-color: #1a73e8;
    outline: 2px solid #1a73e8;
    outline-offset: 1px;
}

.wc-wpm-clock {
    margin: 0 0 2px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.wc-wpm-live {
    margin: 0;
    min-height: 1.3em;
    font-size: 13px;
    color: #5f6368;
}

.wc-wpm-result {
    margin: 10px 0 0;
    padding: 10px 12px;
    background: #f0f7ff;
    border: 1px solid #d2e3fc;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    color: #174ea6;
}

@media (max-width: 480px) {
    .wc-wpm-controls .dev-tool-btn,
    .wc-dupes-controls .dev-tool-btn {
        width: 100%;
        justify-content: center;
    }

    .wc-wpm-field {
        width: 100%;
    }

    .wc-wpm-field input {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .wc-kw-groups,
    .wc-dupes-groups {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   RTL (Arabic) overrides
   The rules above use physical properties; the mirroring below
   is what /ar/word-counter needs. Kept in this page stylesheet
   instead of inline <style> so all locales share one source.
   ============================================================ */

/* Labels sit on the inline-start side of their flex row */
[dir="rtl"] .quick-scenarios-label {
    margin-right: 0;
    margin-left: 6px;
}

/* Breadcrumb chevron points along the reading direction */
[dir="rtl"] .breadcrumb-sep {
    transform: scaleX(-1);
}

/* GEO answer accent bar belongs on the inline-start edge (right in RTL) */
[dir="rtl"] .geo-direct-answer {
    border-left: 0;
    border-right: 5px solid #1a73e8;
}

/* Table cells: main.css sets text-align: left, which is the wrong edge in RTL.
   This also wins over the base .wc-num rules (desktop right / mobile left),
   so numeric cells follow the start edge like their column headers. */
[dir="rtl"] .seo-content .seo-table th,
[dir="rtl"] .seo-content .seo-table td {
    text-align: right;
}

/* Sidebar group toggle arrow keeps its 2px breathing room on the correct side */
[dir="rtl"] .tool-group-toggle::after,
[dir="rtl"] .blog-group-toggle::after {
    margin-left: 0;
    margin-right: 2px;
}

/* CJK warning keeps its accent bar on the inline-start edge (right in RTL) */
[dir="rtl"] .wc-kw-cjk {
    border-left: 0;
    border-right: 3px solid #f2b705;
    border-radius: 6px 0 0 6px;
}

/* Panel +/- indicator follows the reading direction */
[dir="rtl"] .wc-keywords > summary::after,
[dir="rtl"] .wc-readability > summary::after {
    float: left;
}

/* Progress and keyword bars grow from the inline-start edge, so their fill
   should hug the right edge in RTL. The sentence-mix bar is flex and reverses
   its main axis on its own, so it needs no override. */
[dir="rtl"] .wc-progress-bar span,
[dir="rtl"] .wc-kw-bar span {
    margin-left: auto;
}
