@font-face {
  font-family: Montserrat;
  src: url("/brand/Montserrat-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("/brand/Montserrat-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("/brand/Montserrat-SemiBold.woff") format("woff");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #333;
  --black: #050505;
  --muted: #626262;
  --line: #d8d8d8;
  --pale: #f5f5f5;
  --white: #fff;
  --space: clamp(1.1rem, 4vw, 3.5rem);
  font-family: Montserrat, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, dl, dd, figure { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #252525; outline-offset: 3px; }
.shell { width: min(100% - var(--space) * 2, 1232px); margin-inline: auto; }
.top { background: var(--black); color: var(--white); }
.top-row { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); min-height: 76px; }
.brand { flex: 0 0 auto; display: block; }
.brand img { display: block; width: clamp(106px, 14vw, 160px); height: auto; filter: brightness(0) invert(1); }
.top-label, .top-catalogue, .top-contact { color: #ebebeb; font-size: .81rem; font-weight: 500; text-transform: uppercase; letter-spacing: .075em; }
.top-label { margin-right: auto; border-left: 1px solid #646464; padding-left: clamp(1rem, 3vw, 2.4rem); }
.top-catalogue, .top-contact { padding-block: .65rem; text-decoration: none; border-bottom: 1px solid transparent; }
.top-catalogue:hover, .top-contact:hover { border-color: currentColor; }
.top :focus-visible, .bottom :focus-visible, .preview :focus-visible { outline-color: #fff; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(1.3rem, 4vw, 3.8rem); align-items: center; padding-block: clamp(1.6rem, 5vw, 4.3rem); }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 500; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.6rem, 5.9vw, 5rem); line-height: 1.03; letter-spacing: -.063em; font-weight: 500; margin: .24em 0; }
.hero h1 span { display: block; color: #747474; }
.hero h1 + p { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.12rem); line-height: 1.55; margin-top: 1.1em; }
.hero-image { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; object-position: center; }
.workspace { padding-block: clamp(1.3rem, 3vw, 2.3rem) 4rem; border-top: 1px solid var(--line); }
.intro { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: 1.2rem; }
.mobile-preview { display: none; }
.intro h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); letter-spacing: -.04em; }
.config-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1rem, 2.2vw, 1.65rem); align-items: start; }
.controls, .side { display: grid; gap: 1rem; min-width: 0; }
.side { position: sticky; top: 1rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 0; padding: clamp(1rem, 2.15vw, 1.45rem); }
.section-head { display: flex; gap: .8rem; align-items: center; margin-bottom: 1.35rem; }
.section-icon { flex: 0 0 2.55rem; height: 2.55rem; display: grid; place-items: center; border-radius: 0; background: #eee; color: #292929; font-size: 1.35rem; line-height: 1; }
h3 { font-size: 1.13rem; letter-spacing: -.02em; }
.section-head p { color: var(--muted); font-size: .9rem; margin-top: .19rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; }
.dimensions-fields { grid-template-columns: 1fr 1fr .72fr; }
.dimensions-fields.is-single-dimension { grid-template-columns: 1fr .72fr; }
.shape-options { margin: 0 0 1rem; }
.dimension-limit { margin-top: .55rem; color: var(--muted); font-size: .85rem; }
label, legend { display: block; font-size: .88rem; font-weight: 650; }
input:not([type="radio"]):not([type="checkbox"]):not([type="color"]), select, textarea {
  display: block; width: 100%; min-height: 44px; margin-top: .36rem; color: var(--ink); background: #fafafa;
  border: 1px solid #bdbdbd; border-radius: 0; padding: .65rem .72rem; font-size: .94rem; font-weight: 500;
}
select {
  appearance: none; padding-right: 2rem; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23333333' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right .75rem center; background-repeat: no-repeat;
}
textarea { resize: vertical; }
.unit { display: block; position: relative; }
.unit input { padding-right: 2.1rem !important; }
.unit > span { position: absolute; right: .72rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 1.15rem 0 0; }
legend { margin-bottom: .4rem; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices span { display: block; border: 1px solid var(--line); padding: .58rem .82rem; border-radius: 0; color: var(--muted); }
.choices input:checked + span { background: #ededed; border-color: #595959; color: #111; }
.choices input:focus-visible + span { outline: 3px solid #252525; outline-offset: 2px; }
.under-row { display: flex; flex-wrap: wrap; gap: .45rem 1rem; align-items: center; justify-content: space-between; margin-top: .9rem; }
.checkbox { display: flex; gap: .45rem; align-items: center; min-height: 38px; }
.checkbox input { width: 1.08rem; height: 1.08rem; margin: 0; accent-color: #222; }
.notes, #ral-field { margin-top: .9rem; }
.text-button { background: transparent; border: 0; padding: .55rem 0; font-weight: 700; color: #222; font-size: .87rem; text-decoration: underline; text-underline-offset: .25em; }
.text-button:hover { color: #000; }
.preview { --dimension: #e0e0e0; overflow: hidden; background: #171717; color: #fff; border: 1px solid #171717; border-radius: 0; }
.preview header, .preview-footer { padding: .95rem 1.25rem; display: flex; align-items: center; gap: .5rem; }
.preview header { justify-content: space-between; border-bottom: 1px solid #424242; }
.preview header > span, .preview-footer { color: #e0e0e0; font-size: .83rem; }
.drawing { position: relative; min-height: 235px; padding: 32px 55px 18px 22px; display: grid; place-items: center; background-color: #222; background-image: linear-gradient(#8884 1px, transparent 1px), linear-gradient(90deg,#8884 1px, transparent 1px); background-size: 18px 18px; background-position: center; }
.plan { position: relative; }
.panel { width: 100%; height: 100%; background: var(--light); border: 4px solid var(--frame); border-radius: 3px; box-shadow: 0 0 46px color-mix(in srgb, var(--light), transparent 70%), inset 0 0 22px #fff6; }
.panel.is-round { border-radius: 50%; }
.panel.is-multi { background: linear-gradient(105deg, #fff0c9, #fffefa 55%, #e2edff); }
.measure { position: absolute; color: var(--dimension); font-size: .75rem; font-weight: 650; letter-spacing: .01em; white-space: nowrap; text-align: center; }
.measure-x { top: -23px; left: 0; right: 0; padding-bottom: 2px; border-bottom: 1px solid #8b8b8b; }
.measure-y { top: 0; bottom: 0; left: calc(100% + 8px); display: grid; align-items: center; padding-left: 4px; border-left: 1px solid #8b8b8b; }
.preview-footer { min-height: 46px; border-top: 1px solid #424242; }
.light-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #eee; flex-shrink: 0; }
#preview-color { margin-left: auto; width: 2.2rem; height: 1.65rem; cursor: pointer; }
.result header { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .85rem; }
#quantity-tag { color: var(--muted); font-size: .85rem; font-weight: 650; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.metrics > div { background: var(--pale); border-radius: 0; padding: .78rem .7rem; }
.metrics span { display: block; color: var(--muted); font-size: .82rem; }
.metrics strong { display: block; margin-top: .1rem; font-size: clamp(1.2rem, 2.4vw, 1.7rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.totals { margin: .9rem 0; }
.totals > div { display: flex; justify-content: space-between; gap: .55rem; padding: .47rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.totals dd { text-align: right; font-weight: 740; }
.estimate-note, .feedback { font-size: .84rem; color: var(--muted); line-height: 1.5; }
.primary { min-height: 46px; display: grid; place-items: center; width: 100%; text-align: center; color: #fff; background: #111; border: 1px solid #111; border-radius: 0; margin-top: .9rem; padding: .72rem .52rem; text-decoration: none; font-size: .92rem; font-weight: 750; }
.primary:hover { background: #373737; }
.primary:disabled { opacity: .55; cursor: default; }
.utilities { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 .55rem; margin-top: .3rem; }
.feedback:empty { display: none; }
.error { color: #953b25; font-size: .87rem; margin-top: .5rem; }
[aria-invalid="true"] { border-color: #b95037 !important; }
.bottom { background: var(--black); color: #ebebeb; font-size: .88rem; }
.bottom .shell { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem 1.4rem; padding-block: 1.4rem; }
.bottom a:not(.brand) { text-underline-offset: .25em; }
dialog { width: min(92vw, 660px); border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: #fff; padding: clamp(1rem, 3vw, 1.55rem); }
dialog::backdrop { background: #000a; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.dialog-head h2 { font-size: 1.35rem; }
dialog p { margin: .7rem 0 1rem; color: var(--muted); }
.profile-images { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .9rem; }
.profile-images figure { display: grid; align-items: end; border: 1px solid var(--line); padding: .7rem; border-radius: 0; text-align: center; }
.profile-images img { display: block; width: 100%; height: 180px; object-fit: contain; align-self: center; }
.profile-images figcaption { font-size: .87rem; font-weight: 700; }
#print-sheet { display: none; }
@media (max-width: 880px) { .side { position: static; } }
@media (max-width: 730px) {
  .config-grid { grid-template-columns: 1fr; }
  .mobile-preview { display: inline-block; margin-left: auto; }
  .intro { flex-wrap: wrap; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { aspect-ratio: 2.2 / 1; }
  .top-label { display: none; }
  .top-catalogue { margin-left: auto; }
}
@media (max-width: 460px) {
  .top-row { gap: .8rem; min-height: 64px; }
  .hero h1 { font-size: clamp(2.55rem, 11vw, 3.4rem); }
  .fields:not(.dimensions-fields) { grid-template-columns: 1fr; }
  .utilities { justify-content: start; gap: 0 1rem; }
  .profile-images img { height: 125px; }
}
@media print {
  body { background: white; color: black; }
  body > :not(#print-sheet) { display: none !important; }
  #print-sheet { display: block; }
  #print-sheet h1 { font-size: 22pt; margin-bottom: 14pt; }
  #print-sheet pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 11pt/1.42 system-ui, sans-serif; }
}
