:root {
  color-scheme: dark;
  --ink: #f2f4ef;
  --muted: #969d9a;
  --line: #303735;
  --panel: #151918;
  --panel-2: #1b201e;
  --black: #090b0a;
  --accent: #b8ff62;
  --cyan: #75ede0;
  --danger: #ff6d7a;
  --warning: #ffca64;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; background: var(--black); color: var(--ink); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.masthead {
  height: 76px; padding: 0 clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; background: rgba(9,11,10,.92);
}
.brand { display: flex; min-height: 44px; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 38px; aspect-ratio: 1; border: 1px solid var(--accent); display: grid; place-items: center; color: var(--accent); font-weight: 800; }
.brand strong, .brand small { display: block; letter-spacing: .13em; }
.brand strong { font-size: 13px; }.brand small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.system-state { color: var(--muted); font: 600 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.pulse { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--muted); box-shadow: none; }
.system-state[data-connection="connected"] .pulse { background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.system-state[data-connection="disconnected"] .pulse { background: var(--warning); box-shadow: 0 0 14px var(--warning); }

main { padding: clamp(28px, 5vw, 72px) clamp(18px, 4vw, 64px) 60px; }
.intro { max-width: 860px; margin-bottom: 42px; }
.eyebrow { color: var(--accent); font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; margin: 0 0 12px; }
.intro h1 { font-size: clamp(40px, 7vw, 88px); max-width: 960px; line-height: .94; letter-spacing: -.055em; margin: 0; font-weight: 650; }
.intro > p:last-child { max-width: 620px; color: var(--muted); font-size: 15px; line-height: 1.7; margin: 24px 0 0; }

.workspace { display: grid; grid-template-columns: minmax(310px, 410px) minmax(0, 1fr); border: 1px solid var(--line); min-height: 650px; }
.control-panel { border-right: 1px solid var(--line); background: var(--panel); }
.panel { padding: 28px; border-bottom: 1px solid var(--line); }
.panel-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.panel-heading h2 { font-size: 17px; margin: 0 0 4px; }.panel-heading p { color: var(--muted); font-size: 11px; margin: 0; }
.step-number { color: var(--accent); font: 700 11px ui-monospace, monospace; border: 1px solid #4a5843; padding: 5px 6px; }

.dropzone { position: relative; min-width: 0; max-width: 100%; min-height: 174px; border: 1px dashed #4a524f; background: #111413; display: grid; place-items: center; align-content: center; gap: 7px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: #171d14; }
.dropzone input { position: absolute; inset: 0; width: 100%; max-width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.drop-icon { font-size: 30px; color: var(--accent); font-weight: 200; }.dropzone strong { font-size: 13px; }.dropzone span:last-child { color: var(--muted); max-width: 270px; font-size: 10px; overflow-wrap: anywhere; }
.primary-button, .danger-button, .secondary-button, .viewer-actions button, .download-link { min-height: 44px; border: 0; padding: 0 16px; cursor: pointer; font-weight: 700; font-size: 11px; letter-spacing: .04em; }
.secondary-button { width: 100%; margin-top: 8px; background: #29302d; color: var(--ink); border: 1px solid #4a524f; }
.primary-button { width: 100%; margin-top: 12px; background: var(--accent); color: #10150c; }
.primary-button:hover { background: #caff86; }.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.danger-button { background: transparent; color: var(--danger); border: 1px solid #723740; }
.form-message { min-height: 18px; margin: 10px 0 0; color: var(--danger); font-size: 11px; }

.truth-banner { border-left: 2px solid var(--warning); padding: 9px 12px; background: #211d14; color: #e8d5a6; font-size: 11px; line-height: 1.5; margin-bottom: 18px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 17px 26px; color: #6f7773; font-size: 11px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 2px; width: 8px; height: 8px; border: 1px solid #4b524f; border-radius: 50%; background: var(--panel); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 12px; width: 1px; height: calc(100% - 9px); background: #343a37; }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: #b6bcb9; }.timeline li.done::before { background: var(--cyan); border-color: var(--cyan); }
.timeline li.active { color: var(--ink); font-weight: 700; }.timeline li.active::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px #b8ff6266; }
.evidence-title { margin: 10px 0 8px; color: var(--muted); font: 700 9px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.evidence-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.evidence-list li { display: flex; justify-content: space-between; gap: 12px; border: 1px solid #343a37; background: #101312; padding: 8px 10px; font-size: 10px; }
.evidence-list li span { color: var(--muted); }.evidence-list li strong { color: var(--warning); text-align: right; }
.evidence-list li[data-status="PASS"] strong { color: var(--cyan); }
.evidence-list li[data-status="NOT_RUN"] strong, .evidence-list li[data-status="UNKNOWN_LEGACY"] strong { color: var(--warning); }
.review-card { margin-top: 12px; padding: 16px; border: 1px solid #5f543b; background: #1e1b14; }
.review-kicker { color: var(--warning); font: 700 9px ui-monospace, monospace; letter-spacing: .14em; }.review-card h3 { margin: 4px 0 14px; font-size: 15px; }
.review-card label { display: block; color: var(--muted); font-size: 10px; margin-top: 9px; }.review-card input, .review-card textarea { width: 100%; margin-top: 5px; border: 1px solid #464b48; background: #101211; color: var(--ink); padding: 9px; resize: vertical; }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.review-actions .primary-button { margin-top: 12px; }
.reviewer-auth-status { min-height: 18px; margin: 7px 0 0; color: var(--muted); font-size: 10px; }

.viewer-panel { display: flex; min-width: 0; flex-direction: column; background: radial-gradient(circle at 48% 32%, #34373d 0, #1b1e23 38%, #0c0e12 78%, #08090c 100%); }
.viewer-header { min-height: 84px; padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; background: rgba(14,17,16,.78); }
.viewer-header h2 { margin: 0; font-size: 18px; }.viewer-header .eyebrow { margin-bottom: 3px; }
.viewer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }.viewer-actions button, .download-link { background: #202522; color: var(--ink); border: 1px solid #3b423f; text-decoration: none; display: inline-grid; place-items: center; }.viewer-actions button:disabled { opacity: .35; cursor: not-allowed; }
.fullscreen-fallback { flex-basis: 100%; margin: 0; color: var(--warning); font-size: 11px; text-align: right; }
.download-link { color: var(--accent); border-color: #506644; }
.canvas-shell { position: relative; isolation: isolate; flex: 1; min-height: 480px; overflow: hidden; background: radial-gradient(ellipse at 50% 18%, #ffffff0b 0, transparent 52%); }
.canvas-shell::before { content: ""; position: absolute; z-index: 0; left: 16%; right: 16%; bottom: 4%; height: 16%; border-radius: 50%; background: radial-gradient(ellipse, #b6c4dc24 0, #72809a12 36%, transparent 72%); filter: blur(12px); pointer-events: none; }
.canvas-shell:fullscreen { background: radial-gradient(circle at 48% 32%, #34373d 0, #14171c 46%, #08090c 100%); width: 100vw; height: 100vh; }
.canvas-shell.fullscreen-fallback-active { min-height: 72vh; outline: 1px solid var(--warning); }
#model-canvas { position: relative; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; }
.viewer-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; pointer-events: none; }.viewer-empty strong { margin-top: 28px; font-size: 14px; }.viewer-empty p { color: var(--muted); font-size: 11px; max-width: 270px; }
.wire-orbit { width: 126px; height: 126px; border: 1px solid #53605a; border-radius: 50%; transform: rotateX(64deg); box-shadow: inset 0 0 40px #75ede00b; }.wire-orbit::before, .wire-orbit::after { content: ""; position: absolute; inset: 28px -18px; border: 1px solid #3d4642; border-radius: 50%; }.wire-orbit::after { inset: -18px 28px; }
.viewer-status { position: absolute; z-index: 2; top: 16px; left: 16px; padding: 7px 9px; border: 1px solid #4a515d; background: #0c0f12e6; color: #b7bec9; font: 700 9px ui-monospace, monospace; letter-spacing: .08em; }
.viewer-meta { min-height: 44px; padding: 0 20px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 9px; background: rgba(14,17,16,.86); }.viewer-meta code { margin-left: auto; color: #b3bbb7; font-size: 9px; }

footer { min-height: 74px; padding: 0 clamp(20px, 4vw, 64px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #686f6c; font: 600 9px ui-monospace, monospace; letter-spacing: .08em; }

@media (max-width: 900px) {
  .system-state { display: block; max-width: 180px; font-size: 8px; text-align: right; }.workspace { grid-template-columns: 1fr; }.control-panel { border-right: 0; border-bottom: 1px solid var(--line); }.canvas-shell { min-height: 520px; }
}
@media (max-width: 560px) {
  .masthead { height: 64px; gap: 12px; }.brand { gap: 9px; }.brand-mark { width: 34px; }.system-state { max-width: 136px; }.intro h1 { font-size: 42px; }.workspace { border-left: 0; border-right: 0; margin-inline: -18px; }.panel { padding: 22px 18px; }.viewer-header { align-items: flex-start; flex-direction: column; }.viewer-actions { justify-content: flex-start; }.canvas-shell { min-height: 430px; }.viewer-meta span { display: none; }.viewer-meta code { margin-left: 0; overflow: hidden; text-overflow: ellipsis; }.review-actions { grid-template-columns: 1fr; }footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
