.page-tool--data-type-detector .tool-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-tool--data-type-detector .tool-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.25fr);
    gap: 16px;
    align-items: start;
}

.page-tool--data-type-detector .dtd-input,
.page-tool--data-type-detector .dtd-results {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.page-tool--data-type-detector .dtd-input__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.page-tool--data-type-detector .dtd-textarea {
    min-height: 20rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    resize: vertical;
}

.page-tool--data-type-detector .dtd-options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.page-tool--data-type-detector .dtd-options .field {
    min-width: 150px;
}

.page-tool--data-type-detector .dtd-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    font-size: 0.85rem;
    color: var(--ink-2);
    cursor: pointer;
}

.page-tool--data-type-detector .dtd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-tool--data-type-detector .dtd-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.page-tool--data-type-detector .dtd-results__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page-tool--data-type-detector .dtd-status {
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--muted);
}

.page-tool--data-type-detector .dtd-warning {
    margin: 0;
    padding: 9px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 0.78rem;
}

.page-tool--data-type-detector .dtd-results__scroll {
    max-height: 30rem;
    overflow: auto;
}

.page-tool--data-type-detector .dtd-results__scroll .empty-state {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 3rem 1.25rem;
}

.page-tool--data-type-detector .dtd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.page-tool--data-type-detector .dtd-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
}

.page-tool--data-type-detector .dtd-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.page-tool--data-type-detector .dtd-table tr:last-child td {
    border-bottom: 0;
}

.page-tool--data-type-detector .dtd-table tbody tr:nth-child(even) {
    background: var(--surface-2);
}

.page-tool--data-type-detector .dtd-num {
    text-align: right;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
    white-space: nowrap;
}

.page-tool--data-type-detector .dtd-col-name {
    font-family: var(--font-mono);
    color: var(--ink);
    overflow-wrap: anywhere;
}

.page-tool--data-type-detector .dtd-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.page-tool--data-type-detector .dtd-type--boolean {
    background: var(--success-soft);
    color: var(--success);
}

.page-tool--data-type-detector .dtd-type--date,
.page-tool--data-type-detector .dtd-type--datetime,
.page-tool--data-type-detector .dtd-type--time {
    background: var(--warning-soft);
    color: var(--warning);
}

.page-tool--data-type-detector .dtd-type--string,
.page-tool--data-type-detector .dtd-type--null {
    background: var(--surface-3);
    color: var(--muted);
}

.page-tool--data-type-detector .dtd-mix {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.68rem;
}

.page-tool--data-type-detector .dtd-flag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.page-tool--data-type-detector .dtd-flag--yes {
    color: var(--warning);
}

.page-tool--data-type-detector .dtd-flag--no {
    color: var(--muted);
}

.page-tool--data-type-detector .dtd-example {
    max-width: 22ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    color: var(--muted);
}

.page-tool--data-type-detector .dtd-results__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.page-tool--data-type-detector .dtd-copy-status {
    font-size: 0.76rem;
    color: var(--muted);
}

.page-tool--data-type-detector .dtd-copy-status--success {
    color: var(--success);
}

.page-tool--data-type-detector .dtd-copy-status--error {
    color: var(--danger);
}

.page-tool--data-type-detector .dtd-schema__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.page-tool--data-type-detector .dtd-schema__body {
    display: flex;
    flex-direction: column;
}

.page-tool--data-type-detector .dtd-code {
    margin: 0;
    padding: 14px 16px;
    max-height: 24rem;
    overflow: auto;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.6;
    white-space: pre;
    tab-size: 4;
}

.page-tool--data-type-detector .dtd-copy-status--schema {
    padding: 9px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

@media (max-width: 900px) {
    .page-tool--data-type-detector .tool-workspace {
        grid-template-columns: 1fr;
    }

    .page-tool--data-type-detector .dtd-results__scroll {
        max-height: 26rem;
    }
}

@media (max-width: 560px) {
    .page-tool--data-type-detector .dtd-textarea {
        min-height: 14rem;
    }

    .page-tool--data-type-detector .dtd-example {
        max-width: 14ch;
    }
}
