:root {
    color-scheme: light;
    --bg: #f5f7f8;
    --panel: #ffffff;
    --ink: #192024;
    --muted: #69757d;
    --line: #d9e0e4;
    --accent: #177c64;
    --accent-strong: #0f5e4b;
    --warn: #a85d10;
    --shadow: 0 16px 42px rgba(23, 38, 44, 0.10);
}

* {
    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;
}

button,
select,
.tool-button {
    font: inherit;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.1;
    letter-spacing: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #eef3f1;
    color: var(--accent-strong);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.controls {
    padding: 18px;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.field span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    padding: 0 12px;
}

.artifact-list {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.artifact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}

.artifact strong {
    overflow-wrap: anywhere;
}

.artifact span {
    color: var(--muted);
}

.actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

button {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
}

.tool-button {
    display: inline-grid;
    place-items: center;
    min-height: 44px;
    border-radius: 6px;
    background: #235e8f;
    color: #fff;
    padding: 0 16px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.tool-button-large {
    width: min(280px, 100%);
}

button:disabled {
    cursor: not-allowed;
    background: #a9b5b2;
}

#gv2Disconnect {
    background: #34454d;
}

#copyLog {
    background: #4a626d;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.process {
    display: grid;
    grid-template-rows: auto auto minmax(260px, 1fr);
    min-height: 560px;
    overflow: hidden;
}

.tool-panel {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 22px;
    min-height: 560px;
    padding: 28px;
}

.tool-panel p:not(.eyebrow) {
    max-width: 560px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid var(--line);
}

.steps li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    border-right: 1px solid var(--line);
}

.steps li:last-child {
    border-right: 0;
}

.steps li > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #e8eeee;
    color: var(--muted);
    font-weight: 800;
}

.steps li.active > span,
.steps li.done > span {
    background: var(--accent);
    color: #fff;
}

.steps strong {
    display: block;
    margin-bottom: 3px;
}

.steps p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.progress-wrap {
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

progress {
    width: 100%;
    height: 12px;
    accent-color: var(--accent);
}

#logOutput {
    margin: 0;
    padding: 18px;
    overflow: auto;
    background: #10181b;
    color: #d8ece7;
    font: 0.86rem/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
}

.hidden {
    display: none;
}

@media (max-width: 820px) {
    .topbar,
    .workspace,
    .steps {
        grid-template-columns: 1fr;
    }

    .topbar {
        display: grid;
        align-items: start;
    }

    .steps li {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}
