/* p-m50: /blog/erp-roi-calculator-manufacturers/ (ETC-448). Mosaic hero with art tiles around the text, weave motion,
   rounded 22px soft-shadow cards, stepper slider with numbered dots, split-direction columns, numbered margin notes.
   Accent brass. Every class starts with m50-. */
:root { --m50: #A16207; --m50-d: #713F12; --m50-bg: #FEF9EC; --m50-line: #EADDB4; --m50-sh: 0 22px 48px -26px rgba(113, 63, 18, .38); }

.m50-k { display: inline-block; margin: 0 0 10px; font: 700 12.5px/1 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--m50-d); }
.m50-k::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -4px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--m50) 0 3px, transparent 3px 6px), repeating-linear-gradient(0deg, #EAB308 0 3px, transparent 3px 6px); }
.m50-first { font-size: 19px; color: var(--ink); font-weight: 500; }

/* hero: mosaic of art tiles around the text */
.m50-hero { padding-bottom: 72px; }
.m50-mosaic { position: relative; margin-top: 22px; display: grid; grid-template-columns: 23% minmax(0, 1fr) 23%; gap: 24px; min-height: 620px; }
.m50-mosaic > .st-art.m50-art { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; overflow: visible; background: none; box-shadow: none; pointer-events: none; }
.m50-art > .st-l.m50-weave { inset: 0; width: 100%; height: 100%; border-radius: 28px; overflow: hidden; opacity: .55; }
.m50-art > .st-l.m50-tile { inset: auto; width: 23%; height: 46%; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--m50-sh); border: 1px solid var(--m50-line); }
.m50-tile svg { width: 100%; height: 100%; }
.m50-art > .st-l.m50-tile--a { left: 0; top: 0; }
.m50-art > .st-l.m50-tile--b { left: 0; bottom: 0; }
.m50-art > .st-l.m50-tile--c { right: 0; top: 0; }
.m50-art > .st-l.m50-tile--d { right: 0; bottom: 0; }
.m50-art > .m50-chip { left: 1%; top: 45%; }
.m50-hero__text { grid-column: 2; position: relative; z-index: 2; align-self: center; padding: 34px 32px; border-radius: 22px; background: rgba(255, 255, 255, .94); box-shadow: var(--m50-sh); }
.m50-hero__text .kicker { color: var(--m50-d); background: var(--m50-bg); }
.m50-hero__text .kicker i { background: var(--m50); box-shadow: 0 0 0 4px rgba(161, 98, 7, .18); }
.m50-hero h1 { font-size: clamp(30px, 1rem + 2vw, 44px); line-height: 1.12; }
.m50-hero .lead { font-size: 17px; }
.m50-pause { margin-top: 14px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--m50-line); background: #fff; font: 600 13px/1 var(--font-ui); color: var(--m50-d); cursor: pointer; }
.m50-pause:focus-visible { outline: 3px solid var(--m50); outline-offset: 2px; }

/* weave motion: threads slide past each other; press ram steps */
.m50-weft path { stroke-dasharray: 46 24; animation: m50-weft 8s linear infinite; }
.m50-warp path { stroke-dasharray: 34 36; animation: m50-warp 8s linear infinite; }
.m50-weft path:nth-child(even), .m50-warp path:nth-child(even) { animation-direction: reverse; }
.m50-ram { animation: m50-ram 2.4s ease-in-out infinite; transform-box: fill-box; }
@keyframes m50-weft { to { stroke-dashoffset: -140; } }
@keyframes m50-warp { to { stroke-dashoffset: 140; } }
@keyframes m50-ram { 0%, 100% { transform: translateY(0); } 45%, 55% { transform: translateY(22px); } }
.m50-hero.is-paused .m50-weft path, .m50-hero.is-paused .m50-warp path, .m50-hero.is-paused .m50-ram { animation-play-state: paused; }

/* prose with numbered margin notes */
.m50-prose { display: grid; gap: 18px; }
.m50-row { display: grid; grid-template-columns: minmax(0, 760px) 260px; gap: 48px; align-items: start; }
.m50-row p, .m50-row li { font-size: 17px; line-height: 1.68; }
.m50-note { position: relative; padding: 12px 14px 12px 50px; border-left: 3px solid var(--m50); background: var(--m50-bg); border-radius: 0 12px 12px 0; font: 500 14px/1.5 var(--font-ui); color: var(--m50-d); }
.m50-note::before { content: attr(data-n); position: absolute; left: 12px; top: 11px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--m50); color: #fff; font: 800 13px/1 var(--font-ui); }
.m50-list { padding-left: 20px; display: grid; gap: 8px; }

