/* =========================================================
   SUPERSCRIPT GENERATOR — CharacterCounter.com

   File: superscript-generator.css
   ========================================================= */


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

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

    background: #fff;
    color: #333;

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

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

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

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

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

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


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


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


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


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


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


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


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


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


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


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

.sg-layout {
    display: grid;

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

    align-items: stretch;

    gap: 25px;

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

    margin: 0 auto;
}


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


.sg-sidebar {
    display: block;

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

    align-self: stretch;

    margin: 0;
    padding: 0;
}


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

.sg-heading {
    width: 100%;

    margin: 0 0 25px;
    padding: 0;

    text-align: center;
}


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


.sg-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
   ========================================================= */

.sg-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
   ========================================================= */

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

    gap: 24px;

    width: 100%;
    min-width: 0;

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


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

.sg-section-heading {
    display: flex;

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

    flex-wrap: wrap;

    gap: 8px 12px;

    width: 100%;

    margin: 0;
    padding: 0;
}


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

    color: #333;

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

    overflow-wrap: break-word;
}


/* =========================================================
   PRIMARY INPUT AND OUTPUT GRID
   ========================================================= */

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


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

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

    align-items: stretch;

    gap: 10px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


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


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

   Both textareas have identical font sizes.

   Buttons are positioned outside the textareas so the
   native resize handles remain in the bottom-right corner.
   ========================================================= */

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

    flex: 0 0 auto;

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

    height: var(--sg-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(--sg-unicode-font);
    font-size: var(--sg-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;

    appearance: auto;
    -webkit-appearance: auto;

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


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

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


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

    outline: none;

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


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

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

    background: #f8fbff;
    color: #222;

    cursor: text;
}


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


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

    outline: none;

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


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

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


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

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

    opacity: 1;

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

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


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

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


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

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

    flex: 0 0 auto;

    align-items: center;

    gap: 7px;

    width: 100%;
    min-width: 0;

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

    margin: 0;
    padding: 0;

    border: 0;

    background: transparent;
}


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


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


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

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


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

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


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

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


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


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

    background: #f5f6f8;
    color: #8a919a;

    opacity: 1;
    box-shadow: none;

    cursor: not-allowed;
}


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

.sg-page .sg-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(--sg-blue);
    border-radius: 7px;

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

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

    text-align: center;

    cursor: pointer;

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

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


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


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

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


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

    overflow-wrap: break-word;
}


.sg-page .sg-copy-button:hover:not(:disabled) {
    border-color: #1558aa;

    background: #1558aa;

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


.sg-page .sg-copy-button:active:not(:disabled) {
    background: #104c93;
    border-color: #104c93;
}


.sg-page .sg-copy-button:disabled {
    border-color: #d8e1ec;

    background: #e8eef5;
    color: #8493a5;

    box-shadow: none;
    opacity: 1;

    cursor: not-allowed;
}


/* =========================================================
   COPY SUCCESS AND FAILURE STATES
   ========================================================= */

.sg-page .sg-copy-button.is-copied,
.sg-page .sg-copy-button.copied {
    border-color: #2c8b49;

    background: #2c8b49;
    color: #fff;
}


.sg-page .sg-copy-button.is-copied:hover,
.sg-page .sg-copy-button.copied:hover {
    border-color: #24773e;

    background: #24773e;
    color: #fff;
}


.sg-page .sg-copy-button.is-error,
.sg-page .sg-copy-button.copy-error {
    border-color: #b63333;

    background: #b63333;
    color: #fff;
}


/* =========================================================
   WARNING AND STATUS MESSAGES
   ========================================================= */

.sg-warning {
    width: 100%;

    margin: -8px 0 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;
}


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

    background: #fff1f1;
    color: #a12424;
}


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

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


/* =========================================================
   CONVERSION SETTINGS
   ========================================================= */

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

    gap: 20px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 20px;

    border: 1px solid var(--sg-border);
    border-radius: 10px;

    background: #f9fbfd;
}


.sg-settings > .sg-section-heading {
    margin-bottom: 0;
}


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


/* =========================================================
   SETTING GROUPS
   ========================================================= */

.sg-setting-group {
    display: block;

    width: 100%;
    min-width: 0;
    min-inline-size: 0;

    margin: 0;
    padding: 0;

    border: none;
}


