/* =========================================================
   UPSIDE DOWN TEXT GENERATOR — CharacterCounter.com

   File: upside-down-text-generator.css
   ========================================================= */


/* =========================================================
   PAGE BASE
   ========================================================= */

.udt-page {
    width: 100%;
    padding: 105px 15px 45px;

    background: #fff;
    color: #333;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;

    --udt-blue: #1a73e8;
    --udt-blue-dark: #1558aa;
    --udt-blue-light: #edf5ff;

    --udt-border: #dce2e9;
    --udt-text: #333;
    --udt-muted: #666;

    --udt-green: #237a40;
    --udt-green-light: #edf9f0;

    --udt-textarea-height: 180px;
    --udt-textarea-font-size: 17px;
    --udt-copy-height: 49px;

    --udt-unicode-font:
        "Noto Sans",
        "Noto Sans Phonetic",
        "Segoe UI",
        "Segoe UI Symbol",
        "Apple Symbols",
        "Cambria Math",
        "Noto Sans Math",
        "Doulos SIL",
        "Arial Unicode MS",
        Arial,
        "Roboto",
        sans-serif;
}


.udt-page,
.udt-page *,
.udt-page *::before,
.udt-page *::after {
    box-sizing: border-box;
}


.udt-page [hidden] {
    display: none !important;
}


.udt-page button,
.udt-page input {
    font-family: "Roboto", Arial, sans-serif;
}


.udt-page textarea {
    font-family: var(--udt-unicode-font);
}


.udt-page button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}


.udt-page button:disabled {
    cursor: not-allowed;
}


.udt-page a {
    color: #1155cc;
    text-decoration: none;
}


.udt-page a:hover {
    text-decoration: underline;
}


.udt-page a:focus-visible,
.udt-page button:focus-visible,
.udt-page input:focus-visible,
.udt-page textarea:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.3);
    outline-offset: 3px;
}


/* =========================================================
   MAIN PAGE LAYOUT
   ========================================================= */

.udt-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        300px;

    align-items: stretch;

    gap: 25px;

    width: 100%;
    max-width: 1400px;

    margin: 0 auto;
}


.udt-main {
    width: 100%;
    min-width: 0;
}


.udt-sidebar {
    display: block;

    width: 300px;
    min-width: 300px;
    min-height: 100%;

    align-self: stretch;

    margin: 0;
    padding: 0;
}


/* =========================================================
   PAGE HEADING
   ========================================================= */

.udt-heading {
    width: 100%;

    margin: 0 0 25px;
    padding: 0;

    text-align: center;
}


.udt-heading h1 {
    margin: 0 0 10px;
    padding: 0;

    color: #333;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;

    overflow-wrap: break-word;
}


.udt-intro {
    width: 100%;
    max-width: 800px;

    margin: 0 auto;
    padding: 0;

    color: #555;

    font-size: 16px;
    line-height: 1.55;
    font-weight: 400;
}


/* =========================================================
   JAVASCRIPT NOTICE
   ========================================================= */

