* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, sans-serif;
  color: #1b1f23;
  background: #f5f6f8;
}

header {
  padding: 20px 32px;
  background: #1b1f23;
  color: #fff;
}
header h1 { margin: 0; font-size: 22px; letter-spacing: 0.5px; }
.subtitle { margin: 4px 0 0; font-size: 13px; opacity: 0.7; }

main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px 32px;
}

.controls {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 20px;
}
.controls h2 { margin: 0 0 16px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: #586069; }

.controls label {
  display: block;
  font-size: 12px;
  color: #586069;
  margin-bottom: 14px;
}
.controls input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #d1d5da;
  border-radius: 4px;
  font-family: inherit;
}
.controls input:focus { outline: none; border-color: #0366d6; box-shadow: 0 0 0 3px rgba(3,102,214,0.15); }

.errors {
  list-style: none;
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #ffeef0;
  border: 1px solid #f9c8ce;
  border-radius: 4px;
  color: #86181d;
  font-size: 12px;
}
.errors li + li { margin-top: 4px; }

.drawing {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#profile {
  width: 100%;
  max-width: 1100px;
  height: 78vh;
  display: block;
}

/* SVG drawing styles */
.profile-fill {
  fill: #cfd8e3;
  stroke: #1b1f23;
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.dim-line, .dim-witness {
  stroke: #0366d6;
  stroke-width: 0.6;
  fill: none;
}
.dim-witness { stroke-dasharray: 2 2; }
.dim-text {
  fill: #0366d6;
  font-family: -apple-system, Segoe UI, sans-serif;
  text-anchor: middle;
  dominant-baseline: middle;
}
.dim-arrow { fill: #0366d6; }
