:root {
  --ink: #ecf5f3;
  --muted: #8fa7a4;
  --dim: #5e7773;
  --bg: #091213;
  --panel: #101d1e;
  --panel-2: #142425;
  --line: rgba(164, 213, 204, 0.14);
  --line-strong: rgba(164, 213, 204, 0.27);
  --teal: #56e0c3;
  --teal-soft: rgba(86, 224, 195, 0.14);
  --amber: #f4c76a;
  --red: #ff8f86;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(circle at 80% -20%, #1a3c3b 0, transparent 42%), var(--bg); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
code, .mono, pre { font-family: var(--mono); }
.hidden { display: none !important; }

.topbar { min-height: 78px; display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: rgba(9, 18, 19, 0.88); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 5; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--teal); color: var(--teal); font-weight: 800; letter-spacing: -0.08em; transform: skew(-8deg); }
.eyebrow { margin: 0; color: var(--teal); font: 700 10px/1.2 var(--mono); letter-spacing: 0.16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 21px; letter-spacing: -0.03em; }
.privacy-pill { margin-left: auto; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }

.shell { width: min(1500px, 100%); display: grid; grid-template-columns: 272px minmax(0, 1fr); margin: 0 auto; }
.sidebar { min-height: calc(100vh - 78px); padding: 24px 18px; border-right: 1px solid var(--line); background: rgba(12, 27, 28, 0.72); }
.drop-zone { display: grid; place-items: center; gap: 7px; min-height: 170px; padding: 20px; border: 1px dashed var(--line-strong); background: linear-gradient(145deg, rgba(86, 224, 195, 0.09), transparent); text-align: center; transition: 160ms ease; }
.drop-zone:hover, .drop-zone.dragging, .drop-zone:focus-visible { border-color: var(--teal); background-color: var(--teal-soft); outline: none; transform: translateY(-1px); }
.drop-zone strong { font-size: 13px; }
.drop-zone span { color: var(--muted); font-size: 12px; }
.drop-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 25px; }
.file-card, .sidebar-note { margin-top: 18px; padding: 15px; border: 1px solid var(--line); background: var(--panel); }
.card-label { color: var(--dim); font: 700 10px/1.2 var(--mono); letter-spacing: 0.15em; }
.file-name { overflow: hidden; margin: 8px 0 4px; font: 600 13px/1.4 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.file-meta { margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.side-nav { display: grid; gap: 3px; margin-top: 28px; }
.side-nav .card-label { margin-bottom: 7px; }
.side-nav a { display: flex; justify-content: space-between; padding: 9px 10px; color: var(--muted); text-decoration: none; font-size: 12px; border-left: 2px solid transparent; }
.side-nav a:hover { color: var(--ink); border-left-color: var(--teal); background: rgba(86, 224, 195, 0.07); }
.side-nav a span { color: var(--dim); font-family: var(--mono); }
.sidebar-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.sidebar-note p { margin: 9px 0 0; }

.content { min-width: 0; padding: 42px clamp(20px, 5vw, 76px) 70px; }
.empty-state { max-width: 620px; margin: 15vh auto; text-align: center; }
.empty-state h2 { margin: 14px 0 12px; font-size: clamp(30px, 5vw, 52px); letter-spacing: -0.07em; line-height: 0.98; }
.empty-state > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.empty-orbit { width: 92px; height: 92px; position: relative; margin: 0 auto 30px; border: 1px solid var(--line-strong); border-radius: 50%; transform: rotate(-20deg); }
.empty-orbit::before, .empty-orbit::after { content: ""; position: absolute; inset: 15px -10px; border: 1px solid var(--line-strong); border-radius: 50%; transform: rotate(55deg); }
.empty-orbit::after { inset: -10px 15px; transform: rotate(-55deg); }
.empty-orbit span { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 15px var(--teal); }
.empty-orbit span:nth-child(1) { top: 9px; left: 39px; }.empty-orbit span:nth-child(2) { right: 7px; bottom: 24px; background: var(--amber); }.empty-orbit span:nth-child(3) { left: 19px; bottom: 8px; }
.content-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.content-header h2 { margin: 8px 0 0; font-size: clamp(25px, 4vw, 40px); letter-spacing: -0.06em; }
.panel { padding: 25px 0 30px; border-top: 1px solid var(--line); scroll-margin-top: 105px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-heading h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.section-number { color: var(--teal); font: 700 11px var(--mono); }
.panel-intro { max-width: 760px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.button { border: 1px solid transparent; padding: 10px 14px; color: var(--bg); font-weight: 700; font-size: 12px; transition: 150ms ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.button:disabled { cursor: not-allowed; opacity: 0.35; }
.button.primary { background: var(--teal); }.button.success { background: var(--teal); }.button.secondary { width: 100%; background: transparent; border-color: var(--line-strong); color: var(--ink); }.button.tiny { padding: 6px 8px; background: transparent; border-color: var(--line-strong); color: var(--teal); font-size: 10px; }

.summary-grid { display: grid; grid-template-columns: repeat(6, minmax(100px, 1fr)); gap: 8px; }
.summary-card { min-height: 83px; padding: 13px; border: 1px solid var(--line); background: var(--panel); }
.summary-card span { display: block; margin-bottom: 12px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.09em; }
.summary-card strong { display: block; overflow: hidden; font: 700 17px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 12px; }
th { padding: 10px 12px; color: var(--dim); font: 700 10px var(--mono); letter-spacing: 0.1em; text-align: left; text-transform: uppercase; background: rgba(86, 224, 195, 0.05); }
td { padding: 12px; border-top: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
tr:hover td { background: rgba(86, 224, 195, 0.04); color: var(--ink); }
.empty-row { padding: 28px; color: var(--dim); text-align: center; }
.format-chip { display: inline-block; padding: 3px 6px; font: 700 10px var(--mono); border: 1px solid currentColor; }
.format-chip.u3d { color: var(--teal); }.format-chip.prc { color: var(--amber); }.format-chip.unknown { color: var(--red); }
.yes { color: var(--teal); }.bad { color: var(--red); }.muted, .subtle-box { color: var(--muted); }
.warning-list { display: grid; gap: 6px; margin-top: 12px; }.warning, .ok-line { padding: 10px 12px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }.warning { border-color: rgba(244, 199, 106, 0.35); }.warning span, .ok-line span { margin-right: 8px; color: var(--amber); font: 700 12px var(--mono); }.ok-line span { color: var(--teal); }
.viewer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr)); gap: 14px; }
.viewer-card { overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.viewer-card.viewer-error { border-color: rgba(255, 143, 134, 0.35); }
.viewer-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px 15px 10px; }
.viewer-card-title { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.viewer-card-meta { margin-top: 4px; color: var(--muted); font: 10px var(--mono); }
.viewer-canvas { display: block; width: 100%; height: 340px; min-height: 240px; background: radial-gradient(circle at 50% 35%, #203536, #081213 78%); cursor: grab; touch-action: none; }
.viewer-canvas:active { cursor: grabbing; }
.viewer-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 9px 15px 13px; border-top: 1px solid var(--line); }
.viewer-diagnostics { display: grid; gap: 7px; padding: 15px; }
.viewer-diagnostics p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.viewer-diagnostics .warning { margin: 0; }
.viewer-empty { grid-column: 1 / -1; min-height: 125px; padding: 18px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 12px; line-height: 1.7; }
.nested-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }.nested-card, .subtle-box { min-height: 130px; padding: 15px; border: 1px solid var(--line); background: var(--panel); }.error-card { border-color: rgba(255, 143, 134, 0.35); }.nested-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; font-weight: 700; }.nested-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }.nested-stats { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; }.nested-stats b { color: var(--ink); font-family: var(--mono); }.mini-list { display: grid; gap: 5px; margin-top: 16px; }.mini-list div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }.nested-actions { display: flex; justify-content: flex-end; margin-top: 14px; }.standalone-download-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.json-view { max-height: 500px; overflow: auto; margin: 0; padding: 16px; border: 1px solid var(--line); color: #b8ded6; background: #071011; font: 11px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word; }
.error-banner { position: fixed; right: 24px; bottom: 24px; max-width: min(500px, calc(100vw - 48px)); padding: 13px 16px; border: 1px solid rgba(255, 143, 134, 0.5); background: #351b1a; color: #ffd7d2; font-size: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); }
.footer { display: flex; justify-content: space-between; gap: 15px; padding: 17px 28px; border-top: 1px solid var(--line); color: var(--dim); font: 10px var(--mono); }

@media (max-width: 1000px) { .summary-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .topbar { padding: 13px 16px; }.privacy-pill { display: none; }.shell { display: block; }.sidebar { min-height: unset; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }.side-nav { display: none; }.sidebar-note { display: none; }.drop-zone { min-height: 130px; }.content { padding: 30px 16px 45px; }.content-header { align-items: flex-start; flex-direction: column; }.summary-grid { grid-template-columns: repeat(2, 1fr); }.footer { flex-direction: column; padding: 16px; } }
