.dr-title h1 { max-width: 20ch; }
.dr-title .lede { max-width: 60ch; }
.dr-workspace {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    gap: 14px;
    align-items: stretch;
}
.dr-input, .dr-results { min-width: 0; padding: clamp(17px, 3.2vw, 34px); border-radius: 19px; }
.dr-input {
    border: 1px solid #364b84;
    background: radial-gradient(ellipse at 97% 1%, #283f83, #151f40 61%);
    color: var(--white);
}
.dr-input > label:first-child { display: block; font: 740 1.32rem/1.2 var(--display); }
.dr-input-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-block: 7px;
    color: #d3dffd;
    font-size: .91rem;
}
.dr-input-meta [data-dr-count] { font-variant-numeric: tabular-nums; }
.dr-input textarea {
    display: block;
    width: 100%;
    min-height: 221px;
    resize: vertical;
    padding: 11px 12px;
    border: 1px solid #7890ce;
    border-radius: 10px;
    background: #111a34;
    color: #f5f8ff;
    font: .94rem/1.5 ui-monospace, monospace;
}
.dr-input textarea::placeholder { color: #aebcde; }
.dr-input textarea:focus-visible, .dr-input button:focus-visible, .dr-file:focus-within {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}
.dr-input-actions, .dr-submit-actions, .dr-export { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.dr-input-actions { margin-top: 9px; }
.dr-input-actions .button, .dr-export .button { min-height: 39px; padding: 6px 10px; font-size: .86rem; }
.dr-submit-actions { margin-top: 17px; }
.dr-input .dr-secondary { border-color: #7488be; background: #21335d; color: #ecf2ff; }
.dr-input .dr-secondary:hover { background: #344b80; }
.dr-clear { background: transparent; color: #e4ebff; }
.dr-clear:hover { background: #263968; }
.dr-workspace button:disabled { opacity: .63; cursor: default; }
.dr-file { position: relative; }
.dr-file:has(input:disabled) { opacity: .63; cursor: default; }
.dr-message { min-height: 1.4em; margin-top: 10px; color: #e1ebff; font-size: .93rem; line-height: 1.4; }
.dr-message.is-error, .dr-input-meta .is-error { color: #ffbcb7; }

.dr-results { border: 1px solid #cbd5ee; background: var(--white); }
.dr-results-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: 9px 18px;
}
.dr-results h2 { font-size: clamp(1.7rem, 3.1vw, 2.55rem); }
.dr-source, .dr-result-count { color: var(--muted); font-size: .9rem; }
.dr-source { margin-top: 7px; }
.dr-source a { color: var(--link); font-weight: 670; }
.dr-results .dr-secondary { border-color: #bac7e5; background: #f1f4fc; color: var(--ink); }
.dr-results .dr-secondary:hover { background: #e6edff; }
.dr-empty {
    display: grid;
    place-items: center;
    min-height: 245px;
    margin-top: 25px;
    padding: 14px;
    border: 1px dashed #bdcae7;
    border-radius: 12px;
    background: #f5f7fe;
    color: var(--muted);
    text-align: center;
}
.dr-filters {
    display: grid;
    grid-template-columns: minmax(0, .7fr) minmax(0, .7fr) minmax(0, 1.2fr);
    gap: 7px;
    margin: 16px 0 8px;
}
.dr-filters label { min-width: 0; color: #3c4968; font-size: .86rem; font-weight: 670; }
.dr-filters :is(input, select) {
    display: block;
    width: 100%;
    min-height: 41px;
    margin-top: 3px;
    padding: 5px 7px;
    border: 1px solid #aebbd8;
    border-radius: 7px;
    background: #f7f9ff;
    color: var(--ink);
    font-weight: 500;
}
.dr-table-frame { max-height: 480px; overflow: auto; margin-top: 7px; border: 1px solid #cbd5ee; border-radius: 9px; }
.dr-table-frame table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .94rem; line-height: 1.3; }
.dr-table-frame th {
    position: sticky;
    top: 0;
    padding: 8px 11px;
    border-bottom: 1px solid #c4d0ea;
    background: #eaf0fc;
    text-align: left;
}
.dr-table-frame td { padding: 8px 11px; border-bottom: 1px solid #e3e9f7; overflow-wrap: anywhere; }
.dr-table-frame tbody tr:nth-child(even) { background: #f8faff; }
.dr-table-frame :is(th, td):last-child { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.dr-table-frame td:last-child { font-weight: 730; }
.dr-table-frame td.dr-missing { color: var(--muted); font-size: .81rem; font-weight: 500; }

@media (max-width: 880px) {
    .dr-workspace { grid-template-columns: minmax(0, 1fr); }
    .dr-empty { min-height: 148px; margin-top: 16px; }
}
