/* Duplicate Word Finder — CharacterCounter.com */

/* PAGE BASE AND LAYOUT */
.duplicate-word-finder-page {
    width: 100%;
    padding: 105px 15px 30px;
    color: #333;
    font-family: "Roboto", Arial, sans-serif;
}

.duplicate-word-finder-page,
.duplicate-word-finder-page *,
.duplicate-word-finder-page *::before,
.duplicate-word-finder-page *::after {
    box-sizing: border-box;
}

.duplicate-word-finder-page [hidden] {
    display: none !important;
}

.duplicate-word-finder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 28px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.duplicate-word-finder-main,
.duplicate-word-finder-tool-section {
    width: 100%;
    min-width: 0;
}

.duplicate-word-finder-page button,
.duplicate-word-finder-page textarea,
.duplicate-word-finder-page input,
.duplicate-word-finder-page select {
    font-family: "Roboto", Arial, sans-serif;
}

.duplicate-word-finder-page button {
    color: inherit;
}

.duplicate-word-finder-page a {
    color: #1155cc;
    text-decoration: none;
}

.duplicate-word-finder-page a:hover {
    text-decoration: underline;
}

/* PAGE HEADING */
.duplicate-word-finder-heading {
    margin: 0 0 22px;
    text-align: center;
}

.duplicate-word-finder-heading h1 {
    margin: 0 0 10px;
    padding: 0;
    color: #333;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
    overflow-wrap: break-word;
}

.duplicate-word-finder-intro {
    max-width: 720px;
    margin: 0 auto;
    color: #555;
    font-size: 17px;
    line-height: 1.55;
}

.duplicate-word-finder-notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #e3cf9b;
    border-radius: 7px;
    background: #fff9eb;
    color: #665022;
    font-size: 14px;
    line-height: 1.5;
}

/* INPUT AND HIGHLIGHTED TEXT */
.duplicate-word-finder-text-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.duplicate-word-finder-input-section,
.duplicate-word-finder-output-section {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.duplicate-word-finder-page .textarea-column-title {
    display: block;
    margin: 0 0 7px;
    color: #444;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
}

.duplicate-word-finder-input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 28px;
    margin: 0 0 7px;
}

.duplicate-word-finder-page .duplicate-word-finder-input-header .textarea-column-title {
    margin: 0;
}

.duplicate-word-finder-page .duplicate-word-finder-output-section .textarea-column-title {
    display: flex;
    align-items: center;
    min-height: 28px;
}

.duplicate-word-finder-page .duplicate-word-finder-textarea-wrapper {
    position: relative !important;
    width: 100%;
    min-width: 0;
}

.duplicate-word-finder-page .duplicate-word-finder-textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 310px;
    min-height: 60px;
    max-height: 560px;
    margin: 0;
    padding: 16px 17px 8px;
    border: 2px solid #c9ced6;
    border-radius: 10px;
    background: #fff;
    color: #222;
    outline: none;
    resize: vertical;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.55;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.duplicate-word-finder-page .duplicate-word-finder-textarea:hover {
    border-color: #aeb4bd;
}

.duplicate-word-finder-page .duplicate-word-finder-textarea:focus {
    border-color: #5f6368;
    box-shadow: 0 0 0 2px rgba(95, 99, 104, 0.08);
}

.duplicate-word-finder-page .duplicate-word-finder-textarea::placeholder {
    color: #8a8f98;
    opacity: 1;
}

.duplicate-word-finder-highlighted-text {
    width: 100%;
    height: 310px;
    min-height: 60px;
    max-height: 560px;
    margin: 0;
    padding: 16px 17px;
    border: 2px solid #c9ced6;
    border-radius: 10px;
    background: #fff;
    color: #222;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.55;
}

.duplicate-word-finder-placeholder {
    color: #8a8f98;
}

