.fmt {
  --fmt-ink: #21231d;
  --fmt-paper: #f6f4ed;
  --fmt-line: #cbcbbf;
  --fmt-muted: #52564b;
  --fmt-lime: #e4fa67;
  --fmt-mono: "IBM Plex Mono", "Courier New", monospace;
  color: var(--fmt-ink);
  padding-block: clamp(32px, 4.2vw, 65px);
}
.fmt *, .fmt *::before, .fmt *::after { box-sizing: border-box; }
.fmt [hidden] { display: none !important; }
.fmt button, .fmt input { font: inherit; }
.fmt button { color: inherit; cursor: pointer; }
.fmt button:focus-visible, .fmt a:focus-visible, .fmt input:focus-visible, .fmt .fmt-scroll:focus-visible {
  outline: 3px solid #437346;
  outline-offset: 3px;
}
.fmt .fmt-title, .fmt .fmt-caption h2, .fmt .fmt-spec h2 {
  font-size: clamp(25px, 2.7vw, 40px);
  font-weight: 650;
  letter-spacing: -.05em;
  line-height: 1.06;
  margin: 0;
}
.fmt .fmt-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.fmt .fmt-caption > span, .fmt .fmt-drawing figcaption, .fmt .fmt-plan-key {
  font: 500 11px/1.4 var(--fmt-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.fmt .fmt-guide, .fmt .fmt-small { color: var(--fmt-muted); font-size: 14px; }
.fmt .fmt-guide { margin: 18px 0 12px; }
.fmt .fmt-small { font-size: 13px; margin: 10px 0 0; line-height: 1.5; }
.fmt .fmt-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(22px, 3vw, 42px);
  padding: 22px clamp(16px, 3vw, 32px);
  background: var(--fmt-ink);
  color: var(--fmt-paper);
}
.fmt .fmt-bar p { margin: 0; color: inherit; font-size: 16px; line-height: 1.5; }
.fmt .fmt-bar b { display: block; font-size: 19px; font-weight: 600; margin: 0 0 3px; }
.fmt .fmt-bar b + p { font-size: 14px; color: #d7dacd; }
.fmt .fmt-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.fmt .fmt-action {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 22px;
  min-height: 44px; padding: 10px 15px;
  background: var(--fmt-lime); border: 1px solid var(--fmt-lime);
  color: var(--fmt-ink); font-size: 14px; font-weight: 650; line-height: 1.4; text-decoration: none;
}
.fmt .fmt-action--secondary { border-color: #999c8f; color: var(--fmt-paper); background: transparent; }
.fmt .fmt-action:hover { background: #efffa3; color: var(--fmt-ink); }
.fmt .fmt-action span { font-size: 18px; line-height: 1; }
.fmt .fmt-filters { display: flex; flex-wrap: wrap; gap: 5px; margin: 19px 0; }
.fmt .fmt-filters button, .fmt .fmt-export button, .fmt .fmt-export a {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 42px; border: 1px solid var(--fmt-line); border-radius: 0;
  padding: 8px 16px; background: transparent; color: var(--fmt-ink); font-size: 14px; text-decoration: none;
}
.fmt .fmt-filters button:hover, .fmt .fmt-export :is(button,a):hover { border-color: var(--fmt-ink); }
.fmt .fmt-filters button[aria-pressed="true"] { border-color: var(--fmt-ink); background: var(--fmt-ink); color: var(--fmt-paper); }

/* The SVG geometry is the supplied Pedimat cross-section. */
.fmt .fmt-drawing { margin: 0; border: 1px solid var(--fmt-line); background: #edede4; }
.fmt .fmt-scroll { width: 100%; overflow-x: auto; }
.fmt .fmt-scroll svg { box-sizing: border-box; display: block; width: 100%; min-width: 860px; max-width: none; height: auto; padding: clamp(10px, 2vw, 25px); }
.fmt .fmt-drawing figcaption, .fmt .fmt-plan-key {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  padding: 10px 16px; background: #e6e7da; border-top: 1px solid var(--fmt-line); color: #2e3428;
}
.fmt .sd-slab { fill: url(#slabg); }
.fmt .sd-finish { fill: #e1dfd8; }
.fmt .sd-hl { stroke: #b7b3a9; }
.fmt .sd-dot { fill: #b5b1a6; }
.fmt .sd-edge, .fmt .sd-base { fill: none; stroke: #30362e; }
.fmt .sd-base { stroke-width: 1.8; }
.fmt .sd-alu, .fmt .sd-vinyl { stroke: #30362e; stroke-width: 1.1; stroke-linejoin: round; }
.fmt .sd-alu { fill: #bec5c0; }
.fmt .sd-vinyl { fill: #e0e4df; }
.fmt .sd-screed { fill: #a3aa9f; }
.fmt .sd-back { fill: #535c52; }
.fmt .sd-tuft, .fmt .sd-fin, .fmt .sd-scr { fill: none; stroke: #30362e; stroke-linecap: round; }
.fmt .sd-tuft { stroke-width: .95; }
.fmt .sd-fin { stroke-width: 2.3; }
.fmt .sd-scr { stroke-width: 1.3; }
.fmt .sd-dl, .fmt .sd-el, .fmt .sd-ld { stroke: #757c72; stroke-width: .9; fill: none; }
.fmt .sd-tick { stroke: #30362e; stroke-width: 1.4; }
.fmt .sd-dt { font: 600 14px Arial,sans-serif; fill: #30362e; }
.fmt .sd-ldot { fill: #30362e; }
.fmt .sd-mc { fill: var(--fmt-ink); stroke: var(--fmt-ink); stroke-width: 1.3; }
.fmt .sd-mt { font: 600 12px Arial,sans-serif; fill: white; text-anchor: middle; dominant-baseline: central; }
.fmt .sd [data-part] { cursor: pointer; }
.fmt .sd.has-hot [data-part]:not(.is-hot) { opacity: .24; }
.fmt .sd .is-hot :is(.sd-alu,.sd-vinyl,.sd-mc) { fill: var(--fmt-lime); }
.fmt .sd .is-hot .sd-mt { fill: var(--fmt-ink); }
.fmt .fmt-legend { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 20px; list-style: none; margin: 0; padding: 0; }
.fmt .fmt-legend li { margin: 0; }
.fmt .fmt-legend button {
  display: flex; width: 100%; height: 100%; gap: 12px; align-items: center; text-align: left;
  background: transparent; border: 0; border-top: 1px solid var(--fmt-line); border-radius: 0;
  min-height: 51px; padding: 9px 5px; font-weight: 500; line-height: 1.3; font-size: 14px;
}
.fmt .fmt-legend button span { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border: 1px solid var(--fmt-ink); border-radius: 50%; font: 600 12px var(--fmt-mono); }
.fmt .fmt-legend button.is-hot { background: #e6e8d8; }
.fmt .fmt-legend button.is-hot span { background: var(--fmt-lime); }

.fmt .fmt-profiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.fmt .fmt-profile { background: #fffef9; border: 1px solid var(--fmt-line); min-width: 0; }
.fmt .fmt-profile-art { background: #e7e8de; border-bottom: 1px solid var(--fmt-line); }
.fmt .fmt-profile-art img { display: block; width: 100%; height: auto; }
.fmt .fmt-profile-body { padding: 17px 19px 19px; }
.fmt .fmt-profile h3 { margin: 0; font-size: 23px; line-height: 1.14; letter-spacing: -.04em; }
.fmt .fmt-profile p { margin: 6px 0 14px; color: var(--fmt-muted); font-size: 14px; }
.fmt .fmt-profile dl, .fmt .fmt-profile dd { margin: 0; }
.fmt .fmt-profile dl { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--fmt-line); font-size: 12px; line-height: 1.5; }
.fmt .fmt-profile dl > div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.fmt .fmt-profile dt { color: var(--fmt-muted); }
.fmt .fmt-metals { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.fmt .fmt-metals span { white-space: nowrap; }
.fmt .fmt-metals i, .fmt .fmt-radio i { display: inline-block; flex: none; width: 12px; height: 12px; margin-right: 4px; border: 1px solid #0003; border-radius: 50%; background: var(--chip); vertical-align: -.1em; }

.fmt .fmt-swatchgrid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.fmt .fmt-swatchgrid + .fmt-swatchgrid { margin-top: 12px; }
.fmt .fmt-swatch { position: relative; text-align: left; padding: 0; border: 1px solid var(--fmt-line); border-radius: 0; background: #fffef9; min-width: 0; }
.fmt .fmt-swatch:hover, .fmt .fmt-swatch[aria-pressed="true"] { border-color: var(--fmt-ink); }
.fmt .fmt-swatch[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--fmt-ink); background: var(--fmt-lime); color: var(--fmt-ink); font: 700 16px Arial,sans-serif;
}
.fmt .fmt-texture {
  --rails: repeating-linear-gradient(8deg,transparent 0 23px,#aaaead 23px 25px,#d8dad2 25px 26px,#171b19 26px 27px);
  display: block; aspect-ratio: 1.9 / 1;
  background-color: var(--chip); background-image: var(--rails),url("drawings/fibre-grain.png");
  background-size: auto,72px; background-blend-mode: normal,overlay;
}
.fmt .fmt-texture--rib { background-image: var(--rails),repeating-linear-gradient(8deg,#ffffff0f 0 2px,transparent 2px 4px); background-size: auto; }
.fmt .fmt-texture--brush { background-size: auto,32px 65px; }
.fmt .fmt-swatch-label { display: block; padding: 13px 14px; }
.fmt .fmt-swatch-label b, .fmt .fmt-swatch-label small { display: block; }
.fmt .fmt-swatch-label b { font-size: 17px; font-weight: 650; }
.fmt .fmt-swatch-label small { color: var(--fmt-muted); font: 500 11px/1.5 var(--fmt-mono); margin-top: 2px; }

.fmt .fmt-builder { display: grid; grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr); gap: clamp(22px, 4vw, 64px); align-items: start; }
.fmt .fmt-controls, .fmt .fmt-preview { min-width: 0; }
.fmt .fmt-controls .fmt-title { margin-bottom: 17px; }
.fmt .fmt-controls fieldset {
  min-width: 0; border: 0; border-top: 1px solid var(--fmt-line); padding: 12px 0 15px; margin: 0;
}
.fmt .fmt-controls legend { float: left; width: 100%; padding: 0; margin: 0 0 9px; font-size: 15px; font-weight: 650; }
.fmt .fmt-options { clear: both; display: flex; flex-wrap: wrap; gap: 5px; }
.fmt .fmt-radio { position: relative; display: inline-flex; margin: 0; }
.fmt .fmt-radio input { position: absolute; margin: 0; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.fmt .fmt-radio span {
  min-height: 38px; display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--fmt-line);
  padding: 8px 10px; font-size: 13px; line-height: 1.25;
}
.fmt .fmt-radio input:checked + span { background: var(--fmt-lime); border-color: var(--fmt-ink); }
.fmt .fmt-radio input:hover + span { border-color: var(--fmt-ink); }
.fmt .fmt-radio input:focus-visible + span { outline: 3px solid #437346; outline-offset: 2px; }
.fmt .fmt-dimensions { clear: both; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.fmt .fmt-dimensions label { display: grid; gap: 5px; font-size: 13px; }
.fmt .fmt-dimensions input {
  width: 100%; min-height: 42px; padding: 8px; border: 1px solid var(--fmt-line);
  border-radius: 0; background: #fffef9; color: var(--fmt-ink); font-size: 16px;
}
.fmt .fmt-dimensions input[aria-invalid="true"] { border-color: #9e3016; }
.fmt .fmt-plan { background: #d9d6ca; border: 1px solid var(--fmt-line); }
.fmt .fmt-plan svg { display: block; height: auto; width: 100%; aspect-ratio: 640 / 365; }
.fmt .fmt-spec { margin-top: 16px; padding: clamp(16px, 2.4vw, 29px); background: #e7e8dc; }
.fmt .fmt-spec h2 { font-size: clamp(21px, 2.2vw, 30px); }
.fmt .fmt-spec h3 { margin: 6px 0 16px; font: 600 12px/1.45 var(--fmt-mono); text-transform: uppercase; letter-spacing: .04em; }
.fmt .fmt-spec dl { margin: 0; font-size: 13px; line-height: 1.5; }
.fmt .fmt-spec dl div { display: grid; grid-template-columns: minmax(78px, .32fr) 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid #c3c5b8; }
.fmt .fmt-spec dt { color: var(--fmt-muted); }
.fmt .fmt-spec dd { margin: 0; overflow-wrap: anywhere; }
.fmt .fmt-export { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.fmt .fmt-export :is(button,a) { min-height: 40px; padding: 7px 12px; font-size: 13px; border-color: #a0a394; }
.fmt .fmt-export button:first-child { border-color: var(--fmt-ink); color: white; background: var(--fmt-ink); }
.fmt [aria-disabled="true"], .fmt button:disabled { opacity: .55; cursor: default; }
.fmt .fmt-feedback { min-height: 0; margin: 0; font-size: 13px; }
.fmt .fmt-feedback:not(:empty) { margin-top: 8px; }
.fmt-copy-field { position: fixed; left: -9999px; top: 0; }

@media (max-width: 920px) {
  .fmt .fmt-profiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fmt .fmt-legend { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fmt .fmt-builder { gap: 20px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
}
@media (max-width: 740px) {
  .fmt .fmt-builder { grid-template-columns: 1fr; }
  .fmt .fmt-swatchgrid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .fmt .fmt-texture { aspect-ratio: 1.65; }
  .fmt .fmt-filters button { padding-inline: 11px; }
  .fmt .fmt-bar { align-items: flex-start; }
}
@media (max-width: 540px) {
  .fmt .fmt-legend, .fmt .fmt-profiles { grid-template-columns: 1fr; }
  .fmt .fmt-profile-art img { max-height: 155px; }
  .fmt .fmt-profile-body { padding: 14px 16px; }
  .fmt .fmt-drawing figcaption { gap: 4px 12px; }
  .fmt .fmt-caption { gap: 6px 12px; }
  .fmt .fmt-guide::after { content: " Swipe the drawing to see its full width."; }
  .fmt .fmt-swatch-label { padding: 10px; }
  .fmt .fmt-plan-key { font-size: 10px; }
}
