/* O&M Manual Generator – the portal's look, from the "Industry" design system the user chose in Claude
   Design (6 September 2026): Barlow Condensed headings over Barlow, a light technical ground, one navy
   accent, square-ish blueprint objects; job cards on a board, an inline drop zone, an analytics page.
   The tokens are the design system's with the accent set to LCS navy, as the design pages do. */
:root {
    --color-bg: #f2f2f3;
    --color-board-bg: #e6e7e9;
    --color-surface: #e9e9ea;
    --color-text: #1d1f20;
    --color-muted: #5d6165;
    --color-faint: #8a8e92;
    --color-divider: rgba(29, 31, 32, 0.16);
    --color-divider-soft: rgba(29, 31, 32, 0.12);
    --color-accent: #1b365d;
    --color-accent-100: #eef2f8;
    --color-accent-200: #d5e0ee;
    --color-accent-300: #b0c3dc;
    --color-accent-400: #4a6f9c;
    --color-accent-500: #3d5f8a;
    --color-accent-600: #2c4a71;
    --color-accent-700: #1b365d;
    --color-accent-800: #142a49;
    --color-accent-900: #0f1f36;
    --tint-04: rgba(27, 54, 93, 0.04);
    --tint-06: rgba(27, 54, 93, 0.06);
    --tint-09: rgba(27, 54, 93, 0.09);
    --tint-10: rgba(27, 54, 93, 0.10);
    --tint-14: rgba(27, 54, 93, 0.14);
    --review-bg: #f6e0c8; --review-fg: #6b3c0c; --review-bar: #c07a2b;
    --failed-bg: #f3d4d4; --failed-fg: #71201f; --failed-bar: #a83b39;
    --done-bg: #d4e7d8;   --done-fg: #1d4527;
    --neutral-chip-bg: #e2e3e5;
    --placeholder: #ff0000;
    --font-heading: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
    --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius-board: 14px;
    --radius-card: 10px;
    --shadow-board: 0 1px 2px rgba(15, 31, 54, 0.06);
    --shadow-card: 0 2px 8px rgba(15, 31, 54, 0.12);
    --shadow-menu: 0 10px 26px rgba(15, 31, 54, 0.24);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body {
    margin: 0; background: var(--color-board-bg); color: var(--color-text);
    font-family: var(--font-body); font-size: 15px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: rgba(27, 54, 93, 0.3); }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.muted { color: var(--color-muted); font-size: 13px; }
.faint { color: var(--color-faint); }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* ---- the board: one framed page with the navy header inside it ---------------------------------- */
.board-wrap { display: flex; justify-content: center; padding: 40px 28px 60px; }
.board { width: 100%; max-width: 1180px; background: var(--color-bg); border: 1px solid var(--color-divider);
         border-radius: var(--radius-board); overflow: hidden; box-shadow: var(--shadow-board); }
.board-body { padding: 34px 40px 44px; }
@media (max-width: 720px) { .board-wrap { padding: 12px 8px 40px; } .board-body { padding: 22px 18px 30px; } }

header.topbar { display: flex; align-items: center; gap: 26px; background: var(--color-accent); color: #fff; padding: 0 26px; min-height: 62px; }
header.topbar .brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none;
                       font-family: var(--font-heading); font-size: 19px; letter-spacing: 0.01em; margin-right: auto; font-weight: 600; }
header.topbar .brand:hover { opacity: 0.85; color: #fff; }
header.topbar .brand img { width: 30px; height: 30px; display: block; border: 1.5px solid rgba(255,255,255,0.7); }
header.topbar nav { display: flex; align-items: center; gap: 26px; }
header.topbar nav a { color: rgba(255,255,255,0.72); text-decoration: none; font-size: 14px; padding: 4px 0;
                      border-bottom: 2px solid transparent; transition: color 0.12s, border-color 0.12s; }
header.topbar nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.55); }
header.topbar nav a.active { color: #fff; border-bottom-color: #fff; }
.usermenu { position: relative; }
.usermenu-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,0.55);
                background: transparent; color: #fff; cursor: pointer; transition: background 0.14s, border-color 0.14s; padding: 0; }