.sg-setting-label {
    display: block;

    width: 100%;

    margin: 0 0 10px;
    padding: 0;

    color: #333;

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


/* =========================================================
   SUPERSCRIPT / SUBSCRIPT SELECTOR
   ========================================================= */

.sg-style-selector {
    display: grid;

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

    gap: 12px;

    width: 100%;
    max-width: 100%;
}


.sg-style-option {
    position: relative;

    display: block;

    min-width: 0;

    margin: 0;
    padding: 0;

    cursor: pointer;
}


.sg-style-option > input[type="radio"] {
    position: absolute;

    width: 1px;
    height: 1px;

    margin: 0;
    padding: 0;

    opacity: 0;

    overflow: hidden;
}


.sg-style-content {
    display: flex;

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

    gap: 10px;

    min-width: 0;
    min-height: 60px;

    margin: 0;
    padding: 12px 15px;

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

    background: #fff;
    color: #444;

    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;

    text-align: center;

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


.sg-style-option:hover .sg-style-content {
    border-color: #97b8df;

    background: #f1f7ff;
}


.sg-style-option > input[type="radio"]:checked
    + .sg-style-content {
    border-color: var(--sg-blue);

    background: #eaf3ff;
    color: #145ba8;

    box-shadow:
        inset 0 0 0 1px var(--sg-blue);
}


.sg-style-option > input[type="radio"]:focus-visible
    + .sg-style-content {
    outline: 3px solid rgba(26, 115, 232, 0.3);
    outline-offset: 3px;
}


.sg-style-option > input[type="radio"]:disabled
    + .sg-style-content {
    opacity: 0.55;

    cursor: not-allowed;
}


/* =========================================================
   TEXT STYLE PREVIEWS
   ========================================================= */

.sg-style-preview {
    display: inline-flex;

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

    flex-shrink: 0;

    min-width: 30px;

    color: inherit;

    font-family: var(--sg-unicode-font);
    font-size: 25px;
    line-height: 1.2;
    font-weight: 500;
}


.sg-style-preview sup,
.sg-style-preview sub {
    position: relative;

    font-size: 0.60em;
    line-height: 0;

    vertical-align: baseline;
}


.sg-style-preview sup {
    top: -0.60em;
}


.sg-style-preview sub {
    bottom: -0.25em;
}


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

.sg-mode-options {
    display: grid;

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

    gap: 10px;

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


.sg-radio-option {
    position: relative;

    display: flex;

    align-items: flex-start;

    gap: 9px;

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

    margin: 0;
    padding: 12px 13px;

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

    background: #fff;

    cursor: pointer;

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


.sg-radio-option:hover {
    border-color: #a8c6e9;

    background: #f4f8ff;
}


.sg-radio-option:focus-within {
    border-color: #8db5ec;
}


.sg-radio-option:has(input:checked) {
    border-color: #99bdef;

    background: #edf5ff;
}


.sg-radio-option.is-selected {
    border-color: #99bdef;

    background: #edf5ff;
}


/* =========================================================
   RADIO BUTTONS
   ========================================================= */

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

    flex: 0 0 17px;

    width: 17px;
    height: 17px;

    margin: 2px 0 0;
    padding: 0;

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

    appearance: auto;
    -webkit-appearance: radio;

    cursor: pointer;
}


/* =========================================================
   OPTION LABELS AND DESCRIPTIONS
   ========================================================= */

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

    flex: 1;

    gap: 4px;

    min-width: 0;
}


.sg-option-title {
    display: block;

    color: #333;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;

    overflow-wrap: break-word;
}


.sg-option-description {
    display: block;

    color: #666;

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

    overflow-wrap: break-word;
}


/* =========================================================
   MATHEMATICAL NOTATION INSTRUCTIONS
   ========================================================= */

.sg-math-help {
    display: flex;
    flex-direction: column;

    gap: 12px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 15px;

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

    background: #f0f7ff;

    color: #344b64;

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


.sg-math-help-heading {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #205990;

    font-size: 15px;
    font-weight: 600;
}


.sg-math-help-heading i {
    flex-shrink: 0;

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


.sg-math-help p {
    margin: 0;
    padding: 0;

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


.sg-math-help code {
    padding: 2px 5px;

    border: 1px solid #d9e4f2;
    border-radius: 4px;

    background: #fff;
    color: #333;

    font-family:
        Consolas,
        "Courier New",
        monospace;

    font-size: 0.95em;
}


/* =========================================================
   ADDITIONAL OPTIONS
   ========================================================= */

.sg-additional-options {
    margin: 0;
    padding: 16px 0 0;

    border-top: 1px solid #dce2e9;
}


.sg-additional-options .sg-setting-label {
    margin-bottom: 11px;
}


.sg-checkbox-option {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    width: 100%;

    margin: 0;
    padding: 2px 0;

    cursor: pointer;
}


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

    flex: 0 0 17px;

    width: 17px;
    height: 17px;

    margin: 2px 0 0;
    padding: 0;

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

    appearance: auto;
    -webkit-appearance: checkbox;

    cursor: pointer;
}


.sg-checkbox-option .sg-option-title {
    transition: color 0.15s ease;
}


.sg-checkbox-option:hover .sg-option-title {
    color: var(--sg-blue-dark);
}


/* =========================================================
   QUICK EXAMPLES
   ========================================================= */

.sg-examples {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


.sg-examples h2 {
    margin: 0 0 11px;
    padding: 0;

    color: #333;

    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
}


.sg-example-buttons {
    display: flex;

    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

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


.sg-page .sg-example-button {
    display: inline-flex;

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

    min-height: 37px;
    max-width: 100%;

    margin: 0;
    padding: 8px 13px;

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

    background: #fff;
    color: #145ba8;

    font-family: var(--sg-unicode-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;

    text-align: center;
    white-space: normal;

    cursor: pointer;

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


.sg-page .sg-example-button:hover {
    border-color: #99bce6;

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


.sg-page .sg-example-button:active {
    background: #dbeaff;
}


.sg-page .sg-example-button.is-active {
    border-color: var(--sg-blue);

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


/* =========================================================
   COMPATIBILITY NOTE
   ========================================================= */

.sg-compatibility-note {
    display: flex;

    align-items: flex-start;

    gap: 8px;

    width: 100%;
    min-width: 0;

    margin: -5px 0 0;
    padding: 11px 13px;

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

    background: #f7f9fb;
    color: #626a73;

    font-size: 13px;
    line-height: 1.6;
}


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

    margin-top: 2px;

    color: #6381a2;

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


.sg-compatibility-note span {
    min-width: 0;

    overflow-wrap: break-word;
}


/* =========================================================
   SMALL INFORMATIONAL NOTES
   ========================================================= */

.sg-small-note {
    margin: 0;
    padding: 0;

    color: #777;

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

    overflow-wrap: break-word;
}


.sg-math-help .sg-small-note {
    color: #5b6d80;

    font-size: 13px;
}


.sg-character-group > .sg-small-note {
    margin-top: 0;
}


/* =========================================================
   CHARACTER LIBRARY SECTIONS
   ========================================================= */

.sg-character-library {
    display: flex;
    flex-direction: column;

    gap: 15px;

    width: 100%;
    min-width: 0;

    margin: 0 0 35px;
    padding: 0;
}


.sg-character-library > h2,
.sg-expression-section > h2 {
    margin: 0;
    padding: 0;

    color: #333;

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

    overflow-wrap: break-word;
}


.sg-library-description {
    margin: -3px 0 0;
    padding: 0;

    color: #666;

    font-size: 14px;
    line-height: 1.65;
    font-weight: 400;
}


/* =========================================================
   CHARACTER GROUP CARDS
   ========================================================= */

.sg-character-group {
    display: flex;
    flex-direction: column;

    gap: 13px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 17px;

    border: 1px solid var(--sg-border);
    border-radius: 9px;

    background: #fff;
}


/* =========================================================
   CHARACTER GROUP HEADERS
   ========================================================= */

.sg-character-group-header {
    display: flex;

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

    flex-wrap: wrap;

    gap: 8px 12px;

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


.sg-character-group-header h3 {
    flex: 1 1 auto;

    min-width: 0;

    margin: 0;
    padding: 0;

    color: #333;

    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;

    overflow-wrap: break-word;
}


/* =========================================================
   COPY ALL BUTTONS
   ========================================================= */

.sg-page .sg-group-copy-button {
    display: inline-flex;

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

    flex: 0 0 auto;

    gap: 6px;

    min-width: 88px;
    min-height: 34px;

    margin: 0;
    padding: 7px 11px;

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

    background: #fff;
    color: #145ba8;

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

    white-space: nowrap;

    cursor: pointer;

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


.sg-group-copy-button i {
    flex-shrink: 0;

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


.sg-page .sg-group-copy-button:hover:not(:disabled) {
    border-color: #9abce4;

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


.sg-page .sg-group-copy-button:active:not(:disabled) {
    background: #dceaff;
}


.sg-page .sg-group-copy-button:disabled {
    border-color: #dce2e9;

    background: #f4f5f7;
    color: #8e98a4;

    cursor: not-allowed;
}


.sg-page .sg-group-copy-button.is-copied,
.sg-page .sg-group-copy-button.copied {
    border-color: #acd2b6;

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


.sg-page .sg-group-copy-button.is-error {
    border-color: #e4b1b1;

    background: #fff1f1;
    color: #a12424;
}


/* =========================================================
   CHARACTER GRIDS
   ========================================================= */

.sg-character-grid {
    display: grid;

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

    gap: 7px;

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


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


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


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


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

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

    display: flex;
    flex-direction: column;

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

    gap: 2px;

    width: 100%;
    min-width: 0;

    height: 68px;
    min-height: 68px;

    margin: 0;
    padding: 5px 3px;

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

    background: #fff;
    color: #333;

    font-family: var(--sg-unicode-font);

    text-align: center;

    cursor: pointer;

    overflow: visible;

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


.sg-page button.sg-character:hover {
    border-color: #9abce6;

    background: #edf5ff;
    color: #145ba8;

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


.sg-page button.sg-character:active {
    background: #dceaff;
}


.sg-page button.sg-character:disabled {
    border-color: #e3e6ea;

    background: #f6f7f9;
    color: #999;

    opacity: 0.65;

    cursor: not-allowed;
}


/* =========================================================
   CHARACTER VALUES
   ========================================================= */

.sg-character-value {
    display: flex;

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

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

    margin: 0;
    padding: 0;

    color: inherit;

    font-family: var(--sg-unicode-font);
    font-size: 28px;
    line-height: 1.15;
    font-weight: 400;

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

    white-space: nowrap;
}


.sg-character-label {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #858585;

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

    text-transform: none;

    white-space: nowrap;
}


/* =========================================================
   NEWER AND APPROXIMATE CHARACTERS
   ========================================================= */

.sg-page button.sg-modern-character {
    border-style: dashed;

    background: #fbfcfe;
}


.sg-modern-character .sg-character-label {
    color: #826a39;
}


.sg-page button.sg-modern-character:hover {
    border-style: solid;

    border-color: #9abce6;
    background: #edf5ff;
}


.sg-approximate-character .sg-character-label {
    color: #777;
}


/* =========================================================
   INDIVIDUAL CHARACTER COPY FEEDBACK
   ========================================================= */

.sg-page button.sg-character.is-copied,
.sg-page button.sg-character.copied {
    border-color: #9acaa7;
    border-style: solid;

    background: #eaf8ee;
    color: #237a40;

    box-shadow:
        0 0 0 1px rgba(35, 122, 64, 0.08);
}


.sg-page button.sg-character.is-copied .sg-character-label,
.sg-page button.sg-character.copied .sg-character-label {
    color: #237a40;
}


.sg-page button.sg-character.is-error {
    border-color: #e4b1b1;
    border-style: solid;

    background: #fff1f1;
    color: #a12424;
}


/* =========================================================
   COMMON SUPERSCRIPT AND SUBSCRIPT EXPRESSIONS
   ========================================================= */

.sg-expression-section {
    display: flex;
    flex-direction: column;

    gap: 14px;

    width: 100%;
    min-width: 0;

    margin: 0 0 35px;
    padding: 0;
}


.sg-expression-grid {
    display: grid;

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

    gap: 10px;

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


/* =========================================================
   EXPRESSION BUTTONS
   ========================================================= */

.sg-page button.sg-expression {
    position: relative;

    display: flex;
    flex-direction: column;

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

    gap: 6px;

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

    margin: 0;
    padding: 12px 8px;

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

    background: #fff;
    color: #333;

    text-align: center;

    cursor: pointer;

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


.sg-page button.sg-expression:hover {
    border-color: #9abce6;

    background: #edf5ff;
    color: #145ba8;

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


.sg-page button.sg-expression:active {
    background: #dceaff;
}


.sg-expression-value {
    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    color: inherit;

    font-family: var(--sg-unicode-font);
    font-size: 24px;
    line-height: 1.4;
    font-weight: 400;

    white-space: nowrap;

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


.sg-expression-label {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #737373;

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

    overflow-wrap: break-word;
}


/* =========================================================
   EXPRESSION COPY FEEDBACK
   ========================================================= */

.sg-page button.sg-expression.is-copied,
.sg-page button.sg-expression.copied {
    border-color: #9acaa7;

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


.sg-page button.sg-expression.is-copied .sg-expression-label,
.sg-page button.sg-expression.copied .sg-expression-label {
    color: #237a40;
}


.sg-page button.sg-expression.is-error {
    border-color: #e4b1b1;

    background: #fff1f1;
    color: #a12424;
}


/* =========================================================
   SUBSCRIPT LIBRARY DIVIDER
   ========================================================= */

.sg-subscript-library {
    margin-top: 10px;
    padding-top: 28px;

    border-top: 1px solid #e1e5ea;
}


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

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

    margin: 0;
    padding: 0;

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

    background: #fff;

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

    overscroll-behavior-x: contain;

    -webkit-overflow-scrolling: touch;
}


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

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

    margin: 0;
    padding: 0;

    border: 0;

    border-collapse: collapse;
    border-spacing: 0;

    background: #fff;
    color: #333;

    font-family: var(--sg-unicode-font);
    font-size: 14px;
    line-height: 1.55;

    text-align: left;
}


.sg-example-table thead {
    background: #f3f6fa;
}


.sg-example-table th {
    margin: 0;
    padding: 11px 13px;

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

    color: #333;

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

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

    white-space: nowrap;
}


.sg-example-table td {
    margin: 0;
    padding: 10px 13px;

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

    color: #333;

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

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

    overflow-wrap: break-word;
}


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


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


.sg-example-table tbody tr:hover {
    background: #f2f7fd;
}


.sg-example-table td code {
    white-space: nowrap;
}


.sg-example-table td sup,
.sg-example-table td sub {
    font-size: 0.75em;
    line-height: 0;
}


/* =========================================================
   MATHEMATICAL HELP TABLE
   ========================================================= */

.sg-math-help .sg-table-wrapper {
    border-color: #d4e1f0;
}


.sg-math-help .sg-example-table thead {
    background: #e9f1fb;
}


.sg-math-help .sg-example-table th,
.sg-math-help .sg-example-table td {
    padding: 8px 11px;

    font-size: 13px;
}


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

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

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

    border-top: 1px solid #e1e5ea;

    color: #333;

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


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

    margin: 0 0 34px;
    padding: 0;
}


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

    color: #333;

    font-size: 25px;
    line-height: 1.4;
    font-weight: 700;

    overflow-wrap: break-word;
}


.sg-article h3 {
    margin: 21px 0 9px;
    padding: 0;

    color: #333;

    font-size: 19px;
    line-height: 1.4;
    font-weight: 700;

    overflow-wrap: break-word;
}


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

    color: #444;

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

    overflow-wrap: break-word;
}


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


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

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

    font-weight: 400;

    text-decoration: underline;
    text-underline-offset: 2px;

    overflow-wrap: anywhere;
}


.sg-article a:hover {
    color: #0b3f98;
}


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

.sg-article ul,
.sg-article ol {
    margin: 0 0 18px;
    padding: 0 0 0 25px;

    color: #444;

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


.sg-article ul {
    list-style-type: disc;
}


.sg-article ol {
    list-style-type: decimal;
}


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

    margin: 0 0 8px;
    padding: 0;

    line-height: 1.7;
}


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


.sg-article strong {
    color: #333;

    font-weight: 700;
}


/* =========================================================
   ARTICLE INLINE CODE
   ========================================================= */

.sg-article code {
    padding: 2px 5px;

    border: 1px solid #e0e5eb;
    border-radius: 4px;

    background: #f5f7fa;
    color: #333;

    font-family:
        Consolas,
        "Courier New",
        monospace;

    font-size: 0.88em;
    line-height: inherit;

    overflow-wrap: break-word;
}


/* =========================================================
   ARTICLE TABLE SPACING
   ========================================================= */

.sg-article .sg-table-wrapper {
    margin: 18px 0;
}


/* =========================================================
   SUPERSCRIPT VS SUBSCRIPT COMPARISON
   ========================================================= */

.sg-comparison-grid {
    display: grid;

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

    gap: 15px;

    width: 100%;
    min-width: 0;

    margin: 18px 0;
}


.sg-comparison-card {
    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 12px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 21px 17px;

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

    background: #f8fbff;

    text-align: center;
}


.sg-comparison-card h3 {
    margin: 0;
    padding: 0;

    color: #333;

    font-size: 19px;
    line-height: 1.4;
    font-weight: 700;
}


.sg-comparison-preview {
    display: block;

    width: 100%;

    margin: 0;
    padding: 3px 0;

    color: #222;

    font-family: var(--sg-unicode-font);
    font-size: 44px;
    line-height: 1.4;
    font-weight: 400;

    text-align: center;
}


.sg-article .sg-comparison-card p {
    margin: 0;
    padding: 0;

    color: #555;

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


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

.sg-faq-section {
    margin-top: 36px;
}


.sg-faq-section > h2 {
    margin-bottom: 6px;
}


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

    margin: 0;
    padding: 18px 0;

    border-bottom: 1px solid #e5e8ec;
}


.sg-faq-item:last-child {
    border-bottom: 0;
}


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

    color: #333;

    font-size: 17px;
    line-height: 1.5;
    font-weight: 600;
}


.sg-article .sg-faq-item p {
    margin: 0;
    padding: 0;

    color: #444;

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


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

.sg-related-section {
    margin-top: 20px;
    margin-bottom: 0;
    padding-top: 20px;

    border-top: 1px solid #e1e5ea;
}


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

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

    gap: 10px 20px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    list-style: none;
}


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

    min-width: 0;

    margin: 0;
    padding: 0;

    list-style: none;

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


.sg-article .sg-related-tools a {
    display: inline-block;

    color: #1155cc;

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

    text-decoration: none;

    overflow-wrap: anywhere;
}


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


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

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

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

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

    overflow: hidden !important;

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

    white-space: nowrap !important;

    border: 0 !important;
}


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

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

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

}


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

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

    .sg-layout {
        gap: 20px;
    }


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


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


    .sg-expression-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


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

}


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

   Retain the 300px advertising sidebar.
   ========================================================= */

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

    .sg-layout {
        gap: 17px;
    }


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


    .sg-settings {
        padding: 16px;
    }


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


    .sg-radio-option {
        padding: 11px 10px;
    }


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


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


    .sg-character-grid {
        gap: 5px;
    }


    .sg-character-group {
        padding: 13px;
    }


    .sg-character-value {
        font-size: 25px;
    }


    .sg-expression-value {
        font-size: 22px;
    }


    .sg-expression-grid {
        gap: 8px;
    }

}


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

   Hide the advertising sidebar on smaller screens.
   ========================================================= */

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

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

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


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

        gap: 0;
    }


    .sg-sidebar {
        display: none;

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


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


    .sg-settings {
        padding: 19px;
    }


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


    .sg-character-grid {
        gap: 6px;
    }


    .sg-character-group {
        padding: 15px;
    }


    .sg-expression-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }


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

}


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

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

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

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


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


    .sg-heading h1 {
        font-size: 29px;
    }


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


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


    .sg-primary-grid {
        gap: 12px;
    }


    .sg-page .sg-input,
    .sg-page .sg-output {
        padding: 12px;
    }


    .sg-page .sg-copy-button {
        padding: 10px;

        font-size: 14px;
    }


    .sg-copy-button i {
        font-size: 17px;
    }


    .sg-settings {
        gap: 17px;

        padding: 16px;
    }


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


    .sg-radio-option {
        min-height: 78px;
    }


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


    .sg-expression-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    .sg-character-library > h2,
    .sg-expression-section > h2,
    .sg-article h2 {
        font-size: 24px;
    }


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

}


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

   Stack input above output.

   Keep the conversion settings below both textareas.
   ========================================================= */

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

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

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


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


    .sg-heading h1 {
        margin-bottom: 9px;

        font-size: 27px;
        line-height: 1.3;
    }


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


    .sg-tool {
        gap: 19px;

        margin-bottom: 32px;
    }


    /* Primary converter. */

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

        gap: 17px;
    }


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


    .sg-input-section > .sg-section-heading,
    .sg-output-section > .sg-section-heading {
        min-height: 26px;
    }


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


    /* Both textareas retain their native resize handles. */

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

        padding: 11px 12px;

        border-radius: 8px;

        line-height: 1.6;

        resize: vertical;
    }


    /* Input and output actions. */

    .sg-input-actions {
        min-height: 35px;
    }


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


    .sg-page .sg-inline-button {
        min-height: 34px;

        padding: 7px 11px;

        font-size: 13px;
    }


    .sg-page .sg-copy-button {
        min-height: var(--sg-copy-height);

        padding: 11px 13px;

        font-size: 15px;
    }


    /* Settings. */

    .sg-settings {
        gap: 17px;

        padding: 14px;

        border-radius: 9px;
    }


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


    .sg-setting-label {
        margin-bottom: 9px;

        font-size: 14px;
    }


    .sg-style-selector {
        gap: 8px;
    }


    .sg-style-content {
        gap: 7px;

        min-height: 54px;

        padding: 10px 7px;

        font-size: 14px;
    }


    .sg-style-preview {
        min-width: 24px;

        font-size: 22px;
    }


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

        gap: 7px;
    }


    .sg-radio-option {
        gap: 9px;

        min-height: 0;

        padding: 11px 10px;
    }


    .sg-option-title {
        font-size: 14px;
    }


    .sg-option-description {
        font-size: 12px;
        line-height: 1.5;
    }


    .sg-additional-options {
        padding-top: 13px;
    }


    .sg-checkbox-option {
        gap: 9px;
    }


    /* Mathematical notation help. */

    .sg-math-help {
        gap: 10px;

        padding: 12px;
    }


    .sg-math-help-heading {
        font-size: 14px;
    }


    .sg-math-help p {
        font-size: 13px;
    }


    .sg-math-help .sg-example-table th,
    .sg-math-help .sg-example-table td {
        padding: 8px;

        font-size: 12px;
    }


    /* Quick examples. */

    .sg-examples h2 {
        font-size: 16px;
    }


    .sg-example-buttons {
        gap: 6px;
    }


    .sg-page .sg-example-button {
        min-height: 35px;

        padding: 7px 10px;

        font-size: 13px;
    }


    .sg-compatibility-note {
        padding: 10px;

        font-size: 12px;
    }


    /* Character libraries. */

    .sg-character-library,
    .sg-expression-section {
        gap: 12px;

        margin-bottom: 28px;
    }


    .sg-character-library > h2,
    .sg-expression-section > h2 {
        font-size: 23px;
        line-height: 1.4;
    }


    .sg-library-description {
        font-size: 13px;
    }


    .sg-character-group {
        gap: 10px;

        padding: 12px;
    }


    .sg-character-group-header {
        gap: 8px;
    }


    .sg-character-group-header h3 {
        font-size: 17px;
    }


    .sg-page .sg-group-copy-button {
        min-width: 80px;
        min-height: 32px;

        padding: 6px 9px;

        font-size: 12px;
    }


    .sg-group-copy-button i {
        font-size: 14px;
    }


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


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


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


    .sg-character-grid {
        gap: 5px;
    }


    .sg-page button.sg-character {
        height: 60px;
        min-height: 60px;

        padding: 4px 2px;

        border-radius: 6px;
    }


    .sg-character-value {
        min-height: 31px;

        font-size: 25px;
        line-height: 1.2;
    }


    .sg-character-label {
        font-size: 11px;
    }


    .sg-small-note {
        font-size: 12px;
    }


    /* Common expressions. */

    .sg-expression-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 7px;
    }


    .sg-page button.sg-expression {
        gap: 5px;

        min-height: 78px;

        padding: 10px 5px;
    }


    .sg-expression-value {
        font-size: 22px;
    }


    .sg-expression-label {
        font-size: 11px;
    }


    /* Subscript library. */

    .sg-subscript-library {
        padding-top: 23px;
    }


    /* Informational article. */

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


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


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

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


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


    .sg-article p,
    .sg-article ul,
    .sg-article ol {
        font-size: 15px;
        line-height: 1.75;
    }


    .sg-article ul,
    .sg-article ol {
        padding-left: 21px;
    }


    .sg-article li {
        margin-bottom: 7px;
    }


    /* Tables. */

    .sg-example-table th,
    .sg-example-table td {
        padding: 9px 10px;

        font-size: 13px;
    }


    /* Comparison cards. */

    .sg-comparison-grid {
        gap: 10px;
    }


    .sg-comparison-card {
        gap: 9px;

        padding: 15px 11px;
    }


    .sg-comparison-card h3 {
        font-size: 17px;
    }


    .sg-comparison-preview {
        font-size: 38px;
    }


    .sg-article .sg-comparison-card p {
        font-size: 13px;
    }


    /* Frequently asked questions. */

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


    .sg-article .sg-faq-item h3 {
        font-size: 16px;
    }


    .sg-article .sg-faq-item p {
        font-size: 14px;
    }


    /* Related tools. */

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

        gap: 9px 13px;
    }


    .sg-article .sg-related-tools li,
    .sg-article .sg-related-tools a {
        font-size: 14px;
    }

}


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

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

    .sg-letter-grid {
        grid-template-columns:
            repeat(7, minmax(0, 1fr));
    }


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


    .sg-expression-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    .sg-expression-value {
        font-size: 21px;
    }


    .sg-comparison-grid {
        gap: 8px;
    }


    .sg-comparison-card {
        padding: 13px 10px;
    }

}


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

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

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

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


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


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


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


    .sg-settings {
        padding: 12px;
    }


    .sg-style-content {
        gap: 5px;

        min-height: 51px;

        padding: 10px 5px;

        font-size: 13px;
    }


    .sg-style-preview {
        font-size: 21px;
    }


    .sg-page .sg-copy-button {
        min-height: var(--sg-copy-height);

        padding: 9px 10px;

        font-size: 14px;
    }


    .sg-character-group {
        padding: 10px;
    }


    .sg-character-group-header h3 {
        font-size: 16px;
    }


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

        gap: 4px;
    }


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


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


    .sg-character-value {
        min-height: 29px;

        font-size: 24px;
    }


    .sg-expression-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .sg-expression-value {
        font-size: 22px;
    }


    .sg-character-library > h2,
    .sg-expression-section > h2,
    .sg-article h2 {
        font-size: 22px;
    }


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


    .sg-comparison-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }


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

}


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

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

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


    .sg-style-content {
        flex-direction: column;

        gap: 6px;

        min-height: 65px;
    }


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


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


    .sg-character-group-header {
        align-items: flex-start;
    }


    .sg-character-group-header h3 {
        flex-basis: 100%;
    }


    .sg-page .sg-group-copy-button {
        font-size: 12px;
    }

}


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