.udt-notice {
    width: 100%;

    margin: 0 0 18px;
    padding: 12px 15px;

    border: 1px solid #e3cf9b;
    border-radius: 7px;

    background: #fff9eb;
    color: #665022;

    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   MAIN TOOL
   ========================================================= */

.udt-tool {
    display: flex;
    flex-direction: column;

    gap: 25px;

    width: 100%;
    min-width: 0;

    margin: 0 0 40px;
    padding: 0;
}


/* =========================================================
   WARNING AND ERROR MESSAGES
   ========================================================= */

.udt-warning {
    width: 100%;

    margin: 0;
    padding: 12px 15px;

    border: 1px solid #e3cf9b;
    border-radius: 8px;

    background: #fff9eb;
    color: #74531e;

    font-size: 14px;
    line-height: 1.55;

    overflow-wrap: anywhere;
}


.udt-warning.is-error {
    border-color: #e7b1b1;

    background: #fff1f1;
    color: #a12424;
}


.udt-warning.is-success {
    border-color: #a8d9b5;

    background: #f1fff4;
    color: #246b38;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.udt-section-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;

    gap: 8px 12px;

    width: 100%;

    margin: 0;
    padding: 0;
}


.udt-section-heading h2 {
    margin: 0;
    padding: 0;

    color: #333;

    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
}


/* =========================================================
   PRIMARY CONVERTER GRID

   Left: Your Text
   Right: Upside Down Text

   Both columns have equal widths.
   ========================================================= */

.udt-primary-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    align-items: start;

    gap: 20px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   PRIMARY INPUT AND OUTPUT SECTIONS
   ========================================================= */

.udt-input-section,
.udt-output-section {
    display: flex;
    flex-direction: column;

    align-items: stretch;

    gap: 10px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


.udt-input-section > .udt-section-heading,
.udt-output-section > .udt-section-heading {
    min-height: 30px;
}


/* =========================================================
   INPUT AND OUTPUT TEXTAREAS

   Both textareas use the same font size and line height.

   Each textarea owns its own border and native resize
   handle. No button areas are reserved inside the textareas.
   ========================================================= */

.udt-page .udt-input,
.udt-page .udt-output {
    display: block;

    flex: 0 0 auto;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    height: var(--udt-textarea-height);
    min-height: 90px;
    max-height: none;

    margin: 0;
    padding: 14px 15px;

    border: 2px solid #c9ced6;
    border-radius: 10px;

    background: #fff;
    color: #222;

    font-family: var(--udt-unicode-font);
    font-size: var(--udt-textarea-font-size);
    line-height: 1.65;
    font-weight: 400;

    letter-spacing: normal;
    text-transform: none;
    text-align: start;

    outline: none;
    box-shadow: none;

    resize: vertical;

    overflow-x: hidden;
    overflow-y: auto;

    overflow-wrap: anywhere;
    word-break: normal;
    white-space: pre-wrap;

    scrollbar-width: auto;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/* =========================================================
   INPUT TEXTAREA
   ========================================================= */

.udt-page .udt-input:hover {
    border-color: #aeb4bd;
}


.udt-page .udt-input:focus,
.udt-page .udt-input:focus-visible {
    border-color: var(--udt-blue);

    outline: none;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}


/* =========================================================
   OUTPUT TEXTAREA
   ========================================================= */

.udt-page .udt-output {
    border-color: #bfd3ed;

    background: #f8fbff;
    color: #222;

    cursor: text;
}


.udt-page .udt-output:hover {
    border-color: #a3c1e7;
}


.udt-page .udt-output:focus,
.udt-page .udt-output:focus-visible {
    border-color: var(--udt-blue);

    outline: none;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}


.udt-page .udt-output[readonly] {
    opacity: 1;

    -webkit-text-fill-color: #222;
}


/* =========================================================
   TEXTAREA PLACEHOLDERS
   ========================================================= */

.udt-page .udt-input::placeholder,
.udt-page .udt-output::placeholder {
    color: #9299a2;

    opacity: 1;

    -webkit-text-fill-color: #9299a2;

    font-family: var(--udt-unicode-font);
    font-size: var(--udt-textarea-font-size);
    line-height: 1.65;
    font-weight: 400;
}


/* =========================================================
   TEXT SELECTION
   ========================================================= */

.udt-page .udt-input::selection,
.udt-page .udt-output::selection {
    background: #cde2ff;
    color: #222;
}


/* =========================================================
   INPUT AND OUTPUT ACTIONS

   Buttons are completely outside the textareas, leaving
   the entire text area available for typing and scrolling.
   ========================================================= */

.udt-input-actions,
.udt-output-actions {
    display: flex;

    flex: 0 0 auto;

    align-items: center;

    gap: 7px;

    width: 100%;
    min-width: 0;

    min-height: var(--udt-copy-height);

    margin: 0;
    padding: 0;

    border: 0;

    background: transparent;
}


.udt-input-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}


.udt-output-actions {
    justify-content: stretch;
}


/* =========================================================
   CLEAR AND UNDO BUTTONS
   ========================================================= */

.udt-page .udt-inline-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    min-height: 35px;

    margin: 0;
    padding: 7px 12px;

    border: 1px solid #cbd7e7;
    border-radius: 6px;

    background: #fff;
    color: #145ba8;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;

    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05);

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}


.udt-inline-button i {
    flex-shrink: 0;

    font-size: 16px;
    line-height: 1;
}


.udt-page .udt-inline-button:hover:not(:disabled) {
    border-color: #9bbce5;

    background: #e5f0ff;
    color: #104b8d;
}


.udt-page .udt-inline-button:active:not(:disabled) {
    background: #d8e9ff;
}


.udt-page .udt-inline-button:disabled {
    border-color: #d7dce3;

    background: #f5f6f8;
    color: #8a919a;

    opacity: 1;
    box-shadow: none;

    cursor: not-allowed;
}


/* =========================================================
   PRIMARY COPY BUTTON
   ========================================================= */

.udt-page .udt-copy-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-width: 0;

    margin: 0;
    padding: 10px 15px;

    border: 1px solid var(--udt-blue);
    border-radius: 7px;

    background: var(--udt-blue);
    color: #fff;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;

    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.udt-page .udt-primary-copy-button {
    width: 100%;
    min-height: var(--udt-copy-height);

    padding: 10px 18px;

    border-radius: 8px;

    font-size: 17px;
    font-weight: 600;

    box-shadow:
        0 2px 5px rgba(26, 115, 232, 0.15);
}


.udt-copy-button i {
    flex-shrink: 0;

    font-size: 18px;
    line-height: 1;
}


.udt-primary-copy-button i {
    font-size: 21px;
}


.udt-copy-button span {
    min-width: 0;

    overflow-wrap: anywhere;
}


.udt-page .udt-copy-button:hover:not(:disabled) {
    border-color: var(--udt-blue-dark);

    background: var(--udt-blue-dark);
}


.udt-page .udt-copy-button:active:not(:disabled) {
    background: #104b92;
}


.udt-page .udt-copy-button:disabled {
    border-color: #e1e9f3;

    background: #e1e9f3;
    color: #8293a8;

    opacity: 1;

    box-shadow: none;

    cursor: not-allowed;
}


/* =========================================================
   COPY SUCCESS STATE
   ========================================================= */

.udt-page .udt-copy-button.is-copied,
.udt-page .udt-copy-button.copied,
.udt-page .udt-copy-button.is-copied:hover,
.udt-page .udt-copy-button.copied:hover {
    border-color: var(--udt-green);

    background: var(--udt-green);
    color: #fff;

    box-shadow: none;
}


/* =========================================================
   FLIP SETTINGS
   ========================================================= */

.udt-settings {
    display: flex;
    flex-direction: column;

    gap: 17px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 19px 20px;

    border: 1px solid #dce2e9;
    border-radius: 10px;

    background: #f8fafc;
}


.udt-settings .udt-section-heading {
    margin: 0;
}


.udt-settings .udt-section-heading h2 {
    font-size: 21px;
}


/* =========================================================
   CONVERSION MODE FIELDSET
   ========================================================= */

