/* FC Report Builder */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f2f4f7;
  --border: #e6e8ec;
  --border-strong: #d0d5dd;
  --text: #0f1728;
  --text-2: #475467;
  --text-3: #667085;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #eef3ff;
  --accent-ring: rgba(29, 78, 216, .18);
  --ok: #067647; --ok-soft: #ecfdf3; --ok-line: #abefc6;
  --bad: #b42318; --bad-soft: #fef3f2; --bad-line: #fecdca;
  --warn: #b54708; --warn-soft: #fffaeb; --warn-line: #fedf89;
  --info: #175cd3; --info-soft: #eff8ff; --info-line: #b2ddff;
  --pdf: #d92d20; --docx: #1570ef; --xlsx: #079455;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px -6px rgba(16, 24, 40, .08);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .25);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12; --surface: #12151c; --surface-2: #161a22; --surface-3: #1c212b;
    --border: #232a36; --border-strong: #323b4a;
    --text: #e8eaf0; --text-2: #aab1bf; --text-3: #8790a0;
    --accent: #5b8cff; --accent-hover: #7aa2ff; --accent-soft: #172240; --accent-ring: rgba(91, 140, 255, .28);
    --ok: #47cd89; --ok-soft: #0c2419; --ok-line: #1b5136;
    --bad: #f97066; --bad-soft: #2a1210; --bad-line: #5c2420;
    --warn: #fdb022; --warn-soft: #261a06; --warn-line: #5a3d0c;
    --info: #53b1fd; --info-soft: #0b1d30; --info-line: #1c3f63;
    --pdf: #f97066; --docx: #53b1fd; --xlsx: #47cd89;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px -6px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12; --surface: #12151c; --surface-2: #161a22; --surface-3: #1c212b;
  --border: #232a36; --border-strong: #323b4a;
  --text: #e8eaf0; --text-2: #aab1bf; --text-3: #8790a0;
  --accent: #5b8cff; --accent-hover: #7aa2ff; --accent-soft: #172240; --accent-ring: rgba(91, 140, 255, .28);
  --ok: #47cd89; --ok-soft: #0c2419; --ok-line: #1b5136;
  --bad: #f97066; --bad-soft: #2a1210; --bad-line: #5c2420;
  --warn: #fdb022; --warn-soft: #261a06; --warn-line: #5a3d0c;
  --info: #53b1fd; --info-soft: #0b1d30; --info-line: #1c3f63;
  --pdf: #f97066; --docx: #53b1fd; --xlsx: #47cd89;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px -6px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.right { text-align: right; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.page { padding-top: 40px; padding-bottom: 72px; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(140deg, #3b6cf6, #1d3fb8); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.brand-mark svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2.6; }