@media (pointer: coarse) {

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


    .sg-page .sg-inline-button,
    .sg-page .sg-group-copy-button {
        min-height: 38px;
    }


    .sg-style-content {
        min-height: 52px;
    }


    .sg-radio-option {
        min-height: 60px;
    }


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


    .sg-page .sg-example-button {
        min-height: 40px;
    }


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


    .sg-page button.sg-expression {
        min-height: 70px;
    }

}


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

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

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

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;
    }

}


/* =========================================================
   HIGH CONTRAST MODE
   ========================================================= */

@media (forced-colors: active) {

    .sg-page .sg-input,
    .sg-page .sg-output,
    .sg-settings,
    .sg-style-content,
    .sg-radio-option,
    .sg-character-group,
    .sg-page button.sg-character,
    .sg-page button.sg-expression,
    .sg-page .sg-example-button,
    .sg-table-wrapper,
    .sg-comparison-card,
    .sg-compatibility-note,
    .sg-warning,
    .sg-math-help {
        border: 1px solid CanvasText;
    }


    .sg-style-option > input[type="radio"]:checked
        + .sg-style-content {
        border: 2px solid Highlight;
    }


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


    .sg-page .sg-copy-button {
        border: 1px solid ButtonText;
    }


    .sg-page button.is-copied,
    .sg-page button.copied {
        border: 2px solid Highlight;
    }


    .sg-character-label,
    .sg-expression-label {
        color: CanvasText;
    }

}


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