.udt-mode-fieldset {
    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    border: 0;
}


.udt-setting-label {
    display: block;

    width: 100%;

    margin: 0 0 9px;
    padding: 0;

    color: #333;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
}


/* =========================================================
   CONVERSION MODE OPTIONS
   ========================================================= */

.udt-mode-options {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    width: 100%;
    min-width: 0;
}


.udt-radio-option {
    display: flex;

    align-items: center;

    gap: 9px;

    width: 100%;
    min-width: 0;
    min-height: 45px;

    margin: 0;
    padding: 10px 12px;

    border: 1px solid #d7dfe8;
    border-radius: 7px;

    background: #fff;
    color: #444;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}


.udt-radio-option:hover {
    border-color: #abc8ef;

    background: #f4f9ff;
}


.udt-radio-option:has(input:checked),
.udt-radio-option.is-selected {
    border-color: #8bb8ef;

    background: #edf5ff;
    color: #145ba8;
}


.udt-radio-option:has(input:focus-visible) {
    outline: 3px solid rgba(26, 115, 232, 0.2);
    outline-offset: 2px;
}


.udt-radio-option input[type="radio"] {
    display: block;

    flex: 0 0 auto;

    width: 17px;
    height: 17px;

    margin: 0;
    padding: 0;

    accent-color: var(--udt-blue);

    cursor: pointer;
}


.udt-radio-option span {
    min-width: 0;

    overflow-wrap: anywhere;
}


/* =========================================================
   CHECKBOX SETTINGS
   ========================================================= */

.udt-checkbox-options {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    align-items: start;

    gap: 16px 20px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


.udt-checkbox-option {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    cursor: pointer;
}


.udt-checkbox-option input[type="checkbox"] {
    display: block;

    flex: 0 0 auto;

    width: 17px;
    height: 17px;

    margin: 3px 0 0;
    padding: 0;

    accent-color: var(--udt-blue);

    cursor: pointer;
}


.udt-option-content {
    display: flex;
    flex-direction: column;

    gap: 3px;

    min-width: 0;
}


.udt-option-title {
    display: block;

    color: #333;

    font-size: 15px;
    line-height: 1.45;
    font-weight: 500;
}


.udt-option-description {
    display: block;

    color: #777;

    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
}


.udt-checkbox-option:hover .udt-option-title {
    color: #145ba8;
}


.udt-checkbox-option:has(input:disabled) {
    opacity: 0.5;

    cursor: not-allowed;
}


.udt-checkbox-option input:disabled {
    cursor: not-allowed;
}


/* =========================================================
   COMPATIBILITY NOTES
   ========================================================= */

.udt-compatibility-note {
    display: flex;

    align-items: flex-start;

    gap: 8px;

    width: 100%;

    margin: 12px 0 0;
    padding: 0;

    color: #777;

    font-size: 13px;
    line-height: 1.6;
    font-weight: 400;

    overflow-wrap: anywhere;
}


.udt-compatibility-note i {
    flex: 0 0 auto;

    margin-top: 2px;

    color: #78889b;

    font-size: 17px;
    line-height: 1.25;
}


.udt-compatibility-note span {
    min-width: 0;
}


.udt-settings .udt-compatibility-note {
    margin: 0;
    padding: 11px 12px;

    border: 1px solid #dce5ef;
    border-radius: 6px;

    background: #fff;
}


/* =========================================================
   CHARACTER CHART SECTIONS
   ========================================================= */

.udt-alphabet-section {
    display: flex;
    flex-direction: column;

    gap: 16px;

    width: 100%;
    min-width: 0;

    margin: 0 0 36px;
    padding: 0;

    scroll-margin-top: 100px;
}


.udt-alphabet-section > h2,
.udt-alphabet-section > .udt-alphabet-header h2 {
    margin: 0;
    padding: 0;

    color: #333;

    font-size: 26px;
    line-height: 1.35;
    font-weight: 700;

    overflow-wrap: anywhere;
}


.udt-alphabet-intro {
    margin: -5px 0 0;
    padding: 0;

    color: #555;

    font-size: 15px;
    line-height: 1.65;
}


/* =========================================================
   ALPHABET GROUP CARDS
   ========================================================= */

.udt-alphabet-group {
    display: flex;
    flex-direction: column;

    gap: 13px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 17px;

    border: 1px solid #dce2e9;
    border-radius: 9px;

    background: #fff;
}


/* =========================================================
   ALPHABET HEADERS
   ========================================================= */

.udt-alphabet-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;

    gap: 10px 15px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


.udt-alphabet-header h2,
.udt-alphabet-header h3 {
    flex: 1 1 auto;

    min-width: 0;

    margin: 0;
    padding: 0;

    color: #333;

    line-height: 1.4;
    font-weight: 700;

    overflow-wrap: anywhere;
}


.udt-alphabet-header h3 {
    font-size: 18px;
}


/* =========================================================
   ALPHABET COPY BUTTONS
   ========================================================= */

.udt-page .udt-alphabet-copy-button {
    display: inline-flex;

    flex: 0 0 auto;

    align-items: center;
    justify-content: center;

    gap: 6px;

    min-width: 110px;
    min-height: 35px;

    margin: 0;
    padding: 7px 11px;

    border: 1px solid #cbdaf0;
    border-radius: 6px;

    background: #f2f7ff;
    color: #145ba8;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}


.udt-alphabet-copy-button i {
    flex-shrink: 0;

    font-size: 16px;
    line-height: 1;
}


.udt-page .udt-alphabet-copy-button:hover:not(:disabled) {
    border-color: #9cbce6;

    background: #e1edff;
    color: #104b8d;
}


.udt-page .udt-alphabet-copy-button:active:not(:disabled) {
    background: #d2e5ff;
}


.udt-page .udt-alphabet-copy-button:disabled {
    opacity: 0.5;

    cursor: not-allowed;
}


.udt-page .udt-alphabet-copy-button.is-copied,
.udt-page .udt-alphabet-copy-button.copied {
    border-color: #a9d3b3;

    background: #edf9f0;
    color: #237a40;
}


/* =========================================================
   CHARACTER GRID

   All characters wrap naturally. No horizontal scrolling
   is necessary for alphabet or symbol charts.
   ========================================================= */

.udt-character-grid {
    display: grid;

    grid-template-columns:
        repeat(13, minmax(0, 1fr));

    gap: 7px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


.udt-number-grid {
    grid-template-columns:
        repeat(10, minmax(0, 1fr));
}


.udt-symbol-grid {
    grid-template-columns:
        repeat(12, minmax(0, 1fr));
}


/* =========================================================
   INDIVIDUAL CHARACTER BUTTONS
   ========================================================= */

.udt-page button.udt-character {
    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 2px;

    width: 100%;
    min-width: 0;
    height: 72px;
    min-height: 72px;

    margin: 0;
    padding: 5px 3px;

    border: 1px solid #dce2e9;
    border-radius: 7px;

    background: #f8fafc;
    color: #333;

    font-family: var(--udt-unicode-font);
    font-weight: 400;

    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        color 0.15s ease;
}


.udt-page button.udt-character:hover {
    border-color: #96b9e7;

    background: #edf5ff;
    color: #145ba8;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.05);
}


.udt-page button.udt-character:active {
    border-color: #729fdd;

    background: #dcecff;
}


/* =========================================================
   ORIGINAL CHARACTER LABEL
   ========================================================= */

.udt-original-character {
    display: block;

    flex: 0 0 auto;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #777;

    font-family: var(--udt-unicode-font);
    font-size: 12px;
    line-height: 1.25;
    font-weight: 400;

    text-align: center;
}


/* =========================================================
   FLIPPED CHARACTER VALUE
   ========================================================= */

.udt-flipped-character {
    display: flex;

    flex: 0 0 auto;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 36px;

    margin: 0;
    padding: 0 1px;

    color: inherit;

    font-family: var(--udt-unicode-font);
    font-size: 29px;
    line-height: 1.25;
    font-weight: 400;

    text-align: center;

    white-space: nowrap;
}


/* =========================================================
   COPIED CHARACTER STATE
   ========================================================= */

.udt-page button.udt-character.is-copied,
.udt-page button.udt-character.copied {
    border-color: #91c9a0;

    background: #edf9f0;
    color: #237a40;

    box-shadow: none;
}


.udt-character.is-copied .udt-original-character,
.udt-character.copied .udt-original-character {
    color: #237a40;
}


.udt-character.is-copied .udt-flipped-character,
.udt-character.copied .udt-flipped-character {
    color: #237a40;
}


/* =========================================================
   OPTIONAL CHARACTER COPY CHECKMARK
   ========================================================= */

.udt-character-copy-indicator {
    position: absolute;

    top: 3px;
    right: 4px;

    display: none;

    color: #237a40;

    font-size: 12px;
    line-height: 1;
}


.udt-character.is-copied .udt-character-copy-indicator,
.udt-character.copied .udt-character-copy-indicator {
    display: block;
}


/* =========================================================
   INFORMATIONAL ARTICLE
   ========================================================= */

.udt-article {
    width: 100%;
    min-width: 0;

    margin: 40px 0 0;
    padding: 30px 0 0;

    border-top: 1px solid #e1e5ea;

    color: #333;

    font-size: 16px;
    line-height: 1.75;
}


.udt-article-section {
    width: 100%;
    min-width: 0;

    margin: 0 0 34px;
    padding: 0;

    scroll-margin-top: 100px;
}


.udt-article-section:last-child {
    margin-bottom: 0;
}


/* =========================================================
   ARTICLE HEADINGS
   ========================================================= */

.udt-article h2 {
    margin: 0 0 13px;
    padding: 0;

    color: #333;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 26px;
    line-height: 1.35;
    font-weight: 700;

    overflow-wrap: break-word;
}


.udt-article h3 {
    margin: 0 0 10px;
    padding: 0;

    color: #333;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;

    overflow-wrap: break-word;
}


/* =========================================================
   ARTICLE PARAGRAPHS
   ========================================================= */

.udt-article p {
    margin: 0 0 15px;
    padding: 0;

    color: #444;

    font-size: 16px;
    line-height: 1.75;
    font-weight: 400;

    overflow-wrap: anywhere;
}


.udt-article p:last-child {
    margin-bottom: 0;
}


.udt-article strong {
    color: #333;

    font-weight: 700;
}


/* =========================================================
   ARTICLE LINKS
   ========================================================= */

.udt-article a {
    color: #1155cc;

    text-decoration: none;

    overflow-wrap: anywhere;
}


.udt-article a:hover {
    text-decoration: underline;
}


/* =========================================================
   ARTICLE LISTS
   ========================================================= */

.udt-article ul,
.udt-article ol {
    display: block;

    width: 100%;

    margin: 13px 0 18px;
    padding: 0 0 0 27px;
}


.udt-article ul {
    list-style: disc outside;
}


.udt-article ol {
    list-style: decimal outside;
}


.udt-article li {
    display: list-item;

    margin: 0 0 8px;
    padding: 0 0 0 2px;

    color: #444;

    font-size: 16px;
    line-height: 1.65;
}


.udt-article li:last-child {
    margin-bottom: 0;
}


/* =========================================================
   TEXT EXAMPLE BOX
   ========================================================= */

.udt-text-example {
    display: flex;
    flex-direction: column;

    gap: 7px;

    width: 100%;
    min-width: 0;

    margin: 18px 0 20px;
    padding: 17px 19px;

    border: 1px solid #dce5f0;
    border-left: 4px solid #8bb5e9;

    border-radius: 7px;

    background: #f8fbff;
}


.udt-example-label {
    display: block;

    margin: 0;
    padding: 0;

    color: #555;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}


.udt-article .udt-text-example p {
    margin: 0 0 8px;
    padding: 0;

    color: #333;

    font-family: var(--udt-unicode-font);
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;

    overflow-wrap: anywhere;
}


.udt-article .udt-text-example p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   UNICODE EXAMPLES
   ========================================================= */

.udt-unicode-example {
    font-family: var(--udt-unicode-font);

    font-weight: 400;

    letter-spacing: normal;
    text-transform: none;

    overflow-wrap: anywhere;
}


.udt-article .udt-unicode-example {
    font-family: var(--udt-unicode-font);
}


.udt-article .udt-text-example .udt-unicode-example {
    font-size: 18px;
}


/* =========================================================
   TABLE WRAPPER
   ========================================================= */

.udt-table-wrapper {
    width: 100%;
    min-width: 0;

    margin: 18px 0 20px;
    padding: 0;

    border: 1px solid #dce2e9;
    border-radius: 8px;

    background: #fff;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
}


/* =========================================================
   EXAMPLE TABLES
   ========================================================= */

.udt-example-table {
    width: 100%;

    margin: 0;
    padding: 0;

    border: 0;
    border-collapse: collapse;

    table-layout: fixed;

    background: #fff;

    font-size: 15px;
}


.udt-example-table th,
.udt-example-table td {
    width: 50%;

    padding: 12px 15px;

    border: 0;
    border-bottom: 1px solid #e1e5ea;

    text-align: left;
    vertical-align: middle;

    overflow-wrap: anywhere;
    word-break: normal;
}


.udt-example-table th + th,
.udt-example-table td + td {
    border-left: 1px solid #e1e5ea;
}


.udt-example-table thead th {
    background: #edf3fa;
    color: #33465f;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}


.udt-example-table tbody td {
    color: #444;

    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}


.udt-example-table tbody tr:nth-child(even) {
    background: #f8fafc;
}


.udt-example-table tbody tr:last-child td {
    border-bottom: 0;
}


.udt-example-table .udt-unicode-example {
    font-family: var(--udt-unicode-font);
    font-size: 15px;
}


/* =========================================================
   FREQUENTLY ASKED QUESTIONS
   ========================================================= */

.udt-faq-section {
    margin-top: 35px;
}


.udt-faq-section > h2 {
    margin-bottom: 7px;
}


.udt-faq-item {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 17px 0;

    border-bottom: 1px solid #e4e8ed;
}


.udt-faq-item:last-child {
    padding-bottom: 0;

    border-bottom: 0;
}


.udt-article .udt-faq-item h3 {
    margin: 0 0 8px;

    color: #333;

    font-size: 18px;
    line-height: 1.45;
    font-weight: 600;
}


.udt-article .udt-faq-item p {
    margin: 0;

    font-size: 16px;
    line-height: 1.7;
}


/* =========================================================
   RELATED TOOLS
   ========================================================= */

.udt-related-section {
    width: 100%;

    margin-top: 35px;
    padding-top: 23px;

    border-top: 1px solid #e1e5ea;
}


.udt-related-section h2 {
    margin-bottom: 17px;
}


.udt-article .udt-related-tools {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 11px 18px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    list-style: none;
}


.udt-article .udt-related-tools li {
    display: block;

    min-width: 0;

    margin: 0;
    padding: 0;

    list-style: none;
}


.udt-related-tools a {
    display: inline-block;

    color: #1155cc;

    font-family: "Roboto", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;

    overflow-wrap: anywhere;
}


.udt-related-tools a:hover {
    text-decoration: underline;
}


/* =========================================================
   SCREEN READER ONLY
   ========================================================= */

.udt-sr-only {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    border: 0 !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%);

    white-space: nowrap !important;
}


/* =========================================================
   RESPONSIVE — LARGE DESKTOP
   ========================================================= */

@media screen and (min-width: 1600px) {

    .udt-page {
        --udt-textarea-height: 200px;
    }

}


/* =========================================================
   RESPONSIVE — MEDIUM DESKTOP
   ========================================================= */

@media screen and (max-width: 1250px) {

    .udt-layout {
        gap: 20px;
    }


    .udt-primary-grid {
        gap: 17px;
    }


    .udt-character-grid {
        grid-template-columns:
            repeat(9, minmax(0, 1fr));
    }


    .udt-number-grid {
        grid-template-columns:
            repeat(10, minmax(0, 1fr));
    }


    .udt-symbol-grid {
        grid-template-columns:
            repeat(8, minmax(0, 1fr));
    }


    .udt-article .udt-related-tools {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   RESPONSIVE — SMALL DESKTOP
   ========================================================= */

@media screen and (max-width: 1050px) {

    .udt-layout {
        gap: 17px;
    }


    .udt-primary-grid {
        gap: 13px;
    }


    .udt-page .udt-input,
    .udt-page .udt-output {
        padding: 13px;
    }


    .udt-page .udt-primary-copy-button {
        font-size: 15px;
    }


    .udt-settings {
        padding: 17px;
    }


    .udt-checkbox-options {
        gap: 14px;
    }


    .udt-radio-option {
        gap: 7px;

        padding: 9px 10px;

        font-size: 14px;
    }


    .udt-character-grid {
        grid-template-columns:
            repeat(8, minmax(0, 1fr));
    }


    .udt-number-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }


    .udt-symbol-grid {
        grid-template-columns:
            repeat(8, minmax(0, 1fr));
    }

}


/* =========================================================
   RESPONSIVE — TABLET

   Hide the 300px advertising sidebar at 900px and below.
   ========================================================= */

@media screen and (max-width: 900px) {

    .udt-page {
        padding: 95px 15px 40px;

        --udt-copy-height: 47px;
    }


    .udt-layout {
        grid-template-columns:
            minmax(0, 1fr);

        gap: 0;
    }


    .udt-main {
        width: 100%;
    }


    .udt-sidebar {
        display: none !important;

        width: 0;
        min-width: 0;
        min-height: 0;
    }


    .udt-heading {
        margin-bottom: 23px;
    }


    .udt-heading h1 {
        font-size: 30px;
    }


    .udt-primary-grid {
        gap: 17px;
    }


    .udt-page .udt-primary-copy-button {
        font-size: 16px;
    }


    .udt-character-grid {
        grid-template-columns:
            repeat(13, minmax(0, 1fr));
    }


    .udt-number-grid {
        grid-template-columns:
            repeat(10, minmax(0, 1fr));
    }


    .udt-symbol-grid {
        grid-template-columns:
            repeat(12, minmax(0, 1fr));
    }


    .udt-alphabet-group {
        padding: 15px;
    }


    .udt-radio-option {
        font-size: 15px;
    }

}


/* =========================================================
   RESPONSIVE — SMALL TABLET
   ========================================================= */

@media screen and (max-width: 700px) {

    .udt-page {
        padding: 90px 13px 35px;

        --udt-textarea-height: 160px;
        --udt-textarea-font-size: 16px;
        --udt-copy-height: 45px;
    }


    .udt-heading {
        margin-bottom: 22px;
    }


    .udt-heading h1 {
        font-size: 28px;
    }


    .udt-intro {
        font-size: 15px;
    }


    .udt-tool {
        gap: 22px;

        margin-bottom: 32px;
    }


    .udt-primary-grid {
        gap: 13px;
    }


    .udt-section-heading h2 {
        font-size: 20px;
    }


    .udt-page .udt-inline-button {
        padding: 7px 10px;

        font-size: 13px;
    }


    .udt-page .udt-primary-copy-button {
        padding: 8px 12px;

        font-size: 15px;
    }


    .udt-primary-copy-button i {
        font-size: 18px;
    }


    .udt-settings {
        gap: 15px;

        padding: 15px;
    }


    .udt-settings .udt-section-heading h2 {
        font-size: 20px;
    }


    .udt-alphabet-section {
        margin-bottom: 30px;
    }


    .udt-alphabet-section > h2,
    .udt-alphabet-section > .udt-alphabet-header h2 {
        font-size: 24px;
    }


    .udt-alphabet-group {
        gap: 11px;

        padding: 13px;
    }


    .udt-alphabet-header h3 {
        font-size: 17px;
    }


    .udt-character-grid {
        grid-template-columns:
            repeat(9, minmax(0, 1fr));

        gap: 6px;
    }


    .udt-number-grid {
        grid-template-columns:
            repeat(10, minmax(0, 1fr));
    }


    .udt-symbol-grid {
        grid-template-columns:
            repeat(8, minmax(0, 1fr));
    }


    .udt-page button.udt-character {
        height: 66px;
        min-height: 66px;
    }


    .udt-flipped-character {
        min-height: 33px;

        font-size: 27px;
    }


    .udt-article-section {
        margin-bottom: 29px;
    }


    .udt-article h2 {
        font-size: 24px;
    }


    .udt-article h3 {
        font-size: 19px;
    }

}


/* =========================================================
   RESPONSIVE — MOBILE

   Stack the input and output. Keep both textareas and
   their buttons immediately accessible.
   ========================================================= */

@media screen and (max-width: 600px) {

    .udt-page {
        padding: 85px 12px 35px;

        --udt-textarea-height: 135px;
        --udt-textarea-font-size: 16px;
        --udt-copy-height: 48px;
    }


    .udt-heading {
        margin-bottom: 22px;
    }


    .udt-heading h1 {
        font-size: 28px;
    }


    .udt-intro {
        font-size: 15px;
        line-height: 1.55;
    }


    .udt-tool {
        gap: 20px;

        margin-bottom: 30px;
    }


    /* Stack input and output. */

    .udt-primary-grid {
        grid-template-columns:
            minmax(0, 1fr);

        gap: 15px;
    }


    .udt-section-heading h2 {
        font-size: 20px;
    }


    .udt-input-section,
    .udt-output-section {
        gap: 8px;
    }


    .udt-input-section > .udt-section-heading,
    .udt-output-section > .udt-section-heading {
        min-height: 0;
    }


    /* Matching textareas with native resize handles. */

    .udt-page .udt-input,
    .udt-page .udt-output {
        min-height: 90px;

        padding: 12px;

        font-size: 16px;
        line-height: 1.65;
    }


    /* Clear and Undo below input. */

    .udt-input-actions {
        min-height: 35px;

        gap: 6px;
    }


    .udt-page .udt-inline-button {
        min-height: 35px;

        padding: 7px 11px;

        font-size: 13px;
    }


    /* Full-width copy button. */

    .udt-output-actions {
        min-height: var(--udt-copy-height);
    }


    .udt-page .udt-primary-copy-button {
        padding: 9px 15px;

        font-size: 16px;
    }


    .udt-primary-copy-button i {
        font-size: 20px;
    }


    /* Flip settings. */

    .udt-settings {
        gap: 16px;

        padding: 15px 13px;

        border-radius: 8px;
    }


    .udt-settings .udt-section-heading h2 {
        font-size: 20px;
    }


    .udt-setting-label {
        margin-bottom: 8px;

        font-size: 14px;
    }


    .udt-mode-options {
        gap: 8px;
    }


    .udt-radio-option {
        min-height: 44px;

        gap: 7px;

        padding: 9px;

        font-size: 13px;
    }


    .udt-radio-option input[type="radio"] {
        width: 16px;
        height: 16px;
    }


    .udt-checkbox-options {
        grid-template-columns:
            minmax(0, 1fr);

        gap: 13px;
    }


    .udt-checkbox-option {
        gap: 10px;
    }


    .udt-option-title {
        font-size: 15px;
    }


    .udt-option-description {
        font-size: 13px;
    }


    .udt-settings .udt-compatibility-note {
        padding: 10px;
    }


    .udt-compatibility-note {
        font-size: 12px;
    }


    /* Alphabet charts. */

    .udt-alphabet-section {
        gap: 13px;

        margin-bottom: 28px;
    }


    .udt-alphabet-section > h2,
    .udt-alphabet-section > .udt-alphabet-header h2 {
        font-size: 23px;
        line-height: 1.4;
    }


    .udt-alphabet-intro {
        font-size: 14px;
        line-height: 1.6;
    }


    .udt-alphabet-group {
        gap: 12px;

        padding: 12px;

        border-radius: 8px;
    }


    .udt-alphabet-header {
        gap: 9px 10px;
    }


    .udt-alphabet-header h3 {
        flex-basis: 170px;

        font-size: 16px;
    }


    .udt-page .udt-alphabet-copy-button {
        min-width: 100px;
        min-height: 34px;

        gap: 5px;

        padding: 7px 9px;

        font-size: 12px;
    }


    .udt-alphabet-copy-button i {
        font-size: 14px;
    }


    .udt-character-grid {
        grid-template-columns:
            repeat(7, minmax(0, 1fr));

        gap: 5px;
    }


    .udt-number-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }


    .udt-symbol-grid {
        grid-template-columns:
            repeat(6, minmax(0, 1fr));
    }


    .udt-page button.udt-character {
        height: 61px;
        min-height: 61px;

        gap: 1px;

        padding: 4px 2px;

        border-radius: 5px;
    }


    .udt-original-character {
        font-size: 11px;
    }


    .udt-flipped-character {
        min-height: 32px;

        font-size: 25px;
    }


    /* Informational article. */

    .udt-article {
        margin-top: 30px;
        padding-top: 24px;
    }


    .udt-article-section {
        margin-bottom: 28px;
    }


    .udt-article h2 {
        margin-bottom: 11px;

        font-size: 23px;
        line-height: 1.4;
    }


    .udt-article h3 {
        font-size: 18px;
    }


    .udt-article p {
        margin-bottom: 13px;

        font-size: 16px;
        line-height: 1.7;
    }


    .udt-article li {
        font-size: 16px;
        line-height: 1.6;
    }


    .udt-article ul,
    .udt-article ol {
        padding-left: 22px;
    }


    /* Examples. */

    .udt-text-example {
        margin: 15px 0 17px;
        padding: 13px 14px;
    }


    .udt-article .udt-text-example p,
    .udt-article .udt-text-example .udt-unicode-example {
        font-size: 16px;
    }


    /* Tables. */

    .udt-table-wrapper {
        margin: 15px 0 17px;
    }


    .udt-example-table th,
    .udt-example-table td {
        padding: 10px;
    }


    .udt-example-table thead th {
        font-size: 13px;
    }


    .udt-example-table tbody td,
    .udt-example-table .udt-unicode-example {
        font-size: 14px;
    }


    /* FAQ. */

    .udt-faq-section {
        margin-top: 28px;
    }


    .udt-faq-item {
        padding: 15px 0;
    }


    .udt-article .udt-faq-item h3 {
        font-size: 17px;
    }


    .udt-article .udt-faq-item p {
        font-size: 16px;
    }


    /* Related tools. */

    .udt-related-section {
        margin-top: 28px;
        padding-top: 20px;
    }


    .udt-article .udt-related-tools {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px 14px;
    }


    .udt-related-tools a {
        font-size: 14px;
    }

}


/* =========================================================
   RESPONSIVE — NARROW MOBILE
   ========================================================= */

@media screen and (max-width: 430px) {

    .udt-character-grid {
        grid-template-columns:
            repeat(6, minmax(0, 1fr));
    }


    .udt-number-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }


    .udt-symbol-grid {
        grid-template-columns:
            repeat(6, minmax(0, 1fr));
    }


    .udt-alphabet-header h3 {
        flex-basis: 150px;
    }

}


/* =========================================================
   RESPONSIVE — SMALL MOBILE
   ========================================================= */

@media screen and (max-width: 380px) {

    .udt-page {
        padding: 82px 10px 30px;

        --udt-textarea-height: 125px;
        --udt-copy-height: 45px;
    }


    .udt-heading h1 {
        font-size: 25px;
    }


    .udt-intro {
        font-size: 14px;
    }


    .udt-section-heading h2 {
        font-size: 19px;
    }


    .udt-page .udt-input,
    .udt-page .udt-output {
        padding: 11px;
    }


    .udt-input-actions {
        gap: 5px;
    }


    .udt-page .udt-inline-button {
        padding: 6px 9px;

        font-size: 12px;
    }


    .udt-inline-button i {
        font-size: 14px;
    }


    .udt-page .udt-primary-copy-button {
        font-size: 15px;
    }


    .udt-settings {
        padding: 13px 11px;
    }


    .udt-mode-options {
        grid-template-columns:
            minmax(0, 1fr);
    }


    .udt-radio-option {
        font-size: 14px;
    }


    .udt-alphabet-group {
        padding: 10px;
    }


    .udt-alphabet-header h3 {
        font-size: 16px;
    }


    .udt-character-grid {
        grid-template-columns:
            repeat(6, minmax(0, 1fr));

        gap: 4px;
    }


    .udt-number-grid,
    .udt-symbol-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }


    .udt-page button.udt-character {
        height: 56px;
        min-height: 56px;
    }


    .udt-flipped-character {
        min-height: 29px;

        font-size: 24px;
    }


    .udt-alphabet-section > h2,
    .udt-alphabet-section > .udt-alphabet-header h2,
    .udt-article h2 {
        font-size: 22px;
    }


    .udt-example-table th,
    .udt-example-table td {
        padding: 8px;
    }


    .udt-article .udt-related-tools {
        grid-template-columns:
            minmax(0, 1fr);
    }

}


/* =========================================================
   RESPONSIVE — EXTRA SMALL MOBILE
   ========================================================= */

@media screen and (max-width: 320px) {

    .udt-heading h1 {
        font-size: 23px;
    }


    .udt-character-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }


    .udt-number-grid,
    .udt-symbol-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }


    .udt-alphabet-header {
        align-items: flex-start;
    }


    .udt-alphabet-header h2,
    .udt-alphabet-header h3 {
        flex-basis: 100%;
    }

}


/* =========================================================
   TOUCH DEVICE ADJUSTMENTS
   ========================================================= */

@media (pointer: coarse) {

    .udt-page {
        --udt-copy-height: 48px;
    }


    .udt-page .udt-inline-button,
    .udt-page .udt-alphabet-copy-button {
        min-height: 38px;
    }


    .udt-radio-option {
        min-height: 44px;
    }


    .udt-checkbox-option {
        min-height: 44px;
    }


    .udt-page button.udt-character {
        min-height: 44px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .udt-page *,
    .udt-page *::before,
    .udt-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;
    }

}


/* =========================================================
   HIGH CONTRAST / FORCED COLORS
   ========================================================= */

@media (forced-colors: active) {

    .udt-page .udt-input,
    .udt-page .udt-output,
    .udt-settings,
    .udt-radio-option,
    .udt-alphabet-group,
    .udt-page button.udt-character,
    .udt-table-wrapper,
    .udt-text-example {
        border: 1px solid CanvasText;
    }


    .udt-page .udt-copy-button,
    .udt-page .udt-inline-button,
    .udt-page .udt-alphabet-copy-button {
        border: 1px solid ButtonText;
    }


    .udt-radio-option:has(input:checked) {
        border: 2px solid Highlight;
    }


    .udt-page button:focus-visible,
    .udt-page input:focus-visible,
    .udt-page textarea:focus-visible {
        outline: 2px solid Highlight;
    }


    .udt-page .udt-input:focus,
    .udt-page .udt-output:focus {
        outline: 2px solid Highlight;
    }


    .udt-page .udt-output[readonly] {
        -webkit-text-fill-color: CanvasText;
    }

}


/* =========================================================
   PRINT STYLES
   ========================================================= */

@media print {

    .udt-page {
        padding: 0;

        background: #fff;
        color: #000;

        --udt-textarea-height: 180px;
        --udt-textarea-font-size: 16px;
    }


    .udt-layout {
        display: block;

        max-width: none;
    }


    .udt-sidebar {
        display: none !important;
    }


    .udt-primary-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }


    .udt-input-actions,
    .udt-output-actions,
    .udt-page .udt-copy-button,
    .udt-page .udt-alphabet-copy-button,
    .udt-warning {
        display: none !important;
    }


    .udt-page .udt-input,
    .udt-page .udt-output {
        height: 180px !important;

        background: #fff;
        color: #000;

        resize: none;

        box-shadow: none;
    }


    .udt-settings {
        background: #fff;
    }


    .udt-radio-option,
    .udt-radio-option:has(input:checked) {
        background: #fff;
        color: #000;
    }


    .udt-character-grid {
        grid-template-columns:
            repeat(13, minmax(0, 1fr));
    }


    .udt-number-grid {
        grid-template-columns:
            repeat(10, minmax(0, 1fr));
    }


    .udt-symbol-grid {
        grid-template-columns:
            repeat(12, minmax(0, 1fr));
    }


    .udt-page button.udt-character {
        background: #fff;
        color: #000;

        box-shadow: none;
    }


    .udt-primary-grid,
    .udt-settings,
    .udt-alphabet-group,
    .udt-text-example,
    .udt-table-wrapper {
        break-inside: avoid;

        box-shadow: none;
    }


    .udt-article a {
        color: #000;

        text-decoration: underline;
    }

}


/* =========================================================
   END — UPSIDE DOWN TEXT GENERATOR
   ========================================================= */