:root {
  color: #1f2523;
  background: #f4f5f2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #1f2523;
  --muted: #5d6864;
  --line: #d9dfdb;
  --surface: #fff;
  --surface-soft: #eef1ed;
  --blue: #1677c8;
  --green: #2f8f5b;
  --metal: #2b3330;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  background:
    linear-gradient(rgba(31, 37, 35, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 37, 35, .04) 1px, transparent 1px),
    linear-gradient(180deg, #f7f8f4 0%, #edf1ed 48%, #f6f7fb 100%);
  background-size: 42px 42px, 42px 42px, auto;
  color: var(--ink);
  font-size: 15px;
}
a { color: inherit; text-underline-offset: 4px; }
button, input, summary { cursor: pointer; }
button { color: inherit; font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, canvas:focus-visible {
  outline: 3px solid rgba(22, 119, 200, .35);
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--metal);
  color: #fff;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-14px);
}
.skip-link:focus { opacity: 1; transform: translateY(0); }
.topbar {
  min-height: 86px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  padding: 8px max(24px, 4vw);
  background: rgba(247, 248, 244, .88);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; width: fit-content; align-items: center; text-decoration: none; }
.brand img { display: block; width: 133px; height: auto; }
.study-label { font-size: 10px; letter-spacing: 1.8px; color: #748079; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.back { font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.language-switcher { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .7); }
.language-switcher button { min-width: 34px; border: 0; border-radius: 6px; padding: 7px 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 850; }
.language-switcher button[aria-pressed="true"] { background: var(--metal); color: #fff; }
main { max-width: 1600px; padding: 0 40px; margin: auto; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: 44px 0 32px; }
.eyebrow { margin: 0 0 14px; color: #607168; font-size: 10px; font-weight: 850; letter-spacing: 1.7px; }
h1 { margin: 0; font-size: clamp(40px, 4.6vw, 66px); font-weight: 780; line-height: .98; letter-spacing: -2.6px; }
h1 em { color: var(--blue); font-style: normal; }
.intro > p { max-width: 390px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 28px; }
.viewport {
  position: relative;
  min-width: 0;
  height: clamp(520px, calc(100svh - 275px), 760px);
  min-height: 0;
  overflow: hidden;
  align-self: start;
  border: 1px solid #cfd9d3;
  border-radius: 18px;
  background: #e9eeea;
  box-shadow: 0 22px 60px rgba(31, 37, 35, .08);
}
.canvas-holder { position: absolute; inset: 0; touch-action: none; }
.canvas-holder canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.loading { position: absolute; top: 48%; width: 100%; color: #536c62; text-align: center; }
.view-tag {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #52665c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  pointer-events: none;
}
.view-tag > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.view-tag small { margin-left: 15px; color: #6b7e75; font-size: 11px; font-weight: 600; letter-spacing: 0; }
.toolbar { position: absolute; left: 24px; right: 24px; bottom: 70px; z-index: 1; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.toolbar button, .bottom-tools button {
  border: 1px solid #c6d2ca;
  border-radius: 7px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, .88);
  color: #365445;
  font-size: 11px;
  backdrop-filter: blur(6px);
}
.toolbar button[aria-pressed="true"], .bottom-tools button[aria-pressed="true"] { border-color: var(--metal); background: var(--metal); color: #fff; }
.bottom-tools { position: absolute; right: 24px; bottom: 19px; left: 24px; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 17px; }
.bottom-tools button { border: 0; padding: 6px; background: transparent; }
.bottom-tools label { display: flex; align-items: center; gap: 5px; color: #58766b; font-size: 11px; }
.bottom-tools input { accent-color: var(--blue); }
.part-title { border-bottom: 1px solid var(--line); padding: 4px 0 20px; }
.part-title .eyebrow { margin-bottom: 10px; font-size: 9px; }
h2 { margin: 0 0 10px; font-size: 29px; line-height: 1; letter-spacing: -.8px; }
.part-title > span { color: #6d7873; font-size: 11px; }
.measures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-bottom: 1px solid var(--line); padding: 21px 0; }
.measures strong { display: block; font-size: 32px; font-weight: 700; letter-spacing: -1.6px; }
.measures span { display: block; margin-top: 5px; color: #66746d; font-size: 10px; }
.features { list-style: none; margin: 24px 0; padding: 0; }
.features li { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.features b { display: grid; width: 35px; min-width: 35px; height: 35px; place-items: center; border-radius: 7px; background: #e0e8e2; color: var(--green); font-size: 18px; }
.features strong { display: block; margin: 2px 0 6px; font-size: 12px; }
.features span { display: block; color: #68766f; font-size: 11px; line-height: 1.55; }
.download .primary { display: flex; justify-content: space-between; align-items: center; border-radius: 8px; padding: 15px 20px; background: var(--metal); color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; }
.download .primary:hover { background: var(--blue); }
.download > div { display: flex; justify-content: center; gap: 17px; margin: 15px 0 24px; font-size: 10px; }
details { border-top: 1px solid var(--line); padding: 16px 0; color: #596963; font-size: 11px; }
summary { color: #314d41; font-weight: 800; }
details p, details li { line-height: 1.75; }
details ul { padding-left: 19px; }
details li { margin-bottom: 8px; }
.drawing { width: 100%; height: auto; margin-top: 16px; border-radius: 8px; background: #fff; }
.provenance-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 22px 0 8px; }
.provenance { margin: 0; color: #65766e; font-size: 10px; line-height: 1.8; }
.provenance a { margin-left: 8px; font-weight: 700; }
.product-cta { border-radius: 8px; padding: 12px 16px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
#status { min-height: 18px; color: #405d4f; font-size: 12px; }
.safety-note { border-left: 3px solid #94a09a; padding-left: 12px; color: #68736e; font-size: 11px; line-height: 1.6; }
footer { display: flex; justify-content: space-between; gap: 20px; max-width: 1600px; margin: 38px auto 0; border-top: 1px solid var(--line); padding: 28px 40px 36px; color: var(--muted); font-size: 11px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

@media (min-width: 1500px) { .viewport { min-height: 710px; } }
@media (max-width: 1100px) {
  .workbench { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
  main { padding: 0 25px; }
  .intro > p { max-width: 330px; }
}
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .study-label { display: none; }
  .header-actions { gap: 10px; }
  .back { font-size: 0; }
  .back::after { content: "←"; font-size: 20px; }
  .intro { display: block; padding: 30px 0 25px; }
  .intro > p { max-width: none; margin-top: 20px; }
  .workbench { grid-template-columns: 1fr; }
  .viewport { height: 550px; }
  aside { display: block; padding: 10px 5px; }
  .provenance-row { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .topbar { min-height: 74px; padding: 7px 16px; }
  .brand img { width: 108px; }
  .header-actions { gap: 7px; }
  .language-switcher button { min-width: 30px; padding: 7px 6px; }
  main { padding: 0 16px; }
  h1 { font-size: clamp(38px, 13vw, 54px); }
  .viewport { height: min(550px, 69svh); min-height: 470px; border-radius: 13px; }
  .view-tag { top: 20px; left: 18px; }
  .view-tag small { margin-left: 3px; font-size: 10px; }
  .toolbar { right: 10px; bottom: 69px; left: 10px; gap: 4px; }
  .toolbar button { padding: 9px 8px; font-size: 10px; }
  .bottom-tools { right: 10px; left: 10px; gap: 5px; }
  .bottom-tools button, .bottom-tools label { font-size: 10px; }
  footer { flex-direction: column; margin-top: 30px; padding: 24px 18px 32px; }
}