.usermenu-btn:hover, .usermenu.open .usermenu-btn { background: rgba(255,255,255,0.16); border-color: #fff; }
.usermenu-panel { position: absolute; top: 44px; right: 0; min-width: 214px; background: var(--color-bg); border: 1px solid rgba(29,31,32,0.18);
                  border-radius: 10px; box-shadow: var(--shadow-menu); padding: 6px; z-index: 30; color: var(--color-text); }
.usermenu-panel .who { padding: 10px 12px; font-size: 12px; color: var(--color-muted); border-bottom: 1px solid var(--color-divider-soft); }
.usermenu-panel .who b { display: block; color: var(--color-text); font-size: 14px; font-weight: 500; }
.usermenu-panel form { margin: 0; }
.usermenu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0;
                         border-radius: 7px; padding: 10px 12px; margin-top: 4px; font-family: var(--font-heading); font-size: 14px;
                         letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text); cursor: pointer; transition: background 0.14s; }
.usermenu-panel button:hover { background: rgba(27,54,93,0.08); }
.usermenu-panel svg { display: block; }

/* ---- page head ------------------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
             border-bottom: 1px solid var(--color-divider); padding-bottom: 18px; }
.kicker { font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-accent); font-weight: 600; }
.page-head h1 { font-size: 42px; margin: 2px 0 0; letter-spacing: -0.01em; }
.page-head h1 .sub { color: var(--color-muted); font-size: 24px; margin-left: 10px; font-weight: 500; }
.page-head .aside { text-align: right; font-size: 13px; color: var(--color-muted); line-height: 1.4; }
.page-head .aside b { color: var(--color-text); font-weight: 500; }
a.back { display: inline-block; font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
         text-decoration: none; margin-bottom: 14px; font-weight: 600; }
.flash { border-radius: var(--radius-card); padding: 10px 14px; margin: 0 0 18px; font-size: 14px; border: 1px solid var(--color-divider); background: var(--tint-04); }
.flash.error { border-color: var(--failed-bar); background: var(--failed-bg); color: var(--failed-fg); }
.flash.success { background: var(--done-bg); color: var(--done-fg); border-color: rgba(29,69,39,0.3); }
.flash code { background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 4px; }

/* ---- section heading rows -------------------------------------------------------------------------- */
.section-row { display: flex; align-items: center; gap: 10px; margin: 38px 0 16px; }
.section-row h2 { font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.section-row .rule { flex: 1; height: 1px; background: var(--color-divider); }
.section-row .count { font-size: 13px; color: var(--color-muted); }

/* ---- chips ----------------------------------------------------------------------------------------- */
.chip { display: inline-block; flex: none; font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
        border-radius: 999px; padding: 3px 11px; white-space: nowrap; font-weight: 600; background: var(--neutral-chip-bg); color: var(--color-muted); }
.chip.processing, .chip.info { background: var(--color-accent-200); color: var(--color-accent-800); }
.chip.review, .chip.warn { background: var(--review-bg); color: var(--review-fg); }
.chip.failed, .chip.bad { background: var(--failed-bg); color: var(--failed-fg); }
.chip.completed, .chip.ok { background: var(--done-bg); color: var(--done-fg); }
.chip.changed { background: var(--review-bg); color: var(--review-fg); }

/* ---- buttons --------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; text-decoration: none;
       font-family: var(--font-heading); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2;
       color: var(--color-text); background: transparent; border: 1px solid var(--color-divider); border-radius: 999px; padding: 8px 16px;
       transition: background 0.14s, border-color 0.14s, box-shadow 0.14s, color 0.14s; white-space: nowrap; }
.btn svg { display: block; }
.btn:hover { background: rgba(27,54,93,0.08); border-color: var(--color-accent); color: var(--color-text); }
.btn:active { background: var(--tint-14); }
.btn:disabled, .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-400); border-color: var(--color-accent-400); color: #fff; box-shadow: 0 1px 4px rgba(15,31,54,0.14); }
.btn-primary:active { background: var(--color-accent-600); border-color: var(--color-accent-600); }
.btn-danger { border-color: var(--failed-bar); color: var(--failed-fg); }
.btn-danger:hover { background: var(--failed-bg); border-color: var(--failed-bar); color: var(--failed-fg); }
.btn-ghost { border-color: transparent; color: var(--color-accent); }
.btn-ghost:hover { background: rgba(27,54,93,0.08); border-color: transparent; }
.btn-sm { font-size: 12px; padding: 5px 12px; }
.btn-block { width: 100%; }
form.inline { display: inline; margin: 0; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.actions-row.split { justify-content: space-between; }
.actions-row .group { display: flex; gap: 10px; flex-wrap: wrap; }
a.arrow { font-family: var(--font-heading); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; font-weight: 600; }

/* ---- the drop zone --------------------------------------------------------------------------------- */
.dropzone { margin-top: 30px; border: 1px dashed rgba(27,54,93,0.45); border-radius: 12px; background: rgba(27,54,93,0.03); padding: 40px;
            display: flex; flex-wrap: wrap; gap: 32px 44px; align-items: center; justify-content: space-between; cursor: pointer;
            transition: background 0.14s, border-color 0.14s; }
.dropzone:hover, .dropzone.dragover { background: var(--tint-09); border-color: var(--color-accent); }
.dropzone:active { background: var(--tint-14); }
.dropzone.busy { cursor: default; }
.dropzone .dz-main { display: flex; align-items: center; gap: 26px; }
.dropzone svg { flex: none; }
.dropzone .dz-title { font-family: var(--font-heading); font-size: 26px; font-weight: 600; line-height: 1.15; }
.dropzone .dz-title em { font-style: normal; color: var(--color-accent); }
.dropzone .dz-sub { font-size: 14px; color: var(--color-muted); margin-top: 4px; }
.dropzone ol { margin: 0; padding-left: 20px; font-size: 13px; color: var(--color-muted); line-height: 1.7; }
.dropzone .dz-progress { flex: 1 1 100%; }
.dropzone .dz-progress .file-name { font-weight: 500; margin: 0 0 4px; }
.dropzone .dz-progress p { margin: 0; color: var(--color-muted); font-size: 14px; }
.dz-error { color: var(--failed-fg); font-size: 14px; margin: 10px 0 0; }
.dz-error.shake { animation: shake 0.35s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---- progress bars --------------------------------------------------------------------------------- */
.progress { height: 5px; background: rgba(29,31,32,0.14); border-radius: 999px; overflow: hidden; }
.progress .bar { height: 100%; background: var(--color-accent); border-radius: 999px; transition: width 0.6s ease; }
.progress.review .bar { background: var(--review-bar); }
.progress.failed .bar { background: var(--failed-bar); }
.progress.big { height: 8px; margin: 10px 0 6px; }
.progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--color-muted); margin-bottom: 5px; }
.progress-row b { color: var(--color-text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---- job cards ------------------------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }   /* auto-fill: one card stays a tile */
.jobcard { border: 1px solid var(--color-divider); border-left: 3px solid var(--color-accent); border-radius: var(--radius-card); padding: 20px;
           display: flex; flex-direction: column; gap: 14px; background: var(--tint-04); cursor: pointer; color: inherit; text-decoration: none;
           transition: background 0.14s, border-color 0.14s, box-shadow 0.14s; }
.jobcard:hover, .jobcard:focus-visible { background: var(--tint-10); border-color: var(--color-accent); box-shadow: var(--shadow-card); color: inherit; }
.jobcard .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.jobcard .jobno { font-family: var(--font-heading); font-size: 30px; letter-spacing: 0.02em; line-height: 1; font-weight: 600; }
.jobcard .name { font-size: 15px; line-height: 1.35; text-wrap: pretty; }
.jobcard .meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 12px; color: var(--color-muted);
                 border-top: 1px solid var(--color-divider-soft); padding-top: 12px; }
