.aitc-tct {
    --aitc-tct-primary: var(--aitc-brand-primary, #2563eb);
    --aitc-tct-primary-dark: #1d4ed8;
    --aitc-tct-accent: var(--aitc-brand-accent, #0f766e);
    --aitc-tct-ink: #172033;
    --aitc-tct-muted: #5d6678;
    --aitc-tct-line: #dfe4ec;
    --aitc-tct-soft: #f6f8fb;
    --aitc-tct-white: #ffffff;
    --aitc-tct-warning: #9a6700;
    --aitc-tct-warning-bg: #fff8dc;
    --aitc-tct-danger: #a61b1b;
    --aitc-tct-danger-bg: #fff1f1;
    color: var(--aitc-tct-ink);
    font-size: 16px;
    line-height: 1.55;
    margin: 0 auto;
    max-width: 1180px;
}

.aitc-tct *,
.aitc-tct *::before,
.aitc-tct *::after {
    box-sizing: border-box;
}

.aitc-tct button,
.aitc-tct input,
.aitc-tct select,
.aitc-tct textarea {
    font: inherit;
}

.aitc-tct__hero {
    align-items: center;
    background: linear-gradient(135deg, #eef4ff 0%, #f7fbff 52%, #effcf9 100%);
    border: 1px solid #d9e6fb;
    border-radius: 22px;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.5fr) minmax(270px, .65fr);
    margin-bottom: 22px;
    overflow: hidden;
    padding: clamp(24px, 4vw, 46px);
    position: relative;
}

.aitc-tct__hero::after {
    background: radial-gradient(circle, rgba(37, 99, 235, .11), transparent 67%);
    content: "";
    height: 300px;
    pointer-events: none;
    position: absolute;
    right: -90px;
    top: -120px;
    width: 300px;
}

.aitc-tct__eyebrow {
    color: var(--aitc-tct-primary-dark);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .085em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.aitc-tct__hero h2 {
    color: var(--aitc-tct-ink);
    font-size: clamp(2rem, 4.8vw, 3.7rem);
    letter-spacing: -.04em;
    line-height: 1.02;
    margin: 0 0 14px;
}

.aitc-tct__hero p:not(.aitc-tct__eyebrow) {
    color: #3f4b61;
    font-size: 1.08rem;
    margin: 0;
    max-width: 780px;
}

.aitc-tct__privacy {
    align-items: flex-start;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(15, 118, 110, .22);
    border-radius: 16px;
    display: flex;
    gap: 12px;
    padding: 18px;
    position: relative;
    z-index: 1;
}

.aitc-tct__privacy > span {
    font-size: 1.35rem;
}

.aitc-tct__privacy strong,
.aitc-tct__privacy span {
    display: block;
}

.aitc-tct__privacy strong {
    color: #115e59;
    margin-bottom: 3px;
}

.aitc-tct__privacy div span {
    color: var(--aitc-tct-muted);
    font-size: .9rem;
}

.aitc-tct__card {
    background: var(--aitc-tct-white);
    border: 1px solid var(--aitc-tct-line);
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(24, 39, 75, .055);
    margin: 0 0 22px;
    padding: clamp(20px, 3.5vw, 34px);
}

.aitc-tct__section-head {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.aitc-tct__section-head > div:first-child {
    align-items: center;
    display: flex;
    gap: 11px;
}

.aitc-tct__section-head h3 {
    color: var(--aitc-tct-ink);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    letter-spacing: -.018em;
    line-height: 1.2;
    margin: 0;
}

.aitc-tct__step {
    align-items: center;
    background: var(--aitc-tct-primary);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 32px;
    font-size: .9rem;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.aitc-tct__mini-stats {
    color: var(--aitc-tct-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .86rem;
    gap: 13px;
}

.aitc-tct__mini-stats strong {
    color: var(--aitc-tct-ink);
}

.aitc-tct__file-row,
.aitc-tct__result-actions,
.aitc-tct__export-buttons {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.aitc-tct__file-row {
    margin-bottom: 13px;
}

.aitc-tct__file-button,
.aitc-tct__button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 750;
    gap: 8px;
    justify-content: center;
    line-height: 1.2;
    min-height: 43px;
    padding: 10px 15px;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.aitc-tct__file-button {
    background: #eef4ff;
    border-color: #cddcf7;
    color: var(--aitc-tct-primary-dark);
}

.aitc-tct__file-button:hover,
.aitc-tct__button:hover {
    transform: translateY(-1px);
}

.aitc-tct__file-button:focus-within,
.aitc-tct__button:focus-visible,
.aitc-tct__text-button:focus-visible,
.aitc-tct select:focus,
.aitc-tct textarea:focus,
.aitc-tct input:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .2);
    outline: 2px solid transparent;
}

.aitc-tct__file-button input {
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.aitc-tct__button--primary {
    background: var(--aitc-tct-primary);
    border-color: var(--aitc-tct-primary);
    color: #fff;
}

.aitc-tct__button--primary:hover {
    background: var(--aitc-tct-primary-dark);
}

.aitc-tct__button--secondary {
    background: #eaf8f5;
    border-color: #bde4dc;
    color: #0f6159;
}

.aitc-tct__button--ghost {
    background: #fff;
    border-color: #ccd3df;
    color: #344054;
}

.aitc-tct__button--ghost:hover {
    background: #f8fafc;
    border-color: #9ea9ba;
}

.aitc-tct__text-button {
    background: none;
    border: 0;
    color: var(--aitc-tct-primary-dark);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    padding: 5px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.aitc-tct__filename {
    color: var(--aitc-tct-muted);
    font-size: .88rem;
    overflow-wrap: anywhere;
}

.aitc-tct__textarea,
.aitc-tct textarea[data-option] {
    background: #fbfcfe;
    border: 1px solid #cbd3df;
    border-radius: 12px;
    color: #182033;
    display: block;
    line-height: 1.58;
    min-height: 140px;
    padding: 15px;
    resize: vertical;
    width: 100%;
}

.aitc-tct__textarea--input {
    min-height: 330px;
}

.aitc-tct__presets {
    border: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 26px;
    padding: 0;
}

.aitc-tct__preset {
    cursor: pointer;
    display: block;
    min-width: 0;
    position: relative;
}

.aitc-tct__preset input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.aitc-tct__preset > span {
    background: #fff;
    border: 2px solid #d9dee8;
    border-radius: 14px;
    display: block;
    height: 100%;
    min-height: 118px;
    padding: 18px;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.aitc-tct__preset strong,
.aitc-tct__preset small {
    display: block;
}

.aitc-tct__preset strong {
    color: var(--aitc-tct-ink);
    font-size: 1.08rem;
    margin-bottom: 5px;
}

.aitc-tct__preset small {
    color: var(--aitc-tct-muted);
    line-height: 1.45;
}

.aitc-tct__preset input:checked + span {
    background: #f4f8ff;
    border-color: var(--aitc-tct-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.aitc-tct__preset input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .22);
}

.aitc-tct__preset em {
    background: var(--aitc-tct-primary);
    border-radius: 999px;
    color: #fff;
    font-size: .68rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .025em;
    padding: 4px 8px;
    position: absolute;
    right: 10px;
    text-transform: uppercase;
    top: 9px;
}

.aitc-tct__options-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aitc-tct__option-group {
    background: var(--aitc-tct-soft);
    border: 1px solid #e2e7ef;
    border-radius: 14px;
    margin: 0;
    min-width: 0;
    padding: 18px;
}

.aitc-tct__option-group legend {
    color: var(--aitc-tct-ink);
    font-size: 1rem;
    font-weight: 800;
    padding: 0 5px;
}

.aitc-tct__option-group > label,
.aitc-tct__inline-check {
    align-items: flex-start;
    color: #3f4859;
    cursor: pointer;
    display: flex;
    gap: 9px;
    margin: 0 0 11px;
}

.aitc-tct__option-group input[type="checkbox"],
.aitc-tct__inline-check input[type="checkbox"] {
    accent-color: var(--aitc-tct-primary);
    flex: 0 0 auto;
    height: 18px;
    margin-top: 3px;
    width: 18px;
}

.aitc-tct__select-label {
    display: block !important;
}

.aitc-tct__select-label > span {
    display: block;
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.aitc-tct select {
    background: #fff;
    border: 1px solid #cbd3df;
    border-radius: 9px;
    color: #253044;
    min-height: 40px;
    padding: 7px 34px 7px 10px;
    width: 100%;
}

.aitc-tct__advanced {
    border: 1px solid #dce2eb;
    border-radius: 12px;
    margin-top: 18px;
}

.aitc-tct__advanced summary {
    cursor: pointer;
    font-weight: 800;
    padding: 15px 17px;
}

.aitc-tct__advanced-grid {
    border-top: 1px solid #e5e9f0;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 17px;
}

.aitc-tct__advanced-grid label > span,
.aitc-tct__advanced-grid label > small {
    display: block;
}

.aitc-tct__advanced-grid label > span {
    font-weight: 750;
    margin-bottom: 3px;
}

.aitc-tct__advanced-grid label > small {
    color: var(--aitc-tct-muted);
    font-size: .8rem;
    margin-bottom: 8px;
}

.aitc-tct__meaning-guard {
    align-items: flex-start;
    background: #f0fdf8;
    border: 1px solid #c7ebdd;
    border-radius: 12px;
    display: flex;
    gap: 9px 16px;
    margin: 18px 0;
    padding: 14px 16px;
}

.aitc-tct__meaning-guard strong {
    color: #0f6159;
    flex: 0 0 auto;
}

.aitc-tct__meaning-guard span {
    color: #49645f;
}

.aitc-tct__run {
    font-size: 1.02rem;
    min-height: 50px;
    padding-inline: 24px;
}

.aitc-tct__notice,
.aitc-tct__warning {
    border: 1px solid;
    border-radius: 12px;
    font-weight: 650;
    margin: 0 0 18px;
    padding: 13px 15px;
}

.aitc-tct__notice--warning {
    background: var(--aitc-tct-warning-bg);
    border-color: #ebd787;
    color: var(--aitc-tct-warning);
}

.aitc-tct__warning {
    background: var(--aitc-tct-danger-bg);
    border-color: #efb7b7;
    color: var(--aitc-tct-danger);
}

.aitc-tct__compare {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aitc-tct__compare-label {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
}

.aitc-tct__compare-label span {
    color: var(--aitc-tct-muted);
    font-size: .8rem;
}

.aitc-tct__report,
.aitc-tct__export {
    border-top: 1px solid #e4e8ef;
    margin-top: 24px;
    padding-top: 22px;
}

.aitc-tct__report h4,
.aitc-tct__export h4 {
    color: var(--aitc-tct-ink);
    margin: 0 0 13px;
}

.aitc-tct__report-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.aitc-tct__report-grid > div {
    background: var(--aitc-tct-soft);
    border: 1px solid #e4e8ef;
    border-radius: 11px;
    min-width: 0;
    padding: 13px;
}

.aitc-tct__report-grid strong,
.aitc-tct__report-grid span {
    display: block;
}

.aitc-tct__report-grid strong {
    color: var(--aitc-tct-primary-dark);
    font-size: 1.35rem;
    letter-spacing: -.025em;
}

.aitc-tct__report-grid span {
    color: var(--aitc-tct-muted);
    font-size: .77rem;
    line-height: 1.3;
}

.aitc-tct__ai-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-color: #ccdbee;
}

.aitc-tct__ai-card > p {
    color: var(--aitc-tct-muted);
    margin: -5px 0 13px 43px;
    max-width: 820px;
}

.aitc-tct__optional {
    background: #eef2f7;
    border-radius: 999px;
    color: #526071;
    font-size: .74rem;
    font-weight: 800;
    padding: 5px 10px;
    text-transform: uppercase;
}

.aitc-tct__prompt {
    background: #111827;
    border-color: #111827;
    color: #edf4ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .88rem;
    margin-bottom: 12px;
}

.aitc-tct__help h3 {
    margin-top: 0;
}

.aitc-tct__help-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aitc-tct__help-grid > div {
    border-left: 3px solid var(--aitc-tct-primary);
    padding-left: 14px;
}

.aitc-tct__help-grid strong {
    display: block;
    margin-bottom: 4px;
}

.aitc-tct__help-grid p {
    color: var(--aitc-tct-muted);
    margin: 0;
}

.aitc-tct__toast {
    background: #172033;
    border-radius: 999px;
    bottom: 24px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .22);
    color: #fff;
    font-weight: 750;
    left: 50%;
    max-width: calc(100vw - 28px);
    padding: 10px 16px;
    position: fixed;
    transform: translateX(-50%);
    z-index: 99999;
}

.aitc-tct [hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .aitc-tct__hero,
    .aitc-tct__options-grid {
        grid-template-columns: 1fr;
    }

    .aitc-tct__presets {
        grid-template-columns: 1fr;
    }

    .aitc-tct__preset > span {
        min-height: auto;
    }

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

@media (max-width: 700px) {
    .aitc-tct__section-head,
    .aitc-tct__meaning-guard {
        align-items: flex-start;
        flex-direction: column;
    }

    .aitc-tct__section-head > div:first-child {
        align-items: flex-start;
    }

    .aitc-tct__compare,
    .aitc-tct__advanced-grid,
    .aitc-tct__help-grid {
        grid-template-columns: 1fr;
    }

    .aitc-tct__ai-card > p {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .aitc-tct__card,
    .aitc-tct__hero {
        border-radius: 14px;
        padding: 18px;
    }

    .aitc-tct__button,
    .aitc-tct__file-button {
        width: 100%;
    }

    .aitc-tct__report-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aitc-tct *,
    .aitc-tct *::before,
    .aitc-tct *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
