:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #1d232b;
  --muted: #687381;
  --line: #d8dde5;
  --accent: #256f8f;
  --accent-dark: #185773;
  --ok: #177245;
  --bad: #a33b36;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; background: #ffffff; border-bottom: 1px solid var(--line); }
.brandBlock { min-width: 220px; flex: 1; }
.topActions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.navLinks { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; }
.navLinks a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 6px; color: #344150; text-decoration: none; font-size: 13px; font-weight: 700; }
.navLinks a:hover { background: #eef2f5; color: var(--accent-dark); }
.navLinks a.active { background: #e2f1f5; color: var(--accent-dark); }
h1 { margin: 0; font-size: 22px; font-weight: 800; }
h2 { margin: 0; font-size: 16px; font-weight: 700; }
p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.brandBlock p { max-width: 980px; line-height: 1.45; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr); gap: 16px; padding: 16px; min-height: 0; }
.toolWorkspace { flex: 1 0 auto; align-items: stretch; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-height: 0; display: flex; flex-direction: column; }
.panelHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
button { border: 0; border-radius: 6px; background: var(--accent); color: white; height: 34px; padding: 0 14px; font-weight: 650; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button:disabled { background: #9aa7b2; cursor: wait; }
.iconButton { width: 34px; padding: 0; font-size: 18px; }
.formGrid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.formGrid.compact { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
label.wide { grid-column: 1 / -1; }
input, select { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font: inherit; color: var(--text); background: white; }
.toggles { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.toggles label { display: flex; align-items: center; gap: 6px; color: var(--text); }
.toggles input { width: 16px; height: 16px; }
.tableWrap { border: 1px solid var(--line); border-radius: 6px; overflow: auto; flex: 1; min-height: 280px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 9px; text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: #eef2f5; color: #3b4652; z-index: 1; }
.ok { color: var(--ok); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }
.hidden { display: none !important; }
.downloadLink { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 9px; border-radius: 5px; background: #eef7f9; color: var(--accent-dark); text-decoration: none; font-weight: 700; border: 1px solid #b8dbe4; }
.downloadLink:hover { background: #dff0f4; }
.fitPanel { overflow: hidden; }
.resultsWrap { margin-top: 12px; min-height: 120px; max-height: 220px; flex: 0 1 220px; }
.jobBox { border: 1px solid var(--line); border-radius: 6px; min-height: 180px; flex: 1 1 240px; display: flex; flex-direction: column; overflow: hidden; }
#jobStatus { padding: 9px 10px; background: #eef2f5; border-bottom: 1px solid var(--line); font-size: 13px; color: #3b4652; }
.fitProgress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; background: #f8fafb; border-bottom: 1px solid var(--line); }
.progressTrack { height: 10px; overflow: hidden; border-radius: 999px; background: #dfe6ec; }
.progressBar { width: 0%; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.25s ease; }
.progressBar.indeterminate { width: 40%; animation: progressPulse 1.2s ease-in-out infinite; }
#fitProgressText { min-width: 72px; text-align: right; color: #3b4652; font-size: 12px; font-weight: 700; }
#jobOutput { margin: 0; padding: 10px; overflow: auto; flex: 1; white-space: pre-wrap; font-size: 12px; line-height: 1.45; }
@keyframes progressPulse { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

.servicePromo { padding: 0 16px 16px; }
.homePromo { padding-top: 16px; min-height: calc(100vh - 116px); }
.promoInner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 16px; max-width: 1440px; margin: 0 auto; align-items: start; }
.promoMain { display: grid; gap: 16px; }
.promoContent, .contactBlock { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.promoContent { padding: 20px 24px; }
.promoEyebrow { margin: 0 0 6px; color: var(--accent-dark); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0; }
.promoContent h2 { font-size: 22px; margin: 0 0 10px; }
.promoLead, .promoScope { margin: 0; font-size: 14px; line-height: 1.7; color: #344150; }
.promoScope { padding-top: 10px; border-top: 1px solid var(--line); }
.featureList { margin: 14px 0; padding-left: 18px; display: grid; gap: 8px; color: #243242; font-size: 13px; line-height: 1.55; }
.featureList strong { color: #0f2c3d; }
.promoHero, .instrumentPhoto { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #eef2f5; }
.promoHero { height: clamp(300px, 34vw, 440px); }
.promoHero img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 28%; }
.instrumentPhoto { align-self: start; }
.instrumentPhoto img { width: 100%; height: auto; display: block; object-fit: contain; }
.contactBlock { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 18px 20px; background: #f8fafb; }
.contactBlock h3 { margin: 0 0 4px; font-size: 16px; }
.contactBlock p { margin: 0; color: #344150; line-height: 1.5; }
.contactPeople { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 22px; row-gap: 4px; align-items: baseline; }
.contactPeople strong { color: #1d232b; }
.contactPeople a { overflow-wrap: anywhere; }
.labAddress { padding-top: 4px; }
.contactBlock a { color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.contactBlock a:hover { text-decoration: underline; }
.siteFooter { height: 40px; display: flex; align-items: center; justify-content: center; gap: 12px; border-top: 1px solid var(--line); background: #ffffff; color: var(--muted); font-size: 13px; }
.siteFooter a { color: var(--accent-dark); text-decoration: none; font-weight: 650; }
.siteFooter a:hover { text-decoration: underline; }
@media (max-width: 980px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topActions { width: 100%; justify-content: space-between; }
  .navLinks { flex-wrap: wrap; }
  .workspace, .toolWorkspace { grid-template-columns: 1fr; height: auto; }
  .siteFooter { flex-direction: column; gap: 2px; height: auto; min-height: 54px; padding: 8px 12px; text-align: center; }
  .promoInner { grid-template-columns: 1fr; }
  .promoHero { height: 260px; }
  .instrumentPhoto { max-width: 420px; width: 100%; }
  .formGrid, .formGrid.compact { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}
.accessPanel { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr) minmax(420px, 1.15fr); gap: 16px; padding: 16px 16px 0; }
.accessCard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-width: 0; }
.requestGrid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
.loginGrid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
.buttonRow { display: flex; gap: 8px; align-items: center; }
.secondaryButton { background: #eef2f5; color: #344150; border: 1px solid var(--line); }
.secondaryButton:hover { background: #dfe6ec; }
.dangerButton { background: #a33b36; }
.dangerButton:hover { background: #862b27; }
.adminCard { min-width: 0; }
.miniStatus { min-height: 20px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.adminRequestsWrap { max-height: 170px; min-height: 110px; }
.smallButton { height: 26px; padding: 0 9px; border-radius: 5px; font-size: 12px; }
@media (max-width: 980px) {
  .accessPanel { grid-template-columns: 1fr; }
  .requestGrid, .loginGrid { grid-template-columns: 1fr; }
}
