/* Nordic Prototyping – site styles.
   System fonts only (no external font requests – simpler GDPR story). */

:root {
  --ink: #0f1720;
  --ink-2: #1b2632;
  --ink-3: #2a3644;
  --text: #17202a;
  --muted: #5a6572;
  --line: #dfe3e8;
  --line-strong: #c9d0d7;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --accent: #c4410f;          /* buttons/links on light backgrounds (5.1:1 with white) */
  --accent-hover: #a8370c;
  --accent-bright: #ff6a2b;   /* decoration and text on dark backgrounds */
  --accent-soft: #fff1ea;
  --ok: #1d7a46;
  --ok-soft: #e8f5ee;
  --warn: #9a5b00;
  --warn-soft: #fff6e0;
  --danger: #b42318;
  --danger-soft: #fdecea;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 23, 32, .06), 0 8px 24px rgba(15, 23, 32, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;
  --container: 1180px;
  --gutter: 24px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
html.i18n-pending body { visibility: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 750; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 720; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 820px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
  padding: 12px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:disabled { background: #d9dde2; color: #7b8590; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost-dark:hover { border-color: #fff; color: #fff; }
.btn-sm { padding: 9px 14px; font-size: .88rem; }
.btn-lg { padding: 15px 22px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; }
.brand-mark .m-top { fill: var(--accent); }
.brand-mark .m-left { fill: var(--ink); }
.brand-mark .m-right { fill: var(--ink-3); }
.brand-mark .m-lines { stroke: rgba(255, 255, 255, .55); stroke-width: .9; fill: none; }
.brand-word { font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 450; white-space: nowrap; }
.brand-word b { font-weight: 750; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500; white-space: nowrap; }
.main-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.lang-switch button {
  font: 600 .75rem/1 var(--font); letter-spacing: .05em; padding: 8px 9px;
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 1px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(1200px 500px at 85% 20%, #1d2b3a 0%, transparent 60%),
    var(--ink);
  color: #c9d2dc;
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero h1 { color: #fff; max-width: 13ch; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-lead { font-size: 1.15rem; max-width: 34em; color: #b8c3cf; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 44px; }
.eyebrow { font: 600 .78rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.eyebrow-dark { color: var(--accent-bright); }
.spec-strip { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0; margin: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }
.spec-strip div { padding-right: 26px; margin-right: 26px; border-right: 1px solid rgba(255,255,255,.12); }
.spec-strip div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.spec-strip dt { color: #fff; font-size: 1.05rem; font-weight: 600; white-space: nowrap; }
.spec-strip dd { margin: 2px 0 0; font-size: .8rem; color: #8d9aa8; }

.drawing { margin: 0; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); background: rgba(255,255,255,.02); padding: 18px 18px 0; }
.iso .f-top { fill: #e7ebef; }
.iso .f-left { fill: #b8c1ca; }
.iso .f-right { fill: #8b97a3; }
.iso polygon { stroke: #0f1720; stroke-width: 1.2; stroke-linejoin: round; }
.iso .layers { stroke: rgba(15, 23, 32, .16); stroke-width: 1; fill: none; }
.iso .hole { fill: #33404e; stroke: #0f1720; stroke-width: 1.2; }
.iso .dim { stroke: var(--accent-bright); stroke-width: 1.2; fill: none; }
.iso .dim-t { fill: var(--accent-bright); font: 600 13px var(--mono); text-anchor: middle; }
.title-block { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.14); margin: 8px -18px 0; font-size: .74rem; color: #dbe2e9; }
.title-block span { padding: 9px 12px; border-right: 1px solid rgba(255,255,255,.14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-block span:last-child { border-right: 0; }
.title-block i { display: block; font-style: normal; color: #7f8c99; font-size: .64rem; letter-spacing: .1em; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-lead { font-size: 1.08rem; color: var(--muted); }
.section-quote { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink); color: #c2ccd6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-lead { color: #a7b3c0; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.steps li { padding: 22px 24px 8px 0; position: relative; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.step-no { display: inline-block; color: var(--accent); font-weight: 700; font-size: .85rem; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: .95rem; }

/* ---------- Quote tool ---------- */
.quote-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg);
  background-blend-mode: normal;
  min-height: 360px; padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); }
.dropzone.is-over { background-color: var(--accent-soft); }
.dz-icon { width: 56px; height: 56px; color: var(--ink); margin-bottom: 18px; }
.dz-title { font-size: 1.25rem; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.dz-sub { color: var(--muted); font-size: .92rem; max-width: 30em; margin: 0; }
.dz-sub .link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.workspace.is-over .viewer-card { outline: 2px dashed var(--accent); outline-offset: 4px; }

.viewer-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.viewer { position: relative; height: 380px; background: linear-gradient(180deg, #f3f5f7 0%, #e6eaee 100%); touch-action: none; }
.viewer canvas { display: block; width: 100% !important; height: 100% !important; outline: none; }
.viewer-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--muted); font-size: .95rem; background: rgba(243, 245, 247, .85); }
.viewer-bar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: .85rem; }
.viewer-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-dims { color: var(--muted); white-space: nowrap; }

.parts-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
.parts-head h3 { margin: 0; }
.parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.part {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 14px 16px; transition: border-color .15s, box-shadow .15s;
}
.part.is-active { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.part-info { min-width: 0; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; }
.part-name { font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.part-meta { font-size: .8rem; color: var(--muted); }
.part-flag { display: inline-block; margin-top: 6px; font-size: .78rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.part-flag.warn { background: var(--warn-soft); color: var(--warn); }
.part-flag.manual { background: #eef1f5; color: var(--ink-3); }
.part-flag.error { background: var(--danger-soft); color: var(--danger); }
.part-side { display: flex; align-items: flex-start; gap: 10px; }
.part-price { text-align: right; min-width: 92px; }
.part-price strong { display: block; color: var(--ink); font-size: 1.02rem; }
.part-price span { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.part-remove { width: 30px; height: 30px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.part-remove:hover { border-color: var(--line-strong); color: var(--danger); }
.part-controls { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1.2fr .8fr .7fr; gap: 10px; }
.part-controls .field { margin: 0; }
.part-controls label { font-size: .72rem; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field label, .field legend { font-size: .8rem; font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }
input, select, textarea {
  font: inherit; font-size: .95rem; color: var(--text);
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px;
  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 6 6.5l5-5' fill='none' stroke='%235a6572' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.part-controls input, .part-controls select { padding: 8px 10px; font-size: .88rem; }
.part-controls select { padding-right: 28px; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 23, 32, .1); }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }
textarea { resize: vertical; min-height: 100px; }

/* Summary */
.quote-side { position: sticky; top: calc(var(--header-h) + 16px); }
.summary-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 20px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 18px; }
.segmented button { font: 600 .88rem/1 var(--font); padding: 10px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 32, .14); }

.breakdown { border-top: 1px solid var(--line); margin: 6px 0 16px; padding-top: 14px; font-size: .9rem; }
.breakdown-empty { color: var(--muted); margin: 0; }
.breakdown dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.breakdown dt { color: var(--muted); }
.breakdown dd { margin: 0; text-align: right; font-family: var(--mono); font-feature-settings: "tnum" 1; color: var(--ink); white-space: nowrap; }
.breakdown .neg { color: var(--ok); }
.breakdown .total-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-weight: 700; color: var(--ink); }
.breakdown .total-row dd { font-size: 1.35rem; font-weight: 700; }
.breakdown .sub { font-size: .8rem; }
.breakdown-note { margin: 12px 0 0; font-size: .8rem; color: var(--warn); background: var(--warn-soft); padding: 8px 10px; border-radius: var(--radius-sm); }
.fineprint { font-size: .78rem; color: var(--muted); margin: 12px 0 0; }

/* Order form */
.order-form { margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 30px; }
.form-head { margin-bottom: 22px; }
.form-head p { color: var(--muted); margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 16px; }
.form-grid .field { grid-column: span 2; }
.form-grid .span-2 { grid-column: span 4; }
.form-grid fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.radio-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 4px; }
.radio-card { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-size: .92rem; }
.radio-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.radio-card input { width: auto; margin: 0; accent-color: var(--accent); }
.radio-card .price { margin-left: auto; font-family: var(--mono); color: var(--muted); font-size: .85rem; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; margin: 8px 0 4px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.check > span > span { display: block; }
.check .private-only { margin-top: 4px; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
body:not(.is-business) .business-only { display: none; }
body.is-business .private-only { display: none !important; }
.form-error { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: .92rem; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.form-total { font-size: .95rem; color: var(--muted); }
.form-total strong { color: var(--ink); font-size: 1.2rem; font-family: var(--mono); }
.form-total .sub { display: block; font-size: .82rem; }
.form-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 16px; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.order-success { margin-top: 40px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 24px; background: var(--ok-soft); }
.order-success svg { width: 56px; height: 56px; color: var(--ok); margin: 0 auto 14px; }
.order-success:focus { outline: none; }
.order-success.is-neutral { background: var(--surface); }
.order-success.is-neutral svg { display: none; }
.done-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.done-ref { font-size: 1.3rem; font-weight: 700; color: var(--ink); letter-spacing: .05em; }

/* ---------- Materials ---------- */
.material-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.material { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; display: flex; flex-direction: column; }
.material h3 { font-size: 1.3rem; margin-bottom: 4px; }
.material .use { font: 600 .72rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.material p { color: var(--muted); font-size: .93rem; }
.ratings { margin: auto 0 0; display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.rating { display: grid; grid-template-columns: 1fr auto; align-items: center; font-size: .8rem; color: var(--muted); }
.dots { display: flex; gap: 3px; }
.dots i { width: 16px; height: 6px; border-radius: 1px; background: var(--line); }
.dots i.on { background: var(--ink); }
.material .from { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
.material .stock { margin-top: 10px; display: grid; gap: 6px; }
.material .swatch-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); }
.material .swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.material .swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(15,23,32,.2); }
.material .swatches.order i { opacity: .5; border-style: dashed; }

/* ---------- Business ---------- */
.business-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 26px 0 32px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 4px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m4.5 9.2 3 3 6-6.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.checklist strong { color: #fff; }
.usecases { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.usecase { background: var(--ink-2); padding: 22px; }
.usecase span { color: var(--accent-bright); font-size: .78rem; font-weight: 700; display: block; margin-bottom: 10px; letter-spacing: .08em; text-transform: uppercase; }
.usecase p { color: #a7b3c0; font-size: .92rem; margin: 0; }
.usecase-wide { grid-column: 1 / -1; background: #223040; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 600; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 1.5rem/1 var(--font); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-right: 40px; }

/* ---------- Contact & footer ---------- */
.section-contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.contact-intro .contact-card { margin-top: 28px; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--bg); }
.contact-mail { font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 700; color: var(--ink); text-decoration: none; word-break: break-all; }
.contact-mail:hover { color: var(--accent); }
.contact-meta { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }
.site-footer { background: var(--ink); color: #8d9aa8; font-size: .85rem; padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #c2ccd6; text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---------- No file / CAD help ---------- */
.hero-nofile { margin: -26px 0 40px; font-size: .95rem; }
.hero-nofile a { color: #dbe2e9; text-decoration-color: var(--accent-bright); }
.hero-nofile a:hover { color: #fff; }
.nofile-card { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.nofile-card svg { width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; }
.nofile-card p { margin: 0; font-size: .92rem; color: var(--muted); flex: 1; }
.nofile-card strong { color: var(--ink); }
.section-cad { background: #eef1f4; border-bottom: 1px solid var(--line); }
.cad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.tags { list-style: none; padding: 0; margin: 4px 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .85rem; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-3); }
.cad-intro .fineprint { margin-top: 16px; }
.cad-steps { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.cad-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 20px 0 6px; border-bottom: 1px solid var(--line-strong); }
.cad-steps h3 { margin-bottom: 4px; }
.cad-steps p { color: var(--muted); font-size: .95rem; }

/* ---------- Contact form ---------- */
.contact-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 28px; }
.contact-form fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.cf-hint { margin: 0 0 16px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .9rem; color: var(--text); }
.field-label { font-size: .8rem; font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }
.attach-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.attach-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.attach-list:empty { display: none; }
.attach-list li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .88rem; }
.attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.attach-size { color: var(--muted); font-size: .8rem; }
.contact-form .fineprint { margin: 4px 0 0; }
.contact-form .form-actions { justify-content: flex-start; }
.contact-success { text-align: center; padding: 32px 12px; }
.contact-success svg { width: 52px; height: 52px; color: var(--ok); margin: 0 auto 14px; }
.contact-success:focus { outline: none; }

/* ---------- Legal pages ---------- */
html[lang="en"] [data-lang="sv"], html[lang="sv"] [data-lang="en"] { display: none; }
.legal { padding: 64px 0 96px; background: var(--surface); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .6em; }
.legal h2 { font-size: 1.25rem; margin: 2em 0 .5em; }
.legal p, .legal li { color: #2f3a46; }
.legal ul { padding-left: 1.2em; }
.legal .back { display: inline-block; margin-bottom: 28px; font-size: .9rem; }

/* ---------- Responsive ---------- */
/* Six nav items don't fit next to the brand below ~1120px: use the menu button instead. */
@media (max-width: 1120px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
    box-shadow: 0 12px 24px rgba(15, 23, 32, .08);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 960px) {
  :root { --gutter: 20px; }
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .drawing { max-width: 520px; }
  .spec-strip { grid-template-columns: repeat(2, auto); gap: 18px 0; }
  .spec-strip div:nth-child(2) { border-right: 0; margin-right: 0; padding-right: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .quote-grid { grid-template-columns: 1fr; }
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-side { position: static; }
  .business-grid, .contact-grid, .cad-grid { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 72px 0; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 60px; }
  body { font-size: 15.5px; }
  .brand-word { font-size: .78rem; letter-spacing: .1em; }
  .brand-mark { width: 26px; height: 26px; }
  .header-actions .btn-primary { display: none; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .spec-strip div { padding-right: 16px; margin-right: 16px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 18px 0 4px; border-left: 0; border-top: 1px solid var(--line); }
  .steps li:first-child { border-top: 0; }
  .viewer { height: 280px; }
  .dropzone { min-height: 260px; }
  .part-controls { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field, .form-grid .span-2 { grid-column: 1 / -1; }
  .order-form { padding: 20px 16px; }
  .form-actions .btn { width: 100%; }
  .usecases { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .contact-panel { padding: 20px 16px; }
  .nofile-card { flex-wrap: wrap; }
  .nofile-card .btn { width: 100%; }
  .hero-nofile { margin-top: -28px; }
  .material-grid { grid-template-columns: 1fr; }
  .title-block { grid-template-columns: repeat(2, 1fr); }
  .title-block span:nth-child(2) { border-right: 0; }
  .title-block span:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.14); }
  .section { padding: 60px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Inline messages from the quote tool (rejected files etc.) */
.quote-msg { margin-bottom: 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: .9rem; }
.quote-msg p { margin: 0; }
.quote-msg p + p { margin-top: 4px; }
