@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  /* ISO 3098 drawing lettering, for everything that sits on a drawing */
  font-family: "osifont";
  src: url("/fonts/osifont-lgpl3fe.woff") format("woff");
  font-display: swap;
}

:root {
  color-scheme: light;
  /* layout space and paper */
  --ground: #e4e6e5;
  --sheet: #ffffff;
  --ink: #161819;
  --ink-2: #3d4347;
  --ink-3: #5b6267;
  --rule: #c7ccce;
  --rule-2: #e2e5e6;
  /* the drawing's own colours, each with one job */
  --glass: #1d7f80;
  --glass-tint: #d8ecea;
  --select: #1f5fbf;
  --select-tint: #e2ebf9;
  --markup: #cf3427;
  --laser: #e0322c;
  --sans: "Barlow", "Segoe UI", system-ui, sans-serif;
  --iso: "osifont", "Barlow", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(64px, 9vw, 128px);
  --page: 1200px;
  --hang: 0 1px 2px rgb(16 20 24 / 0.1), 0 14px 30px -16px rgb(16 20 24 / 0.32);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #a9b0b3 var(--ground);
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ground);
  font: 400 1.125rem/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--select-tint); color: var(--ink); }

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

:focus-visible { outline: 2.5px solid var(--select); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 4px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 1.25rem + 3.1vw, 4rem); line-height: 1.02; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.8rem, 1.2rem + 1.75vw, 2.8rem); line-height: 1.06; letter-spacing: -0.016em; }
p { margin: 0; text-wrap: pretty; }

