:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2420;
  --muted: #5d6762;
  --border: #dde2de;
  --accent: #0f5132;
  --accent-soft: #e6f0ea;
  --highlight: #f2c230;
  --zebra: #f5f7f5;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --surface: #1a201d;
    --text: #e4e9e6;
    --muted: #9aa5a0;
    --border: #2d3531;
    --accent: #6fcf97;
    --accent-soft: #1f2d26;
    --zebra: #1e2521;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 4px solid var(--highlight);
  background: #0f5132;
  padding: 0.9rem 1.5rem;
}

.lang-switch {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch a {
  padding: 0.2rem 0.75rem;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.lang-switch a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lang-switch a[aria-current] {
  background: var(--highlight);
  color: #0f5132;
}

.site-header .brand {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.layout.has-nav {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
}

.toc {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  font-size: 0.9rem;
}

.toc-title {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.6rem;
}

.toc li {
  margin: 0.35rem 0;
}

.toc a {
  color: var(--text);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

main {
  min-width: 0;
}

.report h1 {
  margin-top: 0;
  font-size: 2rem;
  line-height: 1.25;
}

.report h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.report h3 {
  margin-top: 1.75rem;
}

.report h4 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.report h5 {
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.anchor {
  margin-left: 0.4rem;
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
}

h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor {
  opacity: 1;
}

.report hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.report img {
  display: block;
  max-width: min(100%, 720px);
  height: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.report figure {
  margin: 1rem 0 1.5rem;
}

.report figure.full-width img {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.report figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.report .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.report .gallery figure {
  margin: 0;
}

.report .gallery img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.report .gallery a:hover img,
.report .gallery a:focus-visible img {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}

.report .gallery figcaption strong {
  color: var(--text);
}

.report .diagram {
  overflow-x: auto;
}

.report .diagram svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.report .diagram text {
  fill: var(--text);
  font-family: var(--font);
  font-size: 13px;
}

.report .diagram .title {
  font-size: 14px;
  font-weight: 700;
}

.report .diagram .sub {
  fill: var(--muted);
  font-size: 12px;
}

.report .diagram .node rect {
  fill: var(--bg);
  stroke: var(--border);
  stroke-width: 1.5;
}

.report .diagram .node.suspect rect {
  stroke: #c92a2a;
  stroke-width: 2.5;
}

.report .diagram .pipe {
  fill: none;
  stroke-width: 4;
}

.report .diagram .hot {
  stroke: #e8590c;
}

.report .diagram .ret {
  stroke: #1c7ed6;
}

.report .diagram .vac {
  stroke: #868e96;
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.report .diagram .heat {
  stroke: #e8590c;
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.report .diagram .badge circle {
  fill: #c92a2a;
}

.report .diagram .badge text {
  fill: #fff;
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3.5rem 4rem 1.5rem;
  background: rgb(0 0 0 / 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  border-radius: var(--radius);
}

.lightbox p {
  margin: 0;
  color: #e4e9e6;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox p a {
  color: var(--highlight);
}

.lightbox button {
  position: absolute;
  border: 0;
  border-radius: 999px;
  width: 2.75rem;
  height: 2.75rem;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox button:hover,
.lightbox button:focus-visible {
  background: rgb(255 255 255 / 0.25);
}

.lightbox .lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox .lightbox-prev,
.lightbox .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox .lightbox-prev {
  left: 0.75rem;
}

.lightbox .lightbox-next {
  right: 0.75rem;
}

@media (max-width: 640px) {
  .lightbox {
    padding: 3.5rem 0.5rem 4.5rem;
  }

  .lightbox .lightbox-prev,
  .lightbox .lightbox-next {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}

.report blockquote {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--highlight);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
}

.report blockquote p {
  margin: 0;
}

.report code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.table-wrap {
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--accent-soft);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: var(--zebra);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td[align="right"],
th[align="right"] {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.site-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .layout.has-nav {
    display: block;
  }

  .toc {
    position: static;
    max-height: none;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.builder {
  --stage-bg: radial-gradient(120% 90% at 50% 30%, #ffffff 0%, #eef0ec 55%, #dfe3de 100%);
  margin: 1rem 0 0.75rem;
}

@media (prefers-color-scheme: dark) {
  .builder {
    --stage-bg: radial-gradient(120% 90% at 50% 30%, #2c3430 0%, #1b211e 60%, #131715 100%);
  }
}

.builder-main {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 1rem;
  align-items: start;
}

.builder-stage {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.builder-viewer {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--stage-bg);
  touch-action: none;
}

.builder-viewer .viewer-canvas,
.builder-viewer .xray-labels {
  position: absolute;
  inset: 0;
}

.builder-viewer .xray-labels {
  pointer-events: none;
}

.viewer-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.viewer-status[hidden] {
  display: none;
}

.viewer-toolbar {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  pointer-events: none;
}

.viewer-toolbar .toolbar-gap {
  flex: 1;
}

.viewer-toolbar button {
  pointer-events: auto;
  min-width: 2.1rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgb(0 0 0 / 0.12);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.82);
  color: #1d2420;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.viewer-toolbar button:hover {
  background: #ffffff;
}

.viewer-toolbar button[aria-pressed="true"] {
  border-color: #0f5132;
  background: #0f5132;
  color: #ffffff;
}

.builder:not(.has-model) .viewer-toolbar,
.builder:not(.has-model) .viewer-hint {
  visibility: hidden;
}

.viewer-hint {
  position: absolute;
  left: 0.8rem;
  bottom: 0.5rem;
  z-index: 2;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  pointer-events: none;
}

.xray-label {
  padding: 0.2rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgb(20 24 22 / 0.86);
  color: #ffffff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
}

.xray-label::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: #ff8a1f;
}

.builder-totals {
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.totals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.totals-grid > div {
  display: grid;
  align-content: start;
}

.totals-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.totals-grid strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.totals-grid small {
  color: var(--muted);
  font-size: 0.8rem;
}

.totals-grid .is-off {
  opacity: 0.45;
}

.totals-grid .totals-sum strong {
  color: var(--accent);
  font-size: 1.3rem;
}

.totals-note {
  margin: 0.5rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.totals-toggle {
  font-size: 0.85rem;
  cursor: pointer;
}

.builder-stats {
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.report .builder-stats .stats-title {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
}

.builder.is-fullscreen .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  display: grid;
  align-content: start;
  gap: 0.1rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.stat strong {
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.stats-notes {
  margin-top: 0.6rem;
  font-size: 0.82rem;
}

.stats-notes summary {
  color: var(--accent);
  cursor: pointer;
}

.stats-notes ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.45;
}

.stats-notes li {
  margin-top: 0.35rem;
}

.opt-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.opt-meta.is-gain {
  color: var(--accent);
}

.builder-panel {
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overscroll-behavior: contain;
}

.builder-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.builder-presets > span {
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent);
}

.chip.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip--link {
  margin-left: auto;
}

.builder-notices {
  display: grid;
  gap: 0.4rem;
}

.builder-notices .notice {
  display: flex;
  align-items: start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  padding: 0.5rem 0.7rem;
  border-left: 4px solid var(--highlight);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
  font-size: 0.85rem;
  line-height: 1.4;
}

.builder-notices .notice span {
  flex: 1;
}

.builder-notices .notice button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.opt-section {
  margin-top: 0.5rem;
}

.opt-section > summary {
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.opt-group {
  margin: 0;
  padding: 0.75rem 0.15rem 0.5rem;
  border: 0;
  border-bottom: 1px dashed var(--border);
  min-width: 0;
}

.opt-group legend {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  padding: 0;
  font-weight: 700;
}

.opt-group legend .opt-more {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 400;
}

.opt-list {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.opt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
  padding: 0.4rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.35;
  cursor: pointer;
}

.opt:hover {
  background: var(--zebra);
}

.opt.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.opt input {
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}

.opt-body {
  display: grid;
  min-width: 0;
}

.opt-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.opt-why {
  color: #b54708;
  font-size: 0.78rem;
}

.opt-why:empty {
  display: none;
}

.opt-price {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.opt.is-selected .opt-price {
  color: var(--text);
  font-weight: 600;
}

.opt-price .opt-parts,
.opt-price .opt-labor {
  display: block;
}

.opt-price .opt-labor {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 400;
}

.opt.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.opt.is-disabled:hover {
  background: none;
}

.opt-list--tiles {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.opt--tile {
  position: relative;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 0.35rem;
  border-color: var(--border);
  text-align: left;
}

.opt--tile input {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
}

.wheel-thumb {
  display: block;
  aspect-ratio: 1;
  border-radius: 6px;
  background-color: #2a2d31;
  background-size: 560%;
  background-position: 55.5% 79%;
}

.wheel-thumb--icon {
  display: grid;
  place-items: center;
  background: var(--zebra);
}

.wheel-thumb--icon svg {
  width: 62%;
}

.opt--tile .opt-price {
  text-align: left;
}

.opt-list--swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.swatch {
  position: relative;
  width: 2.1rem;
  height: 2.1rem;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--swatch, #cccccc);
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
}

.swatch--metallic {
  background: radial-gradient(circle at 32% 28%, rgb(255 255 255 / 0.65), transparent 45%), var(--swatch);
}

.swatch--custom {
  background: conic-gradient(#e03131, #f59f00, #f2e32b, #37b24d, #1c7ed6, #7048e8, #e03131);
}

.swatch--custom::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border-radius: 50%;
  background: var(--swatch, transparent);
  box-shadow: 0 0 0 2px var(--surface);
}

.swatch.is-selected {
  box-shadow: 0 0 0 2px var(--accent);
}

.swatch input {
  position: absolute;
  opacity: 0;
}

.swatch:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.paint-name {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.paint-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

.paint-custom[hidden] {
  display: none;
}

.opt-variants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.4rem 0 0 0.55rem;
  font-size: 0.82rem;
}

.opt-variants[hidden] {
  display: none;
}

.opt-variants > span {
  color: var(--muted);
}

.opt-warnings {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.opt-warnings li {
  position: relative;
  margin-top: 0.25rem;
  padding: 0.35rem 0.6rem 0.35rem 1.6rem;
  border-radius: 6px;
  background: #fff4e5;
  color: #6b3d00;
  font-size: 0.8rem;
  line-height: 1.4;
}

.opt-warnings li::before {
  content: "!";
  position: absolute;
  left: 0.55rem;
  top: 0.35rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #f08c00;
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 0.75rem;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .opt-warnings li {
    background: #3a2a12;
    color: #ffd8a8;
  }
}

.opt-group-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.builder-bom {
  margin-top: 1.5rem;
}

.bom-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.bom-head h3 {
  margin: 0;
}

.bom-actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.bom-intro {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.bom-table th[align="right"] {
  text-align: right;
}

.bom-table td small,
.bom-table th small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.bom-table .bom-group th {
  padding-top: 0.8rem;
  background: var(--accent-soft);
  white-space: normal;
}

.bom-table .bom-group th span {
  color: var(--accent);
}

.bom-table .bom-group th small {
  display: inline;
}

.bom-table .bom-subtotal td {
  font-weight: 600;
}

.bom-table tbody.is-flash .bom-group th {
  background: var(--highlight);
  transition: background 0.3s ease;
}

.bom-table tfoot th {
  border-top: 2px solid var(--border);
  background: var(--surface);
  text-align: right;
}

.bom-table tfoot .bom-total th {
  color: var(--accent);
  font-size: 1.05rem;
}

.bom-table tfoot small {
  display: inline;
}

.builder.is-fullscreen {
  overflow-y: auto;
  margin: 0;
  padding: 1rem;
  background: var(--bg);
}

.builder.is-fullscreen .builder-main {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
}

.builder.is-fullscreen .builder-viewer {
  aspect-ratio: auto;
  height: calc(100vh - 12rem);
}

.builder.is-fullscreen .builder-panel {
  max-height: calc(100vh - 2rem);
}

@media (max-width: 960px) {
  .builder-main,
  .builder.is-fullscreen .builder-main {
    grid-template-columns: 1fr;
  }

  .builder-stage {
    position: static;
  }

  .builder-panel {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .builder-viewer {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .totals-grid {
    grid-template-columns: 1fr 1fr;
  }

  .totals-grid .totals-sum {
    grid-column: 1 / -1;
  }

  .viewer-toolbar button {
    font-size: 0.75rem;
  }
}

@media print {
  .site-header,
  .toc,
  .site-footer,
  .anchor {
    display: none;
  }

  .builder-main {
    display: none;
  }

  body.print-bom .report > :not(.builder) {
    display: none;
  }

  body.print-bom .bom-actions {
    display: none;
  }

  .layout.has-nav {
    display: block;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
  }

  a {
    color: inherit;
  }
}