.stepper { display: flex; gap: 6px; list-style: none; margin: 0 auto; padding: 0; }
.stepper li { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; font-weight: 500; }
.stepper li + li::before { content: ''; width: 28px; height: 1px; background: var(--border-strong); margin-right: 2px; }
.stepper .dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3);
}
.stepper .dot svg { width: 12px; height: 12px; stroke-width: 2.4; }
.stepper li.current { color: var(--text); }
.stepper li.current .dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-ring); }
.stepper li.done { color: var(--text-2); }
.stepper li.done .dot { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.new-job svg { width: 14px; height: 14px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 500 14px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:disabled { background: var(--surface-3); color: var(--text-3); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-quiet { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-quiet:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); font-weight: 500; cursor: pointer; }
.link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* headings */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.hero { max-width: 680px; margin-bottom: 32px; }
.hero h1, .page-head h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
.lede { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head h1 { font-size: 26px; }
.page-head > div > .muted { margin-top: 6px; font-size: 15px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.with-badge { display: flex; align-items: center; gap: 12px; }
.badge-ok { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.badge-ok svg { width: 18px; height: 18px; stroke-width: 2.4; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; color: var(--text-2); font-size: 13.5px; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.meta-item svg { color: var(--text-3); }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 2px 7px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }
.section { margin-top: 48px; }
.section-head { margin-bottom: 12px; }
.section-head h2 { font-size: 16px; font-weight: 600; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.card + .card, form > .card + .card, .card + .actionbar { margin-top: 16px; }
.card-head { margin-bottom: 20px; }
.card-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.card-head p { margin-top: 4px; color: var(--text-3); font-size: 13.5px; }
.card-head .eyebrow { margin-bottom: 4px; }

/* callouts */
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; border: 1px solid; margin-bottom: 16px; font-size: 13.5px; line-height: 1.55; }
.callout > svg { width: 20px; height: 20px; margin-top: 0; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout-title { font-weight: 600; }
.callout-info { background: var(--info-soft); border-color: var(--info-line); color: var(--text); }
.callout-info > svg { color: var(--info); }
.callout-bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--text); }
.callout-bad > svg { color: var(--bad); }

/* upload */
.upload { padding: 8px; }
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 56px 24px 44px; text-align: center; cursor: pointer;
  background: var(--surface-2); transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--text-3); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 18px; display: grid; place-items: center;
  background: var(--surface); color: var(--accent); border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.dz-icon svg { width: 24px; height: 24px; }
.dz-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.dz-sub { margin-top: 6px; color: var(--text-3); }
.dz-kinds { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.kind { font: 500 11.5px var(--mono); padding: 3px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.kind::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--k); }
.kind-otdr { --k: #1d4ed8; } .kind-lts { --k: #7a5af8; } .kind-pmd { --k: #0e9384; } .kind-cd { --k: #dc6803; } .kind-other { --k: #98a2b3; }
.picked { padding: 16px 16px 4px; }
.picked-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.picked-title { font-weight: 600; }
.picked-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.picked-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 196px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.picked-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; font: 12.5px var(--mono); color: var(--text-2); border-top: 1px solid var(--border); }
.picked-list li:first-child { border-top: 0; }
.picked-list li span:last-child { color: var(--text-3); flex: none; }
.upload-foot { display: flex; align-items: center; gap: 16px; padding: 16px; flex-wrap: wrap; }
.upload-foot .small { margin-right: auto; }
.progress { flex: 1 1 100%; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .2s; }
.btn svg { width: 15px; height: 15px; }

/* recent jobs */
.table-card { padding: 0; overflow: hidden; }
table { border-collapse: collapse; width: 100%; }
.jobs th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.jobs td { padding: 14px 20px; border-top: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.jobs tbody tr:first-child td { border-top: 0; }
.jobs tbody tr { cursor: pointer; transition: background .1s; }
.jobs tbody tr:hover { background: var(--surface-2); }
.job-link { color: var(--text); font-weight: 500; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px 2px 8px; border-radius: 999px; border: 1px solid; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ready { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.pill-failed { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.pill-draft { color: var(--text-2); background: var(--surface-3); border-color: var(--border); }

/* forms */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-2 { grid-column: span 2; } .col-4 { grid-column: 1 / -1; }
.field label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.req-tag { font-size: 10.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--warn); }
.hint { margin-top: 6px; font-size: 12px; color: var(--text-3); }
input, textarea, select {
  width: 100%; font: 14px/1.4 var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input { height: 38px; padding: 0 12px; }
textarea { padding: 9px 12px; resize: vertical; min-height: 76px; }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: .85; }
input:hover, textarea:hover, select:hover { border-color: var(--text-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
input[type="date"] { font-variant-numeric: tabular-nums; }
.is-missing { border-color: var(--warn-line); background: var(--warn-soft); }
.is-missing:hover { border-color: var(--warn); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; height: 38px; padding: 0 34px 0 12px; cursor: pointer; }
.select::after {
  content: ''; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; margin-top: -5px; pointer-events: none;
  border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: rotate(45deg);
}

/* spans */
.span-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.route { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.route-line { flex: 1; height: 2px; min-width: 40px; position: relative;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); opacity: .7; }
.route-line::after { content: ''; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--accent); border-right: 0; }
.site-code { font: 600 13px var(--mono); padding: 5px 10px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.sites { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.site { border: 1px solid var(--border); border-radius: 10px; padding: 18px; background: var(--surface-2); }
.site-title { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 16px; }
.end { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font: 600 12px var(--mono); background: var(--text); color: var(--surface); }
.fibers-wrap { margin-top: 24px; overflow-x: auto; }
.fibers { min-width: 720px; }
.fibers th { font-size: 12px; font-weight: 500; color: var(--text-3); text-align: left; padding: 0 6px 8px; }
.fibers thead tr:first-child th { padding-bottom: 6px; }
.fibers .end-head { color: var(--text); font-size: 13px; font-weight: 600; font-family: var(--mono); border-bottom: 1px solid var(--border); }
.fibers .end-head .end { width: 18px; height: 18px; font-size: 11px; margin-right: 8px; border-radius: 5px; }
.fibers thead tr:last-child th { padding-top: 8px; }
.fibers tbody { border-top: 1px solid var(--border); }
.fibers td { padding: 10px 6px 0; }
.fibers td.fnum, .fibers th.fnum { width: 64px; padding-left: 0; }
.fiber-no { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; background: var(--surface-3); font: 600 13px var(--mono); color: var(--text); }
input.cell { height: 34px; padding: 0 10px; font: 13px var(--mono); }
.files-row td { padding: 6px 6px 12px; }
.file-chip { display: inline-block; font: 11.5px var(--mono); color: var(--text-3); padding: 2px 8px; margin: 0 6px 4px 0; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }

/* sticky action bar */
.actionbar { position: sticky; bottom: 16px; z-index: 10; margin-top: 24px; }
.actionbar-in {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 12px 12px 20px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.completion { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.meter { width: 140px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--warn); border-radius: 999px; transition: width .25s, background .25s; }
.completion.is-done .meter-fill { background: var(--ok); }
.completion.is-done p { color: var(--ok); }

/* building overlay */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.overlay[hidden] { display: none; }
.overlay-card { max-width: 400px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px; box-shadow: var(--shadow-lg); }
.overlay-title { font-size: 17px; font-weight: 600; margin: 18px 0 6px; }
.spinner { width: 36px; height: 36px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* results */
.verdicts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.verdict { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.verdict::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--v, var(--border-strong)); }
.verdict.is-ok { --v: var(--ok); } .verdict.is-bad { --v: var(--bad); }
.verdict-name { font-size: 13px; font-weight: 500; color: var(--text-2); }
.verdict-state { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 20px; font-weight: 650; letter-spacing: -.015em; color: var(--v, var(--text-3)); }
.verdict-state svg { width: 18px; height: 18px; stroke-width: 2.4; }
.verdict.is-na .verdict-state { font-size: 16px; font-weight: 500; }
.verdict-sub { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.checks { border-color: var(--warn-line); }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
.check-list li:first-child { border-top: 0; padding-top: 0; }
.check-list svg { width: 18px; height: 18px; color: var(--warn); margin-top: 1px; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.result-grid > .card + .card { margin-top: 0; }
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.file-row:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.ftype { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; font: 700 10.5px var(--font); letter-spacing: .04em;
  color: var(--t, var(--text-2)); background: color-mix(in srgb, var(--t, var(--text-3)) 12%, transparent); }
.ftype-pdf { --t: var(--pdf); } .ftype-docx { --t: var(--docx); } .ftype-xlsx { --t: var(--xlsx); }
.fname { display: flex; flex-direction: column; min-width: 0; }
.fname-main { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fdl { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); transition: background .15s, color .15s; }
.file-row:hover .fdl { background: var(--accent-soft); color: var(--accent); }
.compact .file-row { padding: 8px 10px; gap: 12px; }
.compact .ftype { width: 34px; height: 34px; font-size: 9.5px; border-radius: 7px; }
.folder + .folder { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.folder-name { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 10px; }
.folder-name svg { color: var(--text-3); }
.folder-raw { margin-top: 8px; padding-left: 2px; }
.details summary { cursor: pointer; font-weight: 500; }
.details pre { margin: 16px 0 0; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-3); font: 12px/1.6 var(--mono); overflow: auto; white-space: pre-wrap; color: var(--text-2); }

/* narrow screens */
@media (max-width: 900px) {
  .stepper .label { display: none; }
  .stepper li.current .label { display: inline; }
  .result-grid { grid-template-columns: 1fr; }
  .verdicts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sites { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .page { padding-top: 24px; }
  .topbar-in { gap: 12px; }
  .brand-name, .new-job span { display: none; }
  .new-job { width: 38px; padding: 0; }
  .hero h1 { font-size: 24px; }
  .lede { font-size: 15px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .head-actions .btn { flex: 1; }
  .card { padding: 18px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .col-2 { grid-column: 1 / -1; }
  .span-head { flex-direction: column; align-items: flex-start; }
  .route { min-width: 0; width: 100%; }
  .jobs th, .jobs td { padding-left: 14px; padding-right: 14px; }
  .actionbar { bottom: 8px; }
  .actionbar-in { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .completion { justify-content: center; }
  .meter { width: 80px; }
  .dropzone { padding: 40px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 0s !important; } }

/* nav + account */
.nav { display: flex; gap: 4px; margin-right: auto; margin-left: 12px; }
.nav a { padding: 6px 12px; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: 13.5px; }
.nav a:hover { color: var(--text); background: var(--surface-3); }
.nav a.active { color: var(--text); background: var(--surface-3); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px;
  background: linear-gradient(140deg, #e0e8ff, #c7d5fe); color: #1d3fb8; box-shadow: inset 0 0 0 1px rgba(29,78,216,.15); }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; padding: 14px; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.um-name { font-weight: 600; }
.um-sub { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.um-org { margin: 10px 0 12px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; }
.um-out { width: 100%; height: 34px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 500 13px var(--font); cursor: pointer; }
.um-out:hover { background: var(--surface-2); }

/* projects */
.search { position: relative; width: 300px; max-width: 100%; }
.search svg { position: absolute; left: 12px; top: 50%; margin-top: -8px; color: var(--text-3); }
.search input { padding-left: 36px; }
.month + .month { margin-top: 28px; }
.month-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.month-title span { font-size: 11.5px; font-weight: 600; color: var(--text-3); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; }
.jobs td:first-child { width: 38%; }
.minis { display: flex; gap: 4px; }
.mini { font: 600 10.5px var(--font); letter-spacing: .02em; padding: 3px 6px; border-radius: 5px; border: 1px solid; }
.mini.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.mini.bad { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.mini.na { color: var(--text-3); background: var(--surface-2); border-color: var(--border); }
.warn-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); vertical-align: middle; }
.empty { text-align: center; padding: 48px 24px; }
.empty h2 { font-size: 17px; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

/* sign-in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-md); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 28px; }
.auth-card h1 { font-size: 22px; letter-spacing: -.02em; }
.auth-card > .muted { margin: 6px 0 22px; }
.auth-card .callout { margin-bottom: 18px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn { margin-top: 6px; width: 100%; }
.auth-foot { margin-top: 20px; text-align: center; }
@media (max-width: 640px) {
  .nav { display: none; }
  .search { width: 100%; }
  .jobs th:nth-child(2), .jobs td:nth-child(2), .jobs th:nth-child(3), .jobs td:nth-child(3) { display: none; }
  .jobs td:first-child { width: auto; }
  .auth-card { padding: 24px; }
}
.month .jobs { table-layout: fixed; }
.month .jobs th:nth-child(1) { width: 36%; } .month .jobs th:nth-child(2) { width: 17%; }
.month .jobs th:nth-child(3) { width: 13%; } .month .jobs th:nth-child(4) { width: 20%; }
.month .jobs td:first-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .month .jobs th:nth-child(1) { width: auto; } .month .jobs th:nth-child(4) { width: 46%; } }

/* suggested red cells: one checkbox per flag */
.red-cells { border-color: var(--bad-line); }
.flag-list { list-style: none; margin: 0 0 14px; padding: 0; }
.flag-list li { border-top: 1px solid var(--border); }
.flag-list li:first-child { border-top: 0; }
.flag-list label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; font-size: 13.5px; color: var(--text); cursor: pointer; }
.flag-list input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--bad); flex: none; }
.flag-actions { display: flex; justify-content: flex-end; }