main > section {
  width: min(var(--page), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
main > section + section { margin-top: var(--gap); }

.sec-head { display: grid; gap: 12px; margin-bottom: clamp(24px, 3vw, 36px); }
.sec-head p { max-width: 60ch; color: var(--ink-2); font-size: clamp(1.06rem, 1rem + 0.3vw, 1.22rem); }

/* ------------------------------------------------------------------ top bar */

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: clamp(14px, 3vw, 36px);
  padding: 10px max(var(--gutter), calc((100% - var(--page)) / 2));
  background: rgb(255 255 255 / 0.96);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__mark { width: 32px; height: 32px; color: var(--ink); flex: none; }
.brand__word { font-weight: 600; font-size: 1.12rem; letter-spacing: 0.12em; text-transform: uppercase; }
.top__nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.top__nav a { text-decoration: none; font-weight: 500; font-size: 0.98rem; color: var(--ink-2); padding: 6px 0; }
.top__nav a:hover { color: var(--ink); text-decoration: underline; }

/* ------------------------------------------------------------------ buttons and fields */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px;
  padding: 0.7em 1.35em;
  border: 0; border-radius: 4px;
  font: 600 1.04rem/1 var(--sans);
  letter-spacing: 0.01em;
  color: #fff; background: var(--ink);
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:hover { background: var(--select); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: #5d6366; cursor: progress; }
.btn--sm { min-height: 40px; padding: 0.55em 1em; font-size: 0.96rem; }
.btn-quiet {
  justify-self: start;
  border: 0; background: none; padding: 8px 0;
  font: 500 0.98rem var(--sans); color: var(--ink-2);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  cursor: pointer;
}
.btn-quiet:hover { color: var(--select); }

.field { display: grid; gap: 6px; min-width: 0; }
.field label, .cell label {
  font: 400 0.78rem/1.2 var(--iso); letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3);
}
.opt { text-transform: none; letter-spacing: 0.02em; }
.field input {
  width: 100%; min-height: 50px;
  padding: 0.68em 0.8em 0.6em;
  font: 500 1.1rem/1.2 var(--sans); color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--ink-3); border-radius: 4px;
  caret-color: var(--select);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus { outline: none; border-color: var(--select); box-shadow: 0 0 0 3px var(--select-tint); }
input::placeholder { color: #6b7276; }
input[aria-invalid="true"] { border-color: var(--markup) !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.join__note { font-size: 0.95rem; color: var(--ink-3); }
.join__status { font-weight: 600; font-size: 1rem; }
.join__status:empty { display: none; }
.join__status.is-ok { color: var(--glass); }
.join__status.is-bad { color: var(--markup); }

/* ------------------------------------------------------------------ sheets: paper with a drawing frame */

.sheet, .paper {
  position: relative;
  background: var(--sheet);
  box-shadow: var(--hang);
}
.sheet::before {
  content: "";
  position: absolute; inset: 14px;
  border: 1.5px solid var(--ink);
  pointer-events: none;
}
.refs { position: absolute; inset: 0; pointer-events: none; }
.refs__x, .refs__y { position: absolute; display: flex; }
.refs__x { left: 14px; right: 14px; height: 14px; }
.refs__x--top { top: 0; }
.refs__x--bottom { bottom: 0; }
.refs__y { top: 14px; bottom: 14px; width: 14px; flex-direction: column; }
.refs__y--left { left: 0; }
.refs__y--right { right: 0; }
.refs i {
  flex: 1;
  display: grid; place-items: center;
  font: normal 9px/1 var(--iso); color: var(--ink-3);
}
.refs__x i + i { border-left: 1px solid var(--rule); }
.refs__y i + i { border-top: 1px solid var(--rule); }

/* ------------------------------------------------------------------ hero sheet */

.hero { margin-top: clamp(20px, 3vw, 34px); }
.sheet--hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  grid-template-areas: "plan plan" "text form" "tb tb";
  column-gap: clamp(24px, 3.4vw, 48px);
  padding: 30px clamp(26px, 3vw, 40px) 30px;
}
.measure { grid-area: plan; margin: 0; position: relative; }
.measure__stage { position: relative; }
.measure__3d {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; pointer-events: none; touch-action: none; cursor: grab;
  transition: opacity 0.3s var(--ease);
}
.measure__3d:active { cursor: grabbing; }
.measure .plan { transition: opacity 0.45s var(--ease), visibility 0s linear 0s; }
.measure.is-3d .measure__3d { opacity: 1; transition: none; }
.measure.is-3d .plan { opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s; }
.measure.is-3d .tip { display: none !important; }
.measure__ctrl { display: inline-flex; gap: 16px; align-items: baseline; }
.measure__ctrl button {
  font: 400 0.82rem/1 var(--iso); letter-spacing: 0.04em; color: var(--select);
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.measure__ctrl button[aria-pressed="true"] { color: var(--ink); text-decoration: none; cursor: default; }
.plan {
  display: block;
  width: 100%;
  height: auto;
  max-height: max(280px, calc(100svh - 470px));
  overflow: visible;
}
.measure__cap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px;
  margin-top: 2px;
  font: 400 0.82rem/1.3 var(--iso); letter-spacing: 0.04em; color: var(--ink-3);
}
.hint { text-transform: none; letter-spacing: 0.01em; }
.replay {
  font: 400 0.82rem/1 var(--iso); letter-spacing: 0.04em; color: var(--select);
  background: none; border: 0; padding: 6px 0;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.hero__text { grid-area: text; margin-top: clamp(16px, 2vw, 24px); display: grid; gap: 12px; align-content: end; }
.offer { max-width: 50ch; color: var(--ink-2); font-size: clamp(1.06rem, 1rem + 0.3vw, 1.24rem); line-height: 1.45; }
.join--hero {
  grid-area: form;
  align-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "field btn" "note note" "status status";
  align-items: end;
  gap: 8px 10px;
  margin-top: 18px;
}
.join--hero .field { grid-area: field; }
.join--hero .btn { grid-area: btn; }
.join--hero .join__note { grid-area: note; }
.join--hero .join__status { grid-area: status; }

.tblock {
  grid-area: tb;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 1.25fr 2.1fr 1.6fr 1fr 0.9fr 0.5fr;
  border-top: 1.5px solid var(--ink);
}
.tblock > div { padding: 7px 10px 8px; border-left: 1px solid var(--ink); min-width: 0; }
.tblock > div:first-child { border-left: 0; padding-left: 0; }
.tblock dt { font: 400 0.72rem/1.2 var(--iso); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.tblock dd { margin: 3px 0 0; font: 400 0.86rem/1.3 var(--iso); letter-spacing: 0.03em; color: var(--ink); overflow-wrap: anywhere; }
.tblock__brand dd { font-family: var(--sans); font-weight: 600; letter-spacing: 0.12em; }

/* plan drawing (SVG) */
.plan .hatch-line { stroke: var(--ink-3); stroke-width: 1; }
.plan .p-wall { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.plan .p-wall-hatch { stroke: none; }
.plan .p-side { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.plan .p-ghost { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 5 7; opacity: 0; }
.plan .p-edge { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.plan .pt { fill: var(--laser); transform-box: fill-box; transform-origin: center; }
.plan .p-glass { fill: none; stroke: var(--glass); stroke-width: 6; }
.plan .p-gap { stroke: #fff; stroke-width: 3.5; }
.plan .p-joint { stroke: var(--ink); stroke-width: 1.2; }
.plan .p-post { fill: var(--ink); }
.plan .p-tp { fill: #fff; stroke: var(--ink); stroke-width: 1.4; }
.plan .p-tpt { font-family: var(--iso); font-size: 13px; letter-spacing: 0.06em; fill: var(--ink-2); }
.plan--tall .p-tpt { font-size: 18px; }
.plan .p-tpl { stroke: var(--ink-2); stroke-width: 1; }
.plan .p-cloud { fill: none; stroke: var(--markup); stroke-width: 1.8; stroke-linejoin: round; }
.plan .p-leader { stroke: var(--ink); stroke-width: 1.1; }
.plan .p-dot { fill: var(--ink); }
.plan .tag { cursor: pointer; outline: none; }
.plan .tag rect { fill: #fff; stroke: var(--ink); stroke-width: 1.3; transition: fill 0.2s var(--ease), stroke 0.2s var(--ease); }
.plan .tag:hover rect, .plan .tag.is-open rect { fill: var(--select-tint); stroke: var(--select); }
.plan .tag:focus-visible rect { stroke: var(--select); stroke-width: 3; }
.plan .tag.is-check rect { stroke: var(--markup); stroke-width: 1.8; }
.plan .t-id, .plan .t-dim, .plan .t-tol, .plan .t-ghost, .plan .t-check,
.plan .p-name, .plan .p-stamp text, .plan .p-scale text { font-family: var(--iso); }
.plan .t-id { font-size: 19px; fill: var(--ink-3); }
.plan .t-dim { font-size: 21px; fill: var(--ink); }
.plan .t-tol { font-size: 18px; fill: var(--ink-3); }
.plan .tag.is-check .t-tol { fill: var(--markup); }
.plan .t-ghost { font-size: 21px; fill: var(--ink-3); opacity: 0; }
.plan .t-check { font-size: 13px; letter-spacing: 0.06em; fill: var(--markup); }
.plan .p-rline { stroke: var(--ink); stroke-width: 1.1; }
.plan .arrow-head { fill: var(--ink); }
.plan .p-name { font-size: 13.5px; letter-spacing: 0.05em; fill: var(--ink-2); }
.plan .p-nline { stroke: var(--ink-3); stroke-width: 1; }
.plan .beam { stroke: var(--laser); stroke-width: 1.6; stroke-linecap: round; opacity: 0; }
.plan .p-legs { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.plan .p-head { fill: #fff; stroke: var(--ink); stroke-width: 1.8; }
.plan .p-cross { stroke: var(--ink); stroke-width: 1; }
.plan .p-eye { fill: var(--laser); }
.plan .p-stamp rect { fill: none; stroke: var(--markup); stroke-width: 1.8; }
.plan .p-stamp text { font-size: 19px; letter-spacing: 0.14em; fill: var(--markup); }
.plan .p-scale .sb-a { fill: var(--ink); }
.plan .p-scale .sb-b { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.plan .p-scale text { font-size: 13px; fill: var(--ink-2); }

.plan--tall { display: none; }
.plan--tall .t-id { font-size: 27px; }
.plan--tall .t-dim, .plan--tall .t-ghost { font-size: 29px; }
.plan--tall .t-tol { font-size: 24px; }
.plan--tall .t-check { font-size: 20px; }
.plan--tall .p-name { font-size: 19px; }
.plan--tall .p-stamp text { font-size: 25px; }
.plan--tall .p-scale text { font-size: 18px; }

.tip {
  position: absolute; z-index: 5;
  width: max-content; max-width: min(320px, 86vw);
  padding: 11px 13px 10px;
  background: var(--ink); color: #fff;
  border-radius: 4px;
  font-size: 0.98rem; line-height: 1.4;
  box-shadow: 0 12px 24px -12px rgb(0 0 0 / 0.55);
  pointer-events: none;
}
.tip b { display: block; font: 400 1.04rem/1.3 var(--iso); letter-spacing: 0.03em; margin-bottom: 3px; }
.tip.is-check b { color: #ff9c92; }

/* ------------------------------------------------------------------ the problem, as a flow */

.flow {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px;
}
.flow li {
  position: relative;
  display: grid; align-content: start; gap: 10px;
  padding: 14px 14px 16px;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  font-weight: 600; font-size: 1.04rem; line-height: 1.35;
}
.flow li:not(:last-child)::after {
  content: "";
  position: absolute; top: 50%; right: -31px;
  width: 22px; height: 1.5px; background: var(--ink);
}
.flow li:not(:last-child)::before {
  content: "";
  position: absolute; top: calc(50% - 5px); right: -33px;
  border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent;
  border-left: 9px solid var(--ink);
}
.flow__end { border-color: transparent !important; color: var(--markup); }
.cloud-box { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); overflow: visible; pointer-events: none; }
.cloud-box path { fill: none; stroke: var(--markup); stroke-width: 1.8; stroke-linejoin: round; }
.flow__end:not(.has-cloud) { border-color: var(--markup) !important; }
.after { margin-top: 28px; max-width: 56ch; font-size: clamp(1.06rem, 1rem + 0.3vw, 1.22rem); color: var(--ink-2); }

.mini, .det { display: block; width: 100%; height: auto; overflow: visible; }
:is(.mini, .det) .ln { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
:is(.mini, .det) .ln-2 { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-linecap: round; }
:is(.mini, .det) .ln-fill { fill: #fff; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
:is(.mini, .det) .gl { fill: none; stroke: var(--glass); stroke-width: 3.2; stroke-linejoin: round; }
:is(.mini, .det) .gl-f { fill: var(--glass-tint); stroke: none; }
:is(.mini, .det) .dm { fill: none; stroke: var(--ink); stroke-width: 1; }
:is(.mini, .det) .dm-dash { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 5 5; }
:is(.mini, .det) .mk { fill: none; stroke: var(--markup); stroke-width: 2.4; stroke-linecap: round; }
:is(.mini, .det) .hatch { fill: url(#hatch-ui); stroke: none; }
:is(.mini, .det) .pt { fill: var(--laser); }
:is(.mini, .det) .ray { fill: none; stroke: var(--laser); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.75; }
:is(.mini, .det) text { font-family: var(--iso); }
:is(.mini, .det) .tx-s { font-size: 13px; fill: var(--ink); letter-spacing: 0.03em; }
:is(.mini, .det) .tx-xs { font-size: 10.5px; fill: var(--ink-2); letter-spacing: 0.04em; }
:is(.mini, .det) .tx-mk { font-size: 13px; fill: var(--markup); }

/* ------------------------------------------------------------------ how a job runs */

.steps {
  --mini-h: 132px;
  position: relative;
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}
.steps::before {
  content: "";
  position: absolute;
  top: calc(var(--mini-h) + 18px + 17px);
  left: 17px; right: calc(25% - 13px);
  border-top: 1.5px dashed var(--ink-3);
  transform-origin: left center;
}
.steps.is-armed::before { transform: scaleX(0); }
.steps.is-armed.is-drawn::before { animation: lead 1.3s var(--ease) both; }
@keyframes lead { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.steps li { position: relative; display: grid; align-content: start; gap: 8px; }
.mini--step { height: var(--mini-h); width: auto; max-width: 100%; justify-self: start; }
.balloon {
  position: relative; z-index: 1;
  margin-top: 10px;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ground);
  border: 1.5px solid var(--ink);
  font: 400 1rem/1 var(--iso); padding-top: 2px;
}
.steps b { font-weight: 600; font-size: clamp(1.08rem, 1rem + 0.35vw, 1.26rem); line-height: 1.2; margin-top: 4px; }
.steps li > span:last-child { color: var(--ink-2); font-size: 1rem; line-height: 1.45; max-width: 26ch; }

/* ------------------------------------------------------------------ settings */

.sheet--settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "view props" "sched props";
  grid-template-rows: auto 1fr;
  gap: clamp(24px, 3vw, 40px);
  padding: 34px clamp(26px, 3vw, 40px) 32px;
}
.settings__view { grid-area: view; min-width: 0; display: grid; gap: 4px; align-content: start; }
.elev { display: block; width: 100%; height: auto; overflow: visible; }
.view-title {
  font: 400 0.86rem/1.3 var(--iso); letter-spacing: 0.06em; color: var(--ink);
  display: flex; gap: 14px; flex-wrap: wrap;
}
.view-title span { color: var(--markup); }
.settings__sched { grid-area: sched; min-width: 0; }
.sched-wrap { margin-top: 6px; overflow-x: auto; }
.sched { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.sched caption {
  caption-side: top; text-align: left; padding-bottom: 8px;
  font: 400 0.82rem/1.2 var(--iso); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
}
.sched th {
  text-align: left; font: 400 0.74rem/1.2 var(--iso); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); padding: 8px 10px 7px 0; border-bottom: 1.5px solid var(--ink); white-space: nowrap;
}
.sched td { padding: 9px 10px 8px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; transition: color 0.4s var(--ease), background-color 0.4s var(--ease); }
.sched td:first-child { font-family: var(--iso); }
.sched td.is-check { color: var(--markup); font-weight: 600; }
.sched th:last-child, .sched td:last-child { text-align: right; padding-right: 0; }
.sched td.hot { color: var(--select); background: var(--select-tint); }

.props {
  grid-area: props;
  display: grid; align-content: start; gap: 0;
  border: 1.5px solid var(--ink);
  padding: 4px 16px 12px;
  background: #fff;
}
.prop { border: 0; margin: 0; padding: 14px 0 15px; border-bottom: 1px solid var(--rule); min-width: 0; display: grid; gap: 8px; }
.prop > label, .prop > legend { font-weight: 600; font-size: 0.98rem; line-height: 1.2; color: var(--ink); padding: 0; }
.prop--seg legend { float: left; width: 100%; margin-bottom: 8px; }
.prop--seg .seg { clear: both; }
.prop__row { display: grid; grid-template-columns: minmax(0, 1fr) 5.2em; align-items: center; gap: 12px; }
.prop output {
  font: 400 1.02rem/1 var(--iso); letter-spacing: 0.02em; text-align: right; color: var(--ink);
  padding: 7px 8px 6px; border: 1px solid var(--rule); border-radius: 3px;
}
.prop output::after { content: " " attr(data-unit); color: var(--ink-3); font-size: 0.8em; }
.prop__note { font: 400 0.82rem/1.35 var(--iso); letter-spacing: 0.03em; color: var(--ink-3); }
.prop[data-rise].is-off { opacity: 0.45; }
.seg {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden;
}
.seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg label { position: relative; display: block; cursor: pointer; }
.seg label + label { border-left: 1.5px solid var(--ink); }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block; text-align: center;
  padding: 9px 6px 8px;
  font: 600 0.95rem/1.1 var(--sans);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg label:hover input:not(:checked) + span { background: var(--select-tint); }
.seg input:focus-visible + span { outline: 2.5px solid var(--select); outline-offset: -4px; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 0;
  background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--ink-3); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--ink-3); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 24px; margin-top: -11px;
  background: #fff; border: 2px solid var(--select); border-radius: 3px;
}
input[type="range"]::-moz-range-thumb {
  width: 10px; height: 20px;
  background: #fff; border: 2px solid var(--select); border-radius: 3px;
}
input[type="range"]:hover::-webkit-slider-thumb { background: var(--select-tint); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--select-tint); }
input[type="range"]:disabled { cursor: not-allowed; }
input[type="range"]:disabled::-webkit-slider-thumb { border-color: var(--ink-3); }
.props .btn-quiet { margin-top: 8px; }

/* elevation (drawn by app.js) */
.elev text { font-family: var(--iso); }
.elev .e-ffl { stroke: var(--ink); stroke-width: 1.3; }
.elev .e-floor, .elev .e-slab { fill: url(#hatch-ui); stroke: none; }
.elev .e-slab-line { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.elev .e-glass { fill: var(--glass-tint); stroke: var(--glass); stroke-width: 2; stroke-linejoin: round; }
.elev .e-spigot { fill: #4a5155; stroke: var(--ink); stroke-width: 1; }
.elev .e-plate { fill: var(--ink); }
.elev .e-standoff { fill: #fff; stroke: var(--ink); stroke-width: 1.4; }
.elev .e-cross { stroke: var(--ink); stroke-width: 0.9; }
.elev .e-channel { fill: #c9cfd2; stroke: var(--ink); stroke-width: 1.2; }
.elev .e-lip { stroke: #8a9396; stroke-width: 1; }
.elev .e-dim { fill: none; stroke: var(--ink); stroke-width: 1; transition: stroke 0.4s var(--ease); }
.elev .e-dimt { font-size: 15px; fill: var(--ink); transition: fill 0.4s var(--ease); }
.elev .e-break { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.elev .e-pid { font-size: 17px; fill: var(--ink-3); }
.elev .e-rad { font-size: 14px; fill: var(--glass); letter-spacing: 0.04em; }
.elev .e-lbl { font-size: 13px; fill: var(--ink-2); letter-spacing: 0.05em; }
.elev .e-level { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.elev .e-leader { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.elev .hot .e-dim, .elev .e-dim.hot { stroke: var(--select); }
.elev .hot .e-dimt, .elev .e-dimt.hot { fill: var(--select); }
.elev text.halo { paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.elev.is-narrow .e-dimt { font-size: 25px; }
.elev.is-narrow .e-pid { font-size: 27px; }
.elev.is-narrow .e-rad { font-size: 22px; }
.elev.is-narrow .e-lbl { font-size: 21px; }
.elev.is-narrow .e-dim, .elev.is-narrow .e-ffl { stroke-width: 1.6; }
.elev.is-narrow .e-glass { stroke-width: 2.8; }
.elev.is-narrow .e-break { stroke-width: 1.8; }

/* ------------------------------------------------------------------ what you get */

.get__set {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  grid-template-areas: "a3 cut" "a3 view";
  gap: 40px clamp(28px, 3.4vw, 48px);
  align-items: start;
}
.a3-fig { grid-area: a3; margin: 0; }
.paper { padding: 14px; }
.paper--link { display: block; cursor: zoom-in; }
.paper--link:focus-visible { outline-offset: 4px; }
.full {
  display: inline-block; margin-top: 16px;
  font: 400 0.86rem/1 var(--iso); letter-spacing: 0.04em; color: var(--select);
}
.a3 { display: block; width: 100%; height: auto; }
.a3 text { font-family: var(--iso); }
.a3 .s-trim { fill: none; stroke: var(--rule); stroke-width: 1; }
.a3 .s-frame { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.a3 .s-ref { font-size: 9px; fill: var(--ink-3); }
.a3 .s-tick { stroke: var(--rule); stroke-width: 1; }
.a3 .hatch-line { stroke: var(--ink-3); stroke-width: 0.9; }
.a3 .s-wall { stroke: var(--ink); stroke-width: 1.2; }
.a3 .s-line { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.a3 .s-glass { fill: none; stroke: var(--glass); stroke-width: 3.8; }
.a3 .s-joint { stroke: var(--ink); stroke-width: 1; }
.a3 .s-pid { font-size: 11px; fill: var(--ink); }
.a3 .s-cloud { fill: none; stroke: var(--markup); stroke-width: 1.5; stroke-linejoin: round; }
.a3 .s-view { font-size: 12px; letter-spacing: 0.08em; fill: var(--ink); }
.a3 .s-viewsub, .a3 .s-note { font-size: 10.5px; fill: var(--ink-2); letter-spacing: 0.03em; }
.a3 .s-pane { fill: var(--glass-tint); stroke: var(--glass); stroke-width: 1.8; }
.a3 .s-clamp { fill: #4a5155; }
.a3 .s-dim { fill: none; stroke: var(--ink); stroke-width: 0.9; }
.a3 .tick-mark { stroke: var(--ink); stroke-width: 1.4; }
.a3 .s-dimt { font-size: 11px; fill: var(--ink); }
.a3 .s-table { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.a3 .s-rule { stroke: var(--ink); stroke-width: 1.2; }
.a3 .s-rule--thin { stroke: var(--rule); stroke-width: 0.9; }
.a3 .s-th { font-size: 10px; letter-spacing: 0.08em; fill: var(--ink); }
.a3 .s-td { font-size: 11px; fill: var(--ink); }
.a3 .s-td--check { fill: var(--markup); }
.a3 .s-tb { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.a3 .s-brand { font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: 0.12em; fill: var(--ink); }
.a3 .s-tbt { font-size: 10.5px; fill: var(--ink-2); }
.a3 .s-mark circle { fill: #fff; stroke: var(--ink); stroke-width: 1.3; }
.a3 .s-lead { stroke: var(--ink); stroke-width: 0.9; }
svg.a3:root { background: #fff; max-width: 1680px; margin: 0 auto; display: block; }
.a3 .s-mark text { font-size: 12px; fill: var(--ink); }
.a3 .s-stamp rect { fill: none; stroke: var(--markup); stroke-width: 1.5; }
.a3 .s-stamp text { font-size: 15px; letter-spacing: 0.16em; fill: var(--markup); }

.marks {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: grid; gap: 10px;
  counter-reset: mark;
}
.marks li {
  counter-increment: mark;
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
  font-weight: 500; font-size: 1.04rem; line-height: 1.4;
}
.marks li::before {
  content: counter(mark);
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.3px solid var(--ink); background: #fff;
  font: 400 0.84rem/1 var(--iso); padding-top: 2px;
}

.cutfile { grid-area: cut; margin: 0; }
.paper--file { padding: 16px 16px 10px; }
.file-tab {
  position: absolute; top: 12px; right: 14px;
  font: 400 0.8rem/1 var(--iso); letter-spacing: 0.04em; color: var(--ink-2);
  padding: 6px 8px 5px; border: 1px solid var(--rule); border-radius: 3px;
}
.dxf { display: block; width: 100%; height: auto; margin-top: 18px; }
.dxf text { font-family: var(--iso); }
.dxf .d-pane { fill: none; stroke: #1d63c4; stroke-width: 1.8; }
.dxf .d-clamp { fill: none; stroke: #8a4fc4; stroke-width: 1.2; stroke-dasharray: 3 3; }
.dxf .d-axis { fill: none; stroke: var(--markup); stroke-width: 1.4; }
.dxf .d-txt { font-size: 15px; fill: var(--ink); }
.dxf .d-txt--s { font-size: 11px; fill: var(--ink-2); }
.dxf .d-dim { fill: none; stroke: #0f8a4a; stroke-width: 1; }
.dxf .d-dimt { font-size: 12px; fill: #0b6e3a; }
.cutfile figcaption, .viewport figcaption { margin-top: 12px; font-weight: 500; font-size: 1.02rem; line-height: 1.4; }

.viewport { grid-area: view; margin: 0; }
.viewport__frame {
  position: relative;
  border: 1px solid #b9bfc2;
  background: linear-gradient(180deg, #fcfdfd 0%, #e9eef0 62%, #d8dfe2 100%);
  box-shadow: var(--hang);
}
.viewport__label, .viewport__hint {
  position: absolute; font: 400 0.76rem/1 var(--iso); letter-spacing: 0.06em; color: var(--ink-3);
  pointer-events: none;
}
.viewport__label { top: 10px; left: 12px; text-transform: uppercase; }
.viewport__hint { bottom: 10px; right: 12px; }
.viewport__view { display: block; width: 100%; height: auto; aspect-ratio: 420 / 300; touch-action: none; cursor: grab; }
.viewport__view:active { cursor: grabbing; }

/* ------------------------------------------------------------------ jobs: a detail sheet */

.details {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--sheet);
  box-shadow: var(--hang);
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
}
.details li {
  display: grid; gap: 10px; align-content: start;
  padding: clamp(14px, 2vw, 24px) clamp(14px, 2vw, 24px) clamp(16px, 2vw, 22px);
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.details li > span {
  font-weight: 600; font-size: clamp(1rem, 0.95rem + 0.25vw, 1.14rem);
  padding-top: 10px; border-top: 1.5px solid var(--ink);
}
.det { max-height: 170px; }

/* ------------------------------------------------------------------ who, and the notes */

.who {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}
.who__text { display: grid; gap: 16px; }
.who__text p { max-width: 50ch; color: var(--ink-2); font-size: clamp(1.08rem, 1rem + 0.35vw, 1.26rem); }
.notes { background: #fff; border: 1.5px solid var(--ink); padding: 18px 22px 20px; }
.notes h3 { font: 400 0.86rem/1 var(--iso); letter-spacing: 0.1em; text-transform: uppercase; }
.notes ol { margin: 12px 0 0; padding-left: 1.3em; display: grid; gap: 6px; }
.notes li { font-size: 1rem; line-height: 1.45; color: var(--ink-2); padding-left: 4px; }
.notes li::marker { font-family: var(--iso); color: var(--ink); }

/* ------------------------------------------------------------------ join */

.sheet--join { padding: clamp(34px, 4vw, 52px) clamp(28px, 4vw, 56px) clamp(30px, 3.4vw, 44px); }
.sheet--join h2 { max-width: 22ch; }
.join--block { margin-top: clamp(22px, 3vw, 32px); display: grid; gap: 16px; }
.cells {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  border: 1.5px solid var(--ink);
}
.cell { display: grid; gap: 4px; padding: 9px 12px 8px; min-width: 0; transition: box-shadow 0.2s var(--ease); }
.cell + .cell { border-left: 1px solid var(--ink); }
.cell:focus-within { box-shadow: inset 0 0 0 2px var(--select); }
.cell input, .cell select {
  width: 100%; border: 0; background: transparent; padding: 4px 0 2px;
  font: 500 1.12rem/1.3 var(--sans); color: var(--ink);
  caret-color: var(--select);
}
.cell input:focus, .cell select:focus { outline: none; }
.cell select {
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 9px) 55%, calc(100% - 3px) 55%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-right: 22px;
}
.join__go { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.join__go .btn { min-width: 12rem; }

/* ------------------------------------------------------------------ footer */

.foot {
  width: min(var(--page), 100% - 2 * var(--gutter));
  margin: var(--gap) auto 0;
  padding: 16px 0 40px;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px;
  font-size: 0.92rem; color: var(--ink-3);
}
.foot p { display: inline-flex; align-items: center; gap: 8px; }
.foot__mark { width: 22px; height: 22px; color: var(--ink); }

/* ------------------------------------------------------------------ narrower screens */

@media (max-width: 1040px) {
  .sheet--settings { grid-template-columns: 1fr; grid-template-areas: "view" "props" "sched"; grid-template-rows: auto; }
  /* the drawing stays in view while the settings scroll under it */
  .settings__view {
    position: sticky; top: 61px; z-index: 3;
    background: #fff; padding: 6px 0 8px; margin: -6px 0 0;
    box-shadow: 0 10px 12px -12px rgb(16 20 24 / 0.35);
  }
  .get__set { grid-template-columns: 1fr 1fr; grid-template-areas: "a3 a3" "cut view"; }
}

@media (max-width: 860px) {
  .top__nav { display: none; }
  .sheet--hero { grid-template-columns: 1fr; grid-template-areas: "plan" "text" "form" "tb"; }
  .join--hero { margin-top: 18px; }
  .tblock { grid-template-columns: 1fr 1fr 1fr; }
  .tblock > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .tblock > div:nth-child(n + 4) { border-top: 1px solid var(--ink); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
  .flow li:nth-child(2)::after, .flow li:nth-child(2)::before { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .steps::before { display: none; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who { grid-template-columns: 1fr; }
  .cells { grid-template-columns: 1fr; }
  .cell + .cell { border-left: 0; border-top: 1px solid var(--ink); }
}

@media (max-width: 640px) {
  .sheet--hero { grid-template-areas: "text" "form" "plan" "tb"; padding-top: 28px; }
  .hero__text { margin-top: 4px; }
  .measure { margin-top: 26px; }
  .plan--wide { display: none; }
  .plan--tall { display: block; max-height: none; }
  .join--hero { grid-template-columns: 1fr; grid-template-areas: "field" "btn" "note" "status"; }
  .join--hero .btn { width: 100%; }
  .refs__x i:nth-child(n + 5) { display: none; }
  .get__set { grid-template-columns: 1fr; grid-template-areas: "a3" "cut" "view"; }
  .sheet--settings { padding: 30px 22px 26px; }
  .tblock { grid-template-columns: 1fr 1fr; }
  .tblock > div { border-left: 1px solid var(--ink); padding-left: 10px; border-top: 0; }
  .tblock > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .tblock > div:nth-child(n + 3) { border-top: 1px solid var(--ink); }
  .tblock dd { overflow-wrap: break-word; }
  .sched { font-size: 0.86rem; }
  .sched th:nth-child(3), .sched td:nth-child(3) { display: none; }
  .sched th, .sched td { padding-right: 7px; }
  .sched td:last-child { white-space: normal; }
}

@media (max-width: 560px) {
  .flow { grid-template-columns: 1fr; gap: 34px; }
  .flow li:not(:last-child)::after { top: auto; bottom: -27px; right: auto; left: calc(50% - 0.75px); width: 1.5px; height: 20px; }
  .flow li:not(:last-child)::before {
    display: block !important;
    top: auto; bottom: -33px; right: auto; left: calc(50% - 5.5px);
    border-left: 5.5px solid transparent; border-right: 5.5px solid transparent;
    border-top: 9px solid var(--ink); border-bottom: 0;
  }
  .flow li:nth-child(2)::after { display: block; }
  .steps { grid-template-columns: 1fr; row-gap: 30px; }
  .steps li { grid-template-columns: 34px 1fr; column-gap: 16px; row-gap: 6px; }
  .steps .balloon { grid-column: 1; grid-row: 1; margin-top: 0; }
  .steps .mini--step { grid-column: 2; grid-row: 1; height: 96px; }
  .steps li > b, .steps li > span:last-child { grid-column: 2; }
  .steps li:not(:last-child)::after {
    content: ""; position: absolute; left: 16.25px; top: 40px; bottom: -28px;
    border-left: 1.5px dashed var(--ink-3);
  }
  .details { grid-template-columns: 1fr; }
  .join__go .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .steps.is-armed::before { transform: none; animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
