.runtime-panel {
    background: #f5f8f9;
    padding: 28px clamp(16px, 3vw, 44px);
    border-top: 1px solid var(--line);
    scroll-margin-top: 12px;
}

.runtime-heading,
.runtime-task-heading,
.runtime-evidence-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
}

.runtime-heading h2 {
    font: 400 29px Georgia, serif;
    margin: 10px 0;
}

.runtime-heading p {
    font-size: 12px;
    color: #6a8490;
    line-height: 1.6;
}

.runtime-columns {
    display: grid;
    grid-template-columns: 275px minmax(0, 1fr);
    gap: 28px;
    margin-top: 22px;
}

.runtime-sidebar {
    padding-right: 25px;
    border-right: 1px solid var(--line);
    min-width: 0;
}

.runtime-sidebar h3,
.runtime-detail h3 {
    font-size: 16px;
    margin: 0 0 12px;
}

.runtime-sidebar>h3:not(:first-child) {
    margin-top: 30px;
}

.runtime-panel p,
.runtime-panel li {
    font-size: 12px;
    line-height: 1.65;
}

.runtime-panel label {
    margin-bottom: 14px;
}

.runtime-panel select,
.runtime-panel textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin-top: 7px;
    padding: 9px;
    border: 1px solid #c8dbe1;
    border-radius: 5px;
    background: white;
    color: var(--ink);
    font: inherit;
    line-height: 1.6;
}

.runtime-panel textarea {
    resize: vertical;
}

.runtime-panel select:focus,
.runtime-panel textarea:focus {
    outline: 2px solid #218d7855;
    outline-offset: 2px;
}

.runtime-detail {
    min-width: 0;
}

.runtime-task-list {
    display: grid;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
}

.runtime-task-list button {
    display: block;
    width: 100%;
    background: #fff;
    text-align: left;
    color: var(--ink);
    border: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.runtime-task-list button[aria-pressed=true] {
    border-color: var(--accent);
    box-shadow: inset 3px 0 var(--accent);
}

.runtime-task-list small {
    display: block;
    margin-top: 5px;
    color: #6a8490;
    font-weight: 400;
}

.runtime-task-heading h3 {
    overflow-wrap: anywhere;
    margin-bottom: 6px;
}

.runtime-context {
    overflow-wrap: anywhere;
}

.runtime-badge {
    display: inline-block;
    white-space: nowrap;
    border-radius: 4px;
    background: #e6eeee;
    color: #285f61;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 600;
}

.runtime-badge[data-state=SUCCEEDED],
.runtime-badge[data-state=READY] {
    background: #deeee4;
    color: #276e4c;
}

.runtime-badge[data-state=HELD],
.runtime-badge[data-state=WAITING_INPUT],
.runtime-badge[data-state=FAILED] {
    background: #fff0dc;
    color: #855b26;
}

.runtime-actions {
    display: flex;
    align-items: start;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.runtime-actions label {
    margin: 0 0 0 auto;
    max-width: 220px;
}

.runtime-actions select {
    margin-top: 4px;
}

.runtime-hint {
    color: #6a8490;
    font-size: 11px !important;
}

.runtime-nodes {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
}

.runtime-node,
.runtime-principal {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 14px;
    background: #fff;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.runtime-node-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.runtime-node h5,
.runtime-principal h5 {
    font-size: 13px;
    margin: 0;
}

.runtime-node p,
.runtime-principal p {
    margin: 7px 0;
}

.runtime-node button,
.runtime-principal button {
    margin: 6px 8px 0 0;
}

.runtime-panel h4 {
    font-size: 13px;
    margin: 22px 0 12px;
}

.runtime-resolution,
.runtime-error,
.runtime-pending {
    padding: 16px;
    border: 1px solid #e3c99b;
    background: #fff8e9;
    border-radius: 6px;
    margin: 16px 0;
}

.runtime-resolution h4 {
    margin: 0;
}

.runtime-resolution label {
    max-width: 220px;
}

.runtime-error {
    color: #854d38;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.runtime-unresolved {
    padding: 12px 12px 12px 28px;
    background: #fff4e4;
    color: #855b26;
}

.runtime-audit {
    font-size: 12px;
    margin: 20px 0;
}

.runtime-audit summary {
    cursor: pointer;
}

.runtime-audit p {
    overflow-wrap: anywhere;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
}

.runtime-evidence {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 16px;
    background: white;
}

.runtime-evidence h4 {
    margin: 0;
}

.runtime-evidence pre,
.catalog-json {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 11px;
    max-height: 420px;
    overflow: auto;
    line-height: 1.6;
}

@media(max-width:800px) {
    .runtime-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .runtime-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 0 0 24px;
    }

    .runtime-task-list {
        max-height: 250px;
    }

    .runtime-task-heading {
        flex-wrap: wrap;
    }

    .runtime-actions label {
        margin-left: 0;
        width: 100%;
    }

    .runtime-heading {
        gap: 10px;
    }

    .runtime-heading button {
        max-width: 110px;
    }
}

.authored-table-wrap {
    overflow: auto;
    max-width: 100%
}

#authored-table {
    border-collapse: collapse;
    min-width: 620px;
    width: 100%;
    font-size: 12px
}

#authored-table th,
#authored-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--line)
}

#authored-table input {
    width: 120px
}

#authored-table .authored-override {
    background: #fff6d8
}

#authored-blocks textarea {
    min-height: 90px
}

#authored-fields {
    min-width: 0
}

#authored-panel legend {
    font-size: 16px;
    font-weight: 600
}

.plan-preview {
    display: block;
    width: 100%;
    max-height: 540px;
    object-fit: contain;
    background: white;
    border: 1px solid var(--line);
    margin: 16px 0
}

.plan-preview[hidden] {
    display: none
}

#sheet-fields { min-width: 0; }
#sheet-fields table { width: 100%; min-width: 800px; border-collapse: collapse; }
#sheet-fields th, #sheet-fields td { padding: 8px; vertical-align: top; border-bottom: 1px solid var(--line); }
#sheet-fields td { overflow-wrap: anywhere; white-space: pre-line; }
#sheet-fields input { width: 140px; max-width: 100%; }
#sheet-exports a[aria-disabled="true"] { opacity: .5; }

#plan-layout {
    min-width: 0
}

#plan-tools a[aria-disabled="true"] {
    opacity: .5;
    pointer-events: none
}
