.tool-frame--utility .tool-header-block {
    max-width: 60ch;
}

.tool-frame .page-title {
    font-size: clamp(2.7rem, 4vw, 3.2rem);
    max-width: none;
    white-space: nowrap;
}

.tool-frame .page-subtitle {
    max-width: none;
    font-size: 1.08rem;
    white-space: nowrap;
}

.roc-tool {
    gap: 0.88rem;
}

.roc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.roc-language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    padding: 0.34rem;
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(134, 86, 60, 0.24), rgba(29, 59, 115, 0.24)),
        rgba(8, 14, 28, 0.88);
    border: 1px solid rgba(103, 144, 214, 0.28);
}

.roc-lang-button {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    color: var(--color-text-secondary);
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease;
}

.roc-lang-button:hover,
.roc-lang-button:focus-visible {
    color: var(--color-text);
    background: rgba(103, 144, 214, 0.14);
    outline: none;
}

.roc-lang-button.is-active {
    color: #f8fbff;
    background: linear-gradient(135deg, rgba(126, 176, 255, 0.94), rgba(79, 118, 210, 0.96));
    box-shadow: 0 10px 24px rgba(52, 110, 199, 0.24);
}

.roc-clear-button {
    min-width: 6.5rem;
}

.roc-workbench {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.96rem;
}

.roc-panel {
    min-height: 19rem;
    display: flex;
    flex-direction: column;
    gap: 0.78rem;
    padding: 1rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(103, 144, 214, 0.26);
    background:
        linear-gradient(180deg, rgba(241, 235, 224, 0.96), rgba(228, 219, 204, 0.95)),
        linear-gradient(135deg, rgba(145, 104, 83, 0.06), rgba(86, 124, 176, 0.12));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.56),
        0 18px 42px rgba(7, 11, 21, 0.2);
    color: #102036;
}

.roc-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.roc-panel__heading {
    display: grid;
    gap: 0.18rem;
}

.roc-panel__eyebrow {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5a7191;
}

.roc-panel__title {
    margin: 0;
    font-size: 1.16rem;
    line-height: 1.1;
}

.roc-panel__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.22rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(76, 113, 171, 0.22);
    background: rgba(255, 255, 255, 0.42);
    color: #536b8d;
    font-size: 0.84rem;
}

.roc-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #243855;
}

.roc-input {
    width: 100%;
    min-height: 3.35rem;
    padding: 0.88rem 0.96rem;
    border-radius: 1rem;
    border: 1px solid rgba(87, 119, 167, 0.3);
    background: rgba(248, 246, 241, 0.94);
    color: #102036;
    font: inherit;
    font-size: 1.02rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.roc-input::placeholder {
    color: #7589a4;
}

.roc-input:focus-visible {
    outline: 2px solid rgba(85, 133, 220, 0.48);
    outline-offset: 2px;
    border-color: rgba(67, 112, 203, 0.46);
}

.roc-result-band {
    display: grid;
    gap: 0.28rem;
    padding: 0.92rem 0.96rem 0.98rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(93, 126, 177, 0.22);
}

.roc-result-label {
    font-size: 0.86rem;
    color: #566f91;
}

.roc-result-value {
    font-size: clamp(1.5rem, 2.6vw, 2.12rem);
    line-height: 1;
    color: #102036;
}

.roc-note {
    margin: auto 0 0;
    min-height: 2.6rem;
    color: #40597a;
    font-size: 0.93rem;
    line-height: 1.42;
}

.roc-feedback-slot {
    min-height: 2.6rem;
}

.roc-status {
    margin: 0;
    padding: 0.78rem 0.95rem;
    border-radius: 1rem;
    color: #d7e7ff;
    background:
        linear-gradient(135deg, rgba(137, 86, 61, 0.15), rgba(38, 67, 127, 0.18)),
        rgba(14, 22, 40, 0.92);
    border: 1px solid rgba(103, 144, 214, 0.24);
}

.roc-status.is-error {
    color: #ffe3dc;
    border-color: rgba(211, 110, 92, 0.34);
    background:
        linear-gradient(135deg, rgba(146, 62, 45, 0.26), rgba(77, 38, 32, 0.18)),
        rgba(30, 17, 20, 0.94);
}

.roc-status.is-success {
    color: #e4f4dc;
    border-color: rgba(102, 170, 104, 0.32);
    background:
        linear-gradient(135deg, rgba(83, 126, 75, 0.22), rgba(31, 71, 56, 0.16)),
        rgba(17, 27, 23, 0.94);
}

@media (max-width: 700px) {
    .roc-workbench {
        grid-template-columns: 1fr;
    }

    .roc-panel {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .tool-frame .page-title {
        font-size: clamp(2.2rem, 10vw, 2.75rem);
        max-width: 9ch;
        white-space: normal;
    }

    .tool-frame .page-subtitle {
        max-width: 22rem;
        font-size: 1rem;
        padding-inline-end: 0.45rem;
        white-space: normal;
    }

    .roc-toolbar {
        gap: 0.68rem;
        justify-content: flex-end;
    }

    .roc-language-toggle {
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
        gap: 0.28rem;
        padding: 0.24rem;
    }

    .roc-lang-button {
        flex: 0 0 auto;
        text-align: center;
        min-width: 3.65rem;
        padding: 0.38rem 0.7rem;
        font-size: 0.96rem;
    }

    .roc-clear-button {
        width: 100%;
    }

    .roc-panel {
        padding: 0.94rem;
        border-radius: 1.2rem;
    }

    .roc-panel__eyebrow {
        font-size: 0.74rem;
    }

    .roc-panel__header {
        align-items: center;
    }

    .roc-panel__badge {
        font-size: 0.8rem;
    }

    .roc-status {
        font-size: 0.96rem;
    }
}
