/* BrickCore studio: shared screen-only worksheet. Print and guide geometry are independent. */
:root .calculator-workbench {
  --ws-paper: #fff;
  --ws-canvas: #fafbf9;
  --ws-wash: #f3f5f4;
  --ws-line: #dce2df;
  --ws-grid: #e7ebe780;
  --ws-ink: #263831;
  --ws-copy: #63726b;
  --ws-accent: #256452;
  --ws-selected: #eaf1ed;
  --ws-brick: #e0c9b3;
  --ws-brick-line: #8e7763;
  --ws-key: #b2c7bd;
  --ws-dim: #465f55;
  --ws-wall: #edf0eb;
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  background: var(--ws-paper);
  box-shadow: 0 6px 30px #213a2e06;
  color: var(--ws-ink);
  overflow: hidden;
}
:root[data-theme="dark"] .calculator-workbench {
  --ws-paper: #1e2926;
  --ws-canvas: #18221f;
  --ws-wash: #26332e;
  --ws-line: #3a4941;
  --ws-grid: #44554b38;
  --ws-ink: #e4eae6;
  --ws-copy: #a8b8af;
  --ws-accent: #a4cebb;
  --ws-selected: #30473c;
  --ws-brick: #a48a70;
  --ws-brick-line: #d1beaa;
  --ws-key: #7faca0;
  --ws-dim: #b6cbbf;
  --ws-wall: #34413b;
}
body:has(.calculator-workbench) { background: #f0f2f1 !important; }
:root[data-theme="dark"] body:has(.calculator-workbench) { background: #141d19 !important; }
body:has(.calculator-workbench)::before, body:has(.calculator-workbench)::after { display: none !important; }
:root .calculator-page.container { width: min(1580px, calc(100% - 48px)); }
:root .calculator-workbench .calculator-topbar { padding: 10px 16px; margin: 0; border: 0; border-bottom: 1px solid var(--ws-line); border-radius: 0; background: var(--ws-paper); box-shadow: none; }
:root .calculator-workbench :is(.arch-tabs,.stretch-tabs) { gap: 4px; background: none; }
:root .calculator-workbench :is(.arch-tab,.stretch-tab,.calculator-tabs__link) { min-height: 40px; padding: 10px 14px; border: 1px solid transparent; border-radius: 5px; background: transparent; box-shadow: none; color: var(--ws-copy); font-size: 12px; font-weight: 550; }
:root .calculator-workbench :is(.arch-tab,.stretch-tab,.calculator-tabs__link).is-active { color: var(--ws-ink); background: var(--ws-wash); border-color: var(--ws-line); }
:root .calculator-workbench .calculator-grid { display: grid; grid-template-columns: 308px minmax(0,1fr); grid-template-rows: auto auto; gap: 0; align-items: start; min-height: 0; }
:root .calculator-workbench .calculator-grid > :is(.input-panel,.drawing-panel,.results-panel) { min-width: 0; min-height: 0; border: 0; border-radius: 0; background: var(--ws-paper); box-shadow: none; }
:root .calculator-workbench .calculator-grid > .input-panel { display: block; grid-column: 1; grid-row: 1 / span 2; padding: 24px 22px; border-right: 1px solid var(--ws-line); align-self: stretch; }
:root .calculator-workbench .calculator-grid > .drawing-panel { grid-column: 2; grid-row: 1; padding: 0; overflow: hidden; align-self: start; }
:root .calculator-workbench .calculator-grid > .results-panel { display: flex; grid-column: 2; grid-row: 2; padding: 22px 26px; border-top: 1px solid var(--ws-line); position: static; }
:root .calculator-workbench .panel-heading { gap: 12px; }
:root .calculator-workbench .panel-heading__title { min-width: 0; gap: 0; }
:root .calculator-workbench .panel-index { display: none; }
:root .calculator-workbench .panel-heading h2 { color: var(--ws-ink); font-size: 14px; font-weight: 650; letter-spacing: -.01em; line-height: 1.4; }
:root .calculator-workbench .drawing-panel__heading { padding: 12px 20px; min-height: 66px; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--ws-line); background: var(--ws-paper); }
:root .calculator-workbench .drawing-panel__actions { display: flex; flex-wrap: wrap; max-width: 100%; gap: 8px; }
:root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; border: 0; padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
:root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) > :is(button,a,span) { min-height: 40px; padding: 8px 11px; border: 1px solid transparent; border-radius: 5px; box-shadow: none; background: transparent; color: var(--ws-copy); font-size: 12px; font-weight: 550; line-height: 1.3; white-space: nowrap; }
:root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) > .is-active { background: var(--ws-selected); color: var(--ws-accent); border-color: var(--ws-line); }
:root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) > :is(button,a):hover { background: var(--ws-wash); transform: none; box-shadow: none; }
:root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) > .hanenkam-guide-button, :root .calculator-workbench .hanenkam-guide-button { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; gap: 0; border: 1px solid var(--ws-line); border-radius: 5px; color: var(--ws-copy); background: transparent; box-shadow: none; font-size: 0; }
:root .calculator-workbench .hanenkam-guide-button .material-symbols-outlined { font-size: 20px; }
:root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) > .calculator-print-button, :root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) > .calculator-print-button:hover { width: auto; min-width: 70px; margin-left: 6px; color: #fff; background: #293d34; border-color: #293d34; box-shadow: none; }
:root[data-theme="dark"] .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) > .calculator-print-button { background: #b2cebf; color: #15251c; border-color: #b2cebf; }
:root .calculator-workbench .is-disabled { opacity: .42; }
:root .calculator-workbench :is(button,a,summary):focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 3px; }
/* Controls use built-in SVG icons so they never depend on a missing font glyph. */
:root .calculator-workbench .setting-out-viewport__controls button[data-action=full] { display: grid; place-items: center; }
:root .calculator-workbench .natural-stone-control__icon { width: 30px; height: 30px; border-radius: 4px; color: var(--ws-accent); background: var(--ws-selected); box-shadow: none; }
:root .calculator-workbench .natural-stone-control__state { border-radius: 4px; background: var(--ws-paper); border-color: var(--ws-line); }
:root .calculator-workbench .natural-stone-control__switch { color: var(--ws-ink); }
:root .calculator-workbench .natural-stone-control__switch small { color: var(--ws-copy); }
:root .calculator-workbench .brick-picker__selected { padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
:root .calculator-workbench .brick-picker__selected>label { flex: 1 1 100%; min-width: 0; }
:root .calculator-workbench .brick-picker__selected select { width: 100%; min-height: 44px; font-size: 14px; }
:root .calculator-workbench .brick-picker__selected>a { margin-left: auto; font-size: 11px; }
/* Measured input rail: one label, one value, one unit. */
:root .calculator-workbench :is(.measurement-grid,.jack-arch-essential-grid) { gap: 17px 12px; }
:root .calculator-workbench .field__label { color: var(--ws-copy); font-size: 12px; font-weight: 550; line-height: 1.5; margin-bottom: 7px; }
:root .calculator-workbench .field__control { min-height: 46px; border: 1px solid var(--ws-line); border-radius: 5px; background: var(--ws-paper); box-shadow: none; }
:root .calculator-workbench .field__control :is(input,select,output) { min-width: 0; min-height: 44px; color: var(--ws-ink); background: transparent; font-size: 16px; font-weight: 450; letter-spacing: 0; }
:root .calculator-workbench .field__unit { padding-inline: 10px; border: 0; background: transparent; color: var(--ws-copy); font-size: 10px; font-weight: 500; text-transform: lowercase; }
:root .calculator-workbench .field__control:focus-within { border-color: var(--ws-accent); box-shadow: 0 0 0 2px color-mix(in srgb,var(--ws-accent) 12%,transparent); }
:root .calculator-workbench .field__control input[readonly] { background: var(--ws-wash); color: var(--ws-copy); }
:root .calculator-workbench :is(.execution-choice,.stretch-execution-options,.stretch-shape-options,.circle-window-choice) { gap: 4px; padding: 3px; border: 1px solid var(--ws-line); border-radius: 6px; background: var(--ws-wash); }
:root .calculator-workbench :is(.execution-choice,.stretch-execution-options,.stretch-shape-options,.circle-window-choice) button { min-height: 40px; padding: 7px 6px; border: 1px solid transparent; border-radius: 3px; color: var(--ws-copy); background: transparent; box-shadow: none; font-size: 11px; line-height: 1.4; font-weight: 550; }
:root .calculator-workbench :is(.execution-choice,.stretch-execution-options,.stretch-shape-options,.circle-window-choice) button.is-active { background: var(--ws-paper); border-color: var(--ws-line); color: var(--ws-ink); box-shadow: 0 1px 3px #213a2e05; }
:root .calculator-workbench :is(.stretch-shape-choice,.stretch-execution-choice)>span { color: var(--ws-copy); font-size: 12px; font-weight: 550; }
:root .calculator-workbench :is(.brick-picker__selected,.natural-stone-control) { background: var(--ws-wash); border-color: var(--ws-line); border-radius: 5px; box-shadow: none; }
:root .calculator-workbench .brick-picker__selected select { background: var(--ws-paper); border-color: var(--ws-line); border-radius: 4px; font-size: 13px; }
:root .calculator-workbench .brick-picker__selected a { color: var(--ws-accent); }
:root .calculator-workbench :is(.field-hint,.stretch-execution-note,.arch-depth-choice-note) { color: var(--ws-copy); font-size: 11px; line-height: 1.65; background: transparent; border: 0; padding: 0; }
:root .calculator-workbench :is(.jack-arch-primary-input,.jack-arch-advanced-input) { padding: 0; border: 0; border-radius: 0; background: transparent; }
:root .calculator-workbench .jack-arch-advanced-input { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--ws-line); }
:root .calculator-workbench .jack-arch-input > .panel-heading { display: flex; }
:root .calculator-workbench .workspace-gauge-note { margin: 8px 0; padding: 10px 0 10px 12px; border: 0; border-left: 2px solid var(--ws-line); border-radius: 0; color: var(--ws-copy); background: none; font-size: 11px; line-height: 1.7; }
:root .calculator-workbench .stretch-profile-settings { border-color: var(--ws-line); border-radius: 5px; background: var(--ws-paper); box-shadow: none; }
:root .calculator-workbench .stretch-profile-settings :is(summary,.stretch-profile-settings__title) { color: var(--ws-copy); font-weight: 550; font-size: 11px; }
:root .calculator-workbench .stretch-input-advice { padding: 8px 0 8px 10px; border: 0; border-left: 2px solid var(--ws-line); border-radius: 0; background: transparent; color: var(--ws-copy); font-size: 11px; line-height: 1.6; font-weight: 450; }
/* A single drawing sheet with precise, unshaded physical stone outlines. */
:root .calculator-workbench :is(.arch-canvas:not(.is-three-d):not(.is-depth-hidden),.circle-window-canvas,.ezelsrug-canvas) {
  flex: none; height: clamp(450px,40vw,600px); min-height: 0; padding: 28px;
  border: 0; border-radius: 0; background-color: var(--ws-canvas);
  background-image: linear-gradient(var(--ws-grid) 1px,transparent 1px),linear-gradient(90deg,var(--ws-grid) 1px,transparent 1px);
  background-size: 32px 32px;
}
:root .calculator-workbench .arch-canvas.is-three-d { height: auto; min-height: 0; padding: 0; background: var(--ws-canvas); }
:root .calculator-workbench :is(.arch-canvas,.circle-window-canvas) .drawing-zoom-surface { width: 100%; height: 100%; min-height: 0; }
:root .calculator-workbench :is(.arch-canvas,.circle-window-canvas) .drawing-zoom-surface > svg { max-height: 100%; min-height: 0; filter: none; overflow: visible; }
:root .calculator-workbench :is(.calculator-stone,.circle-window-stone) { fill: var(--ws-brick); stroke: var(--ws-brick-line); stroke-width: .8; vector-effect: non-scaling-stroke; filter: none; }
:root .calculator-workbench .calculator-mortar-bed,
:root .calculator-workbench .calculator-joint { fill: #b6bec8; stroke: none; }
:root .calculator-workbench:not([data-calculation-state="ready"]) .calculator-mortar-bed { display:none; }
:root .calculator-workbench .circle-window-dimension line { stroke: var(--ws-dim); stroke-width: .65; }
:root .calculator-workbench :is(#calculator-arrow,#circle-window-arrow,#stretch-arrow) path { fill: var(--ws-dim); }
:root .calculator-workbench .calculator-stone.is-keystone { fill: var(--ws-key); stroke: var(--ws-dim); }
:root .calculator-workbench .calculator-stone.is-natural-stone { fill: var(--masonry-natural, #969d9f); stroke: #778492; }
:root .calculator-workbench .calculator-stone:hover { filter: none; }
:root .calculator-workbench .calculator-arch-shadow { display: none; }
:root .calculator-workbench :is(.calculator-arch-outline,.circle-window-outline) { fill: none; stroke: var(--ws-brick-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
:root .calculator-workbench :is(.calculator-spring,.calculator-wall,.circle-window-centrelines) { stroke: var(--ws-dim); opacity: .42; stroke-width: .7; }
:root .calculator-workbench :is(.calculator-dimension,.circle-window-dimension,.top-gable-dimension) { stroke: var(--ws-dim); stroke-width: .65; }
:root .calculator-workbench :is(.calculator-dimension,.circle-window-dimension,.top-gable-dimension) :is(path,line) { vector-effect: non-scaling-stroke; }
:root .calculator-workbench .calculator-dimension rect { fill: var(--ws-canvas); stroke: none; rx: 0; }
:root .calculator-workbench :is(.calculator-dimension text,.top-gable-dimension text,.circle-window-dimension text) { fill: var(--ws-dim); stroke: var(--ws-canvas); stroke-width: 3px; paint-order: stroke; stroke-linejoin: round; font-family: var(--font-sans); font-weight: 550; letter-spacing: 0; }
:root .calculator-workbench .calculator-dimension__guides { stroke: var(--ws-dim); stroke-dasharray: none; opacity: .38; stroke-width: .6; }
:root .calculator-workbench :is(.drawing-label,.calculator-string-lines,.setting-out-center-vector,.calculator-construction-circles) { stroke: var(--ws-dim); }
:root .calculator-workbench .drawing-label text { fill: var(--ws-dim); font-size: 7px; font-weight: 500; text-transform: none; letter-spacing: 0; }
:root .calculator-workbench :is(.setting-out-labels circle,.circle-window-numbers circle) { fill: var(--ws-paper); stroke: var(--ws-line); stroke-width: .6; }
:root .calculator-workbench :is(.setting-out-labels text,.circle-window-numbers text,.calculator-construction-centre-label) { fill: var(--ws-dim); font-weight: 550; }
:root .calculator-workbench :is(.calculator-wall-brick,.calculator-wall-cut) { fill: var(--ws-wall); stroke: var(--ws-line); }
:root .calculator-workbench .drawing-empty__band { fill: var(--ws-wall); stroke: none; }
:root .calculator-workbench :is(.drawing-empty__outline,.drawing-empty__joints path) { stroke: var(--ws-line); }
/* The gable shares the material palette; sloped bricks remain easy to identify. */
:root .calculator-workbench :is(.weaving-mortar-field,.weaving-tooth-reserve) { fill: var(--ws-canvas); }
:root .calculator-workbench .weaving-brick polygon { fill: var(--ws-wall); stroke: var(--ws-brick-line); stroke-width: .45; vector-effect: non-scaling-stroke; }
:root .calculator-workbench .weaving-brick.is-weaving polygon { fill: var(--ws-brick); stroke-width: .65; }
:root .calculator-workbench .weaving-brick.is-ridge-closure polygon { fill: var(--ws-key); stroke: var(--ws-dim); }
:root .calculator-workbench .weaving-chimney-bricks .weaving-brick polygon { fill: var(--ws-wall); }
:root .calculator-workbench .weaving-profile-line { stroke: var(--ws-dim); stroke-width: 1; }
:root .calculator-workbench :is(.weaving-wire-label,.weaving-station text) { fill: var(--ws-dim); stroke: var(--ws-canvas); font-weight: 550; }
:root .calculator-workbench .weaving-dimensions { color: var(--ws-dim); }
:root .calculator-workbench .weaving-dimensions text { fill: var(--ws-dim); stroke: var(--ws-canvas); font-family: var(--font-sans); font-weight: 550; font-size: var(--workspace-svg-label,54px); }
:root .calculator-workbench .drawing-zoom-surface .calculator-dimension text { font-size: var(--workspace-svg-label,9px); }
:root .calculator-workbench .weaving-dimensions path { stroke-width: .65; }
:root .calculator-workbench .weaving-dimensions .weaving-dimension-extension { stroke-dasharray: none; }
/* Hanenkam: reuse the actual SVG and fit the chosen extent, never a duplicate. */
:root .calculator-workbench .calculator-grid .stretches-drawing:has(brickcore-drawing-view) .arch-canvas:not(.is-three-d) { padding: 0; }
:root .calculator-workbench brickcore-drawing-view { display: block; position: relative; height: 100%; min-height: 0; background: transparent; border: 0; border-radius: 0; }
:root .calculator-workbench brickcore-drawing-view .setting-out-viewport { inset: 58px 18px 60px; touch-action: pan-y; }
:root .calculator-workbench brickcore-drawing-view[data-interactive=true] .setting-out-viewport { touch-action: none; }
brickcore-drawing-view[data-frame=stones] :is(.stretch-reveal-references,.stretch-setting-lines,.porring-point,.stretch-centre,.stretch-profile-boards,.calculator-wall) { visibility: hidden; }
:root .calculator-workbench .stretch-stone-number { fill: #3b322a; stroke: none; font-weight: 500; }
:root .calculator-workbench brickcore-drawing-view .stretch-dimension text { font-size: var(--worksheet-label-size,24px); stroke-width: 6px; }
:root .calculator-workbench brickcore-drawing-view .setting-out-viewport > svg { overflow: visible; }
:root .calculator-workbench .stretch-dimension--height text { text-anchor: start; dominant-baseline: middle; }
:root .calculator-workbench .stretch-dimension--span text { text-anchor: middle; dominant-baseline: middle; }
:root .calculator-workbench brickcore-drawing-view .porring-point text { font-size: var(--worksheet-label-size,24px); fill: var(--ws-dim); stroke: var(--ws-canvas); stroke-width: 5px; paint-order: stroke; }
:root .calculator-workbench .stretch-setting-ray path { stroke: var(--ws-dim); opacity: .36; stroke-width: .65; vector-effect: non-scaling-stroke; }
:root .calculator-workbench .stretch-setting-ray.is-selected path { stroke: var(--ws-accent); opacity: .9; stroke-width: 1.2; }
:root .calculator-workbench .stretch-reveal-references path { stroke: var(--ws-brick-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
:root .calculator-workbench .stretch-profile-toolbar { padding: 6px 20px; gap: 12px; border: 0; border-bottom: 1px solid var(--ws-line); background: var(--ws-paper); }
:root .calculator-workbench .stretch-profile-toolbar button { min-height: 36px; padding: 6px 10px; border-radius: 4px; border-color: var(--ws-line); color: var(--ws-copy); background: var(--ws-paper); font-size: 11px; }
:root .calculator-workbench .stretch-profile-toolbar > span { display: none; }
:root .calculator-workbench .stretch-profile-toolbar:has([aria-pressed=true]) > span { display: inline; font-size: 11px; }
:root .calculator-workbench :is(.workspace-section-detail,.stretch-profile-readout) { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--ws-line); border-radius: 0; background: var(--ws-paper); }
:root .calculator-workbench :is(.workspace-section-detail,.stretch-profile-readout)>summary { padding: 14px 22px; min-height: 44px; color: var(--ws-copy); font-size: 12px; font-weight: 550; cursor: pointer; }
:root .calculator-workbench .workspace-section-detail>summary { display: flex; align-items: center; gap: 8px; list-style: none; }
.workspace-section-detail>summary::-webkit-details-marker { display: none; }
.workspace-section-detail__chevron { margin-left: auto; transition: transform .16s; }
.workspace-section-detail[open] .workspace-section-detail__chevron { transform: rotate(180deg); }
:root .calculator-workbench .arch-depth-section { margin: 0; padding: 20px; border: 0; border-top: 1px solid var(--ws-line); border-radius: 0; background: var(--ws-paper); box-shadow: none; }
:root .calculator-workbench .arch-depth-section__phases { gap: 12px; }
:root .calculator-workbench .arch-depth-section__phases>section { border: 1px solid var(--ws-line); border-radius: 4px; background: var(--ws-canvas); }
:root .calculator-workbench .arch-depth-section svg { height: 210px; max-height: 210px; min-height: 0; }
/* Consistent compact camera controls. */
:root .calculator-workbench :is(.drawing-zoom-controls,.setting-out-viewport__controls) { position: absolute; top: auto; right: 16px; bottom: 14px; padding: 0; gap: 0; border: 1px solid var(--ws-line); border-radius: 5px; background: var(--ws-paper); box-shadow: 0 2px 6px #213a2e08; }
:root .calculator-workbench :is(.drawing-zoom-controls,.setting-out-viewport__controls) button { min-width: 40px; min-height: 38px; border: 0; border-radius: 0; color: var(--ws-copy); background: transparent; font-size: 13px; }
:root .calculator-workbench :is(.drawing-zoom-controls,.setting-out-viewport__controls) button:hover { background: var(--ws-wash); }
:root .calculator-workbench .setting-out-viewport__controls button[data-action=fit] { min-width: 58px; font-size: 11px; font-variant-numeric: tabular-nums; }
:root .calculator-workbench .worksheet-frame-toggle { position: absolute; left: 20px; top: 14px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--ws-line); border-radius: 4px; color: var(--ws-copy); background: var(--ws-paper); font: 500 11px var(--font-sans); cursor: pointer; }
:root .calculator-workbench .worksheet-frame-toggle[aria-pressed=true] { background: var(--ws-selected); border-color: var(--ws-accent); color: var(--ws-accent); }
:root .calculator-workbench brickcore-drawing-view:fullscreen { background: var(--ws-canvas); padding: 24px; }
/* 3D uses the same neutral stage and opaque materials, retaining blue/orange depth roles. */
:root .calculator-workbench .arch-depth-preview { margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--ws-paper); box-shadow: none; }
:root .calculator-workbench .arch-depth-preview>header { padding: 14px 20px; background: var(--ws-paper); border-bottom: 1px solid var(--ws-line); }
:root .calculator-workbench .arch-depth-preview__stage { background: var(--ws-canvas); }
:root .calculator-workbench .arch-depth-preview__background { fill: var(--ws-canvas); }
:root .calculator-workbench .arch-depth-preview__views { border: 1px solid var(--ws-line); border-radius: 5px; background: var(--ws-wash); }
:root .calculator-workbench .arch-depth-preview__views button { color: var(--ws-copy); border-radius: 3px; background: transparent; }
:root .calculator-workbench .arch-depth-preview__views button.is-active { background: var(--ws-paper); color: var(--ws-ink); box-shadow: none; }
:root .calculator-workbench .arch-depth-preview figcaption { background: var(--ws-paper); border-color: var(--ws-line); }
/* Results are a quiet measurement schedule, not a stack of cards. */
:root .calculator-workbench .result-list { grid-column: auto; grid-row: auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 24px; margin-top: 10px; border: 0; }
:root .calculator-workbench .result-row { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 6px; padding: 14px 0; min-height: 72px; border-bottom: 1px solid var(--ws-line); }
:root .calculator-workbench .result-row>span { max-width: none; color: var(--ws-copy); font-size: 11px; line-height: 1.5; }
:root .calculator-workbench .result-row output { max-width: 100%; color: var(--ws-ink); text-align: left; font: 550 15px/1.5 var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: 0; }
:root .calculator-workbench .result-row, :root .calculator-workbench .result-row output { min-width: 0; width: 100%; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
:root .calculator-workbench .result-row output * { white-space: normal; }
:root .calculator-workbench .results-panel__check { width: 22px; height: 22px; color: var(--ws-accent); background: transparent; border: 0; box-shadow: none; }
:root .calculator-workbench :is(.results-summary,.results-fit-note,.keystone-summary p,.result-list__warning) { color: var(--ws-copy); font-size: 12px; line-height: 1.65; }
:root .calculator-workbench :is(.results-summary,.calculator-structural-disclaimer,.keystone-summary) { margin-top: 18px; padding: 14px; border-radius: 4px; border: 1px solid var(--ws-line); background: var(--ws-wash); box-shadow: none; }
:root .calculator-workbench .calculator-structural-disclaimer { font-size: 11px; line-height: 1.6; }
:root .calculator-workbench :is(.setting-out-menu,.weaving-build-aid) { border-color: var(--ws-line); background: var(--ws-paper); border-radius: 0; }
:root .calculator-workbench .setting-out-menu__steps span { border-color: var(--ws-line); background: var(--ws-wash); border-radius: 4px; color: var(--ws-ink); box-shadow: none; }
:root .calculator-workbench .setting-out-menu__steps b { border: 1px solid var(--ws-line); color: var(--ws-dim); background: var(--ws-paper); }
:root .calculator-workbench .weaving-build-gauges { grid-template-columns: repeat(2,minmax(0,1fr)); }
:root .calculator-workbench .weaving-build-gauges b { font-size: 16px; }
.workspace-gauge-note { padding: 14px 16px; margin: 18px 0; border: 1px solid #bacfdb; border-left: 3px solid #226688; border-radius: 5px; background: #eef5f8; color: #345467; font-size: 13px; line-height: 1.75; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .workspace-gauge-note { background: #20333f; border-color: #486271; color: #d3e5ee; }
/* The three guides share fixed drawings and a readable arithmetic block. */
.setting-film canvas, .setting-film canvas:active { touch-action: pan-y; cursor: auto; }
.setting-film__calculation-label { color: #244e65; font-size: .85rem; font-weight: 650; margin: 25px 0 8px; }
.setting-film__calculation-label span { display: block; margin-top: 5px; font-size: .72rem; color: #627987; font-weight: 400; }
.unified-guide .setting-film__calculation { margin-top: 0; padding: 16px; border-radius: 0 6px 6px 0; line-height: 1.9; }
.setting-film__facts:has(span:nth-child(6)) { grid-template-columns: repeat(3,minmax(0,1fr)); }
.public-setting-guide .public-setting-guide__input { border-color: #d5dfe5; border-radius: 10px; background: #f3f6f8; }
.public-setting-guide .public-setting-guide__fields :is(input,select) { font-size: 16px; }
@media(max-width:1150px) {
  :root .calculator-workbench .calculator-grid { grid-template-columns: 284px minmax(0,1fr); }
  :root .calculator-workbench .drawing-panel__heading { padding-inline: 16px; }
  :root .calculator-workbench .drawing-panel__actions { margin-left: auto; }
  :root .calculator-workbench .result-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
}
@media(max-width:900px) {
  :root .calculator-page.container { width: calc(100% - 24px); }
  :root .calculator-workbench .calculator-grid { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; }
  :root .calculator-workbench .calculator-grid > :is(.input-panel,.drawing-panel,.results-panel) { grid-column: 1; grid-row: auto; width: 100%; box-sizing: border-box; }
  :root .calculator-workbench .calculator-grid > .input-panel { display: block; border-right: 0; border-bottom: 1px solid var(--ws-line); }
  :root .calculator-workbench :is(.arch-canvas:not(.is-three-d):not(.is-depth-hidden),.circle-window-canvas) { height: 440px; }
  .setting-film__facts:has(span:nth-child(6)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  :root .calculator-workbench { border-radius: 8px; }
  :root .calculator-workbench .calculator-topbar { padding: 8px; }
  :root .calculator-workbench :is(.arch-tab,.stretch-tab,.calculator-tabs__link) { min-height: 44px; padding-inline: 12px; }
  :root .calculator-workbench .calculator-grid > :is(.input-panel,.results-panel) { padding: 20px 18px; }
  :root .calculator-workbench .drawing-panel__heading { padding: 14px 16px; gap: 10px; }
  :root .calculator-workbench .drawing-panel__actions { width: 100%; margin: 0; }
  :root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs) { width: 100%; gap: 3px; }
  :root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs)>:is(button,a,span) { flex: 0 1 auto; justify-content: center; min-height: 44px; padding: 8px; font-size: 12px; }
  :root .calculator-workbench :is(.workbench-output-tabs,.work-view-tabs)>.hanenkam-guide-button { font-size: 0; width: 44px; }
  :root .calculator-workbench .calculator-print-button { margin-left: auto; min-width: 70px; }
  :root .calculator-workbench :is(.arch-canvas:not(.is-three-d):not(.is-depth-hidden),.circle-window-canvas) { height: 350px; padding: 10px 44px 32px 18px; }
  :root .calculator-workbench .drawing-label { display: none; }
  :root .calculator-workbench .stretches-drawing:has(brickcore-drawing-view) .arch-canvas { height: 350px; padding: 0; }
  :root .calculator-workbench brickcore-drawing-view .setting-out-viewport { inset: 56px 6px 60px; }
  :root .calculator-workbench .worksheet-frame-toggle { left: 12px; min-height: 40px; top: 10px; }
  :root .calculator-workbench :is(.drawing-zoom-controls,.setting-out-viewport__controls) { right: 12px; bottom: 10px; }
  :root .calculator-workbench :is(.drawing-zoom-controls,.setting-out-viewport__controls) button { min-width: 44px; min-height: 44px; }
  :root .calculator-workbench .stretch-profile-toolbar { padding-inline: 12px; }
  :root .calculator-workbench .stretch-profile-toolbar button { min-height: 44px; }
  :root .calculator-workbench .arch-depth-section svg { height: 170px; max-height: 170px; }
  :root .calculator-workbench .weaving-build-gauges { grid-template-columns: 1fr; }
}

@media(max-width:360px) {
  :root .calculator-workbench .drawing-panel:not(.stretches-drawing) .arch-canvas:not(.is-depth-hidden) { padding-right: 50px; }
}

/* A choice of natural-stone details, followed by optional fabrication sizes. */
.natural-stone-control__hint {margin:0;color:var(--ws-copy,#516577);font-size:.65rem;line-height:1.5;}
.natural-stone-presets {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
.natural-stone-preset {display:grid;gap:2px;justify-items:center;min-width:0;padding:5px 3px 8px;border:1px solid #bcc8d4;border-radius:6px;background:rgba(255,255,255,.65);color:#314b63;cursor:pointer;}
.natural-stone-preset svg {width:100%;max-width:90px;height:55px;}
.natural-stone-preset span {font-size:.6rem;line-height:1.3;}
.natural-stone-preset[aria-pressed=true] {border-color:#367ab5;background:#edf5fc;box-shadow:inset 0 0 0 1px #367ab5;}
.natural-stone-preset__brick,.natural-stone-preset__detail {fill:#73879b;stroke:#edf3f8;stroke-width:1.2;}
.natural-stone-preset__joint {stroke:#edf3f8;stroke-width:1.5;fill:none;}
.natural-stone-preset__detail.is-selected {fill:var(--masonry-natural, #969d9f);stroke:#5c7083;stroke-width:1;}
.natural-stone-custom summary {cursor:pointer;color:var(--ws-copy,#516577);font-size:.63rem;padding:10px 0;}
.natural-stone-custom[open] summary {padding-bottom:10px;}
:root[data-theme=dark] .natural-stone-preset {background:#263646;border-color:#66798d;color:#e4edf6;}
:root[data-theme=dark] .natural-stone-preset[aria-pressed=true] {background:#29425b;border-color:#79b9ed;box-shadow:inset 0 0 0 1px #79b9ed;}
@media screen {
  :root :is(.calculator-workbench,.stretches-workbench) .calculator-stone.is-natural-stone,
  :root .arch-depth-preview__face.is-natural-stone,
  :root .jack-arch-depth-preview .jack-arch-three-d__face.is-natural-stone {fill:var(--masonry-natural, #969d9f);stroke:#778492;}
}

/* The finished masonry uses the film's brown clay and charcoal mortar in every
   screen preview. Technical PDF sheets keep their own print colour rules. */
@media screen {
  :root {
    --masonry-brick:#673d2c;
    --masonry-edge:#402c23;
    --masonry-mortar:#323536;
  }
  :root .calculator-workbench :is(#brick,#brick-depth) > stop:first-child {stop-color:#744633;}
  :root .calculator-workbench :is(#brick,#brick-depth) > stop[offset=".5"] {stop-color:#673d2c;}
  :root .calculator-workbench :is(#brick,#brick-depth) > stop:last-child {stop-color:#5b3527;}
  :root .calculator-workbench,
  :root[data-theme=dark] .calculator-workbench {
    --ws-brick:var(--masonry-brick);
    --ws-brick-line:var(--masonry-edge);
    --ws-key:var(--masonry-brick);
    --ws-wall:var(--masonry-brick);
  }
  :root .calculator-workbench :is(.calculator-stone,.circle-window-stone),
  :root .calculator-workbench .weaving-brick polygon {
    fill:url(#masonry-clay);
    stroke:var(--masonry-edge);
    stroke-width:.45;
    fill-opacity:1;
  }
  :root .calculator-workbench :is(.calculator-stone.is-keystone,.weaving-brick.is-weaving polygon,.weaving-brick.is-ridge-closure polygon,.weaving-chimney-bricks .weaving-brick polygon) {
    fill:url(#masonry-clay);
    stroke:var(--masonry-edge);
    stroke-width:.45;
  }
  :root .calculator-workbench :is(.calculator-mortar-bed,.calculator-joint,.weaving-mortar-field,.weaving-tooth-reserve,.weaving-ridge-joint) {fill:var(--masonry-mortar);stroke:none;}
  :root .calculator-workbench .circle-window-mortar {fill:none;stroke:var(--masonry-mortar);}
  :root .calculator-workbench :is(.calculator-wall-brick,.calculator-wall-cut) {fill:var(--masonry-brick);stroke:var(--masonry-mortar);}
  :root .calculator-workbench .stretch-stone-number {fill:#fff5e9;stroke:#513726;stroke-width:.8;paint-order:stroke;}
  :root .calculator-workbench :is(.arch-depth-preview__face,.jack-arch-three-d__face) {fill:url(#masonry-clay-depth);stroke:var(--masonry-edge);}
  :root .calculator-workbench :is(.arch-depth-preview__face,.jack-arch-three-d__face).is-side {fill:#503024;}
  :root .calculator-workbench :is(.arch-depth-preview__face,.jack-arch-three-d__face).is-rear {fill:#5e3828;}
  :root .calculator-workbench .jack-arch-three-d__face.is-top-face {fill:#744633;}
  :root .calculator-workbench :is(.calculator-stone,.arch-depth-preview__face,.jack-arch-three-d__face).is-natural-stone {fill:var(--masonry-natural, #969d9f);stroke:#778492;}
  :root .calculator-workbench .jack-arch-three-d__face.is-selected {fill:#347ca4;stroke:#143e56;}
  .natural-stone-preset__brick,.natural-stone-preset__detail {fill:var(--masonry-brick);stroke:var(--masonry-mortar);}
  .natural-stone-preset__joint {stroke:var(--masonry-mortar);}
  .natural-stone-preset__detail.is-selected {fill:var(--masonry-natural, #969d9f);stroke:#778492;}
  :root .calculator-workbench :is(.ezelsrug-brick,.ezelsrug-wall,.top-gable-brick-layer polygon,.standing-bond-piece rect,.roll-layer-three-d-stone-front rect) {fill:var(--masonry-brick);stroke:var(--masonry-mortar);}
  :root .calculator-workbench .roll-layer-three-d-stone-top {fill:#744633;stroke:var(--masonry-edge);}
  :root .calculator-workbench .roll-layer-three-d-stone-side {fill:#503024;stroke:var(--masonry-edge);}
  :root .calculator-workbench :is(.ezelsrug-core,.roll-layer-three-d-mortar-front,.roll-layer-three-d-mortar-top,.roll-layer-three-d-mortar-side) {fill:var(--masonry-mortar);}
}
@media print {
  .circle-window-mortar {fill:none;stroke:#fff;}
}

@media screen {
  :root .calculator-workbench .masonry-mortar-3d {fill:var(--masonry-mortar);stroke:var(--masonry-mortar);stroke-width:.25;stroke-linejoin:round;pointer-events:none;}
  :root .calculator-workbench .arch-depth-preview__legend {display:none;}
}
