/* Common e-solution 3D UI contract. Technical engines retain their baseline. */
:root { --ink: var(--es3d-ink); --muted: #52665a; --line: var(--es3d-line); --paper: var(--es3d-paper); --green: var(--es3d-green); --green-bright: var(--es3d-green-bright); --green-soft: var(--es3d-green-soft); --night: var(--es3d-night); }
html, body { min-width: 0; max-width: 100%; }
body { touch-action: pan-y; }
.app-shell { width: min(var(--es3d-page-max), calc(100% - 64px)); overflow-anchor: none; }
.site-chrome__inner { width: min(var(--es3d-page-max), calc(100% - 64px)); }
.site-brand, .hero-copy, .hero-status, .panel, .panel-heading, .field-grid > *, .processing-access > *, .release-layout > *, .model-preview__heading > * { min-width: 0; }
.panel-heading > * { min-width: 0; max-width: 100%; }
.panel-heading .status, .panel-heading .score { white-space: normal; overflow-wrap: anywhere; }
.site-brand__text { max-width: 140px; }
.site-nav a, .site-nav-mobile nav a { text-transform: none; letter-spacing: 0; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.hero { margin-bottom: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .6fr); }
.hero-status { width: 100%; max-width: 100%; }
.hero-status > * { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.hero .lead { max-width: 65ch; }
.es3d-candidate-badge { color: #52665a; font-size: .75rem; }
.release-note { grid-template-columns: 1fr; gap: 14px; border-radius: var(--es3d-radius-panel); }
.release-note h2 { font-size: clamp(1.1rem, 2vw, 1.45rem); max-width: 60ch; }
.es3d-phase-status { margin: 0; color: #d2e4d9; font-size: .85rem; }
.panel { border-radius: var(--es3d-radius-panel); }
.dropzone { border-radius: var(--es3d-radius-control); }
button, .primary, .secondary, .text-button, .download-candidate, .share-link, select, input[type="text"], input[type="password"] { min-height: 44px; }
.share-link { min-width: 44px; }
.model-preview__stage { min-width: 0; touch-action: none; contain: layout paint; }
.model-preview__stage canvas { touch-action: none; }
#model-preview { scroll-margin-top: 16px; }
.es3d-view-actions { position: absolute; right: 10px; bottom: 10px; left: 10px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; pointer-events: none; }
.es3d-view-actions button { min-height: 44px; padding: 9px 12px; color: var(--ink); background: rgba(255,255,255,.96); border: 1px solid #9ab5a4; border-radius: var(--es3d-radius-control); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; pointer-events: auto; }
.es3d-view-actions button:disabled { opacity: .55; cursor: not-allowed; }
.es3d-skip-link { position: absolute; z-index: 100; left: 16px; top: -100px; padding: 12px; color: #fff; background: var(--night); border-radius: 8px; }
.es3d-skip-link:focus { top: 8px; }
.es3d-scope :is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid #178953; outline-offset: 3px; }
.es3d-scope .site-chrome :is(a,summary):focus-visible { outline-color: #57d68b; }
@media (max-width: 1100px) { .site-chrome__inner { gap: 18px; } .site-nav { gap: 14px; } }
@media (max-width: 1024px) { .app-shell, .site-chrome__inner { width: calc(100% - 48px); } }
@media (max-width: 900px) { .site-nav--desktop { display: none; } .site-nav-mobile { display: block; } .hero { grid-template-columns: 1fr; gap: 14px; } .hero-status { justify-items: start; } }
@media (max-width: 768px) { .site-chrome__inner { width: 100%; padding-inline: 16px; } }
@media (max-width: 640px) {
  .app-shell { width: calc(100% - 32px); }
  .site-chrome__inner { gap: 12px; }
  .site-brand { gap: 9px; }
  .site-brand__text { max-width: 120px; }
  .site-brand__text strong { font-size: .86rem; }
  .hero .lead { font-size: 1rem; }
  .hero-status { max-width: 100%; }
  .release-note, .panel, .share-panel { padding: 16px; }
  .model-dimensions { white-space: normal; overflow-wrap: anywhere; }
  .es3d-view-actions { justify-content: stretch; }
  .es3d-view-actions button { flex: 1 1 0; min-width: 0; }
  .processing-access { min-width: 0; }
  .es3d-model-ready .app-shell { padding-top: 16px; }
  .es3d-model-ready .hero { gap: 8px; margin-bottom: 12px; }
  .es3d-model-ready .hero h1 { font-size: 2.25rem; }
  .es3d-model-ready .hero .lead { margin-top: 7px; font-size: .88rem; line-height: 1.4; }
  .es3d-model-ready .hero-links { display: none; }
  .es3d-model-ready .hero-status { display: flex; flex-wrap: wrap; gap: 5px; }
  .es3d-model-ready .privacy-badge, .es3d-model-ready .stage-badge { padding: 5px 8px; font-size: .7rem; }
  .es3d-model-ready .es3d-candidate-badge { flex-basis: 100%; font-size: .67rem; }
  .es3d-model-ready .release-note { padding: 12px; gap: 8px; margin-bottom: 12px; }
  .es3d-model-ready .release-note > div { display: none; }
  .es3d-model-ready .es3d-phase-status { font-size: .72rem; line-height: 1.4; }
  .es3d-model-ready .panel-file { display: flex; flex-direction: column; gap: 0; }
  .es3d-model-ready #model-preview { order: -1; margin: 0 0 12px; }
  .es3d-model-ready .panel-file > .panel-heading { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  .es3d-model-ready .panel-file > .panel-heading h2 { font-size: 1rem; }
  .es3d-model-ready .panel-file > .dropzone { min-height: 72px; padding: 10px; gap: 4px; }
  .es3d-model-ready .panel-file > .dropzone .drop-icon { display: none; }
  .es3d-model-ready .panel-file > .dropzone small { font-size: .7rem; }
}

/* ES3D R08.0: shared boundary, compact global header and original wordmark. */
:root {
  --es3d-bf-header-height: 52px;
  --es3d-bf-header-outer: calc(var(--es3d-bf-header-height) + env(safe-area-inset-top, 0px));
  --es3d-bf-menu-gap: 6px;
}
html, body { scroll-padding-top: var(--es3d-bf-header-outer); }
.site-chrome {
  position: sticky;
  top: 0;
  height: var(--es3d-bf-header-outer);
  min-height: var(--es3d-bf-header-outer);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: 0;
  padding-right: 0;
  isolation: isolate;
}
.site-chrome__inner {
  height: calc(var(--es3d-bf-header-height) - 1px);
  min-height: 0;
  padding-block: 0;
}
.site-brand { min-height: 44px; }
.site-brand img.site-brand__master { width: 176px; height: auto; }
.hero h1.es3d-app-lockup { margin: 0 0 20px; padding: 0; min-width: 0; width: 100%; font-size: inherit; line-height: 1; letter-spacing: 0; }
.site-nav a::after { bottom: 4px; }
.site-nav-mobile nav {
  top: calc(100% + var(--es3d-bf-menu-gap));
  width: min(330px, calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100vh - var(--es3d-bf-header-outer) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - var(--es3d-bf-header-outer) - env(safe-area-inset-bottom, 0px));
  padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
#workspace, .app-shell [id], .app-shell :is(a,button,input,select,textarea,summary,[tabindex]):focus {
  scroll-margin-top: 16px;
  scroll-margin-bottom: 16px;
}
.es3d-scope .site-chrome :is(a,summary):focus-visible { outline-offset: 1px; }
@media (max-width: 767px) {
  :root { --es3d-bf-header-height: 52px; --es3d-bf-menu-gap: 4px; }
  .site-brand img.site-brand__master { width: 144px; }
  .hero h1.es3d-app-lockup { margin-bottom: 16px; }
}

/* One shell calculation for the actual brand, navigation and work area. */
.app-shell, .site-chrome__inner {
  width: var(--es3d-shell-width);
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}
.release-note.es3d-procedure-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .48fr);
  align-items: center;
  gap: 12px 20px;
  padding: 12px 16px;
}
.es3d-procedure-intro{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.release-note .es3d-procedure-bar__actions { gap: 5px; justify-content: flex-end; text-align: right; }
.release-note .stage-badge { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: .71rem; padding: 5px 8px; }
.release-note .es3d-phase-status { flex-basis: 100%; font-size: .76rem; line-height: 1.35; }
/* Orbit's inline touch-action:none is superseded only by this explicit UI mode. */
.model-preview__stage, #model-preview-canvas { touch-action: pan-y !important; }
.es3d-interacting .model-preview__stage, .es3d-interacting #model-preview-canvas { touch-action: none !important; }
#es3d-interact-view[aria-pressed="true"] { color: #fff; background: #0d2018; border-color: #0d2018; }
@media (max-width: 1100px) {
  .release-note.es3d-procedure-bar { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .release-note .es3d-procedure-bar__actions { justify-content: flex-start; align-items: center; text-align: left; }
  .release-note .es3d-phase-status { flex: 1 1 260px; }
}
@media (max-width: 640px) {
  .release-note.es3d-procedure-bar, .es3d-model-ready .release-note.es3d-procedure-bar { padding: 10px 8px; gap: 8px; }
  .es3d-model-ready .release-note > .es3d-procedure-bar__actions { display: flex; }
  .release-note .stage-badge { font-size: .67rem; }
  .release-note .es3d-phase-status { font-size: .7rem; }
}
@media (max-width: 359px) {
  .panel-file { padding: 12px; }
  .panel-file .model-preview { padding: 8px; }
  .es3d-view-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .es3d-view-actions button { min-height: 44px; padding: 6px; font-size: 12px; line-height: 1.3; }
  #es3d-interact-view { grid-column: 1 / -1; }
}

/* ES3D R08.1: CSS alone owns the stable phase bar; metrics only reveal focus. */
html, body { scroll-padding-top: calc(var(--es3d-bf-header-outer) + var(--es3d-bf-procedure-height, 0px)); }
.release-note.es3d-procedure-bar { position: sticky; top: var(--es3d-bf-header-outer); z-index: 20; }
.site-nav a { font-size: max(12px, .72rem); }
.release-note .stage-badge { font-size: max(12px, .71rem); }
.machine-selected-label { font-size: max(12px, .66rem); }
.method-strip b, .archive-details dt, .share-link span { font-size: max(12px, .72rem); }
.result-heading small, .result-value-grid span, .result-metrics span, .result-metrics small, .result-card dt { font-size: max(12px, .7rem); }
.result-card .provenance { font-size: max(12px, .74rem); }
@media (max-width: 767px) {
  body { font-size: var(--es3d-mobile-body, 17px); }
  .hero h1.es3d-app-lockup { margin-bottom: var(--es3d-mobile-lead-gap, 8px) !important; font-size: 1rem; }
  .hero .lead, .es3d-model-ready .hero .lead { margin-top: 0; font-size: var(--es3d-mobile-body, 17px); line-height: 1.55; }
  .hero-links { font-size: max(var(--es3d-mobile-secondary, 13px), calc(.88rem + 1px)); }
  .section-kicker, .eyebrow { font-size: max(var(--es3d-mobile-small, 12px), calc(.76rem + 1px)); }
  .privacy-badge, .es3d-model-ready .privacy-badge, .machine-code { font-size: max(var(--es3d-mobile-secondary, 13px), calc(.82rem + 1px)); }
  .release-note .stage-badge, .release-note .es3d-phase-status,
  .es3d-model-ready .release-note .es3d-phase-status { font-size: var(--es3d-mobile-secondary, 13px); }
  .status, .score, footer { font-size: max(var(--es3d-mobile-secondary, 13px), calc(.77rem + 1px)); }
  .dropzone small, .es3d-model-ready .panel-file > .dropzone small,
  .field-help, .machine small, .manual-gates small, .machine-compatibility,
  .processing-privacy, .result-card p, .result-notices, .studio-result span,
  .processing-guide p, .processing-policy p, .processing-policy summary,
  .upload-consent small, .model-preview__status, .model-dimensions,
  .file-summary, .archive-details dd, .field > span, .priority-card small,
  .method-strip span, .check span, .optimization-summary span, .priority-fieldset legend,
  .result-benefit p, .result-checklist li, .result-card dd, .result-tech summary,
  .callout, .studio-version-row p { font-size: max(var(--es3d-mobile-secondary, 13px), 14px); }
  .archive-details dt, .result-heading small, .result-heading > span,
  .result-value-grid span, .result-metrics span, .result-metrics small,
  .result-card dt, .result-card .provenance, .processing-guide__choice > div > span,
  .share-link span, .es3d-candidate-badge, .es3d-model-ready .es3d-candidate-badge {
    font-size: max(var(--es3d-mobile-small, 12px), 13px);
  }
  .es3d-view-actions button { font-size: max(var(--es3d-mobile-secondary, 13px), calc(.8rem + 1px)); }
  .download-candidate { font-size: max(var(--es3d-mobile-secondary, 13px), calc(.8rem + 1px)); }
  .priority-card strong, .processing-guide__choice > div strong, .check strong { font-size: calc(.88rem + 1px); }
  .manual-gates strong { font-size: calc(.84rem + 1px); }
  .result-value-grid strong { font-size: calc(.82rem + 1px); }
  .result-metrics strong { font-size: var(--es3d-mobile-body, 17px); }
  .site-nav-mobile nav a { font-size: var(--es3d-mobile-body, 17px); }
  .es3d-view-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  #es3d-interact-view { grid-column: 1 / -1; }
}
@media (max-width: 359px) {
  .release-note.es3d-procedure-bar, .es3d-model-ready .release-note.es3d-procedure-bar { padding-inline: 4px; }
  .es3d-view-actions button { padding: 6px; }
}