.duplicate-word-finder-highlighted-text .duplicate-word-color-0,
.duplicate-word-finder-highlighted-text .duplicate-word-color-1,
.duplicate-word-finder-highlighted-text .duplicate-word-color-2,
.duplicate-word-finder-highlighted-text .duplicate-word-color-3,
.duplicate-word-finder-highlighted-text .duplicate-word-color-4,
.duplicate-word-finder-highlighted-text .duplicate-word-color-5,
.duplicate-word-finder-highlighted-text .duplicate-word-color-6,
.duplicate-word-finder-highlighted-text .duplicate-word-color-7,
.duplicate-word-finder-highlighted-text .duplicate-word-color-8,
.duplicate-word-finder-highlighted-text .duplicate-word-color-9,
.duplicate-word-finder-highlighted-text .duplicate-word-color-10,
.duplicate-word-finder-highlighted-text .duplicate-word-color-11,
.duplicate-word-finder-highlighted-text .duplicate-word-color-12,
.duplicate-word-finder-highlighted-text .duplicate-word-color-13,
.duplicate-word-finder-highlighted-text .duplicate-word-color-14,
.duplicate-word-finder-highlighted-text .duplicate-word-color-15,
.duplicate-word-finder-highlighted-text .duplicate-word-color-16,
.duplicate-word-finder-highlighted-text .duplicate-word-color-17,
.duplicate-word-finder-highlighted-text .duplicate-word-color-18,
.duplicate-word-finder-highlighted-text .duplicate-word-color-19 {
    padding: 1px 2px;
    border-radius: 3px;
    color: #222;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* WORD COLOR PALETTE
   All colors use dark text and light backgrounds for legibility. */
.duplicate-word-color-0  { background-color: #fff0b8; } /* warm yellow */
.duplicate-word-color-1  { background-color: #f7d5d8; } /* muted rose */
.duplicate-word-color-2  { background-color: #d9efdc; } /* soft green */
.duplicate-word-color-3  { background-color: #d9eafe; } /* pale blue */
.duplicate-word-color-4  { background-color: #e8def8; } /* lavender */
.duplicate-word-color-5  { background-color: #ffe0c8; } /* peach */
.duplicate-word-color-6  { background-color: #e0e3e7; } /* light coal */
.duplicate-word-color-7  { background-color: #e6d9cf; } /* warm stone */
.duplicate-word-color-8  { background-color: #f0dfc4; } /* tan */
.duplicate-word-color-9  { background-color: #eee6d5; } /* beige */
.duplicate-word-color-10 { background-color: #dfc4ad; } /* light cocoa */
.duplicate-word-color-11 { background-color: #f0d3c8; } /* rose clay */
.duplicate-word-color-12 { background-color: #e5e9ca; } /* muted olive */
.duplicate-word-color-13 { background-color: #d0e7e4; } /* dusty teal */
.duplicate-word-color-14 { background-color: #ead9e6; } /* muted mauve */
.duplicate-word-color-15 { background-color: #dce4ef; } /* blue gray */
.duplicate-word-color-16 { background-color: #d5d7d9; } /* soft charcoal */
.duplicate-word-color-17 { background-color: #e8d2bd; } /* sand brown */
.duplicate-word-color-18 { background-color: #d7e6cf; } /* sage */
.duplicate-word-color-19 { background-color: #e9d8c5; } /* light taupe */

/* TEXTAREA ACTION BUTTON */
.duplicate-word-finder-page .duplicate-word-finder-textarea-wrapper > .duplicate-word-finder-textarea-actions {
    position: absolute !important;
    top: auto !important;
    right: 25px !important;
    bottom: 9px !important;
    left: auto !important;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    pointer-events: none;
}

.duplicate-word-finder-page .duplicate-word-finder-textarea-actions .duplicate-word-finder-action-button {
    pointer-events: auto;
}

.duplicate-word-finder-page .duplicate-word-finder-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 68px;
    min-height: 28px;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: rgba(243, 244, 246, 0.9);
    color: #444;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease,
        color 0.15s ease;
}

.duplicate-word-finder-action-button i {
    font-size: 15px;
    line-height: 1;
}

.duplicate-word-finder-page .duplicate-word-finder-action-button:hover {
    border-color: #aeb6bf;
    background: rgba(231, 234, 238, 0.96);
}

.duplicate-word-finder-page .duplicate-word-finder-action-button:disabled {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(243, 244, 246, 0.62);
    color: #9299a2;
    cursor: not-allowed;
    opacity: 0.8;
}

.duplicate-word-finder-page .duplicate-word-finder-action-button:disabled:hover {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(243, 244, 246, 0.62);
    color: #9299a2;
}

.duplicate-word-finder-action-button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* DUPLICATE WORD LIST */
.duplicate-word-finder-duplicate-list-section {
    width: 100%;
    min-width: 0;
    margin: 15px 0 0;
    padding: 14px 16px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fafbfc;
}

.duplicate-word-finder-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 5px;
}

.duplicate-word-finder-duplicate-list-section h2,
.duplicate-word-finder-plain-list-section h2 {
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
}

.duplicate-word-finder-word-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.duplicate-word-finder-word-chips > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
    padding: 5px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    color: #292929;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.duplicate-word-finder-empty-state {
    margin: 10px 0 0;
    color: #7a828c;
    font-size: 14px;
    line-height: 1.5;
}

/* PLAIN-TEXT DUPLICATE WORDS */
.duplicate-word-finder-plain-list-section {
    width: 100%;
    min-width: 0;
    margin: 10px 0 0;
    padding: 14px 16px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fafbfc;
}

.duplicate-word-finder-plain-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 9px;
}

.duplicate-word-finder-plain-list-box {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 68px;
    border: 1px solid #d7dce2;
    border-radius: 6px;
    background: #fff;
}

.duplicate-word-finder-plain-list-text {
    width: 100%;
    min-width: 0;
    min-height: 68px;
    margin: 0;
    padding: 10px 12px 46px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    user-select: text;
}

.duplicate-word-finder-plain-list-box .duplicate-word-finder-copy-words-button {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 1;
}

.duplicate-word-finder-plain-list-text.is-empty {
    color: #7a828c;
}

/* OPTIONS */
.duplicate-word-finder-options {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 18px 0 0;
    padding: 0;
    border: 0;
}

.duplicate-word-finder-options-title {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    color: #444;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
}

.duplicate-word-finder-option-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 11px 22px;
    width: 100%;
}

.duplicate-word-finder-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    color: #444;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.duplicate-word-finder-option:hover {
    color: #222;
}

.duplicate-word-finder-option input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #1a73e8;
    cursor: pointer;
}

.duplicate-word-finder-option input[type="checkbox"]:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 3px;
}

/* COMMON-WORDS INFORMATION POPUP */
.duplicate-word-finder-option-with-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.duplicate-word-finder-info-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    margin: 0;
    padding: 0;
    border: 1px solid #8a98a8;
    border-radius: 50%;
    background: #fff;
    color: #526171;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    font-style: italic;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease,
        color 0.15s ease;
}

.duplicate-word-finder-info-button:hover {
    border-color: #1a73e8;
    background: #f1f6ff;
    color: #1a73e8;
}

.duplicate-word-finder-info-button:focus-visible,
.duplicate-word-finder-info-close:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 3px;
}

.duplicate-word-finder-info-popup {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    z-index: 50;
    width: min(410px, calc(100vw - 32px));
    max-height: 300px;
    padding: 14px 15px;
    overflow: auto;
    border: 1px solid #d6dde7;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(25, 35, 50, 0.16);
    color: #333;
    text-align: left;
}

.duplicate-word-finder-info-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
}

.duplicate-word-finder-info-popup-header h3 {
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.duplicate-word-finder-info-close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    margin: -3px -4px 0 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #626b75;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.duplicate-word-finder-info-close:hover {
    background: #f1f3f5;
    color: #222;
}

.duplicate-word-finder-info-description {
    margin: 0 0 8px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.duplicate-word-finder-info-word-list {
    margin: 0;
    padding: 9px 10px;
    border: 1px solid #e4e7eb;
    border-radius: 6px;
    background: #f7f8fa;
    color: #383838;
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

/* SUMMARY METRICS */
.duplicate-word-finder-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 15px 0 0;
}

.duplicate-word-finder-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding: 11px 8px;
    border: 1px solid #dce1e7;
    border-radius: 7px;
    background: #f7f8fa;
    text-align: center;
}

.duplicate-word-finder-stat-label {
    color: #666;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}

.duplicate-word-finder-stat-value {
    max-width: 100%;
    color: #1a73e8;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.duplicate-word-finder-status,
.duplicate-word-finder-no-matches {
    margin: 8px 0 0;
    color: #666;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: break-word;
}

/* SEO ARTICLE */
.duplicate-word-finder-content {
    width: 100%;
    min-width: 0;
    margin-top: 34px;
    color: #333;
    font-size: 17px;
    line-height: 1.7;
    text-align: left;
    overflow-wrap: break-word;
}

.duplicate-word-finder-content h2 {
    margin: 34px 0 12px;
    padding: 0;
    color: #292929;
    font-size: 25px;
    line-height: 1.3;
    font-weight: 700;
}

.duplicate-word-finder-content > h2:first-child {
    margin-top: 0;
}

.duplicate-word-finder-content h3 {
    margin: 26px 0 9px;
    padding: 0;
    color: #333;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}

.duplicate-word-finder-content p {
    margin: 0 0 17px;
    padding: 0;
    color: #444;
    font-size: 17px;
    line-height: 1.7;
}

.duplicate-word-finder-content strong {
    color: #333;
}

.duplicate-word-finder-content ol,
.duplicate-word-finder-content ul {
    margin: 8px 0 20px 28px;
    padding: 0;
    color: #444;
    list-style-position: outside;
}

.duplicate-word-finder-content ol,
.duplicate-word-finder-content ol li {
    list-style-type: decimal;
}

.duplicate-word-finder-content ul,
.duplicate-word-finder-content ul li {
    list-style-type: disc;
}

.duplicate-word-finder-content li {
    margin-bottom: 8px;
    padding-left: 3px;
    color: #444;
    font-size: 17px;
    line-height: 1.65;
}

.duplicate-word-finder-related-tools {
    width: 100%;
    margin: 36px 0 0;
    padding: 22px;
    border: 1px solid #dce1e7;
    border-radius: 10px;
    background: #f7f9fc;
}

.duplicate-word-finder-content .duplicate-word-finder-related-tools h2 {
    margin: 0 0 8px;
    color: #292929;
    font-size: 23px;
}

.duplicate-word-finder-content .duplicate-word-finder-related-tools-intro {
    margin: 0 0 14px;
    color: #555;
    font-size: 15px;
    line-height: 1.55;
}

.duplicate-word-finder-related-tool-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px !important;
    padding: 0 !important;
    list-style: none !important;
}

.duplicate-word-finder-related-tool-links li {
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.duplicate-word-finder-related-tool-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    height: 100%;
    padding: 11px 13px;
    border: 1px solid #d6dde7;
    border-radius: 7px;
    background: #fff;
    color: #1155cc;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease,
        color 0.15s ease;
}

.duplicate-word-finder-related-tool-links a:hover {
    border-color: #a9c5ee;
    background: #eef5ff;
    color: #0b3d91;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.duplicate-word-finder-related-tool-links a:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.duplicate-word-finder-related-tool-callouts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.duplicate-word-finder-content .duplicate-word-finder-related-tool-callout {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fff;
}

.duplicate-word-finder-content .duplicate-word-finder-related-tool-callout h3 {
    margin: 0 0 5px;
    color: #343a40;
    font-size: 16px;
    line-height: 1.4;
}

.duplicate-word-finder-content .duplicate-word-finder-related-tool-callout p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.55;
}

.duplicate-word-finder-content .duplicate-word-finder-related-tool-callout a {
    color: #1155cc;
    text-decoration: none;
}

.duplicate-word-finder-content .duplicate-word-finder-related-tool-callout a:hover {
    color: #0b3d91;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ADVERTISING SIDEBAR */
.duplicate-word-finder-layout > #sidebar {
    width: 300px;
    min-width: 300px;
    min-height: 600px;
}

/* MEDIUM DESKTOP */
@media only screen and (max-width: 1200px) {
    .duplicate-word-finder-page {
        padding-right: 12px;
        padding-left: 12px;
    }

    .duplicate-word-finder-layout {
        gap: 24px;
    }

    .duplicate-word-finder-heading h1 {
        font-size: 30px;
    }

    .duplicate-word-finder-intro {
        font-size: 16px;
    }

    .duplicate-word-finder-text-columns {
        gap: 12px;
    }

    .duplicate-word-finder-page .duplicate-word-finder-textarea,
    .duplicate-word-finder-highlighted-text {
        height: 295px;
        min-height: 60px;
        max-height: 520px;
    }

    .duplicate-word-finder-content p,
    .duplicate-word-finder-content li {
        font-size: 16px;
    }

    .duplicate-word-finder-content h2 {
        font-size: 23px;
    }

    .duplicate-word-finder-content h3 {
        font-size: 19px;
    }
}

/* TABLET: USE THE FULL CONTENT WIDTH */
@media only screen and (max-width: 992px) {
    .duplicate-word-finder-layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 900px;
        gap: 0;
    }

    .duplicate-word-finder-layout > #sidebar {
        display: none;
    }

    .duplicate-word-finder-page {
        padding-top: 102px;
    }

    .duplicate-word-finder-text-columns {
        gap: 16px;
    }
}

/* SMALL TABLET */
@media only screen and (max-width: 700px) {
    .duplicate-word-finder-heading h1 {
        font-size: 29px;
    }

    .duplicate-word-finder-text-columns {
        gap: 12px;
    }

    .duplicate-word-finder-page .duplicate-word-finder-textarea,
    .duplicate-word-finder-highlighted-text {
        height: 275px;
        min-height: 60px;
        max-height: 480px;
    }

    .duplicate-word-finder-option-list {
        gap: 11px 18px;
    }
}

/* STACK THE INPUT AND HIGHLIGHTED TEXT ON NARROW SCREENS */
@media only screen and (max-width: 650px) {
    .duplicate-word-finder-text-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
    }

    .duplicate-word-finder-page .duplicate-word-finder-textarea,
    .duplicate-word-finder-highlighted-text {
        height: 240px;
        min-height: 60px;
        max-height: 440px;
    }
}

/* MOBILE */
@media only screen and (max-width: 600px) {
    .duplicate-word-finder-page {
        padding: 96px 10px 25px;
    }

    .duplicate-word-finder-heading {
        margin-bottom: 18px;
    }

    .duplicate-word-finder-heading h1 {
        margin-bottom: 8px;
        font-size: 27px;
    }

    .duplicate-word-finder-intro {
        font-size: 15px;
        line-height: 1.5;
    }

    .duplicate-word-finder-page .textarea-column-title {
        margin-bottom: 6px;
        font-size: 13px;
    }

    .duplicate-word-finder-page .duplicate-word-finder-textarea,
    .duplicate-word-finder-highlighted-text {
        height: 230px;
        min-height: 60px;
        max-height: 420px;
        border-radius: 8px;
        font-size: 16px;
        line-height: 1.5;
    }

    .duplicate-word-finder-page .duplicate-word-finder-textarea {
        padding: 14px 13px 8px;
    }

    .duplicate-word-finder-highlighted-text {
        padding: 14px 13px;
    }

    .duplicate-word-finder-duplicate-list-section,
    .duplicate-word-finder-plain-list-section {
        padding: 12px;
    }

    .duplicate-word-finder-list-header,
    .duplicate-word-finder-plain-list-header {
        gap: 8px;
    }

    .duplicate-word-finder-stats {
        gap: 7px;
    }

    .duplicate-word-finder-stat {
        padding: 9px 5px;
    }

    .duplicate-word-finder-stat-label {
        font-size: 12px;
    }

    .duplicate-word-finder-stat-value {
        font-size: 22px;
    }

    .duplicate-word-finder-content {
        margin-top: 28px;
    }

    .duplicate-word-finder-related-tools {
        margin-top: 28px;
        padding: 16px;
    }

    .duplicate-word-finder-content .duplicate-word-finder-related-tools h2 {
        font-size: 21px;
    }

    .duplicate-word-finder-related-tool-links {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .duplicate-word-finder-related-tool-links a {
        min-height: 44px;
    }

    .duplicate-word-finder-related-tool-callouts {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .duplicate-word-finder-content .duplicate-word-finder-related-tool-callout {
        padding: 12px 13px;
    }
}

/* VERY SMALL MOBILE */
@media only screen and (max-width: 390px) {
    .duplicate-word-finder-page {
        padding-right: 8px;
        padding-left: 8px;
    }

    .duplicate-word-finder-heading h1 {
        font-size: 26px;
    }

    .duplicate-word-finder-intro {
        font-size: 14px;
    }

    .duplicate-word-finder-page .duplicate-word-finder-textarea,
    .duplicate-word-finder-highlighted-text {
        height: 220px;
        min-height: 60px;
        max-height: 380px;
    }

    .duplicate-word-finder-stats {
        gap: 5px;
    }

    .duplicate-word-finder-stat-label {
        font-size: 11px;
    }

    .duplicate-word-finder-stat-value {
        font-size: 20px;
    }

    .duplicate-word-finder-content h2 {
        font-size: 21px;
    }

    .duplicate-word-finder-content h3 {
        font-size: 18px;
    }

    .duplicate-word-finder-info-popup {
        width: min(380px, calc(100vw - 24px));
        max-height: 270px;
    }
}

/* EXTRA NARROW SCREENS */
@media only screen and (max-width: 320px) {
    .duplicate-word-finder-heading h1 {
        font-size: 24px;
    }

    .duplicate-word-finder-option-list {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .duplicate-word-finder-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .duplicate-word-finder-stat {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .duplicate-word-finder-info-popup {
        width: calc(100vw - 20px);
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .duplicate-word-finder-page .duplicate-word-finder-textarea,
    .duplicate-word-finder-action-button,
    .duplicate-word-finder-info-button,
    .duplicate-word-finder-copy-words-button {
        transition: none;
    }
}