/* M3 diagnostic modal. White and ink, Brand Red #EF4136. No motion. */
.m3-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(12, 13, 14, 0.55);
  padding: 0;
}
.m3-overlay[hidden] { display: none; }
.m3-dialog {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #fff;
  color: #111827;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  border-radius: 16px 16px 0 0;
}
.m3-dialog > form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.m3-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px 16px; max-width: 100%; }
.m3-form .m3-body { padding-bottom: 28px; }
.m3-actions { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 16px; border-top: 1px solid #E5E7EB; background: #fff; }
.m3-actions .m3-next, .m3-actions .m3-consult, .m3-actions button { width: 100%; min-height: 44px; }
.m3-consult { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #D1D5DB; border-radius: 8px; color: #111827; text-decoration: none; }
.m3-progress { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 10px 22px 8px; min-height: 28px; }
.m3-rail, .m3-rail-fill { position: absolute; left: 28px; top: 50%; height: 2px; transform: translateY(-50%); }
.m3-rail { right: 28px; background: #E5E7EB; }
.m3-rail-fill { background: #111827; max-width: calc(100% - 56px); }
.m3-progress i { position: relative; z-index: 1; width: 10px; height: 10px; border-radius: 50%; border: 1.75px solid #111827; background: #fff; display: block; }
.m3-progress i.done { background: #111827; border-color: #111827; }
.m3-progress i.current { width: 14px; height: 14px; background: #DC2626; border: 2px solid #DC2626; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #DC2626; }
.m3-progress i.future { background: #fff; border-color: #9CA3AF; }
.m3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.m3-intro { font-size: 12px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: #DC2626; margin: 0 0 8px; }
.m3-choice.is-on { box-shadow: inset 0 0 0 1px #111827; border-color: #111827; }
.m3-route { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 8px; padding: 8px; margin: 0 0 12px; max-width: 100%; }
.m3-route img, #m3-cal, #m3-cal iframe { max-width: 100%; }
.m3-route-hero { display: flex; gap: 8px; }
.m3-art { width: 200px; max-width: 46%; flex: none; }
.m3-labs { position: relative; list-style: none; margin: 0; padding: 0; min-height: 200px; flex: 1; }
.m3-labs li { position: absolute; left: 0; right: 0; font-size: 12px; line-height: 15px; color: #4B5563; }
.m3-labs li.is-on { color: #111827; font-weight: 600; }
.m3-booking-h { font-size: 1.15rem; line-height: 1.3; margin: 8px 0; }
.m3-booking-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.m3-ghost { min-width: 44px; min-height: 44px; border: 0; background: none; color: #4B5563; font: inherit; }
.m3-bar { padding: 4px 8px; }
.m3-ferr { color: #DC2626; font-size: 13px; line-height: 18px; margin: 6px 0 0; }
.m3-field.is-err input { border-color: #DC2626; }
.m3-confirm { position: absolute; inset: 0; background: rgba(17,24,39,.45); display: flex; align-items: flex-end; z-index: 5; }
.m3-confirm-panel { background: #fff; width: 100%; padding: 20px 16px; border-radius: 12px 12px 0 0; }
.m3-confirm-panel button { width: 100%; min-height: 44px; margin-top: 8px; }
.m3-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.m3-bypass, .m3-close, .m3-choice, .m3-next, .m3-row button {
  font: inherit;
  cursor: pointer;
}
.m3-bypass {
  color: #111;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.m3-bar .m3-bypass,
.m3-bar [data-m3-back],
.m3-bar [data-m3-close] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
}
.m3-close, .m3-row button, .m3-next {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  padding: 10px 14px;
}
.m3-next, .m3-row button[type="submit"] {
  background: #ef4136;
  border-color: #ef4136;
  color: #fff;
}
.m3-dialog h2 {
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 12px;
}
.m3-dialog p, .m3-dialog label {
  font-size: 1rem;
  line-height: 1.45;
  margin: 0 0 12px;
}
.m3-intro:empty { display: none; }
.m3-nodes {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0 0 16px;
  padding: 8px 0 0;
}
.m3-nodes li {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
}
.m3-nodes li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e5e7eb;
}
.m3-node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #111;
  background: #fff;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
.m3-nodes li[data-state="done"] .m3-node,
.m3-nodes li[data-state="current"] .m3-node {
  background: #ef4136;
  border-color: #ef4136;
}
.m3-node-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.m3-choice {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  min-height: 56px;
  margin: 0 0 8px;
  padding: 14px;
  border: 1px solid #111;
  border-radius: 12px;
  background: #fff;
  color: #111;
  overflow-wrap: anywhere;
}
.m3-choice[aria-checked="true"] { box-shadow: inset 0 0 0 2px #ef4136; }
.m3-observation {
  border-left: 3px solid #ef4136;
  padding-left: 12px;
}
.m3-route {
  border: 1px solid #111;
  border-top: 4px solid #ef4136;
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 16px;
  background: #fff;
}
.m3-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.m3-dialog input[type="text"],
.m3-dialog input[type="email"],
.m3-dialog input[type="tel"],
.m3-dialog select {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid #111;
  border-radius: 8px;
  margin: 0 0 12px;
  background: #fff;
  color: #111;
}
.m3-consent { display: flex; gap: 10px; align-items: flex-start; }
.m3-consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.m3-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.m3-row { display: flex; flex-wrap: wrap; gap: 8px; }
.m3-row button { flex: 1 1 auto; }
#m3-errors { color: #9b1c1c; }
#m3-cal { width: 100%; max-width: 100%; min-height: 0; }
#m3-cal:not(.is-loaded) { height: 0; min-height: 0; overflow: hidden; }
#m3-cal.is-loaded { min-height: 420px; height: auto; overflow: visible; }
#m3-cal iframe { max-width: 100%; border: 0; }
#m3-cal.is-loaded iframe { width: 100%; min-height: 420px; }
.m3-confirm {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #111;
  border-radius: 12px;
  background: #fff;
}
html.m3-open, html.m3-open body { overflow: hidden; }
@media (max-width: 960px) {
  html.m3-ready #diagnostic .form-card { display: none; }
  html.m3-ready #diagnostic .m3-mobile-open { display: block; }
}
.m3-mobile-open { display: none; margin-top: 16px; }
@media (min-width: 961px) {
  .m3-overlay { align-items: center; padding: 24px; }
  .m3-dialog {
    width: min(640px, 100%);
    height: min(88dvh, 840px);
    max-height: min(88dvh, 840px);
    border-radius: 12px;
  }
}