.jobcard .meta span:nth-child(even) { color: var(--color-text); }
.jobcard .meta .reason { color: var(--failed-fg) !important; }
.jobcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jobcard .foot .btn { padding: 6px 14px 6px 12px; font-size: 13px; }
.card-note { border: 1px dashed rgba(29,31,32,0.22); border-radius: var(--radius-card); display: grid; place-items: center; padding: 20px;
             text-align: center; font-size: 13px; color: var(--color-faint); line-height: 1.5; }
.empty { text-align: center; padding: 32px 20px; color: var(--color-faint); font-size: 14px; }

/* ---- panels (inner pages) ------------------------------------------------------------------------- */
.panel { border: 1px solid var(--color-divider); border-radius: var(--radius-card); background: var(--tint-04); padding: 22px 24px; margin-top: 20px; }
.panel.marked { border-left: 3px solid var(--color-accent); }
.panel.attention { border-left: 3px solid var(--failed-bar); }
.panel.ready { border-left: 3px solid #2e7a45; }
.panel h2 { font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 12px; }
.panel h3 { font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; margin: 18px 0 8px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-head .muted { font-size: 12px; }
.attention-msg { font-size: 16px; color: var(--failed-fg); font-weight: 500; margin: 0 0 8px; }
.lead { color: var(--color-muted); margin: 18px 0 0; max-width: 900px; }
.note { color: var(--color-muted); font-size: 13px; margin-top: 12px; line-height: 1.55; }
.note.narrow { max-width: 780px; }
.error { color: var(--failed-fg); font-size: 13px; margin-top: 12px; }
ul.compact { margin: 6px 0; padding-left: 20px; }
ul.compact li { margin: 2px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* ---- stat tiles ------------------------------------------------------------------------------------ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 26px; }
.stat { border: 1px solid var(--color-divider); border-left: 3px solid var(--color-accent); border-radius: var(--radius-card); background: var(--tint-04); padding: 18px 20px; }
.stat-label, .label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-muted); }
.stat-value { font-family: var(--font-heading); font-size: 34px; line-height: 1.1; margin-top: 4px; font-weight: 600; }

