/* DevelopmentsClass: look and feel. The first part is shared with DesignClass Render (brand tokens, header, panel, fields). */
/* Fonts are hosted alongside the app (Poppins + JetBrains Mono, SIL Open Font Licence): no third-party requests */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/poppins-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url("../assets/fonts/poppins-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }
/* DesignClass brand tokens (Brand & Style Guide 1.0), shared with DesignClass CFD, CAM, Render and DevelopmentsClass */
:root {
  --ink: #0A1020;          /* Drawing Ink */
  --ink2: #121B36;         /* Night Sheet */
  --paper: #F4F2EC;        /* Tracing Paper */
  --white: #FFFFFF;
  --blue: #2448FF;         /* Drafting Blue */
  --blue-d: #1630D6;       /* Pressed Blue */
  --cyan: #4FE3FF;         /* Blueprint Cyan */
  --text: #121726;         /* Graphite */
  --pencil: #4D566A;       /* Pencil Grey */
  --field: #C9CDD8;        /* Field Line */
  --body-dark: #B9C4E2;
  --tb-label: #7186BB;
  --tb-value: #C9D3EE;
  --danger: #E0352B;
  --line: rgba(18, 23, 38, .14);
  --line-dark: rgba(160, 195, 255, .22);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --panel-w: 400px;
  --header-h: 64px;
  --blueprint:
    linear-gradient(rgba(120, 170, 255, .07) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(120, 170, 255, .07) 1px, transparent 1px) 0 0 / 40px 40px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font: 400 14px/1.5 var(--sans); color: var(--text); background: var(--paper);
  display: flex; flex-direction: column; overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.site-header :focus-visible, .viewport :focus-visible { outline-color: var(--white); }

/* ---------------------------------------------------------------- header */
.site-header {
  height: var(--header-h); flex: none; position: relative; z-index: 20;
  display: flex; align-items: center; gap: 16px; padding: 0 clamp(14px, 2vw, 24px); color: var(--white);
  background: radial-gradient(60% 180% at 85% 0%, rgba(36, 72, 255, .38), transparent 70%), var(--blueprint), var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.brand { display: block; line-height: 0; flex: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand-text {
  display: flex; flex-direction: column; line-height: 1.15; min-width: 0;
  padding-left: 16px; border-left: 1px solid var(--line-dark);
}
.eyebrow { font: 500 .68rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.app-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; white-space: nowrap; }
.app-name .accent { color: var(--cyan); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: var(--h); padding: 0 1.15em; border-radius: 999px; border: 1.5px solid var(--text);
  background: transparent; color: var(--text); font-weight: 600; font-size: .86rem; line-height: 1.1;
  cursor: pointer; white-space: nowrap; user-select: none; text-align: center;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--text); color: var(--white); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--white); box-shadow: 0 10px 24px -10px var(--blue); }
.btn.primary:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn.ghost { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .55); color: var(--white); }
.btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.btn.small { --h: 36px; padding: 0 .95em; font-size: .8rem; }
.btn.block { width: 100%; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--white); }
.btn.on { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn .arrow { font-family: var(--mono); }

/* ---------------------------------------------------------------- layout */
.layout { flex: 1; display: grid; grid-template-columns: var(--panel-w) minmax(0, 1fr); min-height: 0; }
.panel {
  overflow-y: auto; padding: 16px clamp(14px, 1.4vw, 20px) 40px;
  background:
    linear-gradient(rgba(18, 23, 38, .05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(18, 23, 38, .05) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
  border-right: 1px solid var(--line);
}
.viewport {
  position: relative; min-width: 0; overflow: hidden; color: var(--white);
  background: radial-gradient(ellipse at 60% 30%, rgba(36, 72, 255, .22), transparent 60%), var(--blueprint), var(--ink);
}
/* once a model is loaded the viewport shows the studio colour behind the (transparent) render */
.viewport.has-model { background: var(--studio, #e8e9eb); }
.viewport:not(.has-model) #canvas { visibility: hidden; }   /* empty floor would wash out the blueprint stage */
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
/* the second ray tracer (WebGPU) draws over the normal canvas; clicks go through to the one underneath */
#canvasGpu { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#canvasGpu[hidden] { display: none; }

/* ---------------------------------------------------------------- panel sheets */
details.sheet {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px; margin-bottom: 14px;
  box-shadow: 0 28px 50px -34px rgba(18, 23, 38, .45);
}
details.sheet > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; min-height: 56px; border-radius: 20px;
}
details.sheet > summary::-webkit-details-marker { display: none; }
details.sheet > summary::after { content: "+"; margin-left: auto; font-size: 1.35rem; line-height: 1; color: var(--blue); }
details.sheet[open] > summary::after { content: "−"; }
.sheet-tag {
  display: inline-flex; align-items: center; gap: .7em; padding-right: .7em; flex: none;
  border: 1.5px solid var(--text); border-radius: 6px; overflow: hidden;
  font: 700 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
}
.sheet-tag .num { background: var(--text); color: var(--white); padding: .45em .6em; }
.sum-title { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.sbody { padding: 0 16px 18px; display: flex; flex-direction: column; gap: 14px; }

/* ---------------------------------------------------------------- fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > .top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font: 700 .68rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text);
}
.field > .top output { font: 500 .74rem var(--mono); letter-spacing: 0; text-transform: none; color: var(--blue); white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
.muted { color: var(--pencil); font-size: .8rem; line-height: 1.45; }
.readout { font: 500 .74rem/1.5 var(--mono); color: var(--pencil); }
select, input[type="text"] {
  height: 40px; border: 1.5px solid var(--field); border-radius: 12px; background: var(--white);
  padding: 0 10px; min-width: 0; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
select:focus, input[type="text"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36, 72, 255, .15); }
input[type="range"] { width: 100%; accent-color: var(--blue); margin: 2px 0; }
input[type="color"] {
  -webkit-appearance: none; appearance: none; width: 40px; height: 40px; flex: none; cursor: pointer;
  border: 1.5px solid var(--field); border-radius: 12px; padding: 3px; background: var(--white);
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 8px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; font-size: .86rem; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.seg {
  display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--field);
}
.seg button {
  flex: 1; border: 0; background: transparent; min-height: 32px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: .8rem; color: var(--pencil); white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--blue); color: var(--white); }
.seg.wrap { flex-wrap: wrap; border-radius: 16px; }
.seg.wrap button { flex: 1 1 45%; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button {
  border: 1.5px solid var(--field); background: var(--white); border-radius: 999px; height: 28px; padding: 0 10px;
  font: 500 .7rem var(--mono); letter-spacing: .04em; color: var(--pencil); cursor: pointer;
}
.chips button:hover { border-color: var(--text); color: var(--text); }


/* busy overlay (STEP import, HDRI loading) */
.busy {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 16px; text-align: center; color: var(--white);
  background: rgba(10, 16, 32, .74); backdrop-filter: blur(4px);
}
.ring { width: 54px; height: 54px; border-radius: 50%; border: 2px dashed var(--cyan); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy-label { font: 500 .85rem/1.4 var(--mono); letter-spacing: .06em; }
.busy-sub { font-size: .78rem; color: var(--body-dark); min-height: 1em; }
.bar { position: relative; width: min(320px, 80%); height: 6px; border-radius: 999px; background: rgba(160, 195, 255, .2); overflow: hidden; }
.bar span { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 999px; background: var(--cyan); transition: width .25s; }
.bar.indeterminate span { width: 35% !important; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { left: -35%; } to { left: 100%; } }

.toast {
  position: absolute; left: 50%; bottom: 78px; z-index: 7; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 28px); padding: 9px 18px; border-radius: 999px; font-size: .82rem;
  background: var(--ink); color: var(--white); border: 1px solid var(--line-dark); transition: all .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.help { margin: 0; color: var(--pencil); font-size: .84rem; line-height: 1.45; }
details.more { border: 1.5px dashed var(--field); border-radius: 14px; padding: 0 12px; }
details.more > summary {
  list-style: none; cursor: pointer; display: flex; padding: 10px 0;
  font: 700 .68rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blue);
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; margin-left: auto; font-size: 1rem; line-height: 1; }
details.more[open] > summary::after { content: "−"; }
details.more > .field, details.more > .check { margin-bottom: 14px; }

/* ================================================================ DevelopmentsClass */
:root { --panel-w: 360px; --split: 44%; }
.layout { grid-template-columns: var(--panel-w) minmax(0, 1fr); position: relative; }
.credits { margin: 6px 4px 0; font-size: .72rem; }
.credits a { color: var(--pencil); }
.sbody .row > .seg { flex: none; }
input[type="number"] {
  height: 40px; border: 1.5px solid var(--field); border-radius: 12px; background: var(--white); padding: 0 10px; min-width: 0; width: 100%;
}
input[type="number"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36, 72, 255, .15); }
.row .grow { flex: 1; }

/* parts list */
.bodies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow: auto; }
.bodies li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1.5px solid var(--field); border-radius: 12px; background: var(--white); font-size: .82rem; }
.bodies input { accent-color: var(--blue); width: 16px; height: 16px; }

/* line legend */
.legend { display: grid; grid-template-columns: 54px 1fr; gap: 6px 10px; align-items: center; font-size: .8rem; color: var(--pencil); }
.legend svg { width: 54px; height: 10px; display: block; }

.swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.swatches button { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--field); cursor: pointer; padding: 0; }
.swatches button:hover { border-color: var(--text); }

/* ---------------------------------------------------------------- the two windows */
.work { display: flex; min-width: 0; min-height: 0; position: relative; }
.view3d, .view2d { position: relative; min-width: 0; overflow: hidden; }
.view3d {
  flex: 0 0 var(--split); color: var(--white);
  background: radial-gradient(ellipse at 50% 30%, rgba(36, 72, 255, .22), transparent 60%), var(--blueprint), var(--ink);
}
.view2d { flex: 1 1 0; background: #dfe3ea; }
#canvas3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.view3d:not(.has-model) #canvas3d, .view3d:not(.has-model) .fold-bar, .view3d:not(.has-model) .view-head > :not(.view-label) { visibility: hidden; }
#svg2d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; user-select: none; -webkit-user-select: none; }
.view2d:not(.has-net) #svg2d, .view2d:not(.has-net) .view-head > :not(.view-label), .view2d:not(.has-net) .title-block { visibility: hidden; }
.view2d:not(.has-net)::after {
  content: "The flat net appears here"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 500 .8rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pencil);
  background: linear-gradient(rgba(18, 23, 38, .05) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, rgba(18, 23, 38, .05) 1px, transparent 1px) 0 0 / 32px 32px, var(--paper);
}
.splitter {
  flex: 0 0 8px; cursor: col-resize; background: var(--ink2); position: relative; z-index: 4;
  border-left: 1px solid var(--line-dark); border-right: 1px solid var(--line-dark);
}
.splitter::after { content: ""; position: absolute; top: 50%; left: 2px; width: 2px; height: 36px; margin-top: -18px; border-radius: 2px; background: var(--tb-label); }
.splitter:hover::after, .splitter:focus-visible::after { background: var(--cyan); }

.view-head { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.view-head > * { pointer-events: auto; }
.view-label {
  font: 700 .66rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 9px 10px; border-radius: 8px;
  background: rgba(10, 16, 32, .86); color: var(--cyan); border: 1px solid var(--line-dark);
}
.view-head .dark-seg:last-child { margin-left: auto; }
.dark-seg {
  pointer-events: auto; display: inline-flex; flex-wrap: wrap; border-radius: 999px; padding: 3px; gap: 2px;
  background: rgba(10, 16, 32, .86); backdrop-filter: blur(12px); border: 1px solid var(--line-dark);
}
.dark-seg button {
  border: 0; background: transparent; color: var(--body-dark); min-height: 32px; padding: 0 11px; border-radius: 999px;
  font: 500 .7rem var(--mono); letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.dark-seg button:hover { color: var(--white); background: rgba(255, 255, 255, .08); }
.dark-seg button.active { background: var(--cyan); color: var(--ink); }
.dark-seg button:disabled { opacity: .35; pointer-events: none; }
.icon-dark {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-dark); background: rgba(10, 16, 32, .86);
  color: var(--body-dark); cursor: pointer; font-size: 1.1rem; margin-left: auto;
}
.icon-dark:hover { color: var(--white); }

.fold-bar {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(10, 16, 32, .86); backdrop-filter: blur(12px); border: 1px solid var(--line-dark);
}
.fold-bar input { flex: 1; accent-color: var(--cyan); min-width: 40px; }
.fb-label { font: 500 .66rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tb-label); }
.play { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; background: var(--cyan); color: var(--ink); font-size: .9rem; cursor: pointer; }
.play:hover { background: var(--white); }

/* empty state */
.empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 16px; text-align: center; color: var(--body-dark); z-index: 4;
}
.view3d.has-model .empty { display: none; }
.empty-title { margin: 0; font-weight: 800; font-size: clamp(1.4rem, 2.2vw, 2.1rem); letter-spacing: -.025em; line-height: 1.1; color: var(--white); }
.empty-title b { color: var(--cyan); font-weight: 800; }
.empty-sub { margin: 0 0 10px; max-width: 400px; font-size: .88rem; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: min(380px, 100%); min-height: 110px; border: 1.5px dashed var(--line-dark); border-radius: 18px; cursor: pointer;
  background: rgba(18, 27, 54, .6); transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.dropzone::before, .dropzone::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--cyan); }