/* calculator */
.m50-calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 24px; align-items: start; }
.m50-calc__in, .m50-calc__out { border-radius: 22px; background: #fff; box-shadow: var(--m50-sh); border: 1px solid var(--m50-line); padding: 22px; }
.m50-calc__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.m50-flag { padding: 6px 12px; border-radius: 999px; background: #FEF3C7; font: 700 13px/1.3 var(--font-ui); color: var(--m50-d); }
.m50-calc fieldset { border: 0; margin: 0 0 16px; padding: 14px 0 0; border-top: 1px dashed var(--m50-line); display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.m50-calc legend { padding: 0; margin-bottom: 8px; font: 700 15px/1.3 var(--font); color: var(--ink); }
.m50-calc label { display: grid; gap: 6px; align-content: end; font: 600 13.5px/1.35 var(--font-ui); color: var(--text); }
.m50-calc input, .m50-calc select { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid #D6CBA6; background: #FFFDF7; font: 600 15px/1.2 var(--font-ui); color: var(--ink); }
.m50-calc input:focus-visible, .m50-calc select:focus-visible { outline: 3px solid var(--m50); outline-offset: 1px; }
.m50-calc label:has(select) { grid-column: 1 / -1; }
.m50-calc__out { position: sticky; top: 96px; }
.m50-calc__tag { display: inline-block; margin: 0 0 10px; padding: 5px 10px; border-radius: 999px; background: var(--m50); color: #fff; font: 700 12px/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.m50-calc__out dl { margin: 0 0 12px; display: grid; gap: 8px; }
.m50-calc__out dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #F1E9D2; }
.m50-calc__out dt { font: 500 14px/1.35 var(--font-ui); color: var(--muted); }
.m50-calc__out dd { margin: 0; font: 700 16px/1.3 var(--font-ui); color: var(--ink); text-align: right; white-space: nowrap; }
.m50-calc__big { flex-direction: column; padding: 14px !important; border-radius: 14px; background: var(--m50-bg); border: 0 !important; }
.m50-calc__big dd { text-align: left; white-space: normal; font: 800 26px/1.15 var(--font); color: var(--m50-d); }
.m50-calc__note { font: 500 13px/1.5 var(--font-ui); color: var(--muted); }
.m50-calc__out .btn { width: 100%; }

/* signature: process flow with clickable stations */
.m50-flow { border-radius: 22px; background: #fff; box-shadow: var(--m50-sh); border: 1px solid var(--m50-line); padding: 24px; }
.m50-flow__line { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.m50-flow__line::before { content: ""; position: absolute; left: 8%; right: 8%; top: 26px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--m50) 0 12px, transparent 12px 20px); }
.m50-flow__line button { position: relative; display: grid; justify-items: center; gap: 8px; min-height: 44px; padding: 0 4px 6px; border: 0; background: none; cursor: pointer; font: 600 14px/1.25 var(--font-ui); color: var(--ink); }
.m50-flow__line i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 3px solid var(--m50-line); font: 800 18px/1 var(--font-ui); font-style: normal; color: var(--m50-d); transition: background .2s, border-color .2s; }
.m50-flow__line button[aria-selected="true"] i { background: var(--m50); border-color: var(--m50); color: #fff; }
.m50-flow__line button:focus-visible { outline: 3px solid var(--m50); outline-offset: 2px; border-radius: 12px; }
.m50-flow__p { max-width: 760px; margin: 0 auto; padding: 18px 20px; border-radius: 16px; background: var(--m50-bg); }
.m50-flow__p h3 { font-size: 21px; }
.m50-use { min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--m50); background: #fff; font: 700 14px/1 var(--font-ui); color: var(--m50-d); cursor: pointer; }
.m50-use:focus-visible { outline: 3px solid var(--m50); outline-offset: 2px; }

/* split-direction columns */
.m50-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.m50-col { padding: 24px; border-radius: 22px; background: #fff; box-shadow: var(--m50-sh); border: 1px solid var(--m50-line); will-change: transform; }
.m50-col--cost { background: #FFFBEB; }
.m50-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.m50-col li { padding-left: 16px; border-left: 3px solid var(--m50-line); font-size: 16px; line-height: 1.55; }
.m50-col b { display: block; color: var(--ink); }

/* signature: route card with operations */
.m50-rc { border-radius: 22px; background: #FFFDF5; box-shadow: var(--m50-sh); border: 1px solid var(--m50-line); overflow: hidden; }
.m50-rc__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 16px 22px; background: var(--m50); color: #fff; }
.m50-rc__head p { margin: 0; font: 500 15px/1.4 var(--font-ui); }
.m50-rc__head b { font-weight: 800; }
.m50-rc__smp { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-weight: 700 !important; font-size: 12.5px !important; }
.m50-rc__ops { list-style: none; margin: 0; padding: 8px 22px 16px; }
.m50-rc__ops li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--m50-line); }
.m50-rc__ops li:last-child { border-bottom: 0; }
.m50-rc__ops i { font: 800 18px/1 var(--font-ui); font-style: normal; color: var(--m50-d); background: var(--m50-bg); border: 1px solid var(--m50-line); border-radius: 10px; padding: 9px 0; text-align: center; }
.m50-rc__ops b { display: block; font: 700 16px/1.3 var(--font); color: var(--ink); }
.m50-rc__ops span { font: 500 13.5px/1.4 var(--font-ui); color: var(--muted); }
.m50-rc__ops em { font: 600 14px/1.4 var(--font-ui); font-style: normal; color: var(--m50-d); }

/* tables */
.m50-tbl { overflow-x: auto; margin: 16px 0; border-radius: 16px; border: 1px solid var(--m50-line); background: #fff; }
.m50-tbl:focus-visible { outline: 3px solid var(--m50); outline-offset: 2px; }
.m50-tbl table { width: 100%; min-width: 480px; border-collapse: collapse; font: 500 14.5px/1.5 var(--font-ui); }
.m50-tbl th, .m50-tbl td { padding: 11px 14px; text-align: left; border-top: 1px solid #F1E9D2; }
.m50-tbl thead th { border-top: 0; background: var(--m50-bg); color: var(--m50-d); font-size: 13px; }
.m50-tbl tbody th { color: var(--ink); }

/* carousel: stepper slider with numbered dots */
.m50-step { max-width: 820px; margin: 0 auto; }
.m50-step__track { display: grid; }
.m50-step__s { padding: 28px; border-radius: 22px; background: #fff; box-shadow: var(--m50-sh); border: 1px solid var(--m50-line); }
.m50-step.is-live .m50-step__track > * { grid-area: 1 / 1; transition: opacity .35s ease, transform .35s ease; }
.m50-step.is-live .m50-step__s:not(.is-on) { opacity: 0; transform: translateY(12px); visibility: hidden; }
.m50-step__n { margin: 0 0 6px; font: 700 12.5px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--m50-d); }
.m50-step__s p { font-size: 17px; line-height: 1.65; }
.m50-step__nav { display: none; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.m50-step.is-live .m50-step__nav { display: flex; }
.m50-step__arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--m50-line); background: #fff; font: 700 22px/1 var(--font-ui); color: var(--m50-d); cursor: pointer; }
.m50-step__dots { display: flex; gap: 8px; }
.m50-step__dots button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--m50-line); background: #fff; font: 800 15px/1 var(--font-ui); color: var(--m50-d); cursor: pointer; }
.m50-step__dots button[aria-current="step"] { background: var(--m50); border-color: var(--m50); color: #fff; }
.m50-step__arrow:focus-visible, .m50-step__dots button:focus-visible { outline: 3px solid var(--m50); outline-offset: 2px; }
.m50-step:not(.is-live) .m50-step__track { gap: 14px; }

/* scroll story accent */
#story .st-rail li.is-on { background: var(--m50-bg); }
#story .st-rail li.is-on::before { background: var(--m50); border-color: var(--m50); }
#story .st-scene { border-radius: 22px; box-shadow: var(--m50-sh); }
#story .st-scene__k { color: var(--m50-d); }

@media (prefers-reduced-motion: reduce) {
  .m50-weft path, .m50-warp path, .m50-ram { animation: none; }
  .m50-col { transform: none !important; }
  .m50-step.is-live .m50-step__track > * { transition: none; }
}
@media (max-width: 1100px) {
  .m50-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .m50-note { max-width: 640px; }
}
@media (max-width: 960px) {
  .m50-mosaic { display: flex; flex-direction: column; min-height: 0; }
  .m50-hero__text { order: -1; }
  .m50-mosaic > .st-art.m50-art { position: relative; inset: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
  .m50-art > .st-l.m50-weave { display: none; }
  .m50-art > .st-l.m50-tile { position: relative; inset: auto; width: auto; height: auto; aspect-ratio: 1; }
  .m50-art > .m50-chip { position: relative; left: auto; top: auto; grid-column: 1 / -1; justify-self: start; }
  .m50-hero__text { padding: 22px 18px; }
  .m50-calc { grid-template-columns: 1fr; }
  .m50-calc__out { position: relative; top: 0; }
  .m50-cols { grid-template-columns: 1fr; }
  .m50-flow__line { grid-template-columns: repeat(5, minmax(64px, 1fr)); overflow-x: auto; }
}
@media (max-width: 640px) {
  .m50-calc fieldset { grid-template-columns: 1fr; }
  .m50-flow { padding: 16px; }
  .m50-flow__line { grid-template-columns: 1fr; gap: 6px; }
  .m50-flow__line::before { display: none; }
  .m50-flow__line button { grid-template-columns: 44px 1fr; justify-items: start; align-items: center; text-align: left; }
  .m50-flow__line i { width: 40px; height: 40px; font-size: 15px; }
  .m50-rc__ops li { grid-template-columns: 48px minmax(0, 1fr); }
  .m50-rc__ops em { grid-column: 2; }
  .m50-step__nav, .m50-step__dots { gap: 4px; }
}