/* ---- tables ---------------------------------------------------------------------------------------- */
.table-frame { border: 1px solid var(--color-divider); border-radius: var(--radius-card); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #fff;
     background: var(--color-accent); padding: 10px 14px; font-weight: 600; white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid rgba(29,31,32,0.14); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.row-link { cursor: pointer; transition: background 0.12s; }
tbody tr.row-link:hover { background: var(--tint-06); }
tbody tr.selected { background: var(--tint-09); box-shadow: inset 3px 0 0 var(--color-accent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.kv td:first-child { color: var(--color-muted); width: 180px; }
table.kv td { border-bottom: 1px solid var(--color-divider-soft); padding: 8px 0; }
table.small { font-size: 13px; }
table.small th, table.small td { padding: 7px 10px; }
.table-scroll { overflow-x: auto; }
.row-link { text-decoration: none; }

/* ---- forms ----------------------------------------------------------------------------------------- */
label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--color-muted); }
input[type=text], input[type=password], textarea, select {
    width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid rgba(29,31,32,0.24); border-radius: 8px; font: inherit; font-size: 14px;
    background: var(--color-bg); color: var(--color-text); caret-color: var(--color-accent); transition: border-color 0.15s, box-shadow 0.15s;
}
select { width: auto; font-family: var(--font-heading); letter-spacing: 0.04em; cursor: pointer; }
textarea { min-height: 64px; resize: vertical; }
input:hover, textarea:hover { border-color: rgba(29,31,32,0.45); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(27,54,93,0.15); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; vertical-align: -3px; accent-color: var(--color-accent); }
.field { display: block; margin: 10px 0; font-size: 13px; }
.field > span { display: block; font-weight: 500; margin-bottom: 4px; color: var(--color-muted); }
label.choice { color: var(--color-text); font-size: 15px; margin: 8px 0; }
.seg { display: inline-flex; border: 1px solid rgba(29,31,32,0.2); border-radius: 999px; overflow: hidden; background: var(--color-bg); }
.seg button { font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 16px; border: 0;
              background: transparent; color: var(--color-text); cursor: pointer; transition: background 0.14s; font-weight: 600; }
.seg button + button { border-left: 1px solid rgba(29,31,32,0.2); }
.seg button:hover { background: rgba(27,54,93,0.08); }
.seg button.active { background: var(--color-accent); color: #fff; }

/* ---- login ----------------------------------------------------------------------------------------- */
.login-wrap { display: flex; flex-direction: column; align-items: center; padding: 70px 20px 40px; }
.login-panel { width: min(420px, 100%); border: 1px solid var(--color-divider); border-radius: var(--radius-board); background: var(--color-bg);
               box-shadow: var(--shadow-board); padding: 30px 32px 28px; }
.login-panel img { width: 64px; height: 64px; display: block; margin-bottom: 18px; }
.login-panel h1 { font-size: 30px; margin: 0; }
.login-panel .kicker { margin-bottom: 4px; }
.login-panel p { color: var(--color-muted); margin: 6px 0 0; font-size: 14px; }
.login-panel .btn { margin-top: 18px; }
.footer-note { text-align: center; color: var(--color-faint); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-heading); margin-top: 18px; }

/* ---- modal ----------------------------------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,31,54,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--color-bg); border: 1px solid var(--color-divider); border-radius: var(--radius-board); width: min(640px, 100%); max-height: 92vh; overflow: auto;
         padding: 24px 28px 26px; box-shadow: var(--shadow-menu); animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head h2 { font-size: 24px; margin: 0; }
.modal-close { background: transparent; border: none; font-size: 26px; line-height: 1; color: var(--color-muted); cursor: pointer; padding: 2px 6px; }
.modal-close:hover { color: var(--color-text); }

/* ---- the review page ------------------------------------------------------------------------------- */
.review-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; margin-top: 20px; }
@media (max-width: 900px) { .review-layout { grid-template-columns: 1fr; } .review-nav { position: static !important; flex-direction: row !important; flex-wrap: wrap; } }
.review-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; }
.review-nav a { color: var(--color-text); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-family: var(--font-heading); font-size: 14px;
                letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.review-nav a:hover { background: var(--tint-09); }
.review-nav .count { color: var(--color-muted); font-family: var(--font-body); font-size: 12px; background: var(--neutral-chip-bg); border-radius: 999px; padding: 1px 8px; letter-spacing: 0; text-transform: none; }
.review-main { min-width: 0; }
.review-main .panel:first-child { margin-top: 0; }
.review-main section { scroll-margin-top: 16px; }
.question { border: 1px solid var(--color-divider); border-left: 3px solid var(--color-accent); border-radius: var(--radius-card); padding: 14px 16px; margin-bottom: 12px; background: var(--color-bg); }
.question.blocking { border-left-color: var(--review-bar); }
.question .q-head { font-size: 15px; }
.question textarea { min-height: 56px; margin-top: 8px; }
.question label.na { margin-top: 8px; color: var(--color-text); font-size: 13px; }
.question textarea:disabled { background: var(--color-surface); color: var(--color-muted); }
.uploads { margin-top: 8px; }
table.bom tr.excluded td { color: var(--color-muted); text-decoration: line-through; }
table.bom tr.excluded td:first-child, table.bom tr.excluded td.ds { text-decoration: none; }
table.bom td.ds { white-space: nowrap; }
table.bom td.ds .ds-state { margin-right: 6px; }
.checklist-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--color-bg); border-top: 1px solid var(--color-divider);
                 box-shadow: 0 -6px 18px rgba(15,31,54,0.08); padding: 10px 28px; z-index: 50;
                 display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cl-items { display: flex; gap: 18px; flex-wrap: wrap; }