.dropzone::before { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
.dropzone::after { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }
.dropzone:hover, .dragging .dropzone { border-color: var(--cyan); background: rgba(79, 227, 255, .08); }
.dropzone strong { font-weight: 600; color: var(--white); font-size: 1rem; }
.dropzone span { font-size: .82rem; }
.example-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 460px; margin-top: 6px; }
.example-chips button {
  border: 1px solid var(--line-dark); background: rgba(18, 27, 54, .7); color: var(--body-dark); border-radius: 999px; height: 30px; padding: 0 12px;
  font: 500 .7rem var(--mono); letter-spacing: .04em; cursor: pointer;
}
.example-chips button:hover { border-color: var(--cyan); color: var(--white); }
.empty .readout { color: #ff9c94; max-width: 420px; }

.hint {
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 3; max-width: min(560px, calc(100% - 24px));
  background: rgba(10, 16, 32, .9); backdrop-filter: blur(12px); border: 1px solid var(--line-dark); color: var(--white);
  padding: 7px 16px; border-radius: 999px; font-size: .78rem; text-align: center; pointer-events: none;
}
.title-block {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line-dark); border-radius: 12px; overflow: hidden;
  background: rgba(10, 16, 32, .88); backdrop-filter: blur(12px);
}
.tb-cell { padding: 6px 12px 7px; border-right: 1px solid var(--line-dark); min-width: 0; }
.tb-cell:last-child { border-right: 0; }
.tb-cell span { display: block; font: 700 .58rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tb-label); }
.tb-cell b { display: block; font: 500 .74rem/1.4 var(--mono); color: var(--tb-value); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cell b.ok { color: #7ef0a6; }
.tb-cell b.bad { color: #ff9c94; }
.toast { position: absolute; left: 50%; bottom: 74px; }
.busy { z-index: 8; }

/* the net (SVG) */
#svg2d .page { fill: #fff; }
#svg2d .page-shadow { fill: rgba(18, 23, 38, .12); }
#svg2d .margin { fill: none; stroke: #b9c4e2; stroke-dasharray: 2 2; }
#svg2d .pagenum { font: 600 4px "JetBrains Mono", monospace; fill: #7186bb; }
#svg2d.tool-select .piece { cursor: grab; }
#svg2d.tool-rotate .piece { cursor: alias; }
#svg2d.tool-paint .piece { cursor: copy; }
#svg2d.tool-text { cursor: text; }
#svg2d.panning, #svg2d.dragging .piece { cursor: grabbing; }
#svg2d .art { cursor: move; }

/* text box that pops up on the net */
.text-pop { position: fixed; z-index: 30; }
.text-pop input { height: 34px; border: 1.5px solid var(--blue); border-radius: 10px; padding: 0 10px; min-width: 220px; box-shadow: 0 10px 24px -10px rgba(18, 23, 38, .5); background: #fff; }

.mobile-tabs { display: none; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1200px) { :root { --panel-w: 320px; } .title-block { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tb-cell.wide-only { display: none; } }
@media (max-width: 860px) {
  body { overflow: auto; }
  .layout { display: flex; flex-direction: column-reverse; flex: none; min-height: auto; }
  .work { flex: none; height: 72vh; }
  .view3d, .view2d { flex: 1 1 0 !important; }
  .work.show-3d .view2d, .work:not(.show-3d) .view3d, .splitter { display: none; }
  /* one window at a time on a phone; the switch sits at the bottom of the window, above its bar */
  .mobile-tabs { display: inline-flex; flex-wrap: nowrap; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 9; }
  .view-head { top: 58px; left: 8px; right: 8px; }
  .hint { top: 150px; }
  .panel { overflow: visible; border-right: 0; }
  .brand img { height: 32px; }
  .brand-text .eyebrow { display: none; }
  .title-block { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view-head .dark-seg button { padding: 0 8px; }
  .view-label { display: none; }
}
@media (max-width: 520px) {
  .site-header { gap: 10px; }
  .brand-text { padding-left: 10px; }
  .app-name { font-size: 1rem; }
  .app-prefix { display: none; }
  .brand img { height: 28px; }
  .header-actions { flex: none; gap: 6px; }
  .header-actions .btn { --h: 34px; padding: 0 .8em; font-size: .78rem; }
  .header-actions .wide-only { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- printing: only the pages */
#printArea { display: none; }
@media print {
  html, body { display: block; overflow: visible; height: auto; background: #fff; }
  body > :not(#printArea) { display: none !important; }
  #printArea { display: block; }
  #printArea svg { display: block; break-after: page; page-break-after: always; }
  #printArea svg:last-child { break-after: auto; page-break-after: auto; }
}

/* ---------------------------------------------------------------- inside a page (WordPress, ?embed=1) */
/* the page round the frame already carries the DesignClass logo and the app's name bar */
.is-embed .site-header .brand { display: none; }
.is-embed .brand-text { border-left: 0; padding-left: 0; }
/* the name never runs under the buttons when the column is narrow */
.brand-text { overflow: hidden; }
.app-name { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { #saveProjectBtn { display: none; } }
