body.route-default {
        background: #e9e9ea;
    }

    html[data-theme="dark"] body.route-default {
        background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-body-deep) 100%);
    }

    .tool-template {
        color: var(--text-heading);
        max-width: 1200px;
        margin: 0 auto;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template-shell {
        width: 100%;
    }

    /* Wide tools opt in without widening their guide and supporting content. */
    .tool-template-breakout {
        position: relative;
        left: 50%;
        width: min(1320px, calc(100vw - 56px));
        transform: translateX(-50%);
    }

    .tool-template-rail {
        display: none;
    }

.tool-template-title {
    margin: 4px 2px 14px;
}

.tool-template-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 2px 12px;
    color: #687385;
    font-size: 0.88rem;
}

.tool-template-breadcrumb a {
    color: #687385;
    font-weight: 500;
    text-decoration: none;
}

.tool-template-breadcrumb a:hover {
    color: #16223a;
    text-decoration: none;
}

.tool-template-breadcrumb-sep {
    margin: 0 8px;
    color: #aeb6c2;
    font-size: 0.75rem;
}

.tool-template-breadcrumb-current {
    min-width: 0;
    color: #526075;
    font-weight: 500;
    overflow-wrap: anywhere;
}

html[data-theme="dark"] .tool-template-breadcrumb {
    color: #aeb6c2;
}

html[data-theme="dark"] .tool-template-breadcrumb a {
    color: #aeb6c2;
}

html[data-theme="dark"] .tool-template-breadcrumb a:hover {
    color: #f1f5f9;
}

html[data-theme="dark"] .tool-template-breadcrumb-sep {
    color: #596576;
}

html[data-theme="dark"] .tool-template-breadcrumb-current {
    color: #cbd5e1;
}

    .tool-template-heading-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .tool-template-title h1 {
        margin: 0;
        color: #16223a;
        font-size: 2rem;
        line-height: 1.04;
        letter-spacing: -0.045em;
        font-weight: 800;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template-heading-row h1 {
        flex: 1 1 auto;
        min-width: 0;
    }

    .tool-template-share {
        flex: 0 0 auto;
    }

    .tool-template-title p {
        margin: 7px 0 0;
        max-width: 68ch;
        color: #687385;
        font-size: 0.94rem;
        line-height: 1.48;
        font-weight: 500;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template-header-links {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 7px 20px;
        margin-top: 8px;
    }

    .tool-template-header-link {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: #2563eb;
        font-family: "Inter", var(--font-sans);
        font-size: 0.9rem;
        font-weight: 750;
        line-height: 1.4;
        text-decoration: none;
    }

    .tool-template-header-link [aria-hidden="true"] {
        transition: transform 0.16s ease;
    }

    .tool-template-header-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .tool-template-header-link:hover [aria-hidden="true"] {
        transform: translateX(2px);
    }

    .tool-template-header-link:focus-visible {
        border-radius: 4px;
        outline: 3px solid rgba(37, 99, 235, 0.24);
        outline-offset: 3px;
    }

    .tool-template-card {
        background: #ffffff;
        border: 1px solid rgba(202, 206, 214, 0.95);
        border-radius: 20px;
        box-shadow: 0 12px 30px rgba(19, 28, 40, 0.08);
        padding: 14px;
    }

    .tool-template-learn-card {
        position: relative;
        margin: 18px 0 0;
        padding: 28px;
        overflow: hidden;
        border: 1px solid rgba(202, 206, 214, 0.95);
        border-radius: 20px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 249, 0.98));
        box-shadow: 0 12px 30px rgba(19, 28, 40, 0.08);
    }

.tool-template-donation-banner {
    margin: 18px 0 0;
}

.tool-template-related {
    margin: 18px 0 0;
    padding: 22px;
    border: 1px solid rgba(202, 206, 214, 0.95);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 30px rgba(19, 28, 40, 0.06);
}

.tool-template-related-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tool-template-related-head h2 {
    margin: 0;
    color: #16223a;
    font-size: 1.05rem;
    font-weight: 800;
}

.tool-template-related-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 750;
    text-decoration: none;
    transition: color 0.16s ease;
}

