:root {
  color-scheme: light;
  --ink: #152522;
  --muted: #667572;
  --line: #dce5e1;
  --line-soft: #eaf0ed;
  --canvas: #f5f7f5;
  --surface: #ffffff;
  --nav: #102923;
  --green: #176b53;
  --green-dark: #0e513e;
  --green-soft: #e5f3ed;
  --blue-soft: #e8f0fb;
  --violet-soft: #f0eafa;
  --shadow: 0 16px 42px rgba(21, 37, 34, .10);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(39, 132, 101, .24); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 16px 18px; color: #d5e2de; background: var(--nav); }
.brand { display: flex; align-items: center; gap: 14px; padding: 0 8px 26px; color: #fff; text-decoration: none; font-weight: 760; letter-spacing: .14em; font-size: 18px; }
.brand-logo { width: 72px; height: 72px; display: block; flex: 0 0 auto; border-radius: 50%; object-fit: cover; object-position: center; box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 4px 12px rgba(0,0,0,.28); }
.nav-list { display: flex; flex-direction: column; gap: 5px; }
.nav-list a, .sidebar-footer a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; color: #b9c9c4; border-radius: 8px; text-decoration: none; font-weight: 560; }
.nav-list a:hover, .sidebar-footer a:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-list a.active, .sidebar-footer a.active { color: #fff; background: rgba(112, 207, 176, .14); box-shadow: inset 3px 0 #61c4a3; }
.nav-icon { width: 19px; text-align: center; font-size: 17px; color: #88a59d; }
.active .nav-icon { color: #77d0b2; }
.nav-label { margin: 25px 12px 7px; color: #789088; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 760; }
.nav-label.first { margin-top: 0; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.build-label { display: flex; align-items: center; gap: 8px; margin: 18px 12px 0; color: #789088; font-size: 11px; }
.build-label span { width: 7px; height: 7px; border-radius: 50%; background: #5fc69f; box-shadow: 0 0 0 4px rgba(95,198,159,.1); }

.workspace { min-width: 0; }
.topbar { height: 68px; padding: 0 clamp(20px, 4vw, 48px); display: flex; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); backdrop-filter: blur(12px); }
.menu-button { display: none; border: 0; background: transparent; font-size: 20px; }
.crumbs { display: flex; gap: 10px; align-items: center; color: #7b8986; font-size: 13px; }
.crumbs i { color: #aeb9b6; font-style: normal; }
.crumbs strong { color: #30403c; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.account-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.account-picker select { max-width: 220px; border: 0; background: transparent; color: var(--ink); font-weight: 680; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: #f6fffc; background: #315b4e; font-size: 11px; font-weight: 760; }

main { max-width: 1320px; margin: 0 auto; padding: 50px clamp(24px, 5vw, 72px) 72px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 7px; color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 790; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 4vw, 46px); font-weight: 500; letter-spacing: -.035em; }
.lede { max-width: 650px; margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.heading-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.button { min-height: 42px; padding: 0 17px; border-radius: 7px; border: 1px solid transparent; font-weight: 700; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--green); box-shadow: 0 7px 16px rgba(23,107,83,.16); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { color: #294039; background: var(--surface); border-color: #cfdad6; }
.button.secondary:hover { border-color: #9eb4ac; }
.button.danger { color: #ffe9e4; border-color: rgba(255, 181, 166, .35); background: rgba(139, 48, 35, .32); }
.button.danger:hover { color: #fff; border-color: rgba(255, 181, 166, .58); background: rgba(157, 50, 35, .52); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.metrics article { min-height: 120px; display: flex; align-items: center; gap: 17px; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.metric-icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; font-size: 19px; }
.metric-icon.blue { color: #3c6daa; background: var(--blue-soft); }
.metric-icon.violet { color: #7250a5; background: var(--violet-soft); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metrics p { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 650; }
.metrics strong { display: block; line-height: 1; font-size: 27px; letter-spacing: -.03em; }
.metrics small { display: block; margin-top: 8px; color: #8b9995; }

.notice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 0 0 18px; padding: 15px 18px; border: 1px solid #cbe3d8; border-radius: 9px; background: #eef8f3; }
.notice-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-family: Georgia, serif; font-weight: 700; }
.notice strong { font-size: 12px; }
.notice p { margin: 3px 0 0; color: #557068; font-size: 12px; line-height: 1.45; }
.notice a { color: var(--green-dark); text-decoration: none; font-size: 12px; font-weight: 750; white-space: nowrap; }

.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.panel-toolbar { display: flex; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.search-field { width: min(340px, 100%); position: relative; }
.search-field span { position: absolute; left: 12px; top: 8px; color: #7d8b87; font-size: 20px; }
.search-field input, .filters select, .form-grid input, .form-grid select { width: 100%; min-height: 39px; border: 1px solid #ccd8d4; border-radius: 6px; color: var(--ink); background: #fff; }
.search-field input { padding: 0 12px 0 39px; }
.search-field input::placeholder { color: #95a19e; }
.filters { display: flex; gap: 10px; }
.filters label { position: relative; }
.filters label > span { position: absolute; left: 11px; top: 12px; color: #81908c; font-size: 11px; pointer-events: none; }
.filters select { min-width: 135px; padding: 0 30px 0 43px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 20px; color: #7a8985; background: #fafbfa; text-align: left; text-transform: uppercase; letter-spacing: .07em; font-size: 10px; font-weight: 760; }
td { padding: 15px 20px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.user-avatar { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #315b4e; background: #e8efec; font-size: 11px; font-weight: 770; }
.user-cell strong { display: block; font-size: 13px; }
.user-cell span { display: block; margin-top: 3px; color: #7c8a87; font-size: 11px; }
.role-select { min-height: 32px; padding: 0 28px 0 10px; border: 1px solid transparent; border-radius: 6px; color: #3e514b; background: #f3f6f4; font-size: 11px; font-weight: 680; text-transform: capitalize; }
.role-select:hover { border-color: #cdd9d5; }
.retention-select { min-width: 154px; min-height: 32px; padding: 0 28px 0 10px; border: 1px solid #cdd9d5; border-radius: 6px; color: #3e514b; background: #fff; font-size: 11px; }
.retention-control { min-width: 235px; }
.retention-control small { display: block; margin-top: 5px; color: #82908c; font-size: 9px; line-height: 1.35; }
.access-control { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.access-control div strong { display: block; font-size: 11px; }
.access-control div small { display: block; margin-top: 2px; color: #83908d; font-size: 10px; }
.switch { width: 34px; height: 20px; position: relative; display: inline-flex; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 100%; border-radius: 20px; background: #c8d2ce; transition: .18s; }
.switch span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: .18s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(14px); }
.date-cell { color: #677672; font-size: 11px; white-space: nowrap; }
.row-menu { border: 0; color: #75837f; background: transparent; font-size: 19px; }
.panel-footer { display: flex; justify-content: space-between; padding: 13px 20px; color: #82908c; background: #fafbfa; border-top: 1px solid var(--line-soft); font-size: 10px; }
.empty-state { padding: 65px 20px; text-align: center; border-top: 1px solid var(--line-soft); }
.empty-state > span { color: #a4b4af; font-size: 34px; }
.empty-state h2 { margin: 10px 0 4px; font-family: Georgia, serif; font-weight: 500; }
.empty-state p { margin: 0; color: var(--muted); }
.billing-notes { margin-top: 20px; padding: 24px 28px; display: grid; grid-template-columns: minmax(180px, 1fr) 2.2fr; align-items: center; gap: 30px; border-left: 3px solid #93b8ab; background: #edf1ef; }
.billing-notes h2 { margin: 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.billing-notes > p { margin: 0; color: #5d6d68; line-height: 1.6; }
.retention-audit { margin-top: 20px; }
.notice-table td { color: #52635e; font-size: 11px; }
.notice-table td:first-child strong, .notice-table td:first-child small, .notice-table td:nth-child(2) small { display: block; }
.notice-table td:first-child strong { color: var(--ink); font-size: 12px; }
.notice-table td small { margin-top: 4px; color: #87948f; }
.delivery-status { display: inline-flex; max-width: 250px; padding: 5px 8px; border-radius: 20px; color: #6f5a24; background: #fff4cf; line-height: 1.35; }
.delivery-status.sent { color: #24634f; background: #e7f4ee; }
.delivery-status.failed { color: #8a4333; background: #fcebe7; }
.empty-state.compact { padding: 38px 20px; }

.billing-heading { align-items: flex-end; }
.statement-actions { align-items: flex-end; }
.statement-actions .button { min-width: 176px; }
.month-picker { min-width: 190px; display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.month-picker input { min-height: 42px; padding: 0 12px; border: 1px solid #c9d6d1; border-radius: 7px; color: var(--ink); background: var(--surface); }
.preview-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid #e7d9ae; border-radius: 9px; background: #fff9e8; }
.preview-banner.final { border-color: #c8ded5; background: #f0f8f4; }
.preview-badge { padding: 6px 9px; border-radius: 5px; color: #70571a; background: #f3e4b0; text-transform: uppercase; letter-spacing: .08em; font-size: 9px; font-weight: 800; }
.preview-badge.final { color: #215d49; background: #dcefe7; }
.preview-banner strong { font-size: 12px; }
.preview-banner p { margin: 3px 0 0; color: #756b50; font-size: 11px; line-height: 1.45; }
.provider-label { color: #897b55; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.billing-overview { display: grid; grid-template-columns: minmax(260px, .78fr) 2fr; gap: 16px; margin-bottom: 18px; }
.total-card { min-height: 202px; display: flex; flex-direction: column; padding: 25px; border-radius: 11px; color: #f4fffb; background: linear-gradient(145deg, #102923, #1d5847); box-shadow: 0 13px 30px rgba(16, 41, 35, .14); }
.total-card-top { display: flex; justify-content: space-between; align-items: center; color: #bcd2ca; font-size: 11px; font-weight: 700; }
.status-pill { padding: 5px 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 20px; color: #bfe7d9; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; }
.total-card > strong { margin-top: 25px; font-family: Georgia, "Times New Roman", serif; font-size: 38px; font-weight: 500; letter-spacing: -.035em; }
.total-card > p { margin: 8px 0 0; color: #a8c1b9; font-size: 11px; }
.total-card-foot { display: flex; gap: 16px; margin-top: auto; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.12); color: #aac4bb; font-size: 10px; }
.total-card-foot span::before { content: "✓"; margin-right: 5px; color: #76d1b2; }
.usage-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.usage-metrics article { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.usage-metrics .metric-icon { margin-bottom: 24px; }
.usage-metrics p { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 670; }
.usage-metrics strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 24px; letter-spacing: -.03em; }
.usage-metrics small { display: block; margin-top: 6px; color: #8b9995; }
.billing-grid { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(260px, .8fr); gap: 18px; align-items: start; }
.statement-panel { min-width: 0; }
.section-heading { min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }
.section-heading > span { color: #7e8c88; font-size: 10px; }
.billing-table td { color: #52635e; font-size: 11px; white-space: nowrap; }
.resource-cell { display: flex; align-items: center; gap: 11px; min-width: 175px; }
.resource-cell strong, .resource-cell small { display: block; }
.resource-cell strong { color: var(--ink); font-size: 12px; }
.resource-cell small { margin-top: 3px; color: #8a9793; font-size: 9px; }
.resource-mark { width: 8px; height: 34px; border-radius: 5px; background: #6689b5; }
.resource-mark.memory { background: #866bb0; }
.resource-mark.storage { background: #5ba186; }
.resource-mark.ai_input, .resource-mark.ai_cached_input, .resource-mark.ai_output { background: #c38b45; }
.exempt-usage { color: var(--green) !important; }
.external-usage { color: #315d82 !important; }
.amount-cell { color: var(--ink) !important; font-weight: 770; }
.statement-total-row { display: flex; justify-content: flex-end; align-items: center; gap: 30px; padding: 17px 20px; border-top: 1px solid var(--line); background: #fafbfa; }
.statement-total-row span { color: var(--muted); font-size: 11px; font-weight: 680; }
.statement-total-row strong { font-size: 17px; }
.rate-card-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.rate-card-panel dl { margin: 0; padding: 4px 20px; }
.rate-card-panel dl div { display: grid; gap: 5px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.rate-card-panel dl div:last-child { border-bottom: 0; }
.rate-card-panel dt { color: #71807c; font-size: 10px; }
.rate-card-panel dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 720; }
.storage-note { display: flex; align-items: flex-start; gap: 10px; margin: 6px 13px 13px; padding: 13px; border-radius: 8px; background: #eef5f2; }
.storage-note > span { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-family: Georgia, serif; font-size: 11px; font-weight: 700; }
.storage-note p { margin: 0; color: #587068; font-size: 10px; line-height: 1.5; }
.storage-note strong { display: block; margin-bottom: 2px; color: #31463f; font-size: 10px; }
.retention-form { display: grid; gap: 11px; padding: 18px 20px 20px; border-top: 1px solid var(--line); background: #fbfcfb; }
.retention-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.retention-form-heading h2 { margin: 2px 0 0; font-size: 15px; }
.retention-form label { color: #53635e; font-size: 10px; font-weight: 720; }
.retention-form select { width: 100%; min-height: 39px; padding: 0 10px; border: 1px solid #c9d6d1; border-radius: 6px; color: var(--ink); background: #fff; }
.retention-form > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.retention-form .button { width: 100%; margin-top: 2px; }
.billing-explainer { margin-top: 18px; }
.user-usage-panel { margin-top: 18px; }
.user-usage-table td { color: #52635e; font-size: 11px; white-space: nowrap; }
.attributed-user { min-width: 190px; }
.attributed-user strong, .attributed-user small { display: block; }
.attributed-user strong { color: var(--ink); font-size: 12px; }
.attributed-user small { margin-top: 4px; color: #87948f; }
.user-usage-table td > small { color: #8a9793; font-size: 9px; }
.treatment-pill { display: inline-flex; padding: 5px 8px; border-radius: 20px; color: #3d5b52; background: #edf2f0; font-size: 9px; font-weight: 760; }
.treatment-pill.free_access { color: #27664f; background: #e2f2eb; }
.treatment-pill.mixed { color: #745b21; background: #fbf0cd; }
.treatment-pill.externally_billed { color: #315d82; background: #e8f0f7; }
.treatment-pill.external_and_free { color: #62518a; background: #efeaf8; }

.case-main { max-width: 1420px; }
.case-page-heading { margin-bottom: 22px; }
.retention-notice-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.retention-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid #e4cf8f; border-radius: 9px; background: #fff8e5; }
.retention-alert-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #9b7520; font-weight: 800; }
.retention-alert strong { font-size: 12px; }
.retention-alert p { margin: 4px 0 0; color: #6d634b; font-size: 11px; line-height: 1.5; }
.retention-alert .button { min-height: 36px; }
.workspace-summary { display: none !important; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
body[data-workspace-view="library"] .workspace-summary:not([hidden]) { display: grid !important; }
.workspace-summary article { padding: 15px 19px; background: var(--surface); }
.workspace-summary p, .workspace-summary small { display: block; margin: 0; color: var(--muted); font-size: 10px; }
.workspace-summary strong { display: inline-block; margin: 4px 7px 0 0; font-size: 21px; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; }
.case-builder form { display: grid; gap: 18px; }
.form-card, .validation-card { overflow: visible; }
.form-card .section-heading, .validation-card .section-heading { border-bottom-color: var(--line); }
.section-heading > div > p:not(.eyebrow):not(.step-label) { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.step-label { margin: 0 0 5px; color: var(--green); text-transform: uppercase; letter-spacing: .11em; font-size: 9px; font-weight: 790; }
.completion-mark { padding: 5px 8px; border-radius: 20px; color: #5c7069 !important; background: #eef3f1; text-transform: uppercase; letter-spacing: .06em; font-size: 8px !important; font-weight: 780; white-space: nowrap; }
.case-setup-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; padding: 20px; }
.case-setup-grid label, .timeout-field { display: grid; gap: 7px; color: #3d4f49; font-size: 11px; font-weight: 720; }
.field-label-with-help { display: inline-flex; align-items: center; gap: 6px; }
.info-tooltip { position: relative; width: 16px; height: 16px; display: inline-grid; place-items: center; border: 1px solid #aec0b9; border-radius: 50%; color: #49645b; background: #f5f8f7; cursor: help; font-size: 9px; font-weight: 800; }
.info-tooltip > span { position: absolute; left: 50%; bottom: calc(100% + 9px); z-index: 8; width: 300px; padding: 10px 12px; border: 1px solid #bfd0ca; border-radius: 7px; color: #334a42; background: #fff; box-shadow: 0 8px 24px rgba(23, 45, 38, .16); font-size: 9px; font-weight: 560; line-height: 1.5; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: .14s ease; }
.info-tooltip:hover > span, .info-tooltip:focus > span, .info-tooltip:focus-within > span { opacity: 1; transform: translate(-50%, 0); }
.case-setup-grid input, .case-setup-grid select, .timeout-field select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #c9d6d1; border-radius: 7px; color: var(--ink); background: #fff; }
.case-setup-grid .example-case-field { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(150px, .45fr) minmax(280px, 1.55fr); align-items: center; gap: 7px 16px; padding-top: 2px; color: #3d4f49; font-size: 11px; font-weight: 720; }
.example-case-field > label { grid-column: 1; }
.example-case-controls { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: minmax(280px, 1fr) auto; gap: 10px; }
.example-case-controls .button { min-height: 42px; white-space: nowrap; }
.example-case-field > small { grid-column: 2; color: var(--muted); font-weight: 500; line-height: 1.45; }
.case-setup-grid small { color: var(--muted); font-size: 9px; font-weight: 500; }
.evidence-upload-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 15px; padding: 20px; }
.evidence-heading-actions { display: flex; align-items: center; gap: 9px; }
.evidence-heading-actions .button { min-height: 34px; padding: 0 12px; font-size: 9px; }
.evidence-drop-zone { min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; border: 1.5px dashed #a9bdb6; border-radius: 9px; color: var(--muted); background: #fafcfb; text-align: center; cursor: pointer; transition: .15s; }
.evidence-drop-zone:hover, .evidence-drop-zone.dragging { border-color: var(--green); background: #f2f8f5; }
.evidence-drop-zone.uploading { cursor: progress; opacity: .72; }
.evidence-drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.evidence-drop-zone .upload-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 18px; }
.evidence-drop-zone strong { color: var(--green-dark); font-size: 11px; }
.evidence-drop-zone > span:last-child { margin-top: 5px; font-size: 9px; }
.evidence-next-step { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #d6e3de; border-radius: 9px; background: #f4f8f6; }
.evidence-next-step > span { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--green); font-size: 9px; font-weight: 800; }
.evidence-next-step strong, .evidence-next-step p { display: block; margin: 0; }
.evidence-next-step strong { font-size: 11px; }
.evidence-next-step p { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.evidence-list { border-top: 1px solid var(--line-soft); }
.evidence-empty { padding: 19px 20px; color: var(--muted); background: #fbfcfb; font-size: 10px; }
.evidence-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line-soft); }
.evidence-item:first-child { border-top: 0; }
.evidence-item > input { width: 16px; height: 16px; accent-color: var(--green); }
.evidence-type { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; color: #315b4e; background: var(--green-soft); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.evidence-detail { min-width: 0; }
.evidence-detail strong, .evidence-detail small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-detail strong { font-size: 10px; }
.evidence-detail small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.evidence-status { color: var(--green); font-weight: 700; }
.evidence-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.evidence-actions button { min-height: 30px; padding: 0 9px; border: 1px solid #d2ddd9; border-radius: 6px; color: #4c615a; background: #fff; font-size: 9px; }
.evidence-actions button:hover { border-color: #adc4bb; color: var(--green-dark); }
.evidence-actions .delete-evidence { color: #8c453b; }
.extraction-review { border-top: 1px solid var(--line); background: #f8faf9; }
.extraction-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 20px; }
.extraction-review-heading h3, .extraction-review-heading p { margin: 0; }
.extraction-review-heading h3 { font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.extraction-review-heading p:last-child { margin-top: 5px; color: var(--muted); font-size: 9px; }
.extraction-candidates { display: grid; gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.candidate-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; color: #53645e; background: #eef3f1; font-size: 9px; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.candidate-group-heading strong, .candidate-group-heading small { display: block; }
.candidate-group-heading small { margin-top: 3px; color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
.extraction-candidate { display: grid; grid-template-columns: auto minmax(155px, .75fr) minmax(120px, .45fr) minmax(210px, 1fr); align-items: center; gap: 14px; padding: 15px 20px; background: #fff; }
.extraction-candidate.selected { position: relative; z-index: 1; background: #f1f8f5; box-shadow: inset 3px 0 0 var(--green); }
.extraction-candidate.output-candidate { background: #fbfaf5; }
.extraction-candidate.output-candidate.selected { background: #f7f4e8; box-shadow: inset 3px 0 0 #a7802e; }
.extraction-candidate.unit-warning { box-shadow: inset 3px 0 0 #b65c4c; }
.extraction-candidate input { width: 17px; height: 17px; accent-color: var(--green); }
.candidate-parameter strong, .candidate-parameter small, .candidate-value strong, .candidate-value small, .candidate-source strong, .candidate-source small { display: block; }
.candidate-parameter strong, .candidate-value strong, .candidate-source strong { font-size: 10px; }
.candidate-parameter small, .candidate-value small, .candidate-source small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.candidate-value strong { color: var(--green-dark); font-size: 14px; }
.candidate-kind { display: inline-block; margin-top: 6px; padding: 3px 6px; border-radius: 12px; color: #3c6658; background: var(--green-soft); font-size: 7px; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; }
.candidate-kind.output { color: #775b1e; background: #f2e8cb; }
.candidate-confidence { display: inline-block; margin-top: 5px; padding: 3px 6px; border-radius: 12px; color: #376050; background: var(--green-soft); font-size: 7px; font-weight: 750; }
.extraction-empty { padding: 17px 20px; color: var(--muted); background: #fff; font-size: 10px; }
.parameter-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px 4px; }
.parameter-toolbar strong, .parameter-toolbar span { display: block; }
.parameter-toolbar strong { font-size: 12px; }
.parameter-toolbar span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.parameter-tab-interface { border-top: 1px solid var(--line-soft); }
.parameter-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 20px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.parameter-tabs button { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 10px 12px; border: 0; border-bottom: 3px solid transparent; color: #687771; background: transparent; cursor: pointer; font: inherit; font-size: 10px; font-weight: 730; }
.parameter-tabs button:hover { color: var(--green-dark); background: #f2f7f5; }
.parameter-tabs button.active { border-bottom-color: var(--green); color: var(--green-dark); background: #f0f7f4; }
.parameter-tabs button small { min-width: 20px; padding: 2px 6px; border-radius: 12px; color: #708079; background: #e8efec; font-size: 8px; }
.parameter-tabs button.active small { color: #fff; background: var(--green); }
.parameter-tab-panels > section { padding: 16px 20px 22px; }
.parameter-tab-group { overflow: hidden; margin-bottom: 14px; border: 1px solid #dce5e1; border-radius: 8px; background: #fff; }
.parameter-tab-group:last-child { margin-bottom: 0; }
.parameter-tab-group > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border-bottom: 1px solid var(--line-soft); background: #f8faf9; }
.parameter-tab-group > header strong, .parameter-tab-group > header small { display: block; }
.parameter-tab-group > header strong { font-size: 10px; }
.parameter-tab-group > header small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.parameter-tab-group > header > span { padding: 3px 7px; border-radius: 12px; color: #476f61; background: var(--green-soft); font-size: 7px; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.parameter-tab-group .parameter-grid { padding: 16px; }
.parameter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; padding: 16px 20px 22px; }
.parameter-field { min-width: 0; }
.parameter-field.dependency-conflict { padding: 10px; border: 1px solid #e4b7ad; border-radius: 7px; background: #fff6f3; }
.parameter-field.dependency-conflict > small { color: #8a4035; font-weight: 650; }
.parameter-field.dependency-disabled { padding: 10px; border: 1px dashed #d7dfdc; border-radius: 7px; background: #f7f8f7; opacity: .72; }
.parameter-field.dependency-disabled .number-input input, .parameter-field.dependency-disabled .number-input select { color: #7d8985; background: #edf1ef; cursor: not-allowed; }
.parameter-field.dependency-disabled > small { color: #687771; }
.parameter-label { min-height: 19px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.parameter-label strong { font-size: 10px; line-height: 1.4; }
.parameter-documentation-link { color: var(--green-dark); text-decoration: underline; text-decoration-color: #91b7aa; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.parameter-documentation-link:hover, .parameter-documentation-link:focus-visible { color: var(--green); text-decoration-color: currentColor; }
.parameter-documentation-link[data-documentation-kind="schema"] { text-decoration-style: dotted; }
.parameter-label em { flex: 0 0 auto; color: #81908c; font-size: 9px; font-style: normal; }
.number-input { position: relative; display: block; }
.number-input input, .number-input select { width: 100%; min-height: 40px; padding: 0 73px 0 10px; border: 1px solid #c9d6d1; border-radius: 6px; color: var(--ink); background: #fff; }
.number-input select { padding-right: 78px; }
.number-input i { position: absolute; top: 13px; right: 10px; max-width: 62px; overflow: hidden; color: #8a9793; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-style: normal; pointer-events: none; }
.number-input:has(.parameter-source-select) > input,
.number-input:has(.parameter-source-select) > select[data-parameter] { padding-right: 116px; }
.number-input .parameter-source-select { position: absolute; top: 1px; right: 1px; width: 108px; min-height: 38px; padding: 0 24px 0 8px; border: 0; border-left: 1px solid #d7dfdc; border-radius: 0 5px 5px 0; color: #65746f; background: #f3f6f5; font-size: 9px; font-weight: 650; cursor: pointer; }
.number-input .parameter-source-select:hover, .number-input .parameter-source-select:focus { color: var(--green-dark); background: var(--green-soft); }
.number-input .parameter-source-select:disabled { cursor: not-allowed; }
.parameter-field > small { display: block; margin-top: 5px; color: #899691; font-size: 8.5px; }
.form-loading { grid-column: 1 / -1; padding: 32px; color: var(--muted); text-align: center; }
.advanced-parameters { border-top: 1px solid var(--line-soft); }
.advanced-parameters summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; cursor: pointer; list-style: none; }
.advanced-parameters summary::-webkit-details-marker { display: none; }
.advanced-parameters summary::before { content: "+"; order: 3; width: 22px; height: 22px; display: grid; place-items: center; margin-left: 12px; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.advanced-parameters[open] summary::before { content: "−"; }
.advanced-parameters summary strong, .advanced-parameters summary small { display: block; }
.advanced-parameters summary strong { font-size: 11px; }
.advanced-parameters summary small, .advanced-parameters summary > span:last-of-type { margin-top: 3px; color: var(--muted); font-size: 9px; }
.advanced-parameters .parameter-grid { padding-top: 8px; border-top: 1px solid var(--line-soft); background: #fbfcfb; }
.parameter-category { grid-column: 1 / -1; overflow: hidden; border: 1px solid #dce5e1; border-radius: 8px; background: #fff; }
.parameter-category > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; cursor: pointer; list-style: none; }
.parameter-category > summary::-webkit-details-marker { display: none; }
.parameter-category > summary strong, .parameter-category > summary small { display: block; }
.parameter-category > summary strong { font-size: 10px; }
.parameter-category > summary small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.parameter-category > summary > span:last-child { color: var(--green); font-size: 8px; font-weight: 760; text-transform: uppercase; letter-spacing: .05em; }
.parameter-category[open] > summary > span:last-child { font-size: 0; }
.parameter-category[open] > summary > span:last-child::after { content: "Close"; font-size: 8px; }
.parameter-category .parameter-grid { padding: 16px; border-top: 1px solid var(--line-soft); }
.validation-body { display: grid; grid-template-columns: 1fr 180px 160px; align-items: center; gap: 18px; padding: 20px; }
.validation-summary { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f8; }
.validation-summary.valid { border-color: #c7e0d6; background: #eff8f4; }
.validation-summary.invalid { border-color: #ead2c4; background: #fff5ef; }
.validation-summary.monte-carlo { border-color: #c9d6ea; background: #f1f5fb; }
.validation-icon { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #85948f; font-weight: 800; }
.validation-summary.valid .validation-icon { background: var(--green); }
.validation-summary.invalid .validation-icon { background: #b8623a; }
.validation-summary.monte-carlo .validation-icon { background: #496f9f; font-size: 8px; letter-spacing: -.03em; }
.validation-summary strong, .validation-summary p { display: block; margin: 0; }
.validation-summary strong { font-size: 11px; }
.validation-summary p { margin-top: 3px; color: var(--muted); font-size: 9px; }
.execution-mode { min-height: 58px; display: flex; flex-direction: column; justify-content: center; padding: 10px 13px; border: 1px solid #d6e1dd; border-radius: 8px; background: #f7faf8; }
.execution-mode span, .execution-mode small { color: var(--muted); font-size: 9px; }
.execution-mode strong { margin: 3px 0; font-size: 11px; }
.execution-mode.monte-carlo { border-color: #c9d6ea; background: #f1f5fb; }
.execution-mode.monte-carlo strong { color: #31577f; }
.validation-list { margin: 0 20px 18px; padding: 13px 13px 13px 31px; border-radius: 7px; color: #884025; background: #fff1e9; font-size: 10px; line-height: 1.6; }
.monte-carlo-setup { border-top: 1px solid #d6dfec; background: #f7f9fd; }
.monte-carlo-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px; }
.monte-carlo-heading h3, .monte-carlo-heading p { margin: 0; }
.monte-carlo-heading h3 { font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.monte-carlo-heading p:last-child { margin-top: 5px; color: var(--muted); font-size: 9px; }
.monte-carlo-heading-actions { display: flex; align-items: center; gap: 12px; }
.monte-carlo-heading-actions > span { padding: 6px 9px; border-radius: 14px; color: #31577f; background: #e2eafa; font-size: 8px; font-weight: 780; text-transform: uppercase; white-space: nowrap; }
.monte-carlo-controls { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 14px; padding: 0 20px 20px; }
.monte-carlo-controls > label, .monte-carlo-controls > div { display: flex; flex-direction: column; justify-content: center; min-height: 68px; padding: 10px 12px; border: 1px solid #d6dfec; border-radius: 8px; background: #fff; }
.monte-carlo-controls span, .monte-carlo-variable span, .monte-carlo-builder span { color: var(--muted); font-size: 8px; }
.monte-carlo-controls input, .monte-carlo-variable select, .monte-carlo-variable input, .monte-carlo-builder select { width: 100%; min-height: 34px; margin-top: 5px; padding: 0 9px; border: 1px solid #c9d6d1; border-radius: 6px; color: var(--ink); background: #fff; }
.monte-carlo-controls strong, .monte-carlo-controls small { display: block; }
.monte-carlo-controls strong { margin-top: 4px; color: #31577f; font-size: 11px; }
.monte-carlo-controls small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.monte-carlo-builder { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(340px, 1.1fr); gap: 14px; padding: 0 20px 20px; }
.monte-carlo-add-variable, .monte-carlo-output-select { min-width: 0; padding: 12px; border: 1px solid #d6dfec; border-radius: 8px; background: #fff; }
.monte-carlo-add-variable { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.monte-carlo-add-variable label { min-width: 0; }
.monte-carlo-add-variable .button { min-height: 34px; }
.monte-carlo-output-select { display: flex; flex-direction: column; }
.monte-carlo-output-select select { min-height: 124px; padding: 6px 8px; }
.monte-carlo-output-select small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.monte-carlo-empty { margin: 0 20px 20px; padding: 18px; border: 1px dashed #b8c9df; border-radius: 8px; color: #31577f; background: #fff; text-align: center; }
.monte-carlo-empty strong, .monte-carlo-empty p { display: block; margin: 0; }
.monte-carlo-empty strong { font-size: 11px; }
.monte-carlo-empty p { margin-top: 5px; color: var(--muted); font-size: 9px; }
.monte-carlo-variables { display: grid; gap: 1px; border-top: 1px solid #d6dfec; background: #d6dfec; }
.monte-carlo-variable { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1fr) minmax(230px, 1fr) auto; align-items: center; gap: 18px; padding: 15px 20px; background: #fff; }
.monte-carlo-variable strong, .monte-carlo-variable small { display: block; }
.monte-carlo-variable strong { margin-top: 4px; font-size: 10px; }
.monte-carlo-variable small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.remove-monte-carlo-variable { justify-self: end; }
.distribution-parameters { grid-column: 1 / -1; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 14px; padding-top: 13px; border-top: 1px solid #e2e8ef; }
.distribution-parameters > small { grid-column: 1; margin-top: -8px; }
.distribution-parameter-fields { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 10px; }
.distribution-parameter { min-width: 0; }
.distribution-parameter.wide { grid-column: 1 / -1; }
.monte-carlo-analysis { margin-top: 18px; overflow: hidden; }
.monte-carlo-analysis-note { margin: 0 20px 18px; padding: 13px 15px; border: 1px solid #c7d9d2; border-radius: 8px; background: #f2f8f5; }
.monte-carlo-analysis-note strong, .monte-carlo-analysis-note p { display: block; margin: 0; }
.monte-carlo-analysis-note strong { color: var(--green-dark); font-size: 10px; }
.monte-carlo-analysis-note p { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.analysis-subsection { padding: 18px 20px; border-top: 1px solid var(--line-soft); }
details.analysis-subsection { padding: 0; }
details.analysis-subsection > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; cursor: pointer; list-style: none; }
details.analysis-subsection > summary::-webkit-details-marker { display: none; }
details.analysis-subsection > summary strong, details.analysis-subsection > summary small { display: block; }
details.analysis-subsection > summary strong { font-size: 11px; }
details.analysis-subsection > summary small { margin-top: 3px; color: var(--muted); font-size: 8px; }
details.analysis-subsection > summary > span:last-child { color: #31577f; font-size: 8px; font-weight: 750; text-transform: uppercase; white-space: nowrap; }
.analysis-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.analysis-highlight { padding: 13px 14px; border: 1px solid #d9e2df; border-left: 4px solid #78908a; border-radius: 7px; background: #fff; }
.analysis-highlight.warning, .analysis-highlight.critical { border-left-color: #c8654a; background: #fffaf7; }
.analysis-highlight.success { border-left-color: #27795f; background: #f5faf8; }
.analysis-highlight.ai { border-left-color: #6268ad; background: #f7f7fd; }
.analysis-highlight > span { color: var(--muted); font-size: 7px; font-weight: 750; text-transform: uppercase; }
.analysis-highlight strong, .analysis-highlight p { display: block; margin: 0; }
.analysis-highlight strong { margin-top: 4px; font-size: 10px; }
.analysis-highlight p { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.analysis-histogram-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px 20px; }
.analysis-histogram-card { min-width: 0; padding: 13px; border: 1px solid #d9e2df; border-radius: 8px; background: #fff; }
.analysis-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.analysis-chart-heading strong, .analysis-chart-heading small { display: block; }
.analysis-chart-heading strong { font-size: 10px; }
.analysis-chart-heading small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.analysis-chart-heading > span { color: #31577f; font-size: 8px; font-weight: 750; white-space: nowrap; }
.analysis-histogram, .analysis-sensitivity-chart { display: block; width: 100%; height: auto; margin-top: 8px; border: 1px solid #edf1ef; border-radius: 6px; background: #fff; }
.analysis-statistics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 10px 0 0; overflow: hidden; border: 1px solid #e4eae7; border-radius: 6px; background: #e4eae7; }
.analysis-statistics > div { min-width: 0; padding: 7px 8px; background: #fafcfb; }
.analysis-statistics dt { color: var(--muted); font-size: 7px; }
.analysis-statistics dd { margin: 3px 0 0; overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.analysis-output-picker { min-width: 280px; }
.analysis-output-picker span { display: block; color: var(--muted); font-size: 8px; }
.analysis-output-picker select { width: 100%; min-height: 34px; margin-top: 4px; padding: 0 8px; border: 1px solid #c9d6d1; border-radius: 6px; background: #fff; }
#monte-carlo-sensitivity-chart { margin-top: 12px; }
.analysis-recommendations { display: grid; gap: 8px; margin: 0; padding: 0 20px 20px 42px; }
.analysis-recommendations li { padding-left: 3px; color: #52635d; }
.analysis-recommendations strong, .analysis-recommendations span { display: block; }
.analysis-recommendations strong { font-size: 9px; }
.analysis-recommendations span { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.run-actions { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 20px; border-top: 1px solid var(--line); background: #fafbfa; }
.run-actions > div span, .run-actions > div small { display: block; }
.cost-cue { color: #334b43; font-size: 10px; font-weight: 750; }
.run-actions small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.run-button { min-width: 210px; }
.run-rail { margin-bottom: 18px; }
.simulation-library-card, .workspace-view-panel { overflow: hidden; }
.simulation-library-card .section-heading, .workspace-view-panel .section-heading { min-height: 72px; }
.stored-runs-view[hidden] { display: none; }
.stored-runs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); background: #fbfcfb; }
.stored-runs-toolbar strong, .stored-runs-toolbar small { display: block; }
.stored-runs-toolbar strong { font-size: 11px; }
.stored-runs-toolbar small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.stored-runs-toolbar-actions { display: flex; align-items: center; gap: 14px; }
.select-all-stored-runs { display: flex; align-items: center; gap: 7px; color: #53635e; font-size: 9px; font-weight: 750; white-space: nowrap; }
.select-all-stored-runs input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.stored-runs-toolbar .button.danger { min-height: 36px; color: #8a4035; border-color: #e3bbb3; background: #fff4f1; }
.stored-runs-toolbar .button.danger:hover { color: #742e25; border-color: #ce8d82; background: #ffeae5; }
.stored-runs { max-height: 720px; overflow-y: auto; background: #f7f9f8; }
.stored-run-card { display: grid; grid-template-columns: auto minmax(0, 1fr) 126px; align-items: stretch; gap: 15px; padding: 17px 18px; border-top: 1px solid var(--line-soft); background: #fff; transition: .14s ease; }
.stored-run-card:first-child { border-top: 0; }
.stored-run-card:hover { background: #fbfdfc; }
.stored-run-card.selected { position: relative; z-index: 1; background: #f2f8f5; box-shadow: inset 3px 0 0 var(--green); }
.stored-run-selector { display: grid; align-items: start; padding-top: 3px; }
.stored-run-selector input { width: 17px; height: 17px; accent-color: var(--green); }
.stored-run-content { min-width: 0; }
.stored-run-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.stored-run-title > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.stored-run-title strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stored-run-title > small { flex: 0 0 auto; color: #7f8d88; font-size: 8px; }
.stored-run-title .run-status { padding: 4px 7px; color: #65736f; background: #edf2f0; font-size: 7px; }
.stored-run-title .run-status.succeeded { color: #2e6955; background: #e4f3ed; }
.stored-run-title .run-status.failed { color: #8a4035; background: #fbe9e6; }
.stored-run-metadata { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 9px; margin-top: 12px; }
.stored-run-metadata span { min-width: 0; color: #586963; font-size: 9px; overflow-wrap: anywhere; }
.stored-run-metadata b { display: block; margin-bottom: 3px; color: #899691; font-size: 7px; letter-spacing: .05em; text-transform: uppercase; }
.stored-run-outputs { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.stored-run-outputs > span { min-width: 0; padding: 9px 10px; border: 1px solid #dce6e2; border-radius: 7px; background: #f8faf9; }
.stored-run-outputs b, .stored-run-outputs strong, .stored-run-outputs small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stored-run-outputs b { color: #7a8984; font-size: 7.5px; font-weight: 650; }
.stored-run-outputs strong { margin-top: 3px; color: var(--green-dark); font-size: 11px; }
.stored-run-outputs small { margin-top: 3px; color: #7a8984; font-size: 7.5px; }
.stored-run-outputs .stored-run-no-results { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.stored-run-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 12px; padding-left: 15px; border-left: 1px solid var(--line-soft); }
.stored-run-actions > span { text-align: right; }
.stored-run-actions strong, .stored-run-actions small { display: block; }
.stored-run-actions strong { font-size: 13px; }
.stored-run-actions small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.stored-run-actions .button { min-height: 34px; padding: 0 10px; font-size: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ba8a4; box-shadow: 0 0 0 4px rgba(155,168,164,.1); }
.status-dot.succeeded { background: #3f9879; box-shadow: 0 0 0 4px rgba(63,152,121,.1); }
.status-dot.running { background: #497fb1; box-shadow: 0 0 0 4px rgba(73,127,177,.1); }
.status-dot.failed { background: #b65c4c; box-shadow: 0 0 0 4px rgba(182,92,76,.1); }
.status-dot.cancelled { background: #78847f; box-shadow: 0 0 0 4px rgba(120,132,127,.1); }
.status-dot.cancel_requested { background: #ad762f; box-shadow: 0 0 0 4px rgba(173,118,47,.1); }
.compare-runs-picker { display: grid; gap: 14px; padding: 18px 16px 20px; }
.compare-runs-picker[hidden] { display: none; }
.compare-runs-picker > p { margin: 0 0 2px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.compare-runs-picker label > span { display: block; margin-bottom: 6px; color: #53635e; font-size: 9px; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.compare-runs-picker select { width: 100%; min-height: 38px; padding: 0 9px; border: 1px solid #cbd8d3; border-radius: 6px; color: var(--ink); background: #fff; font-size: 9px; }
.compare-runs-picker .button { width: 100%; justify-content: center; margin-top: 2px; }
.compare-runs-picker > small { color: #7e8c87; font-size: 8px; line-height: 1.45; text-align: center; }
.job-control[hidden] { display: none; }
.worker-summary { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 1px; border-bottom: 1px solid var(--line-soft); background: var(--line-soft); }
.worker-summary article { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 15px 17px; background: #fff; }
.worker-summary article:not(:first-child) { display: block; }
.worker-summary small, .worker-summary strong { display: block; }
.worker-summary small { color: #7a8984; font-size: 8px; }
.worker-summary strong { margin-top: 4px; color: #334b43; font-size: 12px; }
#worker-state-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #9ba8a4; box-shadow: 0 0 0 4px rgba(155,168,164,.12); }
#worker-state-dot.running { background: #3f9879; box-shadow: 0 0 0 4px rgba(63,152,121,.12); }
#worker-state-dot.stopping { background: #ad762f; box-shadow: 0 0 0 4px rgba(173,118,47,.12); }
#worker-state-dot.stopped { background: #b65c4c; box-shadow: 0 0 0 4px rgba(182,92,76,.12); }
#worker-state-dot.external { background: #497fb1; box-shadow: 0 0 0 4px rgba(73,127,177,.12); }
.worker-controls { display: grid; grid-template-columns: 140px 190px auto auto; align-items: end; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); background: #f7f9f8; }
.worker-controls label span { display: block; margin-bottom: 6px; color: #53635e; font-size: 8px; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.worker-controls input { width: 100%; min-height: 36px; padding: 0 9px; border: 1px solid #cbd8d3; border-radius: 6px; color: var(--ink); background: #fff; }
.worker-controls .button { min-height: 36px; justify-content: center; white-space: nowrap; }
.worker-controls > small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; line-height: 1.5; }
.managed-jobs-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); background: #fbfcfb; }
.managed-jobs-heading strong, .managed-jobs-heading small { display: block; }
.managed-jobs-heading strong { font-size: 10px; }
.managed-jobs-heading small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.managed-jobs { max-height: 460px; overflow-y: auto; }
.managed-job { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px 18px; border-top: 1px solid var(--line-soft); background: #fff; }
.managed-job:first-child { border-top: 0; }
.managed-job strong, .managed-job small { display: block; }
.managed-job strong { font-size: 10px; }
.managed-job small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.managed-job-actions { display: flex; align-items: center; gap: 12px; }
.managed-job-actions .text-button:last-child { color: #9b4d40; }
.rail-empty { padding: 45px 20px; text-align: center; }
.rail-empty > span { color: #a1b0ab; font-size: 25px; }
.rail-empty strong, .rail-empty p { display: block; }
.rail-empty strong { margin-top: 9px; font-size: 11px; }
.rail-empty p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.run-result { display: grid; gap: 18px; }
.result-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; padding: 25px 28px; border-radius: 11px; color: #effbf7; background: linear-gradient(140deg, #102923, #1d5847); }
.result-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; }
.result-heading p:last-child { margin: 8px 0 0; color: #a9c3ba; font-size: 10px; }
.result-heading .eyebrow { color: #7fd0b4; }
.result-heading-actions { display: flex; align-items: center; gap: 10px; }
.run-status { padding: 7px 10px; border-radius: 20px; color: #dce8e4; background: rgba(255,255,255,.1); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; font-weight: 780; }
.run-status.succeeded { color: #9be0c8; }
.run-status.failed { color: #ffc0b5; }
.run-status.cancelled { color: #d1dad7; }
.run-status.cancel_requested { color: #ffd7a6; }
.result-heading .button.secondary { color: #e7f2ee; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.run-progress { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; overflow: hidden; border: 1px solid #d4dfdb; border-radius: 9px; background: #fff; }
.run-progress > span { width: 27px; height: 27px; flex: 0 0 auto; border: 3px solid #cad6d2; border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
.run-progress.succeeded > span { display: grid; place-items: center; border: 0; color: #fff; background: var(--green); animation: none; }
.run-progress.succeeded > span::after { content: "✓"; }
.run-progress.failed > span { display: grid; place-items: center; border: 0; color: #fff; background: #b65c4c; animation: none; }
.run-progress.failed > span::after { content: "!"; }
.run-progress.cancelled > span { display: grid; place-items: center; border: 0; color: #fff; background: #677a74; animation: none; }
.run-progress.cancelled > span::after { content: "×"; }
.run-progress.cancel_requested > span { border-color: #e0c6a5; border-top-color: #a66a25; }
.run-progress strong, .run-progress p { display: block; margin: 0; }
.run-progress strong { font-size: 11px; }
.run-progress p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.run-progress-body { min-width: 0; flex: 1; }
.run-progress-meter { height: 8px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #e3ebe8; }
.run-progress-meter > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2e8068, #55ad91); transition: width .35s ease; }
.run-progress-meter.indeterminate > span { width: 35%; animation: progress-slide 1.35s ease-in-out infinite; }
.run-progress.failed .run-progress-meter > span { background: #b65c4c; }
.run-progress.cancelled .run-progress-meter > span,
.run-progress.cancel_requested .run-progress-meter > span { background: #8a7160; }
.run-progress-details { display: flex; justify-content: space-between; gap: 18px; margin-top: 7px; color: var(--muted); font-size: 8px; }
@keyframes progress-slide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.retention-status { display: flex; align-items: center; gap: 12px; padding: 14px 17px; border: 1px solid #d2ded9; border-radius: 9px; background: #f4f7f6; }
.retention-status > span { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #60736c; font-size: 11px; }
.retention-status strong, .retention-status p { display: block; margin: 0; }
.retention-status strong { font-size: 11px; }
.retention-status p { margin-top: 3px; color: var(--muted); font-size: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.result-highlights:empty { display: none; }
.result-highlights article { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.result-highlights p { min-height: 28px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.result-highlights strong { display: block; margin-top: 12px; overflow: hidden; text-overflow: ellipsis; font-size: 22px; letter-spacing: -.03em; }
.result-highlights span { display: block; margin-top: 5px; color: #82908c; font-size: 9px; }
.input-snapshot-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; cursor: pointer; list-style: none; }
.input-snapshot-panel summary::-webkit-details-marker { display: none; }
.input-snapshot-panel summary strong, .input-snapshot-panel summary small { display: block; }
.input-snapshot-panel summary strong { font-size: 12px; }
.input-snapshot-panel summary small, .input-snapshot-panel summary > span:last-child { margin-top: 3px; color: var(--muted); font-size: 9px; }
.snapshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.snapshot-grid div { min-width: 0; padding: 13px 16px; background: #fafbfa; }
.snapshot-grid span, .snapshot-grid strong, .snapshot-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-grid span { color: var(--muted); font-size: 9px; }
.snapshot-grid strong { margin-top: 5px; font-size: 12px; }
.snapshot-grid small { margin-top: 2px; color: #8c9894; font-size: 8px; }
.result-table-panel { overflow: hidden; }
.result-table td:first-child { color: #41534d; }
.result-table td:nth-child(2) { width: 190px; }
.result-table td:last-child { width: 130px; color: var(--muted); }
.result-table td strong, .result-table td small { display: block; }
.result-table td small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.structured-result-sections { min-width: 0; display: grid; gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.structured-output-group { min-width: 0; background: #fff; }
.structured-output-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 20px; cursor: pointer; list-style: none; }
.structured-output-group > summary::-webkit-details-marker { display: none; }
.structured-output-group > summary div strong, .structured-output-group > summary div small { display: block; }
.structured-output-group > summary div strong { font-size: 11px; }
.structured-output-group > summary div small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.structured-output-group > summary > span { color: var(--muted); font-size: 8px; font-weight: 700; white-space: nowrap; }
.structured-output-group .result-table th, .structured-output-group .result-table td { padding-left: 20px; padding-right: 20px; }
.structured-table-scroll { width: 100%; max-width: 100%; overflow-x: scroll; overscroll-behavior-inline: contain; scrollbar-gutter: stable; padding-bottom: 4px; }
.structured-table-scroll::-webkit-scrollbar { height: 13px; }
.structured-table-scroll::-webkit-scrollbar-track { background: #edf2f0; }
.structured-table-scroll::-webkit-scrollbar-thumb { border: 3px solid #edf2f0; border-radius: 999px; background: #82958f; }
.structured-table-scroll:focus { outline: 2px solid #6aa891; outline-offset: -2px; }
.raw-data-table { min-width: 720px; font-variant-numeric: tabular-nums; }
.raw-data-table th { white-space: nowrap; }
.raw-data-table td { padding-top: 10px; padding-bottom: 10px; white-space: nowrap; font-size: 10px; }
.table-scroll-hint { margin: 0; padding: 7px 20px 10px; border-top: 1px solid var(--line-soft); color: var(--muted); background: #fafbfa; font-size: 8px; }
.table-output-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 20px; border-top: 1px solid var(--line-soft); background: #fafbfa; }
.table-output-actions strong, .table-output-actions p { display: block; }
.table-output-actions strong { font-size: 10px; }
.table-output-actions p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.plot-builder { display: grid; gap: 14px; padding: 18px 20px; border-top: 1px solid var(--line); background: #f8faf9; }
.plot-builder[hidden] { display: none; }
.plot-builder-help { padding: 13px 15px; border: 1px solid #cfe0da; border-radius: 8px; background: #eff7f3; }
.plot-builder-help strong { display: block; font-size: 11px; }
.plot-builder-help ol { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 19px; color: #526861; font-size: 9px; line-height: 1.45; }
.plot-builder-controls { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(150px, 1fr); gap: 12px; }
.plot-builder label > span, .plot-series-fieldset legend { display: block; margin-bottom: 6px; color: #667771; font-size: 8px; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.plot-builder input[type="text"], .plot-builder select { width: 100%; min-height: 37px; padding: 0 10px; border: 1px solid #ccd8d4; border-radius: 6px; background: #fff; }
.plot-axis-note { min-height: 37px; padding: 8px 10px; border: 1px solid #d7e1dd; border-radius: 6px; background: #fff; }
.plot-axis-note span, .plot-axis-note strong { display: block; }
.plot-axis-note span { color: #667771; font-size: 8px; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.plot-axis-note strong { margin-top: 4px; color: #3f5750; font-size: 9px; }
.plot-series-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.plot-series-options { display: flex; flex-wrap: wrap; gap: 8px; }
.plot-series-options label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #d6e0dc; border-radius: 6px; background: #fff; font-size: 9px; }
.plot-series-options label:has(input:disabled) { opacity: .45; }
.plot-series-limit { margin: 8px 0 0; color: var(--muted); font-size: 9px; }
.plot-builder-actions { display: flex; align-items: center; gap: 9px; }
.plot-builder-actions small { color: var(--muted); font-size: 8px; }
.plot-preview, .saved-plot-graphic { min-height: 260px; padding: 10px; overflow-x: auto; border: 1px solid #dce5e1; border-radius: 8px; background: #fff; }
.xy-plot { display: block; width: 100%; min-width: 620px; height: auto; }
.saved-plots-section { border-top: 1px solid var(--line); background: #f7faf8; }
.saved-plots-section[hidden] { display: none; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; }
.subsection-heading strong, .subsection-heading small { display: block; }
.subsection-heading strong { font-size: 11px; }
.subsection-heading small, .subsection-heading > span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.saved-plots { display: grid; gap: 14px; padding: 0 20px 18px; }
.saved-plot { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.saved-plot-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.saved-plot-heading strong, .saved-plot-heading small { display: block; }
.saved-plot-heading strong { font-size: 11px; }
.saved-plot-heading small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.saved-plot-heading > div:last-child { display: flex; gap: 8px; }
.saved-plot-graphic { min-height: 0; border: 0; border-radius: 0; }
.structured-output-empty { padding: 28px 20px; color: var(--muted); text-align: center; font-size: 10px; background: #fff; }
.observed-comparison { overflow: hidden; }
.comparison-summary { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fafbfa; }
.comparison-summary:empty { display: none; }
.comparison-summary span { padding: 5px 8px; border-radius: 15px; color: #53645e; background: #eef3f1; font-size: 8px; font-weight: 700; }
.comparison-table td:first-child { min-width: 180px; color: #41534d; }
.comparison-table td:nth-child(2), .comparison-table td:nth-child(3) { min-width: 135px; }
.comparison-table td:nth-child(4) { min-width: 110px; }
.comparison-status { display: inline-block; padding: 5px 8px; border-radius: 14px; color: #52645e; background: #edf2f0; font-size: 8px; font-weight: 740; white-space: nowrap; }
.comparison-status.match { color: #2e6955; background: #e4f3ed; }
.comparison-status.difference { color: #765a1d; background: #f5ecd2; }
.comparison-status.warning { color: #8a4035; background: #fbe9e6; }
.run-comparison { display: grid; gap: 18px; }
.run-comparison[hidden] { display: none; }
.comparison-heading h2 { max-width: 850px; }
.comparison-run-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.comparison-run-card { min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.comparison-run-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comparison-run-card > div > span { color: var(--green); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.comparison-run-card .run-status { padding: 5px 8px; color: #64736e; background: #edf2f0; font-size: 8px; }
.comparison-run-card .run-status.succeeded { color: #2e6955; background: #e4f3ed; }
.comparison-run-card .run-status.failed { color: #8a4035; background: #fbe9e6; }
.comparison-run-card > strong { display: block; margin-top: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.comparison-run-card p, .comparison-run-card small { display: block; margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.same-values-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 18px; padding: 19px 21px; border-color: #cbded6; background: #f7fbf9; }
.same-values-panel > div { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.same-values-panel > div > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 15px; font-weight: 800; }
.same-values-panel strong { font-size: 11px; }
.same-values-panel p { margin: 4px 0 0; color: #50625c; font-size: 10px; line-height: 1.6; }
.run-difference-panel { overflow: hidden; }
.run-comparison-table td:first-child { min-width: 190px; color: #41534d; }
.run-comparison-table td:nth-child(2), .run-comparison-table td:nth-child(3) { min-width: 190px; }
.run-comparison-table td:nth-child(4) { min-width: 155px; }
.run-comparison-table td:nth-child(5) { min-width: 130px; }
.run-comparison-table td strong, .run-comparison-table td small { display: block; }
.run-comparison-table td small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.comparison-status.higher { color: #2e6955; background: #e4f3ed; }
.comparison-status.lower { color: #315d82; background: #e8f0f7; }
.comparison-status.different { color: #765a1d; background: #f5ecd2; }
.comparison-status.missing { color: #8a4035; background: #fbe9e6; }
.comparison-empty-row td { padding: 28px 18px; color: var(--muted) !important; text-align: center; }
.run-diagnostics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.run-diagnostics:empty { display: none; }
.run-diagnostics > span { padding: 14px 18px; color: var(--muted); background: #fafbfa; font-size: 9px; }
.run-diagnostics strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 11px; }
.run-diagnostics > strong, .run-diagnostics > p { grid-column: 1 / -1; margin: 0; padding: 14px 18px; color: #7c382d; background: #fff3f0; }
.run-log-viewer { border-top: 1px solid var(--line); background: #f7f9f8; }
.run-log-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; }
.run-log-heading strong, .run-log-heading small { display: block; }
.run-log-heading small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.run-log-heading > div:last-child { display: flex; align-items: center; gap: 9px; }
.run-log-viewer pre { max-height: 420px; margin: 0; padding: 18px; overflow: auto; border-top: 1px solid var(--line); color: #2d3935; background: #eef2f0; font: 10px/1.6 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.provider-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, .8fr); gap: 18px; align-items: start; }
.provider-panel { overflow: hidden; }
.provider-list { display: grid; gap: 12px; padding: 0 20px 20px; }
.provider-card { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.provider-card.disabled { opacity: .72; background: #f8faf9; }
.provider-card-heading, .provider-card-heading > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.provider-card-heading > div { justify-content: flex-start; min-width: 0; }
.provider-logo { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--green); font-weight: 800; }
.provider-card-heading strong, .provider-card-heading small { display: block; }
.provider-card-heading small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.provider-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.provider-tags .status-pill { position: static; padding: 5px 8px; color: #27634f; background: #e3f2ec; font-size: 8px; }
.provider-tags .status-pill.muted { color: #5e6c67; background: #edf1ef; }
.provider-tags .status-pill.warning { color: #875327; background: #f8ead9; }
.provider-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 18px; margin: 0; padding-top: 13px; border-top: 1px solid var(--line); }
.provider-card dl div { min-width: 0; }
.provider-card dt { color: var(--muted); font-size: 8px; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.provider-card dd { margin: 4px 0 0; overflow: hidden; color: #40514b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.provider-help { padding: 22px; }
.provider-help h2 { margin: 5px 0 14px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.provider-help ol { margin: 0 0 16px; padding-left: 20px; color: #465750; font-size: 10px; line-height: 1.7; }
.provider-help > p:last-child { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.provider-control { min-width: 175px; }
.provider-control select, .provider-control small { display: block; width: 100%; }
.provider-control small { max-width: 220px; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.35; }
@media (max-width: 980px) { .provider-layout { grid-template-columns: 1fr; } }

dialog { width: min(540px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 13px; color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(11, 27, 23, .58); backdrop-filter: blur(3px); }
dialog form { padding: 27px; }
.wide-dialog { width: min(680px, calc(100% - 30px)); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dialog-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.dialog-heading p:last-child { margin: 7px 0 0; color: var(--muted); }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 50%; color: #71807b; background: transparent; font-size: 21px; }
.icon-button:hover { background: #f0f3f1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid label > span, .form-grid label > small { display: block; }
.form-grid label > span { margin-bottom: 7px; font-size: 11px; font-weight: 720; }
.form-grid input, .form-grid select { padding: 0 10px; }
.form-grid small { margin-top: 6px; color: #82908c; font-size: 10px; }
.form-grid .full { grid-column: 1 / -1; }
.access-check { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 39px; padding: 0 3px; }
.access-check input { width: 17px; min-height: auto; height: 17px; accent-color: var(--green); }
.access-check span { margin: 0 !important; }
.access-check strong, .access-check small { display: block; }
.access-check small { margin-top: 2px; }
.dialog-actions { margin-top: 27px; padding-top: 20px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line-soft); }
.dialog-actions.split { justify-content: space-between; align-items: center; }
.dialog-actions.split > div { display: flex; gap: 9px; }
.text-button { border: 0; color: var(--green); background: none; font-size: 11px; font-weight: 750; }
.csv-requirements { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; color: var(--muted); font-size: 11px; }
.csv-requirements strong { color: var(--ink); margin-right: 3px; }
code { padding: 3px 6px; border-radius: 4px; color: #315b4e; background: #edf4f1; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.drop-zone { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #a9bdb6; border-radius: 9px; color: var(--muted); background: #fafcfb; transition: .15s; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); background: #f2f8f5; }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 9px; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 21px; }
.drop-zone strong { color: var(--green); }
.drop-zone > span:not(.upload-icon) { margin-top: 3px; }
.drop-zone small { margin-top: 9px; color: #97a39f; }
.file-summary { display: flex; justify-content: space-between; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 8px; }
.file-summary > div { display: flex; align-items: center; gap: 11px; }
.file-summary strong, .file-summary small { display: block; }
.file-summary small { margin-top: 3px; color: var(--muted); }
.file-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: var(--green); font-size: 9px; font-weight: 780; }
.import-preview { margin-top: 14px; padding: 14px; border-radius: 8px; background: #f6f8f7; }
.import-preview > div:first-child { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 11px; }
.import-preview > div:first-child span { color: var(--muted); }
.mini-table { display: grid; gap: 6px; }
.mini-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 12px; color: #4f605b; font-size: 10px; }
.mini-row span:last-child { color: var(--green); font-weight: 700; text-transform: capitalize; }
.form-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 6px; color: #8a2e2e; background: #fbeded; font-size: 11px; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; width: min(380px, calc(100% - 48px)); display: flex; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid #c8dfd6; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.toast > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); }
.toast div { flex: 1; }
.toast strong { font-size: 12px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.toast button { border: 0; background: none; color: #74827e; font-size: 18px; }

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .menu-button { display: block; margin-right: 14px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { min-height: 94px; }
  .billing-notes { grid-template-columns: 1fr; gap: 9px; }
  .billing-overview, .billing-grid { grid-template-columns: 1fr; }
  .case-layout { grid-template-columns: 1fr; }
  .run-rail { position: static; }
  .stored-run-card { grid-template-columns: auto minmax(0, 1fr); }
  .stored-run-actions { grid-column: 2; flex-direction: row; align-items: center; padding: 12px 0 0; border-top: 1px solid var(--line-soft); border-left: 0; }
  .stored-run-actions > span { text-align: left; }
  .stored-run-metadata, .stored-run-outputs { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .worker-summary { grid-template-columns: repeat(2, 1fr); }
  .worker-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-highlights { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .topbar { padding: 0 16px; }
  .crumbs span, .crumbs i, .account-picker > span { display: none; }
  .account-picker select { max-width: 145px; }
  main { padding: 32px 16px 52px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .month-picker { width: 100%; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .notice { grid-template-columns: auto 1fr; }
  .notice a { grid-column: 2; }
  .retention-alert { grid-template-columns: auto 1fr; }
  .retention-alert .button { grid-column: 2; justify-self: start; }
  .panel-toolbar { flex-direction: column; }
  .search-field { width: 100%; }
  .filters label { flex: 1; }
  .filters select { width: 100%; min-width: 0; }
  .user-table th:nth-child(5), .user-table td:nth-child(5), .user-table th:nth-child(6), .user-table td:nth-child(6) { display: none; }
  th, td { padding-left: 13px; padding-right: 13px; }
  .panel-footer span:last-child { display: none; }
  .preview-banner { grid-template-columns: auto 1fr; }
  .provider-label { grid-column: 2; }
  .usage-metrics { grid-template-columns: 1fr; }
  .usage-metrics article { flex-direction: row; align-items: center; gap: 16px; }
  .usage-metrics .metric-icon { margin-bottom: 0; }
  .billing-table th:nth-child(3), .billing-table td:nth-child(3),
  .billing-table th:nth-child(4), .billing-table td:nth-child(4) { display: none; }
  .workspace-summary { grid-template-columns: 1fr; }
  .stored-runs-toolbar { align-items: stretch; flex-direction: column; }
  .stored-runs-toolbar-actions { justify-content: space-between; }
  .stored-runs-toolbar .button { align-self: flex-start; }
  .stored-run-card { grid-template-columns: auto minmax(0, 1fr); padding: 15px 13px; }
  .stored-run-title { flex-direction: column; gap: 6px; }
  .stored-run-title > small { padding-left: 17px; }
  .stored-run-metadata, .stored-run-outputs { grid-template-columns: 1fr; }
  .stored-run-actions { grid-column: 2; align-items: stretch; flex-direction: column; }
  .worker-summary, .worker-controls { grid-template-columns: 1fr; }
  .managed-job { grid-template-columns: auto minmax(0, 1fr); }
  .managed-job-actions { grid-column: 2; }
  .info-tooltip > span { left: -80px; width: min(280px, calc(100vw - 44px)); transform: translate(0, 4px); }
  .info-tooltip:hover > span, .info-tooltip:focus > span, .info-tooltip:focus-within > span { transform: translate(0, 0); }
  .parameter-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 12px; }
  .parameter-tabs button { justify-content: space-between; }
  .parameter-tab-panels > section { padding: 12px; }
  .case-setup-grid, .evidence-upload-body, .parameter-grid, .validation-body, .monte-carlo-controls, .monte-carlo-builder, .monte-carlo-variable, .snapshot-grid, .plot-builder-controls { grid-template-columns: 1fr; }
  .table-output-actions, .plot-builder-actions { align-items: stretch; flex-direction: column; }
  .table-output-actions .button, .plot-builder-actions .button { align-self: flex-start; }
  .case-setup-grid .example-case-field, .example-case-controls { grid-template-columns: 1fr; }
  .example-case-field > label, .example-case-controls, .example-case-field > small { grid-column: 1; grid-row: auto; }
  .run-actions, .result-heading, .run-log-heading { align-items: stretch; flex-direction: column; }
  .run-button { width: 100%; }
  .result-heading-actions { align-items: stretch; flex-direction: column; }
  .run-progress { align-items: flex-start; }
  .run-progress-details { align-items: flex-start; flex-direction: column; gap: 3px; }
  .result-highlights, .run-diagnostics { grid-template-columns: 1fr; }
  .comparison-run-cards, .same-values-panel { grid-template-columns: 1fr; }
  .same-values-panel > div { white-space: normal; }
  .result-table th:nth-child(3), .result-table td:nth-child(3) { display: table-cell; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .dialog-actions.split { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions.split > div { display: grid; grid-template-columns: 1fr 1fr; }
  .evidence-item { grid-template-columns: auto auto minmax(0, 1fr); }
  .evidence-actions { grid-column: 3; justify-content: flex-start; }
  .evidence-heading-actions, .extraction-review-heading { align-items: stretch; flex-direction: column; }
  .monte-carlo-heading { align-items: stretch; flex-direction: column; }
  .monte-carlo-heading-actions { align-items: flex-start; flex-direction: column; }
  .monte-carlo-add-variable { grid-template-columns: 1fr; }
  .remove-monte-carlo-variable { justify-self: start; }
  .distribution-parameters { grid-template-columns: 1fr; }
  .distribution-parameters > small { grid-column: 1; margin-top: -8px; }
  .distribution-parameter-fields { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; }
  .analysis-highlights, .analysis-histogram-grid { grid-template-columns: 1fr; }
  .analysis-statistics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-output-picker { min-width: 0; width: 100%; }
  .analysis-subsection .subsection-heading { align-items: stretch; flex-direction: column; }
  .extraction-candidate { grid-template-columns: auto 1fr; }
  .candidate-value, .candidate-source { grid-column: 2; }
}

#operator-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(32, 91, 78, .18);
  border-radius: 12px;
  background: rgba(32, 91, 78, .045);
}

#operator-controls[hidden] { display: none; }
#operator-control-message { flex: 1 1 320px; margin: 0; color: var(--muted); }
.topbar-actions > .text-link { color: var(--green); font-size: 11px; font-weight: 750; text-decoration: none; }
.topbar-actions > .text-link:hover { text-decoration: underline; }
.operational-alerts { display: grid; gap: 9px; margin: 14px 0; }
.operational-alerts[hidden] { display: none; }
#operational-alert-list { display: grid; gap: 7px; }
.operational-alert { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(184, 116, 29, .09); color: #765018; }
.operational-alert.critical { background: rgba(164, 62, 54, .09); color: #8c302a; }
.operational-alert > span:first-child { font-weight: 800; }
#dead-letter-jobs { display: grid; gap: 10px; }
.dead-letter-job { border-color: rgba(164, 62, 54, .28); background: rgba(164, 62, 54, .035); }
.status-dot.failed_infrastructure { background: #a43e36; box-shadow: 0 0 0 4px rgba(164, 62, 54, .12); }
.managed-job-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
