/* p-m15: ERP for electric motor manufacturers in Bangalore (ETC-253). Full-bleed art band with a floating ruled-paper card,
   line-draw strokes, notebook frames, pinned horizontal gallery, split-direction columns, pull-quote lead. Prefix m15-. */
:root { --m15: #C2410C; --m15-d: #9A3412; --m15-bg: #FFF4EC; --m15-rule: #E4ECF5; --m15-margin: #F3B4A0; }

/* ruled notebook paper frame */
.m15-ruled { background-color: #fff;
  background-image: linear-gradient(90deg, transparent 38px, var(--m15-margin) 38px, var(--m15-margin) 40px, transparent 40px),
    repeating-linear-gradient(180deg, transparent 0, transparent 27px, var(--m15-rule) 27px, var(--m15-rule) 28px);
  border: 1px solid #E7DED6; border-radius: 6px; box-shadow: 0 1px 0 #EFE6DD, 0 18px 40px -30px rgba(124, 45, 18, .45); }

/* hero: full-bleed band + floating white card */
.m15-hero { padding-bottom: 40px; }
.m15-hero .kicker { color: var(--m15-d); background: var(--m15-bg); }
.m15-hero .kicker i { background: var(--m15); box-shadow: 0 0 0 4px rgba(194, 65, 12, .16); }
.m15-bandwrap { position: relative; z-index: 1; margin-top: 14px; display: grid; }
.m15-band.st-art, .m15-cardwrap { grid-area: 1 / 1; }
.m15-band.st-art { aspect-ratio: auto; height: auto; min-height: 600px; border-radius: 0; box-shadow: none; border-block: 1px solid #F1E6DC; }
.m15-cardwrap { position: relative; display: flex; align-items: center; padding-block: 44px; pointer-events: none; z-index: 6; }
.m15-card { pointer-events: auto; max-width: 560px; padding: 26px 28px 24px 58px; border-radius: 6px; background-color: #fff;
  background-image: linear-gradient(90deg, transparent 38px, var(--m15-margin) 38px, var(--m15-margin) 40px, transparent 40px);
  border: 1px solid #E7DED6; box-shadow: 0 30px 70px -36px rgba(124, 45, 18, .5); }
.m15-card h1 { font-size: clamp(28px, 1.2rem + 1.7vw, 42px); }
.m15-card h1 .hl { background: linear-gradient(45deg, var(--m15), #3EA900); -webkit-background-clip: text; background-clip: text; color: transparent; }
.m15-lead { position: relative; margin: 0 0 12px; padding-left: 16px; border-left: 4px solid var(--m15); font: 600 clamp(17.5px, 1rem + .25vw, 20px)/1.5 var(--font); color: var(--ink); }
.m15-sub { margin: 0; color: var(--text); font-size: 16px; }
.m15-card .trust { margin: 14px 0 18px; }
.m15-tag { left: auto; right: 14px; }
.m15-chip { max-width: 220px; }

/* line draw: strokes draw themselves once */
.m15-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: m15-draw 2.2s var(--d, 0s) cubic-bezier(.4, .1, .2, 1) forwards; }
@keyframes m15-draw { to { stroke-dashoffset: 0; } }
.m15-sdraw { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.4, .1, .2, 1); }
.m15-js .st-scene:not(.m15-seen) .m15-sdraw { stroke-dashoffset: 1; }
.m15-glow { animation: m15-glow 3s ease-in-out 3; opacity: .85; }
@keyframes m15-glow { 50% { opacity: .35; } }

/* two-column sections with margin note */
.m15-two { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.m15-two > .sec__head { margin-bottom: 0; }
.m15-margin { margin: 16px 0 0; padding: 4px 0 4px 16px; border-left: 2px solid var(--m15-margin); font: italic 500 15px/1.55 var(--font); color: var(--muted); }
.m15-cap { margin: 14px 0 0; font: 500 13.5px/1.45 var(--font-ui); color: var(--muted); }
.m15-ruled.k-fit { padding: 18px 18px 18px 54px; }

/* story */
.m15-story .st-scene { border-radius: 6px; border-color: #E7DED6; }
.m15-story .st-scene__k { color: var(--m15-d); }
.m15-story .st-rail li.is-on { background: var(--m15-bg); }
.m15-story .st-rail li.is-on::before { background: var(--m15); border-color: var(--m15); }
.m15-ruledart { background-color: #FFF8F2; border-radius: 6px; border: 1px solid #F1E6DC; }

/* pinned horizontal gallery */
.m15-gal { padding: 80px 0; }
.m15-gal__host { position: relative; }
.m15-gal__track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 18px; scroll-padding: 16px;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.m15-gal__track:focus-visible { outline-offset: -3px; }
.m15-gal__card { flex: 0 0 min(340px, 82vw); scroll-snap-align: start; padding: 24px 22px 22px 54px; border-radius: 6px; background-color: #fff;
  background-image: linear-gradient(90deg, transparent 38px, var(--m15-margin) 38px, var(--m15-margin) 40px, transparent 40px),
    repeating-linear-gradient(180deg, transparent 0, transparent 27px, var(--m15-rule) 27px, var(--m15-rule) 28px);
  border: 1px solid #E7DED6; box-shadow: 0 22px 44px -34px rgba(124, 45, 18, .5); }
.m15-gal__card h3 { font-size: 21px; }
.m15-gal__card p { font-size: 15px; }
.m15-gal__card p:last-child { margin: 0; }
.m15-gal__k { margin: 0 0 6px; font: 700 12.5px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--m15-d); }
.m15-gal.is-pinned .m15-gal__sticky { position: sticky; top: 72px; height: calc(100vh - 72px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.m15-gal.is-pinned .m15-gal__sticky .sec__head { margin-bottom: 24px; }
.m15-gal.is-pinned .m15-gal__track { overflow: visible; scroll-snap-type: none; padding-left: max(16px, calc((100vw - 1200px) / 2)); will-change: transform; }
.m15-gal.is-pinned .m15-gal__card { flex-basis: 360px; }

/* recipe card + test log */
.m15-recipe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 24px; }
.m15-recipe__tabs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.m15-recipe__tabs button { min-height: 44px; padding: 10px 14px; border-radius: 99px; border: 1px solid #E7DED6; background: #fff; cursor: pointer;
  font: 600 14px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.m15-recipe__tabs button[aria-selected="true"] { background: var(--m15); border-color: var(--m15); color: #fff; }
.m15-recipe__card { padding: 22px 22px 18px 56px; }
.m15-recipe__h { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 12px; font: 700 15px/1.3 var(--font-ui); color: var(--ink); }
.m15-recipe__h em { font-style: normal; font-size: 12px; padding: 3px 8px; border-radius: 99px; background: #FEF3C7; color: #7C2D12; align-self: start; }
.m15-recipe dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.m15-recipe dl div { padding: 4px 0; min-height: 28px; display: flex; justify-content: space-between; gap: 8px; font: 500 14px/20px var(--font-ui); }
.m15-recipe dt { color: var(--muted); }
.m15-recipe dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.m15-recipe__f { margin: 10px 0 0; font: 500 13px/1.45 var(--font-ui); color: var(--muted); }
.m15-log { padding: 22px; border-radius: 6px; background: #fff; border: 1px solid #E7DED6; overflow-x: auto; }
.m15-log table { width: 100%; min-width: 380px; border-collapse: collapse; font: 500 14px/1.3 var(--font-ui); }
.m15-log th, .m15-log td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.m15-log thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.m15-log td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.m15-log .ok { color: #166534; font-weight: 700; } .m15-log .hold { color: var(--m15-d); font-weight: 700; }

/* cost waterfall */
.m15-wf { padding: 22px; border-radius: 6px; background: #fff; border: 1px solid #E7DED6; display: grid; gap: 8px; }
.m15-wf__row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 62px; align-items: center; gap: 10px; font: 500 13.5px/1.25 var(--font-ui); color: var(--ink); }
.m15-wf__row i { position: relative; height: 22px; border-radius: 4px; background: repeating-linear-gradient(90deg, #F8FAFC 0 9.9%, #EEF2F6 9.9% 10%); }
.m15-wf__row i::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--s) * 1%); width: calc(var(--w) * 1%); border-radius: 4px;
  background: linear-gradient(90deg, #EA580C, var(--m15)); transform-origin: left; transition: transform .9s cubic-bezier(.3, .7, .2, 1); }
.m15-wf__row b { text-align: right; font-variant-numeric: tabular-nums; }
.m15-wf__row--tot { margin-top: 6px; padding-top: 10px; border-top: 1px dashed #E7DED6; font-weight: 700; }
.m15-wf__row--tot i::after { background: linear-gradient(90deg, #1E293B, #475569); }
.m15-wf.is-pre .m15-wf__row i::after { transform: scaleX(0); }
.m15-wf__row:nth-child(2) i::after { transition-delay: .1s; } .m15-wf__row:nth-child(3) i::after { transition-delay: .2s; }
.m15-wf__row:nth-child(4) i::after { transition-delay: .3s; } .m15-wf__row:nth-child(5) i::after { transition-delay: .4s; }
.m15-wf__row:nth-child(6) i::after { transition-delay: .5s; } .m15-wf__row:nth-child(7) i::after { transition-delay: .6s; }
.m15-wf__row:nth-child(8) i::after { transition-delay: .7s; } .m15-wf__row:nth-child(9) i::after { transition-delay: .9s; }
.m15-wf__f { margin: 6px 0 0; font: 600 12.5px/1.3 var(--font-ui); color: var(--m15-d); }

/* split-direction columns */
.m15-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.m15-col { padding: 22px 22px 22px 56px; border-radius: 6px; background-color: #fff;
  background-image: linear-gradient(90deg, transparent 38px, var(--m15-margin) 38px, var(--m15-margin) 40px, transparent 40px);
  border: 1px solid #E7DED6; will-change: transform; }
.m15-col--new { background-color: var(--m15-bg); }
.m15-col__h { margin: 0 0 10px; font: 700 13px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--m15-d); }
.m15-col p:not(.m15-col__h) { margin: 0; padding: 10px 0; border-bottom: 1px dashed #E7DED6; font-size: 15px; }
.m15-col p:last-child { border-bottom: 0; }
.m15-col b { display: block; color: var(--ink); font: 600 15.5px/1.35 var(--font); }

/* terminal box integrations */
.m15-tb { list-style: none; margin: 0; padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; border-radius: 10px;
  background: #334155; }
.m15-tb li { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 12px 14px;
  border-radius: 8px; background: #fff; }
.m15-tb i { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal; color: #fff; background: radial-gradient(circle at 35% 35%, #F59E0B, var(--m15)); }
.m15-tb b { color: var(--ink); font: 600 15.5px/1.3 var(--font); }
.m15-tb span { grid-column: 2; font-size: 14px; color: var(--text); }
.m15-l { grid-column: 3; grid-row: 1 / 3; font-style: normal; padding: 4px 9px; border-radius: 99px; font: 700 11.5px/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .04em; }
.m15-l--n { background: #DCFCE7; color: #166534; } .m15-l--m { background: #E0E7FF; color: #3730A3; } .m15-l--c { background: #FEF3C7; color: #7C2D12; }

/* rewinding steps */
.m15-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; counter-reset: m15s; }
.m15-steps li { counter-increment: m15s; padding: 16px 16px 16px 52px; position: relative; border-radius: 6px; background: #fff; border: 1px solid #E7DED6; }
.m15-steps li::before { content: counter(m15s); position: absolute; left: 14px; top: 15px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--m15); color: #fff; font: 700 13px/1 var(--font-ui); }
.m15-steps b { display: block; color: var(--ink); font: 600 16px/1.3 var(--font); }
.m15-steps span { font-size: 14.5px; }

/* Karnataka field notes */
.m15-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.m15-note { padding: 20px 18px 18px 56px; }
.m15-note h3 { font-size: 18px; margin-bottom: 6px; }
.m15-note p { margin: 0; font-size: 15px; line-height: 28px; }
#local .m15-cap { margin-bottom: 36px; }

@media (max-width: 1100px) { .m15-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .m15-band.st-art { min-height: 0; height: 300px; }
  .m15-band > .st-l svg { width: 140%; max-width: none; margin-left: -40%; }
  .m15-band.st-art, .m15-cardwrap { grid-area: auto; }
  .m15-cardwrap { display: block; padding-block: 0; margin-top: -48px; }
  .m15-card { max-width: none; }
  .m15-two, .m15-recipe, .m15-cols, .m15-tb, .m15-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .m15-band.st-art { height: 260px; }
  .m15-band > .st-l svg { width: 180%; max-width: none; margin-left: -80%; }
  .m15-card { padding: 20px 16px 18px 44px; background-image: linear-gradient(90deg, transparent 28px, var(--m15-margin) 28px, var(--m15-margin) 30px, transparent 30px); }
  .m15-chip { display: none; }
  .m15-notes { grid-template-columns: minmax(0, 1fr); }
  .m15-recipe dl { grid-template-columns: minmax(0, 1fr); }
  .m15-wf__row { grid-template-columns: 104px minmax(0, 1fr) 54px; font-size: 12.5px; }
  .m15-tb li { grid-template-columns: 42px minmax(0, 1fr); }
  .m15-l { grid-column: 2; grid-row: auto; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .m15-draw, .m15-sdraw { stroke-dashoffset: 0 !important; animation: none !important; transition: none !important; }
  .m15-glow { animation: none !important; }
  .m15-col { transform: none !important; }
  .m15-wf.is-pre .m15-wf__row i::after { transform: none; }
}
