/* Measurement guide — shared brand tokens, isolated from the room editor. */
.mg-page { color: var(--navy-900); background: var(--warm-50); line-height: 1.7; }
.mg-page * { box-sizing: border-box; }
.mg-page [hidden] { display: none !important; }
.mg-page :focus-visible { outline: 3px solid var(--gold-600); outline-offset: 4px; }
.mg-shell { width: min(1180px, 100% - 40px); margin: auto; }
.mg-page h1, .mg-page h2, .mg-page h3 { line-height: 1.15; font-weight: 750; }
.mg-page h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); max-width: 850px; margin: 20px 0; }
.mg-page h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 12px 0 20px; }
.mg-page h3 { font-size: 1.45rem; margin: 12px 0 20px; }
.mg-page p { margin: 12px 0; }
.mg-page a:not(.mg-button) { text-decoration: underline; text-underline-offset: 4px; }
.mg-eyebrow { font-size: .72rem; font-weight: 750; letter-spacing: .15em; }
.mg-hero { padding: 70px 0; background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: white; }
.mg-page .mg-hero h1, .mg-page .mg-hero p,
.mg-page .mg-cta h2, .mg-page .mg-cta p { color: white; }
.mg-hero .mg-eyebrow, .mg-cta .mg-eyebrow { color: #fde047; }
.mg-hero p { max-width: 700px; font-size: 1.15rem; }
.mg-page .mg-small { font-size: .85rem; }
.mg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0; }
.mg-button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; padding: 12px 20px; min-height: 48px; border: 1px solid #bcccdc; border-radius: var(--rounded-btn, .5rem); color: var(--navy-900); background: white; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; transition: background .2s, transform .2s; }
.mg-button:hover { background: #f0f4f8; transform: translateY(-2px); }
.mg-gold { background: #eab308; border-color: #eab308; }
.mg-gold:hover { background: #fde047; }
.mg-outline { background: transparent; border-color: #bcccdc; color: white; }
.mg-outline:hover { color: var(--navy-900); }
.mg-primary, .mg-diagram-button[aria-pressed="true"] { background: var(--navy-900); color: white; }
.mg-primary:hover, .mg-diagram-button[aria-pressed="true"]:hover { background: var(--navy-700); }
.mg-prep, .mg-checklist-section { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 60px 0; }
.mg-note { background: #f5f5f4; border-left: 3px solid var(--gold-600); padding: 24px; border-radius: 0 12px 12px 0; }
.mg-guide { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start; scroll-margin-top: 110px; }
.mg-step { padding: 30px 0; border-bottom: 1px solid #d6d3d1; scroll-margin-top: 110px; }
.mg-number { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fef9c3; color: #713f12; font-weight: 750; }
.mg-step ol { list-style: decimal; padding-left: 24px; }
.mg-step li { margin: 12px 0; padding-left: 4px; }
.mg-visual { position: sticky; top: 110px; }
.mg-diagram { background: white; padding: 24px 16px; border: 1px solid #e7e5e4; border-radius: 16px; box-shadow: 0 10px 40px -10px rgba(15, 23, 42, .12); margin-bottom: 24px; }
.mg-diagram svg { width: 100%; height: auto; }
.mg-diagram figcaption { border-top: 1px solid #e7e5e4; padding-top: 16px; font-weight: 600; }
.mg-layer { display: none; fill: #854d0e; }
.mg-layer text { text-anchor: middle; font-size: 14px; font-family: inherit; }
.mg-layer path, .mg-layer rect, .mg-layer circle { stroke: #a16207; stroke-width: 2; fill: none; }
.mg-diagram[data-view="walls"] [data-layer="walls"],
.mg-diagram[data-view="heights"] [data-layer="heights"],
.mg-diagram[data-view="utilities"] [data-layer="utilities"],
.mg-diagram[data-view="appliances"] [data-layer="appliances"] { display: inline; }
.mg-diagram .mg-trace { stroke-dasharray: 900; stroke-dashoffset: 0; animation: mg-draw .8s ease-out; }
@keyframes mg-draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
.mg-check-section { padding: 36px; background: white; border: 1px solid #e7e5e4; border-radius: 16px; margin-top: 60px; }
.mg-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.mg-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.mg-field input, .mg-field select { width: 100%; min-width: 0; border: 1px solid #829ab1; background: white; color: var(--navy-900); border-radius: 6px; padding: 12px; font: inherit; }
.mg-field input[aria-invalid="true"] { border: 2px solid #b91c1c; }
#measure-result { min-height: 2em; font-weight: 650; }
.mg-checklist label { display: flex; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid #d6d3d1; cursor: pointer; }
.mg-checklist input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 3px; accent-color: var(--navy-900); }
.mg-faq { padding: 20px 0 50px; }
.mg-faq details { border-bottom: 1px solid #d6d3d1; padding: 18px 0; }
.mg-faq summary { cursor: pointer; font-weight: 700; }
.mg-cta { background: var(--navy-900); color: white; padding: 44px; border-radius: 16px; margin-bottom: 60px; }
@media (max-width: 800px) {
  .mg-prep, .mg-guide, .mg-checklist-section { grid-template-columns: 1fr; gap: 28px; }
  .mg-visual { position: static; }
  .mg-guide.mg-enhanced .mg-visual { grid-row: 1; }
  .mg-hero { padding: 45px 0; }
  .mg-check-section, .mg-cta { padding: 24px; }
}
@media (max-width: 480px) { .mg-fields { grid-template-columns: 1fr; } .mg-shell { width: calc(100% - 32px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mg-page *, .mg-page *::before, .mg-page *::after { animation: none !important; transition: none !important; }
  .mg-button:hover { transform: none; }
}
@media print {
  body > nav, body > footer, body > header, .mg-page nav, #measure-print, #measure-return, .mg-diagram-button, .mg-actions, #measure-check, #measure-progress { display: none !important; }
  body > :not(main):not(script):not(style) { display: none !important; }
  .mg-page, .mg-hero, .mg-cta { background: white; color: black; }
  .mg-page .mg-hero h1, .mg-page .mg-hero p,
  .mg-page .mg-cta h2, .mg-page .mg-cta p { color: black; }
  .mg-shell { width: 100%; }
  .mg-hero, .mg-prep, .mg-checklist-section, .mg-faq, .mg-cta { padding: 16px 0; margin: 0; }
  .mg-page h1 { font-size: 28pt; }
  .mg-page h2 { font-size: 20pt; }
  .mg-eyebrow { color: black !important; }
  .mg-guide, .mg-prep, .mg-checklist-section { display: block; }
  .mg-visual { position: static; }
  .mg-diagram { max-width: 420px; box-shadow: none; break-inside: avoid; }
  .mg-step, .mg-checklist { break-inside: avoid; }
  .mg-check-section { margin: 16px 0; padding: 16px; }
  .mg-faq details > * { display: block; }
}