@media print {

    .sg-page {
        padding: 0;

        background: #fff;
        color: #000;

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


    .sg-layout {
        display: block;

        width: 100%;
        max-width: none;
    }


    .sg-sidebar,
    .sg-input-actions,
    .sg-output-actions,
    .sg-group-copy-button,
    .sg-examples,
    .sg-sr-only,
    .sg-warning {
        display: none !important;
    }


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


    .sg-page .sg-input,
    .sg-page .sg-output {
        border: 1px solid #999;

        background: #fff;
        color: #000;

        resize: none;

        box-shadow: none;
    }


    .sg-settings,
    .sg-character-group,
    .sg-comparison-card,
    .sg-math-help,
    .sg-table-wrapper {
        border: 1px solid #bbb;

        background: #fff;

        break-inside: avoid;
    }


    .sg-page button.sg-character,
    .sg-page button.sg-expression {
        border: 1px solid #ddd;

        background: #fff;
        color: #000;

        box-shadow: none;
    }


    .sg-article h2,
    .sg-article h3,
    .sg-character-library h2,
    .sg-expression-section h2 {
        break-after: avoid;
    }


    .sg-article p,
    .sg-article li {
        color: #000;
    }


    .sg-example-table th,
    .sg-example-table td {
        border-color: #ccc;
    }


    .sg-article a {
        color: #000;

        text-decoration: underline;
    }


    .sg-faq-item {
        break-inside: avoid;
    }

}