.jmt-shell {
    --jmt-page: #eef6ff;
    --jmt-page-2: #f8fbff;
    --jmt-card: #ffffff;
    --jmt-card-soft: #f8fafc;
    --jmt-text: #061735;
    --jmt-muted: #52617a;
    --jmt-soft: #8491a7;
    --jmt-line: #dfe6f0;
    --jmt-blue: #2563eb;
    --jmt-cyan: #079bd3;
    --jmt-green: #0f9f6e;
    --jmt-red: #dc2626;
    --jmt-editor: #f8fbff;
    --jmt-gutter: #e6eefc;
    --jmt-shadow: 0 22px 55px rgba(15, 31, 57, 0.12);
    background:
        radial-gradient(circle at 50% 0, rgba(37, 99, 235, 0.16), transparent 34rem),
        linear-gradient(180deg, var(--jmt-page-2) 0%, var(--jmt-page) 100%);
    color: var(--jmt-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: none;
    overflow-x: clip;
    padding: 22px clamp(12px, 2.5vw, 28px) 28px;
    width: 100vw;
}

.jmt-shell[data-theme="dark"] {
    --jmt-page: #0c1422;
    --jmt-page-2: #111d30;
    --jmt-card: #172235;
    --jmt-card-soft: #202d42;
    --jmt-text: #f2f7ff;
    --jmt-muted: #aab8cd;
    --jmt-soft: #8190a7;
    --jmt-line: #314158;
    --jmt-editor: #101a2a;
    --jmt-gutter: #1d2b43;
    --jmt-shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
}

.jmt-shell *,
.jmt-shell *::before,
.jmt-shell *::after {
    box-sizing: border-box;
}

.jmt-hero {
    margin: 0 auto 16px;
    max-width: 940px;
    text-align: center;
}

.jmt-kicker {
    color: var(--jmt-blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.jmt-hero h1 {
    color: var(--jmt-text);
    font-size: clamp(31px, 3.4vw, 42px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.04;
    margin: 0 0 8px;
}

.jmt-hero h1::first-letter {
    color: var(--jmt-text);
}

.jmt-hero p {
    color: var(--jmt-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 auto;
    max-width: 760px;
}

.jmt-hero-stats {
    align-items: center;
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(94px, 1fr));
    margin-top: 14px;
}

.jmt-hero-stats span {
    border-right: 1px solid var(--jmt-line);
    color: var(--jmt-soft);
    display: grid;
    font-size: 12px;
    font-weight: 900;
    gap: 3px;
    min-width: 116px;
    padding: 0 16px;
    text-transform: uppercase;
}

.jmt-hero-stats span:last-child {
    border-right: 0;
}

.jmt-hero-stats strong {
    color: var(--jmt-blue);
    font-size: 17px;
    text-transform: none;
}

.jmt-ad-space {
    align-items: center;
    border: 1px dashed #b8cef7;
    border-radius: 8px;
    color: var(--jmt-soft);
    display: flex;
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    margin: 0 auto 14px;
    max-width: 1520px;
    min-height: 52px;
}

.jmt-ad-space::before {
    content: "Ad space";
}

.jmt-ad-space-bottom {
    margin: 16px auto 0;
}

.jmt-workspace-title,
.jmt-controls,
.jmt-workspace {
    margin-left: auto;
    margin-right: auto;
    max-width: 1520px;
    width: 100%;
}

.jmt-workspace-title {
    align-items: center;
    background: var(--jmt-card);
    border: 1px solid var(--jmt-line);
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(15, 31, 57, 0.08);
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    min-height: 50px;
    padding: 9px 12px;
}

.jmt-workspace-title h2 {
    color: var(--jmt-text);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
}

.jmt-theme-toggle {
    align-items: center;
    background: #e9f1ff;
    border: 1px solid #a8c4ff;
    border-radius: 7px;
    color: var(--jmt-blue);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    gap: 9px;
    min-height: 34px;
    padding: 6px 10px;
}

.jmt-shell[data-theme="dark"] .jmt-theme-toggle {
    background: var(--jmt-card-soft);
    border-color: var(--jmt-line);
    color: #9cc5ff;
}

.jmt-toggle-dot {
    background: var(--jmt-blue);
    border-radius: 999px;
    display: inline-block;
    height: 18px;
    position: relative;
    width: 34px;
}

.jmt-toggle-dot::after {
    background: #ffffff;
    border-radius: 50%;
    content: "";
    height: 12px;
    left: 4px;
    position: absolute;
    top: 3px;
    transition: transform 160ms ease;
    width: 12px;
}

.jmt-shell[data-theme="dark"] .jmt-toggle-dot::after {
    transform: translateX(14px);
}

.jmt-controls {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(320px, 1fr) minmax(210px, 0.44fr) minmax(360px, 0.7fr);
    margin-bottom: 10px;
}

.jmt-control-group,
.jmt-actions {
    background: var(--jmt-card);
    border: 1px solid var(--jmt-line);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 31, 57, 0.07);
    padding: 9px;
}

.jmt-control-group > span {
    color: var(--jmt-blue);
    display: block;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.jmt-segmented {
    border: 1px solid var(--jmt-line);
    border-radius: 7px;
    display: flex;
    overflow: hidden;
}

.jmt-segmented button,
.jmt-actions button,
.jmt-file-button,
.jmt-output-actions button,
.jmt-panel-head button {
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.jmt-segmented button {
    background: var(--jmt-card);
    color: var(--jmt-muted);
    flex: 1 1 auto;
    font-size: 13px;
    min-height: 35px;
    padding: 7px 10px;
    white-space: nowrap;
}

.jmt-segmented button.is-active {
    background: linear-gradient(135deg, var(--jmt-blue), var(--jmt-cyan));
    color: #ffffff;
}

.jmt-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.jmt-controls .jmt-actions {
    grid-column: auto;
}

.jmt-actions button,
.jmt-file-button,
.jmt-output-actions button {
    align-items: center;
    background: var(--jmt-card);
    border-color: var(--jmt-line);
    border-radius: 7px;
    color: var(--jmt-text);
    display: inline-flex;
    justify-content: center;
    font-size: 13px;
    min-height: 35px;
    padding: 7px 10px;
    white-space: nowrap;
}

.jmt-file-button {
    position: relative;
}

.jmt-file-button input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.jmt-actions .jmt-primary {
    background: linear-gradient(135deg, var(--jmt-blue), var(--jmt-cyan));
    border-color: transparent;
    color: #ffffff;
}

.jmt-message {
    color: var(--jmt-muted);
    font-size: 13px;
    font-weight: 750;
    margin: -2px auto 10px;
    max-width: 1520px;
    min-height: 22px;
}

.jmt-message[data-type="error"] {
    color: var(--jmt-red);
}

.jmt-message[data-type="success"] {
    color: var(--jmt-green);
}

.jmt-workspace {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.jmt-inputs {
    display: grid;
    gap: 12px;
}

.jmt-panel {
    background: var(--jmt-card);
    border: 1px solid var(--jmt-line);
    border-radius: 10px;
    box-shadow: var(--jmt-shadow);
    min-width: 0;
    overflow: hidden;
}

.jmt-panel-head {
    align-items: center;
    border-bottom: 1px solid var(--jmt-line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 50px;
    padding: 10px 14px;
}

.jmt-panel-head h2 {
    color: var(--jmt-text);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
}

.jmt-panel-head h2::before {
    color: var(--jmt-blue);
    content: "JSON";
    display: block;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.jmt-panel-head button {
    background: var(--jmt-card-soft);
    border-color: var(--jmt-line);
    border-radius: 999px;
    color: var(--jmt-muted);
    font-size: 12px;
    min-height: 30px;
    padding: 6px 10px;
}

.jmt-panel-head [data-remove-panel] {
    font-size: 16px;
    line-height: 1;
    width: 34px;
}

.jmt-panel-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.jmt-output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.jmt-panel textarea {
    background:
        linear-gradient(90deg, var(--jmt-gutter) 0 42px, transparent 42px),
        var(--jmt-editor);
    border: 0;
    color: var(--jmt-text);
    display: block;
    font: 13px/1.6 Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
    min-height: clamp(260px, 32vh, 340px);
    outline: 0;
    padding: 15px 14px 15px 56px;
    resize: vertical;
    tab-size: 2;
    width: 100%;
}

.jmt-panel textarea::placeholder {
    color: var(--jmt-soft);
}

.jmt-output-panel {
    position: sticky;
    top: 16px;
}

.jmt-output-panel textarea {
    min-height: clamp(560px, 70vh, 720px);
}

.jmt-panel-status {
    border-top: 1px solid var(--jmt-line);
    color: var(--jmt-muted);
    font-size: 12px;
    font-weight: 750;
    margin: 0;
    min-height: 32px;
    padding: 8px 14px;
}

.jmt-panel-status[data-type="error"] {
    color: var(--jmt-red);
}

.jmt-panel-status[data-type="success"] {
    color: var(--jmt-green);
}

.jmt-stats {
    border-top: 1px solid var(--jmt-line);
    color: var(--jmt-soft);
    display: grid;
    font-size: 11px;
    font-weight: 900;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 9px 12px;
    text-transform: uppercase;
}

.jmt-stats strong {
    color: var(--jmt-blue);
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.jmt-seo-content {
    color: var(--jmt-muted);
    margin: 28px auto 0;
    max-width: 1180px;
    width: 100%;
}

.jmt-seo-content h2,
.jmt-seo-content h3 {
    color: var(--jmt-text);
    letter-spacing: 0;
    margin: 0;
}

.jmt-seo-intro {
    margin: 0 auto 18px;
    max-width: 860px;
    text-align: center;
}

.jmt-seo-intro h2 {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 8px;
}

.jmt-seo-intro p {
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.jmt-seo-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.jmt-seo-grid section,
.jmt-faq {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--jmt-line);
    border-radius: 10px;
    padding: 18px;
}

.jmt-shell[data-theme="light"] .jmt-seo-grid section,
.jmt-shell[data-theme="light"] .jmt-faq {
    background: rgba(255, 255, 255, 0.72);
}

.jmt-seo-grid h3,
.jmt-faq h2 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 10px;
}

.jmt-seo-grid ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}

.jmt-seo-grid li,
.jmt-faq p {
    font-size: 14px;
    line-height: 1.65;
}

.jmt-faq {
    display: grid;
    gap: 10px;
}

.jmt-faq details {
    background: var(--jmt-card);
    border: 1px solid var(--jmt-line);
    border-radius: 8px;
    padding: 12px 14px;
}

.jmt-faq summary {
    color: var(--jmt-text);
    cursor: pointer;
    font-weight: 900;
}

.jmt-faq p {
    margin: 9px 0 0;
}

.jmt-shell button:hover,
.jmt-file-button:hover {
    border-color: var(--jmt-blue);
    transform: translateY(-1px);
}

.jmt-shell button:focus-visible,
.jmt-file-button:focus-within,
.jmt-shell textarea:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.24);
    outline-offset: 2px;
}

@media (max-width: 1120px) {
    .jmt-controls,
    .jmt-workspace {
        grid-template-columns: 1fr;
    }

    .jmt-controls .jmt-actions {
        grid-column: auto;
    }

    .jmt-output-panel {
        position: static;
    }

    .jmt-output-panel textarea {
        min-height: 380px;
    }

    .jmt-panel textarea {
        min-height: 240px;
    }

    .jmt-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .jmt-shell {
        padding: 20px 10px 22px;
        width: 100vw;
    }

    .jmt-hero h1 {
        font-size: 28px;
    }

    .jmt-hero p {
        font-size: 14px;
        line-height: 1.55;
    }

    .jmt-hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 12px;
        width: 100%;
    }

    .jmt-hero-stats span {
        border-bottom: 0;
        border-right: 1px solid var(--jmt-line);
        min-width: 0;
        padding: 0 8px;
    }

    .jmt-hero-stats span:last-child {
        border-right: 0;
    }

    .jmt-ad-space {
        min-height: 52px;
    }

    .jmt-workspace-title {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .jmt-theme-toggle {
        justify-content: center;
        width: 100%;
    }

    .jmt-segmented,
    .jmt-actions,
    .jmt-output-actions {
        flex-direction: column;
        width: 100%;
    }

    .jmt-segmented button,
    .jmt-actions button,
    .jmt-file-button,
    .jmt-output-actions button {
        width: 100%;
    }

    .jmt-panel-head {
        align-items: center;
        flex-direction: row;
        gap: 10px;
        padding: 9px 10px;
    }

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

    .jmt-panel-actions {
        flex-shrink: 0;
    }

    .jmt-panel textarea {
        background:
            linear-gradient(90deg, var(--jmt-gutter) 0 32px, transparent 32px),
            var(--jmt-editor);
        font-size: 12px;
        min-height: 230px;
        padding: 12px 10px 12px 42px;
    }

    .jmt-output-panel textarea {
        min-height: 320px;
    }

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

    .jmt-seo-content {
        margin-top: 22px;
    }

    .jmt-seo-intro {
        text-align: left;
    }

    .jmt-seo-intro h2 {
        font-size: 23px;
    }

    .jmt-seo-grid {
        grid-template-columns: 1fr;
    }

    .jmt-seo-grid section,
    .jmt-faq {
        padding: 14px;
    }
}

@media (max-width: 430px) {
    .jmt-hero h1 {
        font-size: 26px;
    }

    .jmt-kicker {
        font-size: 11px;
    }

    .jmt-hero-stats span {
        font-size: 10px;
    }

    .jmt-hero-stats strong {
        font-size: 14px;
    }

    .jmt-panel-head h2 {
        font-size: 15px;
    }

    .jmt-panel-head button {
        padding-left: 8px;
        padding-right: 8px;
    }
}
