/* Factory map product demo: isolated styles, shared site typography. */
.fmx {
  --fmx-ink: #173b52;
  --fmx-muted: #526b7b;
  --fmx-line: #dce5eb;
  --fmx-teal: #0b7188;
  color: var(--fmx-ink);
  font-family: Inter, Arial, sans-serif;
  text-align: left;
  background: #fff;
  border: 1px solid #cedce5;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 55px -26px #123c5840;
}
.fmx *, .fmx *::before, .fmx *::after { box-sizing: border-box; }
.fmx [hidden] { display: none !important; }
.fmx button { font: inherit; cursor: pointer; }
.fmx button:focus-visible, .fmx summary:focus-visible, .fmx-outcome a:focus-visible { outline: 3px solid #0784a0; outline-offset: 4px; }
.fmx-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px; background: #12384f; color: #fff; }
.fmx-eyebrow { display: block; font-size: 10px; font-weight: 600; letter-spacing: .09em; line-height: 1.5; color: #5b7586; }
.fmx-heading .fmx-eyebrow { color: #adc8d5; }
.fmx h3 { font: 600 25px/1.3 Inter, Arial, sans-serif; letter-spacing: -.035em; margin: 7px 0 0; color: inherit; }
.fmx-time { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #d1e0e8; white-space: nowrap; }
.fmx-time time { display: block; font-size: 17px; font-weight: 500; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: #fff; margin-top: 3px; }
.fmx-pulse { width: 7px; height: 7px; border-radius: 50%; background: #8fa8b5; }
.fmx.is-playing .fmx-pulse { background: #78d0c2; animation: fmxPulse 2s ease-in-out infinite; }
.fmx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; border-bottom: 1px solid var(--fmx-line); }
.fmx-location strong { display: block; font-size: 13px; font-weight: 600; }
.fmx-location>span { display: block; font-size: 11px; color: var(--fmx-muted); margin-top: 3px; }
.fmx-view-switch { display: flex; gap: 3px; padding: 4px; border-radius: 10px; background: #edf2f5; }
.fmx-view-switch button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 13px; min-height: 38px; border: 0; border-radius: 7px; background: transparent; color: #4a6475; font-size: 12px; font-weight: 600; transition: background .2s, color .2s; }
.fmx-view-switch button[aria-pressed=true] { background: #fff; color: #163d55; box-shadow: 0 1px 5px #163d511a; }
.fmx-view-switch svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.fmx-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.fmx-overview { min-width: 0; display: flex; flex-direction: column; background: #f6f9fa; }
.fmx-viewport { min-width: 0; position: relative; }
.fmx-plan, .fmx-camera { position: relative; width: 100%; overflow: hidden; aspect-ratio: 1672/941; }
.fmx-plan { min-height: 380px; }
.fmx-blueprint { position: absolute; inset: 0; width: 100%; height: 100%; }
.fmx-zone { position: absolute; top: 5%; transform: translateX(-50%); font-size: 10px; font-weight: 600; letter-spacing: .06em; color: #486778; white-space: nowrap; }
.fmx-zone-left { left: 23%; }
.fmx-zone-right { left: 77%; }
.fmx [data-state=work] { --status: #248064; }
.fmx [data-state=setup] { --status: #98672c; }
.fmx [data-state=control] { --status: #496ea1; }
.fmx [data-state=offline] { --status: #77838e; }
.fmx-marker { --status: #248064; position: absolute; transform: translate(-50%, -50%); z-index: 1; width: 140px; min-height: 74px; padding: 10px 14px; border: 1px solid #bacbd6; border-radius: 9px; background: #fff; color: #24475e; text-align: left; box-shadow: 0 4px 12px #163c4e0b; transition: box-shadow .2s, border-color .2s, background .2s; }
.fmx-marker b { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; }
.fmx-marker b:before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--status); flex-shrink: 0; }
.fmx-marker span { display: block; font-size: 11px; margin-top: 4px; }
.fmx-marker small { display: block; font-size: 10px; color: #597485; margin-top: 3px; }
.fmx-marker[aria-pressed=true] { border-color: #0b7891; box-shadow: 0 0 0 3px #0b78912b, 0 4px 12px #123e5915; z-index: 2; }
.fmx-marker:hover { border-color: #0b7891; }
.fmx-camera { background: #17303e; }
.fmx-camera>img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.fmx-camera-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #0b23336b, transparent 24%, transparent 66%, #0b2333cf); pointer-events: none; }
.fmx-camera-caption { position: absolute; left: 22px; top: 18px; right: 22px; display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #fff; text-shadow: 0 1px 3px #0006; }
.fmx-camera-caption>span:first-child { letter-spacing: .12em; font-weight: 600; }
.fmx-camera .fmx-marker { min-height: 44px; min-width: 64px; width: auto; padding: 8px 12px; border: 1px solid #ffffffb3; border-radius: 24px; background: #173445ee; color: #fff; box-shadow: 0 4px 18px #00152242; }
.fmx-camera .fmx-marker b { font-size: 12px; letter-spacing: .01em; }
.fmx-camera .fmx-marker b:before { width: 8px; height: 8px; border: 1px solid #ffffffc2; }
.fmx-camera .fmx-marker span { display: none; }
.fmx-camera .fmx-marker:after { content: ''; position: absolute; width: 1px; height: 15px; left: 50%; top: 100%; background: #ffffffb3; }
.fmx-camera .fmx-marker[aria-pressed=true] { background: #fff; color: #16445a; border-color: #fff; box-shadow: 0 0 0 4px #ffffff38, 0 4px 20px #061e3652; }
.fmx-camera .fmx-marker:hover { background: #0c6078; color: #fff; }
.fmx-camera-note { position: absolute; bottom: 20px; left: 22px; right: 22px; display: flex; align-items: center; gap: 12px; color: #fff; font-size: 14px; pointer-events: none; }
.fmx-camera-note small { display: block; font-size: 11px; color: #d8e4ea; margin-top: 4px; }
.fmx-camera-cursor { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #ffffff6b; border-radius: 50%; font-size: 20px; }
.fmx-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 22px; padding: 18px 20px; flex: 1; font-size: 11px; color: #476477; }
.fmx-legend span { display: flex; align-items: center; gap: 7px; }
.fmx-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--status); }
.fmx-detail { padding: 21px; border-left: 1px solid var(--fmx-line); min-width: 0; background: #fff; font-size: 12px; line-height: 1.5; }
.fmx-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fmx-detail-top .fmx-eyebrow { font-size: 9px; letter-spacing: .07em; }
.fmx-status { color: var(--status, #248064); font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.fmx-status:before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fmx-detail h4 { font: 600 19px/1.4 Inter, Arial, sans-serif; letter-spacing: -.035em; color: var(--fmx-ink); margin: 10px 0 4px; }
.fmx-muted { font-size: 11px; color: var(--fmx-muted); line-height: 1.6; margin: 0; }
.fmx-machine-heading>.fmx-muted { display: none; }
.fmx-person { display: flex; align-items: center; gap: 11px; margin: 15px 0; }
.fmx-person .fmx-field-label { display: none; }
.fmx-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border: 1px solid #d4e1e8; border-radius: 50%; background: #e9f1f5; color: #385d74; font-size: 16px; font-weight: 500; }
.fmx-person>div { display: flex; flex-direction: column; min-width: 0; }
.fmx-person strong { font-size: 13px; font-weight: 600; line-height: 1.6; }
.fmx-field-label { display: block; color: var(--fmx-muted); font-size: 11px; line-height: 1.5; }
.fmx-current { border-left: 3px solid #168299; padding: 13px 14px; background: #eff6f8; border-radius: 0 8px 8px 0; }
.fmx-current>strong { display: block; font-size: 13px; line-height: 1.5; font-weight: 600; margin: 5px 0; }
.fmx-current>span:not(.fmx-field-label) { font-size: 12px; color: #436073; }
.fmx-current-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; margin-top: 10px; font-size: 10px; color: #4d6b7e; }
.fmx-current-bottom strong { font-size: 12px; font-weight: 600; color: #1d5066; }
.fmx-queue { margin-top: 17px; }
.fmx-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.fmx-queue-heading h5 { font: 600 12px/1.5 Inter, Arial, sans-serif; margin: 0; color: #173b52; }
.fmx-queue-heading>span { font-size: 10px; color: var(--fmx-muted); }
.fmx-queue-item { position: relative; padding: 8px 0 8px 16px; margin-left: 2px; border-left: 1px solid #d5e2e9; }
.fmx-queue-item:before { content: ''; position: absolute; width: 5px; height: 5px; left: -3px; top: 17px; border-radius: 50%; background: #8da8b8; }
.fmx-queue-item>div { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; color: #607a8b; }
.fmx-queue-item strong { display: block; font-size: 12px; line-height: 1.5; font-weight: 600; margin: 3px 0; }
.fmx-queue-item p { font-size: 10px; color: var(--fmx-muted); margin: 0; line-height: 1.5; }
.fmx-skills { margin-top: 5px; padding-top: 6px; border-top: 1px solid var(--fmx-line); font-size: 11px; color: #486678; }
.fmx-skills summary { cursor: pointer; min-height: 36px; padding: 10px 0; font-weight: 500; }
.fmx-skills p { font-size: 11px; line-height: 1.7; margin: 10px 0; }
.fmx-capacity { padding: 9px 0; }
.fmx-capacity>div:first-child { display: flex; align-items: center; justify-content: space-between; }
.fmx-capacity strong { font-weight: 600; }
.fmx-capacity p { margin: 0; font-size: 10px; }
.fmx-load-track { height: 4px; background: #e3ebf0; border-radius: 4px; overflow: hidden; margin: 9px 0 7px; }
.fmx-load-track>span { display: block; height: 100%; width: 83%; background: #368e9e; border-radius: 4px; transition: width .3s; }
.fmx-camera-link { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px; padding: 8px 0; margin: 5px 0 0; border: 0; background: transparent; color: #076e88; font-size: 12px !important; }
.fmx-scene { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px; padding: 25px 28px; border-top: 1px solid var(--fmx-line); background: #f2f7f9; }
.fmx-scene-top { display: flex; align-items: center; gap: 14px; }
.fmx-scene-top>span:last-child { font: 11px 'JetBrains Mono', monospace; color: #3c6d80; }
.fmx-scene h4 { font: 600 19px/1.4 Inter, Arial, sans-serif; letter-spacing: -.025em; color: var(--fmx-ink); margin: 8px 0; }
.fmx-scene p { font-size: 12px; line-height: 1.7; color: #506b7c; margin: 0; max-width: 660px; }
.fmx-scene-progress { display: flex; gap: 6px; margin-bottom: 16px; }
.fmx-scene-progress span { height: 3px; flex: 1; border-radius: 4px; background: #d7e2e9; transition: background .3s; }
.fmx-scene-progress .is-complete { background: #14829a; }
.fmx-event-controls { display: flex; align-items: center; gap: 12px; }
.fmx-next, .fmx-play { min-height: 44px; border-radius: 8px; font-size: 12px !important; font-weight: 600 !important; white-space: nowrap; }
.fmx-next { padding: 11px 16px; background: #133e58; border: 1px solid #133e58; color: #fff; }
.fmx-next:hover { background: #1c526e; }
.fmx-next span { margin-left: 10px; }
.fmx-play { padding: 10px 8px; color: #345c73; border: 1px solid transparent; background: transparent; }
.fmx-play:hover, .fmx-play[aria-pressed=true] { color: #076b84; background: #e3eef3; }
.fmx-bottom { padding: 13px 28px; border-top: 1px solid var(--fmx-line); font-size: 10px; line-height: 1.7; color: #5f7585; background: #fff; }
.fmx-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.fmx-noscript { padding: 20px; }
.fmx-outcome { margin-top: 32px; display: flex; gap: 30px; align-items: center; justify-content: space-between; padding: 6px 2px 24px; border-bottom: 1px solid #d7e3e9; color: #193c53; }
.fmx-outcome>div { max-width: 710px; }
.fmx-outcome h3 { font: 600 22px/1.45 Inter, Arial, sans-serif; letter-spacing: -.025em; margin: 7px 0 10px; color: #193c53; }
.fmx-outcome p { font: 13px/1.8 Inter, Arial, sans-serif; color: #536d7e; margin: 0; }
.fmx-outcome a { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-shrink: 0; color: #123f5d; padding: 13px 0; font: 600 13px/1.5 Inter, Arial, sans-serif; text-decoration: none; border-bottom: 1px solid #9fb8c9; }
.fmx-outcome a:hover { color: #08728a; border-color: #08728a; }
#factory-map .fm-point { background: transparent; box-shadow: none; border: 0; padding: 20px 12px 12px 0; }
#factory-map .fm-point h4 { font-family: Inter, Arial, sans-serif; font-weight: 600; }
#factory-map .fm-point-ic { display: none; }
@keyframes fmxPulse { 50% { opacity: .35; } }
@media (max-width: 1100px) {
  .fmx-workspace { grid-template-columns: minmax(0,1fr) 310px; }
  .fmx-detail { padding: 19px; }
  .fmx-plan { min-height: 365px; }
  .fmx-outcome { align-items: flex-start; flex-direction: column; gap: 14px; }
  .fmx-scene { gap: 22px; }
  .fmx-event-controls { flex-direction: column; gap: 2px; }
}
@media (max-width: 1100px) {
  .fmx-workspace { grid-template-columns: 1fr; }
  .fmx-detail { padding: 24px; border-left: 0; border-top: 1px solid var(--fmx-line); display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px 28px; }
  .fmx-machine-heading { grid-column: 1; }
  .fmx-person { grid-column: 1; margin: 0; }
  .fmx-current { grid-column: 2; grid-row: 1/3; align-self: start; }
  .fmx-queue { grid-column: 2; grid-row: 3/6; margin: 0; }
  .fmx-skills { grid-column: 1; margin: 0; }
  .fmx-camera-link { grid-column: 1; margin: 0; align-self: start; }
  .fmx-plan { min-height: 400px; }
  .fmx-legend { padding: 18px; }
  .fmx-scene { grid-template-columns: 1fr; gap: 20px; }
  .fmx-scene-actions { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
  .fmx-scene-progress { flex: 1; max-width: 200px; margin: 0; }
  .fmx-event-controls { flex-direction: row; gap: 8px; }
}
@media (max-width: 600px) {
  .fmx { border-radius: 15px; }
  .fmx-heading { padding: 20px; gap: 12px; }
  .fmx-heading .fmx-eyebrow { font-size: 8px; letter-spacing: .06em; }
  .fmx h3 { font-size: 21px; max-width: 220px; }
  .fmx-time { font-size: 9px; gap: 5px; }
  .fmx-time time { font-size: 12px; }
  .fmx-pulse { width: 5px; height: 5px; }
  .fmx-toolbar { padding: 13px 15px; display: block; }
  .fmx-location { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
  .fmx-location strong { font-size: 11px; }
  .fmx-location>span { font-size: 10px; margin: 0; }
  .fmx-view-switch button { flex: 1; min-height: 40px; }
  .fmx-camera-caption { top: 10px; left: 12px; right: 12px; font-size: 8px; }
  .fmx-camera-caption>span:first-child { display: none; }
  .fmx-camera-note { bottom: 12px; left: 13px; right: 13px; gap: 7px; font-size: 10px; }
  .fmx-camera-note small { display: none; }
  .fmx-camera-cursor { width: 21px; height: 21px; font-size: 13px; }
  .fmx-camera .fmx-marker { min-width: 52px; min-height: 36px; padding: 6px 8px; }
  .fmx-camera .fmx-marker b { font-size: 10px; gap: 5px; }
  .fmx-camera .fmx-marker:after { height: 8px; }
  .fmx-camera .fmx-marker b:before { width: 6px; height: 6px; }
  .fmx-camera .fmx-marker[aria-pressed=true] { box-shadow: 0 0 0 3px #ffffff38, 0 3px 12px #061e3652; }
  .fmx-plan { min-height: 350px; }
  .fmx-zone { font-size: 7px; }
  .fmx-plan .fmx-marker { min-height: 72px; width: 104px; padding: 9px; }
  .fmx-plan .fmx-marker b { font-size: 12px; }
  .fmx-plan .fmx-marker span { font-size: 11px; }
  .fmx-plan .fmx-marker small { font-size: 10px; }
  .fmx-legend { justify-content: flex-start; font-size: 10px; padding: 13px 15px; gap: 8px 13px; }
  .fmx-legend span { gap: 5px; }
  .fmx-detail { display: block; padding: 22px; }
  .fmx-detail h4 { font-size: 21px; }
  .fmx-detail .fmx-muted { font-size: 12px; }
  .fmx-person { margin: 20px 0; }
  .fmx-person strong { font-size: 14px; }
  .fmx-current { padding: 15px; }
  .fmx-current>strong { font-size: 14px; }
  .fmx-current-bottom { font-size: 11px; }
  .fmx-queue { margin-top: 22px; }
  .fmx-queue-heading h5 { font-size: 13px; }
  .fmx-queue-item strong { font-size: 13px; }
  .fmx-queue-item p, .fmx-queue-item>div { font-size: 11px; }
  .fmx-skills { margin-top: 12px; font-size: 12px; }
  .fmx-skills summary { padding: 12px 0; min-height: 44px; }
  .fmx-scene { padding: 22px; gap: 18px; }
  .fmx-scene-top { gap: 10px; justify-content: space-between; }
  .fmx-scene-top .fmx-eyebrow { font-size: 9px; }
  .fmx-scene h4 { font-size: 19px; }
  .fmx-scene-actions { display: block; }
  .fmx-scene-progress { max-width: none; margin-bottom: 16px; }
  .fmx-event-controls { flex-wrap: wrap; }
  .fmx-next { flex: 1; padding: 10px 12px; }
  .fmx-play { font-size: 11px !important; }
  .fmx-bottom { padding: 14px 22px; }
  .fmx-outcome { margin-top: 26px; }
  .fmx-outcome h3 { font-size: 21px; }
}
@media (max-width: 380px) {
  .fmx-heading { padding: 18px; }
  .fmx-time { display: none; }
  .fmx h3 { max-width: none; }
  .fmx-location { display: block; }
  .fmx-location>span { margin-top: 4px; }
  .fmx-detail, .fmx-scene { padding: 18px; }
  .fmx-next, .fmx-play { width: 100%; }
  .fmx-camera .fmx-marker { min-width: 45px; padding: 6px; }
  .fmx-camera .fmx-marker b { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { .fmx *, .fmx *:before, .fmx *:after { animation: none !important; transition: none !important; } }
