:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #eef3f8;
    --ink: #17202a;
    --muted: #647084;
    --line: #d8e0ea;
    --accent: #0f766e;
    --accent-strong: #0b5f59;
    --danger: #b42318;
    --ok: #157f3b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px clamp(18px, 4vw, 48px);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 18px;
}

.system {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.system span,
.pill,
.status {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 5px 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
}

.notice {
    margin: 16px clamp(18px, 4vw, 48px) 0;
    padding: 12px 14px;
    border: 1px solid #b8d8d3;
    border-radius: 8px;
    background: #e8f6f3;
    color: #164e47;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    padding: 18px clamp(18px, 4vw, 48px) 48px;
}

.workspace {
    display: grid;
    gap: 18px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-head p,
.muted {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.runner,
.settings-form {
    display: grid;
    gap: 14px;
}

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

.field {
    display: grid;
    gap: 6px;
}

.field span {
    color: #324154;
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 11px 12px;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(15, 118, 110, 0.2);
    border-color: var(--accent);
}

.hidden {
    display: none;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 10px 12px;
}

button:hover {
    border-color: var(--accent);
}

.submit,
.secondary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.submit:hover,
.secondary:hover {
    background: var(--accent-strong);
}

.output {
    min-height: 240px;
    max-height: 620px;
    overflow: auto;
    margin: 0;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #ced8e3;
    background: #111827;
    color: #edf2f7;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.55;
    font-size: 13px;
}

.output.error {
    border-color: #f2b8b5;
    background: #fff5f5;
    color: var(--danger);
}

.empty {
    display: grid;
    place-items: center;
    min-height: 180px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
}

.chart {
    display: block;
    width: 100%;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}

.history {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.history article {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.history strong {
    font-size: 13px;
}

.history small {
    color: var(--muted);
}

.status.success {
    color: var(--ok);
}

.status.error {
    color: var(--danger);
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid.two {
        grid-template-columns: 1fr;
    }
}


.street-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid #9ee5d1;
    border-radius: 8px;
    background: #ecfdf7;
}

.street-panel strong {
    color: #075e54;
    font-size: 16px;
}

.street-panel p {
    margin-top: 4px;
    color: #476070;
    font-size: 14px;
    line-height: 1.5;
}

.street-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.street-badges span {
    border-radius: 999px;
    padding: 6px 9px;
    background: #d8f8eb;
    color: #076453;
    font-size: 12px;
    font-weight: 800;
}

.check-field {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 10px;
    align-content: start;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #cfe9df;
    border-radius: 8px;
    background: #f6fffb;
}

.check-field input[type="hidden"] {
    display: none;
}

.check-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
}

.check-field span {
    color: #0b4f47;
    font-size: 13px;
    font-weight: 800;
}

.check-field small {
    grid-column: 2;
    color: var(--muted);
    line-height: 1.4;
}

.check-field.hidden {
    display: none;
}

@media (max-width: 900px) {
    .street-panel {
        grid-template-columns: 1fr;
    }

    .street-badges {
        justify-content: flex-start;
    }
}
