:root {
  --bs-primary: #2458b3;
  --bs-primary-rgb: 36,88,179;
  --bs-body-color: #20304a;
  --bs-body-bg: #f4f6fa;
  --bs-border-color: #dce3ed;
  --bs-secondary-color: #647188;
  --ink: #172840;
  --blue: #2458b3;
}
* { box-sizing: border-box; }
body { font-family: Inter,"Segoe UI",system-ui,sans-serif; font-size: 1rem; }
[hidden] { display: none !important; }
.topbar { background: var(--ink); color: white; }
.topbar > .container-fluid { max-width: 1560px; min-height: 68px; padding: 16px 32px !important; }
main.container-fluid { max-width: 1560px; padding: 32px !important; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: white; text-decoration: none; font-size: 1.3rem; font-weight: 650; letter-spacing: -.5px; }
.brand-mark { display: grid; place-items: center; background: #a7dcf4; color: var(--ink); height: 30px; width: 30px; border-radius: 7px; font-size: 1.7rem; line-height: 1; }
.brand-divider { color: #64819c; margin: 0 6px; font-weight: 300; }
.brand-sub { font-size: .875rem; letter-spacing: 0; color: #bdc9d8; font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.queue-health { color: #c7d4e4; font-size: .875rem; }
.privacy-link { padding: 0; border: 0; color: #e0e9f5; background: transparent; font-size: .875rem; text-decoration: underline; text-underline-offset: 4px; }
h1 { font-size: 1.9rem; font-weight: 600; letter-spacing: -.8px; margin: 0; }
h2 { font-size: 1rem; font-weight: 650; letter-spacing: -.15px; margin: 0; }
h3 { font-size: 1rem; font-weight: 600; }
.workspace-heading { margin-bottom: 24px !important; }
.workspace-heading p { margin: 8px 0 0; color: #647188; font-size: .95rem; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: 1.5px; color: #647188; }
.surface { background: white; border: 1px solid #dce3ed; border-radius: 10px; box-shadow: 0 2px 4px #15253c05; }
.processing-notice { display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin-bottom: 20px; background: #eaf0f9; border: 1px solid #d7e2f2; border-radius: 8px; }
.processing-notice p { flex: 1; margin: 0; font-size: .875rem; line-height: 1.6; color: #445d7c; }
.processing-notice .btn { flex-shrink: 0; padding: 0; font-size: .875rem; text-underline-offset: 3px; }
.notice-mark { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border: 1px solid #8199ba; border-radius: 50%; color: #527197; font-size: .75rem; }
.btn { font-weight: 500; border-radius: 6px; }
.btn-primary { --bs-btn-bg: #2458b3; --bs-btn-border-color: #2458b3; --bs-btn-hover-bg: #1b4796; --bs-btn-hover-border-color: #1b4796; display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 44px; font-size: .9rem; padding: 10px 16px; }
.btn-outline-secondary { --bs-btn-color: #425571; --bs-btn-border-color: #ccd6e3; --bs-btn-hover-bg: #edf2f8; --bs-btn-hover-color: #172840; --bs-btn-hover-border-color: #9dafc9; }
.btn-sm { font-size: .8rem; padding: 7px 11px; }
.upload-panel { padding: 24px; }
.upload-intro { display: flex; align-items: baseline; gap: 20px; margin-bottom: 20px; }
.upload-intro p { margin: 0; color: #647188; font-size: .875rem; line-height: 1.5; }
#upload-form { display: grid; grid-template-columns: minmax(260px,1fr) minmax(200px,1fr) 250px; gap: 24px; align-items: stretch; }
.upload-picker { position: relative; }
.drop-zone { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; height: 132px; width: 100%; padding: 16px; border: 1px dashed #a5b5cc; border-radius: 7px; background: #f8faff; cursor: pointer; transition: background .15s,border-color .15s; }
.drop-zone:hover,.drop-zone.dragover { border-color: var(--blue); background: #edf3fd; }
.drop-zone strong { font-size: .9rem; font-weight: 600; }
.drop-zone > span:last-child { font-size: .8rem; color: #6d7e95; }
.upload-symbol { font-size: 1.8rem; line-height: 1; color: #5275a5; }
.upload-picker:focus-within .drop-zone { outline: 3px solid #81b3e8; outline-offset: 3px; }
.upload-selection { padding: 10px 24px 10px 0; border-right: 1px solid #e5eaf1; min-width: 0; }
.upload-selection h3 { font-size: .875rem; margin: 0 0 12px; }
#selection-hint { font-size: .875rem; color: #7c8ba0; margin: 0; }
.selected-files { list-style: none; padding: 0; margin: 0; max-height: 84px; overflow: auto; font-size: .8rem; color: #52657e; overflow-wrap: anywhere; }
.selected-files li { padding: 4px 0; }
.upload-actions { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
#submit { justify-content: space-between; }
#upload-limit { color: #748299; font-size: .8rem; line-height: 1.6; margin: 0; }
#upload-progress { grid-column: 1/-1; height: 5px; }
.progress-bar { background: var(--blue); }
.job-panel { display: grid; grid-template-columns: 180px minmax(0,1fr) auto; gap: 10px 24px; align-items: center; margin-top: 16px; padding: 18px 24px; }
.job-heading { display: flex; align-items: center; gap: 12px; }
.job-heading h2 { font-size: .9rem; white-space: nowrap; }
.job-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#job-progress { font-size: .9rem; margin: 0; overflow-wrap: anywhere; }
#job-queue { font-size: .8rem; color: #647188; margin: 4px 0 0; }
#job-queue:empty { display: none; }
.job-files { display: flex; gap: 6px 18px; flex-wrap: wrap; grid-column: 1/-1; border-top: 1px solid #edf0f5; padding-top: 12px; color: #60718a; font-size: .8rem; overflow-wrap: anywhere; }
#attempt-note { grid-column: 1/-1; color: #7c899b; font-size: .75rem; margin: 0; }
.inspection-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 24px; align-items: stretch; margin-top: 24px !important; }
.preview-column,.report-column { min-width: 0; }
.viewer-panel,.report-panel { height: 100%; overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; padding: 16px 20px; border-bottom: 1px solid #e5eaf1; }
.panel-header h2 { flex-shrink: 0; margin: 0; }
.viewer-toolbar { flex-wrap: wrap; }
.viewer-toolbar > .d-flex { min-width: 0; }
#mesh-select { max-width: 240px; min-width: 0; font-size: .8rem; }
#fit-view { white-space: nowrap; }
#viewer-stage { min-height: 560px; background-color: #f7f9fc; background-image: radial-gradient(#cad4e2 1px,transparent 1px); background-size: 24px 24px; }
#viewer-empty { display: flex; min-height: 560px; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 28px; }
#viewer-empty h3 { margin: 16px 0 10px; font-size: 1.1rem; color: #506680; }
#viewer-empty p { font-size: .875rem; color: #73849b; margin: 0; }
.wire-cube { color: #a9bdd6; font-size: 5rem; line-height: 1; font-weight: 200; }
.viewer-credit { font-size: .7rem; text-transform: uppercase; letter-spacing: 1.2px; color: #8291a5; margin-top: 30px; }
#viewer iframe { display: block; width: 100%; height: 560px; border: 0; }
.viewer-footer { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; min-height: 43px; border-top: 1px solid #e5eaf1; font-size: .75rem; color: #718198; }
.report-body { padding: 20px; max-height: 603px; overflow: auto; }
#report-summary { font-size: .875rem; line-height: 1.7; color: #647188; }
.file-report { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e6ebf2; }
.file-report h3 { font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; margin: 0 0 12px; }
.hash { font-family: ui-monospace,monospace; font-size: .7rem; color: #8692a3; overflow-wrap: anywhere; margin-bottom: 16px; }
.revision-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: #eef3fb; border-radius: 5px; }
.revision-label { font-size: .8rem; color: #5a7090; }
.revision-value { font-size: .875rem; color: var(--blue); }
.revision-evidence { margin: 8px 0 12px; font-size: .8rem; color: #718198; }
.revision-evidence p { margin: 8px 0; }
.revision-evidence pre { font-size: .75rem; white-space: pre-wrap; }
.category-row { display: grid; grid-template-columns: minmax(105px,1fr) 88px; gap: 6px 12px; padding: 13px 0; border-bottom: 1px solid #edf0f5; }
.category-label { font-size: .875rem; font-weight: 600; align-self: center; }
.category-row > div:nth-child(2) { justify-self: end; }
.category-detail { grid-column: 1/-1; color: #697b92; font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
.category-detail details { margin-top: 8px; }
.category-detail pre { white-space: pre-wrap; font-size: .75rem; max-height: 220px; overflow: auto; }
.state-pill { display: inline-block; border-radius: 4px; padding: 4px 8px; font-size: .7rem; font-weight: 600; background: #edf1f7; color: #51647c; white-space: nowrap; }
.state-recovered { background: #e6f4ed; color: #28674c; }
.state-partial { background: #fff3df; color: #8b631f; }
.state-failed { background: #fce8e8; color: #a13939; }
.state-running,.state-queued { background: #e7effd; color: var(--blue); }
.download-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.download-list:empty { display: none; }
.download-list a { text-align: left; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #81b3e8; outline-offset: 3px; }
#privacy-notice { width: min(680px,calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid #dce3ed; border-radius: 12px; background: white; color: #24354d; box-shadow: 0 24px 100px #08162c50; }
#privacy-notice[open] { display: flex; flex-direction: column; }
#privacy-notice::backdrop { background: #101f37a8; backdrop-filter: blur(3px); }
.privacy-heading { padding: 26px 28px 22px; border-bottom: 1px solid #e5eaf1; flex-shrink: 0; }
.privacy-heading h2 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -.6px; margin: 10px 0 14px; }
.privacy-heading p { font-size: .95rem; color: #62748c; line-height: 1.65; margin: 0; }
.privacy-body { padding: 22px 28px 4px; overflow: auto; }
.privacy-body h3 { font-size: .95rem; margin: 22px 0 10px; }
.privacy-body p { font-size: .9rem; color: #62748c; line-height: 1.7; margin-bottom: 16px; }
.data-flow { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 6px; background: #edf3fb; padding: 14px 16px; font-size: .875rem; font-weight: 600; color: #486a98; }
.privacy-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; padding: 20px 28px; border-top: 1px solid #e5eaf1; flex-shrink: 0; background: #fbfcfe; }
.privacy-actions .btn { min-height: 44px; padding: 10px 12px; font-size: .825rem; line-height: 1.5; }
body:has(#privacy-notice[open]) { overflow: hidden; }
.mission-layout { max-width: 1180px; margin: 0 auto; padding: 80px 32px; display: grid; grid-template-columns: .95fr 1.1fr; gap: 80px; align-items: start; }
.mission-intro { position: sticky; top: 50px; }
.mission-intro h1 { font-size: clamp(2.3rem,4.1vw,3.7rem); line-height: 1.1; letter-spacing: -1.7px; margin: 18px 0 26px; }
.mission-lead { font-size: 1.15rem; line-height: 1.7; color: #53657c; max-width: 440px; }
.mission-story h2 { font-size: 1.2rem; line-height: 1.5; margin-bottom: 14px; }
.mission-story p { font-size: 1rem; line-height: 1.8; color: #53657c; margin-bottom: 22px; }
.mission-principle { border-left: 3px solid var(--blue); padding: 4px 0 4px 24px; margin: 34px 0; }
.mission-principle h2 { color: var(--blue); }
.mission-principle p { margin: 0; }
.mission-return { margin-top: 28px; gap: 32px; }
@media (max-width: 1199px) {
  #upload-form { grid-template-columns: minmax(220px,1fr) minmax(170px,1fr) 210px; gap: 20px; }
  .inspection-grid { grid-template-columns: 1fr; }
  .report-body { max-height: none; min-height: 220px; }
  .job-panel { grid-template-columns: 170px minmax(0,1fr); }
  .job-actions { grid-column: 1/-1; }
}
@media (max-width: 850px) {
  #upload-form { grid-template-columns: 1fr 1fr; }
  .upload-selection { border: 0; padding-right: 0; }
  .upload-actions { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
  .upload-intro { display: block; }
  .upload-intro h2 { margin-bottom: 8px; }
  .brand-sub,.brand-divider { display: none; }
  .mission-layout { grid-template-columns: 1fr; gap: 30px; padding: 42px 24px; }
  .mission-intro { position: static; }
  .mission-lead { max-width: none; }
}
@media (max-width: 575px) {
  .topbar > .container-fluid { padding: 16px 20px !important; }
  main.container-fluid { padding: 24px 16px !important; }
  .queue-health { display: none; }
  h1 { font-size: 1.6rem; }
  .processing-notice { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .processing-notice p { flex-basis: calc(100% - 32px); }
  .processing-notice .btn { margin-left: 30px; }
  .upload-panel { padding: 18px; }
  #upload-form,.upload-actions { grid-template-columns: 1fr; gap: 16px; }
  .upload-selection { padding: 0; }
  .job-panel { grid-template-columns: 1fr; padding: 18px; gap: 14px; }
  .panel-header { padding: 16px; min-height: 62px; }
  .report-body { padding: 16px; }
  .viewer-toolbar > .d-flex { width: 100%; }
  #mesh-select { max-width: none; }
  #viewer-stage,#viewer-empty { min-height: 360px; }
  #viewer iframe { height: 360px !important; }
  .viewer-footer { flex-direction: column; gap: 4px; padding: 12px 16px; }
  .privacy-heading { padding: 22px 20px 18px; }
  .privacy-body { padding: 18px 20px 4px; }
  .privacy-actions { grid-template-columns: 1fr; padding: 16px 20px; }
  .privacy-heading h2 { font-size: 1.35rem; }
  .data-flow { padding: 12px; font-size: .8rem; }
}
/* Distinct intake and inspection pages. */
main.upload-page { max-width: 1100px; padding-top: 60px !important; }
.upload-page .workspace-heading { margin-bottom: 32px !important; }
.upload-page .upload-intro { display: block; }
.upload-page .upload-intro h2 { margin-bottom: 8px; }
.upload-page #upload-form { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
.upload-page .drop-zone { height: 190px; gap: 12px; }
.upload-page .upload-symbol { font-size: 2.2rem; }
.upload-page .upload-selection { border: 0; padding: 16px 0 0 8px; }
.upload-page .selected-files { max-height: 130px; }
.upload-page .upload-actions { grid-column: 1/-1; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid #e5eaf1; padding-top: 20px; }
.upload-page #submit { width: 230px !important; flex-shrink: 0; }
.upload-page #upload-limit { max-width: 420px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.results-heading > a { flex-shrink: 0; font-size: .875rem; padding: 10px 16px; }
.results-page .job-panel { margin-top: 0; }
.results-grid { grid-template-columns: minmax(360px,.85fr) minmax(0,1.35fr); }
.results-grid .report-body { max-height: calc(100dvh - 295px); min-height: 400px; }
.results-grid #viewer-stage,.results-grid #viewer-empty { min-height: max(400px,calc(100dvh - 338px)); }
.results-grid #viewer iframe { height: max(400px,calc(100dvh - 338px)) !important; }
@media (max-width: 1199px) {
  .results-grid { grid-template-columns: minmax(300px,.9fr) minmax(0,1.1fr); gap: 18px; }
  .results-grid .viewer-toolbar > .d-flex { width: 100%; }
  .results-grid .panel-header { min-height: 96px; }
}
@media (max-width: 850px) {
  .results-grid { grid-template-columns: 1fr; }
  .results-grid .panel-header { min-height: 66px; }
  .results-grid .report-body { max-height: 500px; min-height: 180px; }
  .results-heading { align-items: flex-start; }
  .results-heading h1 { font-size: 1.5rem; }
}
@media (max-width: 575px) {
  main.upload-page { padding-top: 32px !important; }
  .upload-page #upload-form { grid-template-columns: 1fr; }
  .upload-page .upload-selection { padding: 0; }
  .upload-page .upload-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .upload-page #submit { width: 100% !important; }
  .results-heading { flex-direction: column; gap: 16px; }
}
.mission-section { margin: 34px 0; padding-top: 28px; border-top: 1px solid #dfe6f0; }
.format-roadmap { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.format-roadmap li { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: white; border: 1px solid #dce3ed; border-radius: 6px; }
.format-roadmap strong { font-size: .875rem; font-weight: 600; }
.format-roadmap span { font-family: ui-monospace,monospace; font-size: .8rem; color: #708199; }
.improvement-loop { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 16px; border-radius: 6px; background: #eaf0f9; font-size: .8rem; color: #49698f; }
@media (max-width: 400px) { .format-roadmap { grid-template-columns: 1fr; } }
/* Landing context stays separate from the results workspace. */
main.upload-page { max-width: 1200px; padding-top: 42px !important; }
.landing-intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; margin-bottom: 30px; }
.landing-kicker { display: flex; gap: 12px; align-items: center; font-size: .75rem; color: #708199; margin-bottom: 18px; }
.preview-label { display: inline-block; background: #e8eef8; color: #48648c; border: 1px solid #d8e2f0; border-radius: 4px; padding: 4px 8px; }
.landing-intro h1 { font-size: clamp(2rem,3.4vw,2.9rem); line-height: 1.15; letter-spacing: -1.3px; margin-bottom: 18px; }
.landing-intro > div > p { color: #63758c; font-size: 1rem; line-height: 1.75; margin: 0; max-width: 520px; }
.landing-context { padding-left: 28px; border-left: 1px solid #d6dfec; }
.landing-context h2 { font-size: 1.05rem; margin-bottom: 12px; }
.landing-intro .landing-context p { font-size: .9rem; }
.landing-context a,.landing-mission a { display: inline-flex; gap: 12px; margin-top: 18px; font-size: .875rem; font-weight: 600; text-decoration: none; }
.landing-context a:hover,.landing-mission a:hover { text-decoration: underline; text-underline-offset: 4px; }
.landing-outcomes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 32px 0 36px; }
.landing-outcomes article { padding: 0 24px; border-right: 1px solid #dce3ed; }
.landing-outcomes article:first-child { padding-left: 0; }
.landing-outcomes article:last-child { border: 0; padding-right: 0; }
.outcome-number { display: block; font-size: .75rem; font-weight: 650; color: #7790b2; margin-bottom: 12px; }
.landing-outcomes h2 { font-size: .95rem; line-height: 1.5; margin-bottom: 9px; }
.landing-outcomes p { font-size: .875rem; line-height: 1.75; color: #6a7c93; margin: 0; }
.landing-mission { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; background: #192d48; color: #edf3fb; padding: 34px; border-radius: 10px; }
.landing-mission .eyebrow { color: #97b4d8; font-size: .7rem; }
.landing-mission h2 { font-size: 1.6rem; font-weight: 500; line-height: 1.35; letter-spacing: -.5px; margin: 14px 0; }
.landing-mission p { font-size: .9rem; color: #b1c2d8; line-height: 1.8; margin: 0; }
.landing-mission a { color: #b1daf4; }
.contribution-steps { list-style: none; counter-reset: contribution; padding: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.contribution-steps li { counter-increment: contribution; position: relative; padding-left: 40px; }
.contribution-steps li::before { content: counter(contribution); position: absolute; top: 0; left: 0; display: grid; place-items: center; height: 25px; width: 25px; border: 1px solid #4c6584; border-radius: 50%; font-size: .75rem; color: #a7c3e6; }
.contribution-steps strong { display: block; font-size: .9rem; font-weight: 550; margin-bottom: 5px; }
.contribution-steps span { display: block; font-size: .8rem; color: #a4b8d2; line-height: 1.6; }
.landing-roadmap { margin: 32px 0 10px; padding: 0 2px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; }
.landing-roadmap h2 { font-size: 1rem; margin-bottom: 10px; }
.landing-roadmap p { color: #6b7b92; font-size: .875rem; line-height: 1.7; margin: 0; }
.roadmap-label { color: #7a8ba2; font-size: .75rem; display: block; margin-bottom: 9px; }
.landing-roadmap ul { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 0; }
.landing-roadmap li { padding: 5px 9px; background: #edf1f7; border: 1px solid #dce3ed; border-radius: 4px; color: #617590; font-size: .75rem; }
@media (max-width: 850px) {
  .landing-intro { grid-template-columns: 1fr; gap: 24px; }
  .landing-context { padding: 0; border: 0; }
  .landing-mission { grid-template-columns: 1fr; gap: 32px; }
  .landing-roadmap { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 575px) {
  .landing-intro h1 { font-size: 2rem; }
  .landing-outcomes { grid-template-columns: 1fr; gap: 22px; }
  .landing-outcomes article { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid #dce3ed; }
  .outcome-number { margin-bottom: 7px; }
  .landing-mission { padding: 24px; }
  .landing-mission h2 { font-size: 1.4rem; }
}

.landing-contact { display: flex; flex-wrap: wrap; gap: 24px 64px; margin-top: 30px; padding-top: 24px; border-top: 1px solid #dce3ed; }
.landing-contact h2 { font-size: .875rem; margin-bottom: 8px; }
.landing-contact a { font-size: .875rem; text-underline-offset: 3px; }
