/* Structure and controls belong to the owner's Wave 5. Only the site binding
   and new Metal extension live here; no old .it-card / generator stylesheet. */
.site-wordmark { color:#ff6b35; }
/* Public shell is generated from the site's header; workshop controls are a toolbar. */
@font-face{font-family:Manrope;src:url('/studio-redesign/fonts/manrope-variable.woff2') format('woff2');font-weight:200 800;font-display:swap}
:root{--paper:#fff;--line:#dfe4e8;--action-ink:#101827;--workspace-muted:#586771;--danger-ink:#ad3b32;--danger-surface:#fff0ee;--font-ui:Manrope,-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;--motion-fast:140ms;--motion-state:220ms;--ease-out:cubic-bezier(.22,1,.36,1);font-family:var(--font-ui)}
.with-public-header .public-header{position:sticky;top:0;z-index:80;display:block;background:white}
.with-public-header .app-header{height:48px;padding:0 clamp(16px,2vw,28px);gap:16px;background:white;view-transition-name:none}
.with-public-header .app-header>.brand,.with-public-header .header-local,.with-public-header .local-dot{display:none}
.with-public-header .main-nav{margin:0;gap:20px}
.with-public-header .main-nav a{font-size:12px}
.with-public-header .app-rail{background:white;top:88px;height:calc(100dvh - 88px)}
.with-public-header .main-content{background:white;padding-top:20px}
@media(max-width:720px){
 .with-public-header .app-header{height:56px;gap:10px;padding:0 16px}
 .with-public-header .main-nav a{display:none}
 .with-public-header .main-nav a[data-top="projects"]{display:flex;font-size:11px;white-space:nowrap}
 .with-public-header .header-right{margin:0}
 .with-public-header .app-header .compact-tools{display:block;order:-1;flex:1;min-width:0;padding:0;border:0}
 .with-public-header .compact-tools label{font-size:0;gap:0}
 .with-public-header .compact-tools select{font-size:12px;min-height:38px;padding:8px;width:100%}
 .with-public-header .main-content{padding-top:16px}
}
.compact-tools { display:none; }
@media(max-width:720px) {
 .compact-tools { display:block; padding:12px 16px; border-bottom:1px solid var(--line); }
 .compact-tools label { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--navy); }
 .compact-tools select { flex:1; min-width:0; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--navy); font:inherit; }
 .app-body>.app-rail { display:none; }
}
/* Collections wrap in their available space: no nested two-axis scrollers. */
@media(max-width:1000px) {
 .studio-workspace>.presets-panel { display:block; max-height:none; overflow:visible; }
 .studio-workspace>.presets-panel>.panel-heading { width:auto; padding:12px 16px 8px; }
 .studio-workspace>.presets-panel>.panel-heading .eyebrow { display:none; }
 .studio-workspace>.presets-panel>.panel-heading h2 { margin:0; font-size:13px; }
 .studio-workspace>.presets-panel>[data-presets] { max-height:none; overflow:visible; padding:0 12px 12px; }
 .presets-panel .preset-card,.presets-panel .seal-preset,.presets-panel .type-preset { width:auto; min-width:0; margin:0; }
 .presets-panel .frame-select { float:none; width:100%; max-width:none; margin:0 0 12px; }
 .presets-panel .preset-card>span { white-space:normal; overflow-wrap:anywhere; }
}
/* One horizontal collection for every recipe family, independent of its markup. */
.studio-workspace:has(.variant-track) { grid-template-columns:minmax(0,1fr) 286px; }
.studio-workspace>.presets-panel:has(.variant-track) { grid-column:1/-1; display:block; max-height:none; overflow:visible; }
.presets-panel:has(.variant-track)>.panel-heading { width:auto; padding:12px 16px 8px; }
.presets-panel:has(.variant-track)>.panel-heading .eyebrow { display:none; }
.presets-panel:has(.variant-track)>.panel-heading h2 { margin:0; font-size:13px; }
.presets-panel:has(.variant-track) .panel-description { display:none; }
.presets-panel:has(.variant-track) .library-callout { display:none; }
.presets-panel:has(.variant-track)>[data-presets] { padding:0 12px 12px; max-height:none; overflow:visible; }
.variant-collection { min-width:0; }
.presets-panel .variant-track { display:flex; gap:8px; padding:2px 2px 8px; margin:0; overflow-x:auto; overflow-y:hidden; max-height:none; scroll-snap-type:x proximity; scrollbar-width:thin; }
.presets-panel .variant-track>button { box-sizing:border-box; display:flex; flex-direction:column; flex:0 0 124px; width:124px; min-width:0; margin:0; padding:6px; gap:4px; text-align:left; white-space:normal; border:1px solid var(--line); border-radius:9px; scroll-snap-align:start; }
.presets-panel .variant-track>button.selected { border-color:#ff6b35; }
.presets-panel .variant-track>button>span,.presets-panel .variant-track>button>strong { font-size:11px; line-height:1.35; overflow-wrap:anywhere; white-space:normal; padding:0; }
.presets-panel .variant-track>button>small { font-size:9px; line-height:1.4; }
.presets-panel .variant-track .preset-render,.presets-panel .variant-track .wave4-preset-cover { width:100%; margin:0; }
.presets-panel .variant-track svg { display:block; max-width:100%; height:68px; }
.presets-panel .variant-track .type-preset-preview { font-size:20px; min-height:68px; margin:0; padding:8px 0; }
.variant-track:focus-visible { outline:2px solid #ff6b35; outline-offset:2px; }
/* Photo input is an action with up to four attachments, not a preset carousel. */
.presets-panel:has(.upload-card) { max-height:none; overflow:visible; }
.presets-panel:has(.upload-card)>.panel-heading { padding:16px 16px 12px; }
.presets-panel:has(.upload-card) .panel-description { display:none; }
.presets-panel:has(.upload-card)>[data-presets] { min-width:0; max-height:none; overflow:visible; padding:0 16px 16px; }
.presets-panel .upload-card { float:none; width:100%; height:auto; min-height:64px; margin:0; padding:12px; display:grid; grid-template-columns:24px minmax(0,1fr); gap:4px 10px; text-align:left; }
.presets-panel .upload-card>svg { grid-row:1/3; width:24px; height:24px; align-self:center; }
.presets-panel .upload-card>strong { font-size:12px; }
.presets-panel .upload-card>span { font-size:10px; }
.presets-panel .photo-slots { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:12px; padding:0; }
.presets-panel .photo-slots:not(:empty) { margin-top:12px; }
.presets-panel .photo-slot { width:auto; min-width:0; margin:0; }
.presets-panel:has(.upload-card) .demo-callout { padding:12px 0 0; }
.presets-panel:has(.upload-card) .privacy-note { padding:12px 0 0; }
@media(max-width:1000px) {
 .presets-panel:has(.upload-card) { display:block; }
 .presets-panel:has(.upload-card)>.panel-heading { width:auto; padding:12px 16px 8px; }
 .presets-panel:has(.upload-card)>.panel-heading .eyebrow { display:none; }
 .presets-panel:has(.upload-card)>.panel-heading h2 { margin:0; font-size:13px; }
}
/* Spiral shades have no photographs/presets: give that space to the real model. */
.spiral-photo-workspace>.presets-panel { display:none; }
.studio-workspace.spiral-photo-workspace { grid-template-columns:minmax(0,1fr) 300px; }
.design-workspace-head .project-actions { flex-wrap:wrap; gap:8px; }
.design-workspace-head .workspace-actions { min-width:0; }
.design-frame-wrap { min-width:0; }
.design-frame { display:block; width:100%; height:850px; max-height:calc(100dvh - 220px); min-height:700px; border:0; }
.design-workspace-footer { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.design-workspace-footer p { max-width:80ch; font-size:12px; color:var(--muted); line-height:1.7; margin:0; }
.design-workspace-footer button { flex-shrink:0; }
.design-workspace-footer .project-actions {width:auto;flex:1;flex-wrap:wrap;gap:8px;}
@media(max-width:800px) {
 .design-workspace-head .workspace-actions { width:100%; max-width:none; }
 .design-workspace-head .project-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .design-workspace-head .project-actions .button { min-width:0; white-space:normal; justify-content:center; }
 .design-frame { height:780px; min-height:650px; max-height:none; }
 .design-workspace-footer { align-items:flex-start; flex-direction:column; gap:16px; }
 .design-workspace-footer .project-actions {width:100%;justify-content:flex-start;}
}
.button.primary { background:linear-gradient(130deg,#ff6b35,#ff8c5a); color:var(--action-ink); }
.button.primary:hover:not(:disabled) { background:#ff8c5a; color:var(--action-ink); }
.button.primary:active:not(:disabled) { background:#e55a2b; }
.more-tools { margin:4px 0; }
.more-tools summary { cursor:pointer; padding:10px; font-size:11px; color:var(--muted); }
.more-tools>a { display:flex; align-items:center; gap:10px; padding:12px 10px; border-radius:8px; font-size:11px; line-height:1.4; }
.more-tools>a:hover { background:#eaece740; }
.more-tools>a.active { background:var(--navy); color:#fff; }
.more-tools>a.active .rail-icon { color:#ff976e; }
.site-start-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.site-start-grid h2 { font-size:22px; line-height:1.3; margin-bottom:12px; }
.site-scope { margin-top:24px; }
.site-request-entry { padding:32px 0; margin-top:32px; border-top:1px solid var(--line); }
.site-request-entry h2 { font-size:22px; margin:0 0 12px; }
.site-request-entry p { max-width:70ch; line-height:1.7; margin:0 0 20px; color:var(--muted); }
.fabrication-dialog { width:min(900px,calc(100vw - 32px)); }
.fabrication-dialog .dialog-content { display:grid; gap:24px; }
.fabrication-lead h3 { margin:0 0 12px; font-size:20px; overflow-wrap:anywhere; }
.fabrication-lead p, .fabrication-receipt p { line-height:1.7; margin:12px 0 0; color:var(--muted); }
.fabrication-progress { display:flex; align-items:center; gap:16px; padding:24px 0; min-height:90px; }
.fabrication-progress[hidden], .fabrication-form[hidden], [data-verified][hidden], [data-request-result][hidden], .fabrication-fields [hidden] { display:none; }
.fabrication-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; border-block:1px solid var(--line); padding:20px 0; }
.fabrication-summary span { display:block; font-size:12px; color:var(--muted); margin-bottom:10px; }
.fabrication-summary strong { font-size:24px; }
.fabrication-notes { margin:24px 0; }
.fabrication-notes h3 { margin-bottom:12px; font-size:15px; }
.fabrication-notes ul { padding-left:20px; display:grid; gap:8px; font-size:13px; line-height:1.6; }
.fabrication-files { margin:0; border-bottom:1px solid var(--line); padding-bottom:12px; }
.fabrication-files summary { cursor:pointer; font-size:13px; padding:8px 0; }
.fabrication-files ul { list-style:none; padding:0; margin:12px 0 0; max-height:240px; overflow:auto; }
.fabrication-files li { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-top:1px solid var(--line); font-size:12px; }
.fabrication-files li div { min-width:0; }
.fabrication-files strong { overflow-wrap:anywhere; }
.fabrication-files small { display:block; color:var(--muted); margin-top:6px; }
.fabrication-files li>span { white-space:nowrap; color:var(--muted); }
.fabrication-form fieldset { border:0; padding:0; margin:0; min-width:0; }
.fabrication-fields { display:grid; grid-template-columns:1fr 1fr; gap:22px 24px; }
.fabrication-fields .field { min-width:0; margin:0; }
.fabrication-form .field { font-size:var(--text-sm,13px); }
.fabrication-form .input { min-height:var(--control-size,42px); font-size:var(--text-sm,13px); }
.fabrication-form select { width:100%; min-width:0; }
.fabrication-full { grid-column:1/-1; }
.fabrication-form .small-note { display:block; margin:20px 0 24px; line-height:1.7; }
.fabrication-consent { display:flex; align-items:flex-start; gap:12px; font-size:12px; line-height:1.7; margin-top:18px; cursor:pointer; }
.fabrication-consent input { flex:0 0 auto; width:18px; height:18px; margin-top:2px; accent-color:var(--orange); }
.fabrication-status { margin:20px 0; font-size:13px; line-height:1.7; }
.fabrication-status:empty { display:none; }
.fabrication-actions { display:flex; flex-wrap:wrap; gap:12px; padding-top:24px; margin-top:24px; border-top:1px solid var(--line); }
.fabrication-receipt h3 { font-size:22px; margin-top:12px; }
.fabrication-operation + .fabrication-operation { margin-top:24px; padding-top:24px; border-top:1px solid var(--line); }
.fabrication-operation>p { margin-bottom:16px; line-height:1.7; }
.site-workshop-sections { display:flex; flex-wrap:wrap; gap:12px 24px; padding-bottom:28px; }
.site-workshop-sections a { padding:10px 0; color:var(--navy); text-decoration:underline; text-underline-offset:5px; }
.product-card {display:flex;flex-direction:column;min-width:0;padding:20px;}
.product-card-top {font-size:12px;line-height:1.4;color:var(--muted);}
.product-card h3 {font-size:18px;line-height:1.35;font-weight:650;color:var(--navy);}
.product-card p {font-size:13px;line-height:1.55;color:var(--muted);margin:10px 0 18px;}
.product-tag {margin-top:auto;font-size:11px;letter-spacing:.04em;color:var(--navy);}
@media(max-width:600px){.product-card{padding:18px}.product-mark{height:96px}}
.home-products + .home-products { margin-top:48px; }
#print-tools, #lighting-tools, #metal-tools { scroll-margin-top:100px; }
.metal-controls { padding:18px; }
.metal-controls fieldset { padding:0; border:0; margin:0; min-width:0; }
.metal-controls .field { margin-bottom:20px; }
.metal-section { border-top:1px solid var(--line); padding-top:18px; margin-top:24px; }
.metal-section summary { padding:0 0 20px; font-size:12px; font-weight:600; cursor:pointer; }
.metal-section .fabrication-consent { margin-bottom:18px; }
.metal-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
.metal-status { margin-top:14px; font-size:12px; min-height:2em; }
.metal-stage { display:flex; align-items:center; justify-content:center; }
.metal-stage>img { width:100%; height:100%; object-fit:contain; }
.metal-empty { max-width:34ch; text-align:center; padding:32px; }
.metal-empty p { color:var(--muted); font-size:12px; margin-top:12px; }
.metal-presets { padding:0 12px 16px; display:grid; gap:10px; }
.metal-preset { border:1px solid var(--line); border-radius:9px; padding:18px 12px; display:grid; gap:12px; text-align:left; }
.metal-preset[aria-pressed=true] { border-color:var(--orange); background:#fff5ef; }
.metal-preset strong { font-size:12px; }
.metal-preset small { color:var(--muted); font-size:11px; }
.metal-notes { padding:20px; margin-top:24px; border-top:1px solid var(--line); font-size:12px; }
.metal-notes ul { padding-left:20px; }
/* The editor mounts asynchronously after full-document navigation. Capturing
   that changing workspace as a cross-document transition can hold Chromium's
   compositor. Keep normal navigation and the editor's own local transitions. */
@view-transition { navigation:none; }
/* Nested tools must follow the same compact rail as its direct links. */
@media(min-width:721px) and (max-width:1270px) {
  .more-tools>a { justify-content:center; padding:13px 0; }
  .more-tools>a>span:not(.rail-icon) { display:none; }
  .more-tools summary { padding:10px 2px; text-align:center; font-size:0; }
  .more-tools summary::after { content:'Ещё'; font-size:11px; }
}
@media(max-width:1000px) {
  .workspace-head { display:block; }
  .workspace-head .workspace-actions { min-width:0; max-width:none; margin-top:20px; text-align:left; }
  .workspace-head .project-actions { flex-wrap:wrap; justify-content:flex-start; }
}
@media(max-width:720px) {
  .app-rail { align-items:center; min-width:0; max-width:100%; }
  .app-rail>a { min-height:44px; }
  /* The disclosure stays keyboard-operable. Its expanded items run across,
     never down alongside (and stretching) the other navigation buttons. */
  .more-tools { flex:0 0 auto; margin:0; white-space:nowrap; }
  .more-tools summary { min-height:44px; padding:10px 12px; cursor:pointer; }
  .more-tools[open] summary { float:left; }
  .more-tools>a { display:inline-flex; vertical-align:middle; min-height:44px; gap:7px; padding:9px 12px; margin-right:8px; border:1px solid #e5e7df; border-radius:7px; font-size:10px; }
  .more-tools>a:last-child { margin-right:0; }
  .more-tools>a .rail-icon { width:18px; }
  .more-tools>a svg { width:18px; height:18px; }
  .workspace-head .project-actions { flex-wrap:wrap; }
  .workspace-head .project-actions>.button { min-width:0; white-space:normal; }
}
@media(max-width:600px) {
  .fabrication-dialog { width:calc(100vw - 20px); }
  .fabrication-fields { grid-template-columns:1fr; }
  .fabrication-form .input { font-size:16px; }
  .fabrication-summary { gap:12px; }
  .fabrication-summary strong { font-size:20px; }
  .fabrication-actions .button { width:100%; }
  .site-start-grid { grid-template-columns:1fr; }
  .app-header .main-nav { gap:14px; }
  .app-header .main-nav a { white-space:nowrap; }
  .metal-presets { grid-template-columns:1fr 1fr; }
  .metal-actions .button { flex:1; }
}
/* One navigation strip at every viewport; native scrolling, no disclosure. */
.app-body { display:block; }
.app-body>.app-rail.generator-strip {
  display:flex; flex-direction:row; align-items:center; gap:6px;
  position:static; width:100%; max-width:100%; height:auto; min-height:64px;
  padding:8px 16px; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin;
  border:0; border-bottom:1px solid var(--line); background:#fff;
}
.app-rail.generator-strip>a {
  display:flex; flex:0 0 auto; align-items:center; justify-content:center;
  min-height:44px; height:44px; width:auto; padding:10px 12px;
  margin:0; gap:8px; white-space:nowrap; font-size:12px;
  border:1px solid var(--line); border-radius:8px;
}
.app-rail.generator-strip>a>span:not(.rail-icon) { display:block; }
.app-rail.generator-strip .rail-label {
  display:block; flex:0 0 auto; margin:0; padding:0 8px; white-space:nowrap;
  font-size:11px; letter-spacing:0; text-transform:none;
}
.app-rail.generator-strip .rail-icon { width:20px; }
.app-rail.generator-strip svg { width:20px; height:20px; flex:none; }
.app-header .compact-tools,
.with-public-header .app-header .compact-tools { display:none; }
.model-dimension-overlay { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; pointer-events:none; color:var(--navy,#17335a); }
.current-server-bridge {display:grid;gap:8px;margin:0 0 20px;min-width:0;}
.current-server-bridge .project-actions {justify-content:flex-start;flex-wrap:wrap;gap:8px;}
.current-server-bridge p {margin:0;font-size:13px;line-height:1.5;color:var(--muted);}
.current-server-bridge .button {min-width:0;max-width:100%;white-space:normal;}
.current-server-bridge .local-order-notice {max-width:80ch;}
.server-request-dialog .settings-section {border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;}
.server-request-dialog .settings-section:first-child {border-top:0;}
.server-request-dialog .settings-section>summary[hidden] {display:none;}
.current-order-progress {margin:0 0 8px;line-height:1.5;}
.current-order-dialog .dialog-content {gap:8px;}
.server-request-dialog [data-request-intro] {margin:0 0 20px;line-height:1.5;}
.server-request-dialog .section-content {padding:16px 0;}
.server-request-dialog .settings-section>summary {padding-inline:0;}
.server-request-dialog [data-metal-request-status] {margin-top:16px;}
.server-request-dialog .fabrication-fields {margin-bottom:20px;}
.server-request-dialog [data-metal-receipts] {overflow-wrap:anywhere;}
@media(max-width:600px){.current-server-bridge .project-actions>.button {flex:1 1 140px;}.server-request-dialog .input {font-size:16px;}}
.model-dimension-overlay path { fill:none; stroke:currentColor; stroke-width:1; vector-effect:non-scaling-stroke; }
.model-dimension-overlay .dimension-extension { opacity:.45; }
.model-dimension-overlay text { font:600 12px Arial,Helvetica,sans-serif; font-variant-numeric:tabular-nums; text-anchor:middle; dominant-baseline:middle; fill:currentColor; stroke:white; stroke-width:5px; stroke-linejoin:round; paint-order:stroke; }

/* Motion explains state and hierarchy; it never gates content or delays input. */
.button,.icon-button,.input {transition:background var(--motion-fast),border-color var(--motion-fast),box-shadow var(--motion-fast),color var(--motion-fast),transform var(--motion-fast) var(--ease-out);}
.button:active:not(:disabled),.icon-button:active:not(:disabled) {transform:translateY(1px);}
.button:disabled,.icon-button:disabled {transform:none;}
.tool-rail>a {transition:background var(--motion-fast),color var(--motion-fast);}
.project-menu:popover-open {animation:studio-surface-in var(--motion-state) var(--ease-out) both;}
#workspace>.workspace-head,.workshop-intro {animation:studio-surface-in var(--motion-state) var(--ease-out) both;}
#workspace:focus {outline:none;}
@keyframes studio-surface-in {from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce) {
 .button,.icon-button,.input,.tool-rail>a,.project-menu:popover-open,#workspace>.workspace-head,.workshop-intro {animation:none!important;transition:none!important;}
 .button:hover:not(:disabled),.button:active:not(:disabled),.icon-button:active:not(:disabled) {transform:none;}
 .studio-workspace--editor :is(.segmented-tabs>button,.model-information summary>svg) {transition:none;}
}
@media(max-width:720px) {
 .with-public-header .app-header {height:44px;}
 .with-public-header .main-nav a[data-top=projects] {min-height:44px;font-size:12px;}
 .with-public-header .header-right>.icon-button {min-width:44px;min-height:44px;}
}