.cl-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cl-item .tick { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.cl-item.done .tick { background: var(--done-bg); color: var(--done-fg); }
.cl-item.todo .tick { background: var(--failed-bg); color: var(--failed-fg); }
.cl-item.todo.optional .tick { background: var(--neutral-chip-bg); color: var(--color-muted); }
.cl-item small { display: block; color: var(--color-muted); font-size: 11px; }
.submit-row { display: flex; align-items: center; gap: 12px; }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--color-accent); color: #fff; padding: 10px 16px;
         border-radius: 999px; font-size: 13px; z-index: 200; box-shadow: var(--shadow-menu); }
.toast.error { background: var(--failed-bar); }

/* photo cards (kept for the layout's cards; not shown to the engineer today) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--color-divider); border-radius: var(--radius-card); overflow: hidden; background: var(--color-bg); display: flex; flex-direction: column; }
.card-thumb { aspect-ratio: 3 / 2; background: var(--color-surface); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-box { width: 86%; height: 78%; border: 2px solid var(--placeholder); background: #fff5f5; color: var(--placeholder);
                   display: flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: 0.5px; font-size: 13px; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-weight: 500; }
.card-status { font-size: 12px; color: var(--color-muted); }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ---- analytics ------------------------------------------------------------------------------------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-top: 20px; }
.chart-panel { border: 1px solid var(--color-divider); border-radius: var(--radius-card); background: var(--tint-04); padding: 22px 24px; display: flex; flex-direction: column; }
.chart-panel h2 { font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; margin-top: 22px; border-bottom: 1px solid rgba(29,31,32,0.22); }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; cursor: pointer; min-width: 0; }
.bars .bar-col span { font-family: var(--font-heading); font-size: 13px; white-space: nowrap; }
.bars .bar-col .bar { width: 100%; border-radius: 4px 4px 0 0; background: #a9bcd2; transition: background 0.14s, height 0.2s; }
.bars .bar-col:hover .bar { background: var(--color-accent-400); }
.bars .bar-col.active .bar { background: var(--color-accent); }
.bar-labels { display: flex; gap: 14px; margin-top: 8px; }
.bar-labels div { flex: 1; text-align: center; font-size: 12px; color: var(--color-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bar-labels div.active { color: var(--color-accent); }
.stats-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 26px; margin-top: 14px; border-top: 1px solid var(--color-divider-soft); padding-top: 12px; }
.stats-line span.pair { display: inline-flex; align-items: baseline; gap: 8px; }
.stats-line .label { color: var(--color-faint); }
.stats-line .val { font-family: var(--font-heading); font-size: 18px; font-weight: 600; }
.mixbar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; margin-top: 20px; background: rgba(29,31,32,0.08); }
.mixbar.thin { height: 12px; margin-top: 10px; }
.mix-read { background: #1b365d; } .mix-write { background: #4a6f9c; } .mix-output { background: #8fa9c6; } .mix-uncached { background: #c8d5e5; }
.legend { display: grid; gap: 10px; margin-top: 20px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 10px; }
.legend .sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.legend .n { color: var(--color-muted); font-variant-numeric: tabular-nums; }
.legend .pct { width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.runs-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.runs-table { flex: 3 1 440px; min-width: 0; }
.runs-table td.jobcell div { font-size: 12px; color: var(--color-faint); }
.runs-table td.runno { font-family: var(--font-heading); font-size: 17px; font-weight: 600; }
.run-detail { flex: 1 1 340px; min-width: 0; border: 1px solid var(--color-divider); border-left: 3px solid var(--color-accent); border-radius: var(--radius-card);
              background: var(--tint-04); padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; }
.run-detail h2 { font-size: 26px; margin: 4px 0 0; letter-spacing: 0; text-transform: none; }
.run-detail .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; font-size: 13px; border-top: 1px solid var(--color-divider-soft); padding-top: 16px; }
.run-detail .facts .label { font-size: 11px; letter-spacing: 0.12em; color: var(--color-faint); }
.run-detail .block { border-top: 1px solid var(--color-divider-soft); padding-top: 16px; }
.run-detail .rows { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; }
.run-detail .rows div { display: flex; justify-content: space-between; gap: 12px; }
.run-detail .rows div span:first-child { color: var(--color-muted); }
.stage-list { display: grid; gap: 10px; margin-top: 12px; }
.stage-list .stage-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.stage-list .stage-row span:last-child { color: var(--color-muted); font-variant-numeric: tabular-nums; }
.stage-list .progress { height: 4px; margin-top: 5px; }
.stage-list .progress .bar { transition: none; }

/* ---- workings -------------------------------------------------------------------------------------- */
.trace { font-size: 13px; }
.trace .turn { border-left: 3px solid rgba(29,31,32,0.2); padding: 4px 10px; margin: 6px 0; }
.trace .assistant { border-color: var(--color-accent); }
.trace .tools { border-color: var(--color-faint); background: rgba(29,31,32,0.03); }
.trace .opening { border-color: var(--color-accent-400); }
.err { color: var(--failed-fg); }
.trace pre, details pre { white-space: pre-wrap; word-break: break-word; margin: 2px 0; font-size: 12px; }
.trace .call { margin: 2px 0; }
details summary { cursor: pointer; }
details { margin: 4px 0; }
.evidence img { max-width: 100%; border: 1px solid var(--color-divider); margin: 4px 0; }

/* ---- the datasheet library ------------------------------------------------------------------------ */
.library-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.library-tools input { max-width: 420px; }
table.library td { vertical-align: middle; }
table.library td.parts { max-width: 320px; }
table.library td.actions { white-space: nowrap; text-align: right; }
.pn { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
      background: var(--color-accent-100); color: var(--color-accent-800); border-radius: 4px; padding: 1px 6px; margin: 1px 0; }
tr.editing td { background: var(--tint-04); }
.edit-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px 16px; align-items: start; }
.edit-grid label { margin: 0; }
.edit-grid label textarea, .edit-grid label input, .edit-grid label select { margin-top: 4px; width: 100%; }
@media (max-width: 760px) { .edit-grid { grid-template-columns: 1fr; } }