.tool-template-related-all:hover {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tool-template-related-all:focus-visible {
    border-radius: 4px;
    outline: 3px solid rgba(37, 99, 235, 0.24);
    outline-offset: 3px;
}

.tool-template-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tool-template-related-grid a {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e1e5eb;
    border-radius: 14px;
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.tool-template-related-grid a:hover {
    border-color: #bfd3ee;
    background: #f1f6fc;
}

.tool-template-related-grid strong {
    color: #1d2740;
    font-size: 0.92rem;
}

.tool-template-related-grid span {
    color: #687385;
    font-size: 0.84rem;
    line-height: 1.45;
}

html[data-theme="dark"] .tool-template-related {
    border-color: #3d4550;
    background: #20252d;
}

html[data-theme="dark"] .tool-template-related-head h2,
html[data-theme="dark"] .tool-template-related-grid strong {
    color: #f3f5f7;
}

html[data-theme="dark"] .tool-template-related-grid span {
    color: #aeb6c2;
}

html[data-theme="dark"] .tool-template-related-all {
    color: #93c5fd;
}

html[data-theme="dark"] .tool-template-related-all:hover {
    color: #bfdbfe;
}

html[data-theme="dark"] .tool-template-related-grid a {
    border-color: #3d4550;
    background: #272d36;
}

html[data-theme="dark"] .tool-template-related-grid a:hover {
    border-color: #5b6b80;
    background: #303846;
}

@media (max-width: 640px) {
    .tool-template-breakout {
        width: min(100%, calc(100vw - 16px));
    }

    .tool-template-related {
        padding: 16px;
    }

    .tool-template-related-grid {
        grid-template-columns: 1fr;
    }
}

    .tool-template-guide {
        margin: 18px 0 0;
        border: 1px solid rgba(202, 206, 214, 0.95);
        border-radius: 20px;
        background:
            linear-gradient(135deg, rgba(219, 234, 254, 0.55), transparent 36%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 249, 0.98));
        box-shadow: 0 12px 30px rgba(19, 28, 40, 0.08);
        overflow: hidden;
    }

    .tool-template-guide[open] {
        overflow: visible;
    }

    .tool-template-guide-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        min-height: 58px;
        list-style: none;
        cursor: pointer;
        padding: 14px 18px;
        color: #16223a;
        font-family: "Inter", var(--font-sans);
        user-select: none;
    }

    .tool-template-guide-summary::-webkit-details-marker {
        display: none;
    }

    .tool-template-guide-summary::after {
        content: "+";
        display: inline-grid;
        width: 32px;
        height: 32px;
        flex: 0 0 auto;
        place-items: center;
        border: 1px solid #d8dbe0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.85);
        color: #2563eb;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
        font-size: 1.1rem;
        font-weight: 700;
        transition: background-color 0.18s ease;
    }

    .tool-template-guide[open] .tool-template-guide-summary::after {
        content: "-";
    }

    .tool-template-guide-label {
        color: #16223a;
        font-size: 0.95rem;
        font-weight: 800;
        letter-spacing: -0.01em;
    }

    .tool-template-guide-hint {
        margin-left: auto;
        color: #687385;
        font-size: 0.88rem;
        font-weight: 700;
    }

    .tool-template-guide[open] .tool-template-guide-hint {
        font-size: 0;
    }

    .tool-template-guide[open] .tool-template-guide-hint::after {
        content: "Hide guide";
        font-size: 0.88rem;
    }

    .tool-template-guide-content {
        padding: 0 18px 18px;
        border-top: 1px solid #e4e7ec;
        border-radius: 0 0 20px 20px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 248, 249, 0.98));
    }

    .tool-template-guide-content > :first-child {
        margin-top: 18px;
    }

    .tool-template-guide-content h3 {
        margin: 18px 0 8px;
        color: #16223a;
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template-guide-content p,
    .tool-template-guide-content li {
        color: #5b6475;
        font-size: 0.95rem;
        line-height: 1.6;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template-guide-content p {
        margin: 0 0 12px;
    }

    .tool-template-guide-content ul,
    .tool-template-guide-content ol {
        margin: 0 0 14px;
        padding-left: 20px;
    }

    .tool-template-guide-content li + li {
        margin-top: 8px;
    }

    .tool-template-guide-content strong {
        color: #1d2740;
    }

    .tool-template-guide-content code {
        padding: 2px 6px;
        border: 1px solid #d8dbe0;
        border-radius: 8px;
        background: #ffffff;
        color: #152033;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
        font-size: 0.88em;
        white-space: nowrap;
    }

    .site-ad-slot--tool-rail {
        margin: 0;
    }

    .tool-template-learn-card::before {
        content: "";
        position: absolute;
        top: -120px;
        right: -90px;
        width: 240px;
        height: 240px;
        border-radius: 999px;
        background: radial-gradient(circle, rgba(63, 127, 216, 0.14), transparent 68%);
        pointer-events: none;
    }

    .tool-template-learn-card-content {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .tool-template-learn-card-text {
        flex: 1;
        min-width: 0;
    }

    .tool-template-learn-card-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 10px;
        padding: 5px 12px;
        border-radius: 999px;
        background: #eef4fb;
        color: #3f6fa8;
        font-size: 0.76rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .tool-template-learn-card-badge svg {
        width: 13px;
        height: 13px;
    }

    .tool-template-learn-card h2 {
        margin: 0 0 8px;
        color: #16223a;
        font-family: "Inter", var(--font-sans);
        font-size: clamp(1.25rem, 2vw, 1.65rem);
        font-weight: 800;
        line-height: 1.18;
        letter-spacing: -0.035em;
    }

    .tool-template-learn-card p {
        margin: 0;
        color: #687385;
        font-size: 0.96rem;
        font-weight: 500;
        line-height: 1.58;
    }

    .tool-template-learn-card-button {
        display: inline-flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 50px;
        padding: 0 24px;
        border-radius: 14px;
        background: #2563eb;
        color: #ffffff;
        font-size: 0.95rem;
        font-weight: 800;
        text-decoration: none;
        box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
        transition: background-color 0.18s ease, box-shadow 0.18s ease;
    }

    .tool-template-learn-card-button:hover {
        background: #1d4ed8;
        color: #ffffff;
        text-decoration: none;
        box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
    }

    .tool-template-learn-card-button svg {
        width: 18px;
        height: 18px;
    }

    .tool-template-learn-card-button.is-disabled {
        background: #f3f5f7;
        color: #687385;
        box-shadow: none;
    }

    .tool-template .cipher-top-controls,
    .tool-template .cipher-content-grid {
        display: grid;
        gap: 12px;
        align-items: start;
    }

    .tool-template .cipher-top-controls {
        margin-bottom: 12px;
    }

    .tool-template .tool-topbar-start,
    .tool-template .tool-topbar-end {
        display: grid;
        gap: 8px;
        min-width: 0;
    }

    .tool-template .cipher-left-col,
    .tool-template .cipher-right-col {
        display: grid;
        gap: 12px;
        align-content: start;
    }

    .tool-template .cipher-segment {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 5px;
        background: #f1f2f4;
        border: 1px solid #d8dbe0;
        border-radius: 999px;
    }

    .tool-template .cipher-segment-btn {
        appearance: none;
        border: 0;
        background: transparent;
        color: #6f7786;
        border-radius: 999px;
        padding: 12px 14px;
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
        transition: background-color 0.18s ease, color 0.18s ease, transform 0.16s ease;
        min-height: 48px;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-segment-btn:hover {
        color: #4d5666;
    }

    .tool-template .cipher-segment-btn[aria-pressed="true"] {
        background: #dbe7f5;
        color: #152033;
        box-shadow: inset 0 0 0 1px rgba(180, 194, 214, 0.7);
    }

    .tool-template .cipher-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tool-template .cipher-btn {
        appearance: none;
        width: 100%;
        border-radius: 14px;
        padding: 12px 14px;
        font-size: 0.97rem;
        font-weight: 700;
        cursor: pointer;
        border: 1px solid #d8dbe0;
        background: #ffffff;
        color: #152033;
        transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
        min-height: 58px;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-btn:hover:not(:disabled) {
        border-color: #b8c7d9;
        background: #f3f6fa;
    }

    .tool-template .cipher-btn:active {
        transform: translateY(1px);
    }

    .tool-template .cipher-btn[disabled] {
        opacity: 0.62;
        cursor: not-allowed;
        transform: none;
    }

    .tool-template .cipher-btn-primary {
        background: #eef4fb;
        border-color: #d8e3f0;
        color: #43556f;
    }

    .tool-template .cipher-btn-primary:hover:not(:disabled) {
        border-color: #b9cde3;
        background: #e5eef8;
    }

    .tool-template .cipher-btn-subtle {
        background: #fafafa;
        color: #434d5e;
    }

    .tool-template .cipher-btn-subtle:hover:not(:disabled) {
        border-color: #c4cbd5;
        background: #f1f3f6;
    }

    .tool-template .cipher-btn-danger {
        background: #f3e4e4;
        border-color: #e9d3d3;
        color: #5e4848;
    }

    .tool-template .cipher-btn-danger:hover:not(:disabled) {
        border-color: #d8b2b7;
        background: #efdbdd;
    }

    .tool-template .tool-actions button:hover:not(:disabled) {
        border-color: rgba(var(--accent-rgb), 0.55);
        filter: brightness(0.97);
        transform: none;
    }

    .tool-template .cipher-section,
    .tool-template .cipher-io {
        border: 1px solid #d8dbe0;
        background: #f8f8f9;
        border-radius: 18px;
        padding: 12px;
    }

    .tool-template .cipher-section-title {
        margin: 0 0 10px;
        font-size: 0.95rem;
        line-height: 1.2;
        color: #535d6f;
        font-weight: 700;
        letter-spacing: -0.01em;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-option-list {
        display: grid;
        gap: 12px;
    }

    .tool-template .cipher-option-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-height: 42px;
        transition: opacity 0.16s ease;
    }

    .tool-template .cipher-option-row.is-disabled,
    .tool-template .cipher-stepper.is-disabled {
        opacity: 0.56;
    }

    .tool-template .cipher-option-left {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }

    .tool-template .cipher-option-left label {
        font-size: 0.98rem;
        color: #40495a;
        font-weight: 500;
        line-height: 1.3;
        cursor: pointer;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-option-left input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin: 0;
        accent-color: #3f7fd8;
        flex: 0 0 auto;
    }

    .tool-template .cipher-stepper {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 108px;
        justify-content: flex-end;
        transition: opacity 0.16s ease;
    }

    .tool-template .cipher-stepper-btn {
        appearance: none;
        border: 1px solid #d8dbe0;
        background: #fff;
        color: #4a5364;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 800;
        cursor: pointer;
        transition: background-color 0.16s ease, border-color 0.16s ease;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-stepper-btn:hover:not(:disabled) {
        border-color: #b8c7d9;
        background: #f3f6fa;
    }

    .tool-template .cipher-stepper-btn:active:not(:disabled) {
        transform: translateY(1px);
    }

    .tool-template .cipher-stepper-btn:disabled {
        cursor: not-allowed;
        opacity: 0.6;
        background: #f3f5f7;
    }

    .tool-template .cipher-stepper-value {
        min-width: 34px;
        text-align: center;
        font-weight: 700;
        color: #243048;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-helper {
        margin: 12px 0 0;
        font-size: 0.9rem;
        line-height: 1.45;
        color: #687385;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-inner-panel {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        height: auto;
    }

    .tool-template .cipher-chip-row,
    .tool-template .cipher-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .tool-template .cipher-chip,
    .tool-template .cipher-stat {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 11px;
        border-radius: 999px;
        border: 1px solid #d8dbe0;
        background: #ffffff;
        color: #4b5566;
        font-size: 0.87rem;
        line-height: 1;
        font-weight: 600;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-chip strong,
    .tool-template .cipher-stat strong {
        color: #152033;
        font-weight: 700;
    }

    .tool-template .cipher-stats {
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 0.88rem;
    }

    .tool-template .cipher-io-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 8px;
    }

    .tool-template .cipher-io-title {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        color: #465162;
        letter-spacing: -0.01em;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-mini-btn {
        appearance: none;
        border: 1px solid #d8dbe0;
        background: #ffffff;
        color: #6a7281;
        border-radius: 999px;
        padding: 8px 12px;
        font-size: 0.88rem;
        font-weight: 700;
        cursor: pointer;
        transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
        min-width: 78px;
        text-align: center;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-mini-btn[disabled] {
        cursor: not-allowed;
        opacity: 0.62;
        background: #f5f6f8;
        color: #7f8794;
    }

    .tool-template .cipher-note {
        background: #fbfbfc;
        border: 1px solid #d8dbe0;
        border-radius: 16px;
        padding: 12px;
    }

    .tool-template .cipher-note-title {
        margin: 0 0 8px;
        font-size: 0.9rem;
        color: #556072;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-note p {
        margin: 0;
        color: #5b6475;
        font-size: 0.95rem;
        line-height: 1.55;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template .cipher-note strong {
        color: #1d2740;
    }

    .tool-template-mobile-accordion {
        overflow: hidden;
        border: 1px solid #d8dbe0;
        border-radius: 18px;
        background: #f8f8f9;
    }

    .tool-template-mobile-priority-section {
        order: -1;
    }

    .tool-template-mobile-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 56px;
        padding: 12px 14px;
        list-style: none;
        cursor: pointer;
        color: #16223a;
        user-select: none;
    }

    .tool-template-mobile-summary::-webkit-details-marker {
        display: none;
    }

    .tool-template-mobile-summary::after {
        content: "+";
        display: inline-grid;
        width: 28px;
        height: 28px;
        flex: 0 0 auto;
        place-items: center;
        border: 1px solid #d8dbe0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.86);
        color: #2563eb;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
        font-size: 1rem;
        font-weight: 700;
    }

    .tool-template-mobile-accordion[open] .tool-template-mobile-summary::after {
        content: "-";
    }

    .tool-template-mobile-label {
        color: #535d6f;
        font-size: 0.95rem;
        line-height: 1.2;
        font-weight: 700;
        letter-spacing: -0.01em;
        font-family: "Inter", var(--font-sans);
    }

    .tool-template-mobile-body {
        display: grid;
        gap: 12px;
        padding: 0 14px 14px;
        border-top: 1px solid #e4e7ec;
        background: #f8f8f9;
    }

    .tool-template-mobile-body > :first-child {
        margin-top: 14px;
    }

    html[data-theme="dark"] .tool-template-card {
        background: linear-gradient(180deg, rgba(26, 31, 39, 0.96), rgba(21, 25, 32, 0.98));
        border-color: #2a3037;
        box-shadow: var(--shadow-md);
    }

    html[data-theme="dark"] .tool-template-learn-card {
        background: linear-gradient(180deg, rgba(26, 31, 39, 0.96), rgba(21, 25, 32, 0.98));
        border-color: #2a3037;
        box-shadow: var(--shadow-md);
    }

    html[data-theme="dark"] .tool-template-guide {
        background:
            linear-gradient(135deg, rgba(37, 99, 235, 0.14), transparent 38%),
            linear-gradient(180deg, rgba(26, 31, 39, 0.96), rgba(21, 25, 32, 0.98));
        border-color: #2a3037;
        box-shadow: var(--shadow-md);
    }

    html[data-theme="dark"] .tool-template-learn-card-badge {
        background: rgba(110, 168, 255, 0.12);
        color: #a9c7ff;
    }

    html[data-theme="dark"] .tool-template-learn-card h2 {
        color: #f2f5fb;
    }

    html[data-theme="dark"] .tool-template-learn-card p {
        color: #a8b2c0;
    }

    html[data-theme="dark"] .tool-template-learn-card-button.is-disabled {
        background: #222831;
        color: #a8b2c0;
    }

    html[data-theme="dark"] .tool-template-title h1 {
        color: #f2f5fb;
    }

    html[data-theme="dark"] .tool-template-title p {
        color: #a8b2c0;
    }

    html[data-theme="dark"] .tool-template-header-link {
        color: #93c5fd;
    }

    html[data-theme="dark"] .tool-template-header-link:hover {
        color: #bfdbfe;
    }

    html[data-theme="dark"] .tool-template-guide-label {
        color: #f2f5fb;
    }

    html[data-theme="dark"] .tool-template-guide-hint {
        color: #a8b2c0;
    }

    html[data-theme="dark"] .tool-template-guide-summary::after {
        border-color: #2f3742;
        background: #1c2128;
        color: #9fc2ff;
    }

    html[data-theme="dark"] .tool-template-guide[open] .tool-template-guide-summary::after {
        background: #202a36;
    }

    html[data-theme="dark"] .tool-template-guide-content {
        border-top-color: #2a3037;
        background: linear-gradient(180deg, rgba(23, 28, 35, 0.98), rgba(19, 24, 31, 0.98));
    }

    html[data-theme="dark"] .tool-template-guide-content h3 {
        color: #f2f5fb;
    }

    html[data-theme="dark"] .tool-template-guide-content p,
    html[data-theme="dark"] .tool-template-guide-content li {
        color: #aeb8c5;
    }

    html[data-theme="dark"] .tool-template-guide-content strong {
        color: #f2f5fb;
    }

    html[data-theme="dark"] .tool-template-guide-content code {
        border-color: #2f3742;
        background: #1c2128;
        color: #eff3f8;
    }

    html[data-theme="dark"] .tool-template .cipher-segment {
        background: #20252d;
        border-color: #313843;
    }

    html[data-theme="dark"] .tool-template .cipher-segment-btn {
        color: #9aa5b4;
    }

    html[data-theme="dark"] .tool-template .cipher-segment-btn:hover {
        color: #c6d0dd;
    }

    html[data-theme="dark"] .tool-template .cipher-segment-btn[aria-pressed="true"] {
        background: rgba(110, 168, 255, 0.14);
        color: #f2f5fb;
        box-shadow: inset 0 0 0 1px rgba(110, 168, 255, 0.22);
    }

    html[data-theme="dark"] .tool-template .cipher-btn {
        background: #181d24;
        border-color: #2f3742;
        color: #eff3f8;
    }

    html[data-theme="dark"] .tool-template .cipher-btn-primary {
        background: #202a36;
        border-color: #334356;
        color: #dbe7f7;
    }

    html[data-theme="dark"] .tool-template .cipher-btn-subtle {
        background: #1c2128;
        color: #d7dde6;
    }

    html[data-theme="dark"] .tool-template .cipher-btn-danger {
        background: #332426;
        border-color: #4a2f33;
        color: #f0c8cc;
    }

    html[data-theme="dark"] .tool-template .cipher-btn:hover:not(:disabled) {
        border-color: #596574;
        background: #252c35;
    }

    html[data-theme="dark"] .tool-template .cipher-btn-primary:hover:not(:disabled) {
        border-color: #506986;
        background: #29384a;
    }

    html[data-theme="dark"] .tool-template .cipher-btn-subtle:hover:not(:disabled) {
        border-color: #505a68;
        background: #262d36;
    }

    html[data-theme="dark"] .tool-template .cipher-btn-danger:hover:not(:disabled) {
        border-color: #70474e;
        background: #432c30;
    }

    html[data-theme="dark"] .tool-template .tool-actions button:hover:not(:disabled) {
        filter: brightness(1.08);
    }

    html[data-theme="dark"] .tool-template .cipher-section,
    html[data-theme="dark"] .tool-template .cipher-io,
    html[data-theme="dark"] .tool-template .cipher-note {
        background: #181d24;
        border-color: #2f3742;
    }

    html[data-theme="dark"] .tool-template .cipher-section-title,
    html[data-theme="dark"] .tool-template .cipher-io-title {
        color: #dce5ef;
    }

    html[data-theme="dark"] .tool-template .cipher-option-left label,
    html[data-theme="dark"] .tool-template .cipher-stepper-value {
        color: #dce5ef;
    }

    html[data-theme="dark"] .tool-template .cipher-stepper-btn {
        background: #1c2128;
        border-color: #2f3742;
        color: #d7dde6;
    }

    html[data-theme="dark"] .tool-template .cipher-stepper-btn:hover:not(:disabled) {
        border-color: #596574;
        background: #29313b;
    }

    html[data-theme="dark"] .tool-template .cipher-stepper-btn:disabled {
        background: #222831;
    }

    html[data-theme="dark"] .tool-template .cipher-helper {
        color: #aeb8c5;
    }

    html[data-theme="dark"] .tool-template .cipher-chip,
    html[data-theme="dark"] .tool-template .cipher-stat,
    html[data-theme="dark"] .tool-template .cipher-mini-btn {
        background: #1c2128;
        border-color: #2f3742;
        color: #aeb8c5;
    }

    html[data-theme="dark"] .tool-template .cipher-chip strong,
    html[data-theme="dark"] .tool-template .cipher-stat strong,
    html[data-theme="dark"] .tool-template .cipher-note strong {
        color: #f2f5fb;
    }

    html[data-theme="dark"] .tool-template .cipher-mini-btn[disabled] {
        background: #222831;
        color: #7d8896;
    }

    html[data-theme="dark"] .tool-template .cipher-note-title {
        color: #9aa8b8;
    }

    html[data-theme="dark"] .tool-template .cipher-note p {
        color: #aeb8c5;
    }

    html[data-theme="dark"] .tool-template-mobile-accordion {
        background: #181d24;
        border-color: #2f3742;
    }

    html[data-theme="dark"] .tool-template-mobile-summary::after {
        border-color: #2f3742;
        background: #1c2128;
        color: #9fc2ff;
    }

    html[data-theme="dark"] .tool-template-mobile-label {
        color: #dce5ef;
    }

    html[data-theme="dark"] .tool-template-mobile-body {
        border-top-color: #2a3037;
        background: #181d24;
    }

    @media (max-width: 1023px) {
        .tool-template-card {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .tool-template .cipher-top-controls {
            display: contents;
        }

        .tool-template-card > .cipher-content-grid {
            display: contents;
        }

        .tool-template .tool-topbar-start,
        .tool-template .tool-topbar-end {
            width: 100%;
            max-width: none;
            justify-self: stretch;
        }

        .tool-template .tool-topbar-start {
            order: 1;
            margin-bottom: 8px;
        }

        .tool-template .tool-topbar-end {
            order: 2;
            margin-bottom: 14px;
        }

        .tool-template .cipher-right-col {
            order: 3;
            display: grid;
            gap: 12px;
        }

        .tool-template .cipher-left-col {
            order: 4;
            display: grid;
            gap: 12px;
        }

        .tool-template .cipher-segment {
            width: 100%;
            max-width: none;
            margin-inline: auto;
        }

        .tool-template .cipher-actions {
            width: 100%;
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .tool-template-heading-row {
            align-items: center;
            flex-direction: row;
            gap: 12px;
        }
    }

    @media (max-width: 699px) {
        .tool-template .cipher-segment {
            width: 100%;
            max-width: none;
            margin-inline: auto;
        }

        .tool-template .cipher-actions {
            width: 100%;
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .tool-template .cipher-btn {
            width: 100%;
            min-height: 52px;
            padding: 10px 8px;
            font-size: 0.83rem;
            line-height: 1.15;
        }

        .tool-template .cipher-io {
            padding: 10px 10px 12px;
        }

        .tool-template .cipher-io-head {
            min-height: 38px;
            align-items: center;
            margin-bottom: 4px;
        }

        .tool-template .cipher-io-title {
            line-height: 1;
        }

        .tool-template .cipher-mini-btn {
            min-height: 38px;
            padding-top: 7px;
            padding-bottom: 7px;
        }

        .tool-template-learn-card {
            padding: 22px;
        }

        .tool-template-guide-summary {
            gap: 12px;
        }

        .tool-template-guide-content {
            padding-bottom: 18px;
        }

        .tool-template-learn-card-content {
            align-items: flex-start;
            flex-direction: column;
        }

        .tool-template-learn-card-button {
            align-self: center;
            max-width: 100%;
        }
    }

    @media (min-width: 700px) {
        .tool-template-title {
            margin-bottom: 14px;
        }

        .tool-template-title h1 {
            font-size: 2.3rem;
        }

        .tool-template-title p {
            font-size: 0.98rem;
        }

        .tool-template-card {
            padding: 16px;
        }

        .tool-template .cipher-actions {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    @media (min-width: 700px) and (max-width: 1023px) {
        .tool-template {
            --cipher-mid-controls-width: min(100%, 526px);
        }

        .tool-template .cipher-top-controls {
            grid-template-columns: 1fr;
            justify-items: stretch;
        }

        .tool-template .cipher-top-controls > * {
            width: 100%;
            max-width: none;
            justify-self: stretch;
        }

        .tool-template .cipher-segment {
            width: var(--cipher-mid-controls-width);
            max-width: var(--cipher-mid-controls-width);
            margin-inline: auto;
        }

        .tool-template .cipher-actions {
            width: var(--cipher-mid-controls-width);
            max-width: var(--cipher-mid-controls-width);
            margin-inline: auto;
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }

    @media (min-width: 1024px) {
        .tool-template {
            max-width: 1180px;
        }

        .tool-template-title {
            margin: 2px 2px 12px;
        }

        .tool-template-title h1 {
            font-size: 2.45rem;
            line-height: 1.02;
        }

        .tool-template-title p {
            margin-top: 6px;
            font-size: 0.96rem;
            line-height: 1.42;
            max-width: 62ch;
        }

        .tool-template-card {
            padding: 16px;
            border-radius: 22px;
        }

        .tool-template .cipher-top-controls,
        .tool-template .cipher-content-grid {
            grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.38fr);
            gap: 12px;
        }

        .tool-template .cipher-top-controls {
            align-items: stretch;
            margin-bottom: 12px;
        }

        .tool-template .cipher-content-grid {
            align-items: stretch;
        }

        .tool-template .cipher-left-col {
            gap: 10px;
            position: sticky;
            top: 16px;
            align-self: start;
        }

        .tool-template .cipher-right-col {
            gap: 10px;
            align-self: stretch;
            display: grid;
            grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
            min-height: 100%;
            height: 100%;
        }

        .tool-template .cipher-segment {
            min-height: 50px;
            height: 50px;
            padding: 4px;
            align-self: stretch;
        }

        .tool-template .cipher-segment-btn {
            min-height: 40px;
            height: 100%;
            padding: 8px 12px;
            font-size: 0.95rem;
        }

        .tool-template .cipher-actions {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
            align-items: stretch;
        }

        .tool-template .cipher-btn {
            min-height: 50px;
            height: 50px;
            padding: 8px 12px;
            font-size: 0.95rem;
        }

        .tool-template .cipher-section,
        .tool-template .cipher-io {
            padding: 10px;
        }

        .tool-template .cipher-section {
            border-radius: 16px;
        }

        .tool-template .cipher-io {
            border-radius: 16px;
            display: grid;
            grid-template-rows: auto minmax(0, 1fr);
            min-height: 0;
        }

        .tool-template .cipher-section-title {
            margin: 0 0 8px;
            font-size: 0.92rem;
        }

        .tool-template .cipher-option-list {
            gap: 10px;
        }

        .tool-template .cipher-option-row {
            min-height: 36px;
        }

        .tool-template .cipher-option-left label {
            font-size: 0.94rem;
        }

        .tool-template .cipher-helper {
            margin-top: 10px;
            font-size: 0.86rem;
            line-height: 1.4;
        }

        .tool-template .cipher-stepper {
            min-width: 102px;
        }

        .tool-template .cipher-stepper-btn {
            width: 32px;
            height: 32px;
        }

        .tool-template .cipher-chip-row,
        .tool-template .cipher-stats {
            gap: 6px;
        }

        .tool-template .cipher-chip,
        .tool-template .cipher-stat {
            gap: 6px;
            padding: 7px 10px;
            font-size: 0.82rem;
        }

        .tool-template .cipher-io-head {
            margin-bottom: 6px;
        }

        .tool-template .cipher-io-title {
            font-size: 0.96rem;
        }

        .tool-template .cipher-mini-btn {
            min-width: 72px;
            padding: 7px 11px;
            font-size: 0.84rem;
        }

        .tool-template textarea {
            min-height: 0;
            height: 100%;
            resize: none;
            padding: 12px;
            border-radius: 14px;
            font-size: 0.96rem;
            line-height: 1.42;
        }
    }

    @media (min-width: 1440px) {
        .tool-template-shell.tool-template-shell-has-rail {
            display: grid;
            grid-template-columns: minmax(0, 1180px) 180px;
            gap: 40px;
            align-items: start;
            max-width: 1400px;
            margin: 0 auto;
        }

        .tool-template-shell.tool-template-shell-has-rail .tool-template {
            max-width: none;
            margin: 0;
        }

        .tool-template-shell.tool-template-shell-has-rail .tool-template-rail {
            display: block;
        }

        .tool-template-shell.tool-template-shell-has-rail .tool-template-rail .site-ad-slot {
            position: sticky;
            top: 120px;
            margin-top: 112px;
        }

        .tool-template-shell.tool-template-shell-has-rail .tool-template-rail .site-ad-slot-box {
            min-height: 600px;
        }
    }

    @media (max-width: 560px) {
        .tool-template-card {
            padding: 14px;
        }
    }
