/* ===========================================================================
   Services / Manufacturing — sections below the explorer: four steps,
   coverage matrix + strengths, delivered projects, industries.
   Rows of cards use subgrid so each tier (number, title, text, deliverable)
   starts at the same height in every card.
   =========================================================================== */

/* --- four steps ------------------------------------------------------------ */
.mf-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 20px; margin: var(--sp-tight) 0 0; padding: 0; list-style: none; }
.mf-step { display: grid; grid-template-rows: subgrid; grid-row: span 4; gap: 0; padding: 0 0 20px; background: var(--white); border: 1px solid var(--line-strong); }
.mf-step__no { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 18px; background: var(--navy); color: var(--white); font-size: 14px; font-weight: 700; letter-spacing: .12em; }
.mf-step:nth-child(2) .mf-step__no { background: var(--navy-mid); }
.mf-step:nth-child(3) .mf-step__no { background: var(--blue); }
.mf-step:nth-child(4) .mf-step__no { background: var(--mf-green-text); }
.mf-step__no b { font-size: 22px; font-weight: 900; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mf-step__t { margin: 0; padding: 18px 18px 0; font-size: 18px; font-weight: 700; line-height: 1.5; color: var(--navy); }
.mf-step__p { margin: 0; padding: 10px 18px 0; font-family: 'Noto Sans JP', sans-serif; font-size: 15px; line-height: 1.85; color: var(--ink); }
.mf-step__get { margin: 16px 18px 0; padding: 12px 0 0; border-top: 1px solid var(--line-strong); font-size: 15px; line-height: 1.7; color: var(--ink); }
.mf-step__get b { display: block; margin-bottom: 2px; font-size: 13px; letter-spacing: .06em; color: var(--mf-blue-text); }

/* --- coverage matrix + strengths ------------------------------------------- */
/* pictograms shared by the strengths cards and the industries cards */
.mfi { display: block; width: 100%; height: 100%; }
.mfi .a { fill: var(--navy); } .mfi .b { fill: var(--blue); } .mfi .p { fill: var(--blue-pale); } .mfi .c { fill: var(--amber); } .mfi .w { fill: var(--white); }
.mfi .t { font-size: 11.6px; font-weight: 900; color: var(--white); fill: currentColor; text-anchor: middle; }

/* coverage figure: who covers machines, who covers systems. A filled bar = covers it, a dashed
   box = usually not. NAL is one unbroken bar across both columns. */
.mf-why { margin-top: var(--sp-tight); }
.mf-cov { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); margin: 0; background: var(--white); border: 1px solid var(--line-strong); }
.mf-cov__fig { padding: 24px 28px 22px; }
.mf-cov table { width: 100%; border-collapse: separate; border-spacing: 0 10px; table-layout: fixed; }
.mf-cov th, .mf-cov td { padding: 0; text-align: center; vertical-align: middle; }
.mf-cov thead th { padding: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--navy); text-wrap-style: balance; vertical-align: bottom; }
.mf-cov tbody th { width: 34%; padding-right: 16px; text-align: left; font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--navy); }
.mf-cov tbody td { padding: 0 3px; }
.mf-cov td span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; font-size: 15px; line-height: 1.3; }
.mf-cov td.is-on span { background: var(--navy-mid); color: var(--white); font-weight: 700; }
.mf-cov td.is-on span::before { content: ""; flex: none; width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.500 12.500l4.200 4.300 8.800-9.800' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.mf-cov td.is-off span { border: 2px dashed #B9C6D3; color: var(--muted); }
.mf-cov tr.is-nal th { font-size: 24px; font-weight: 900; }
.mf-cov tr.is-nal td { padding: 0; }
.mf-cov tr.is-nal td:nth-child(2) { padding-left: 3px; }
.mf-cov tr.is-nal td:last-child { padding-right: 3px; }
.mf-cov tr.is-nal td span { height: 60px; background: var(--navy-deep); border-bottom: 5px solid var(--amber); font-size: 17px; }
.mf-cov figcaption { display: flex; align-items: center; margin: 0; padding: 26px 30px; background: var(--surface-2); border-left: 6px solid var(--amber); font-family: 'Noto Sans JP', sans-serif; font-size: 16px; line-height: 1.9; color: var(--ink); }
@keyframes mf-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
html.js .mf-cov[data-io] td span { opacity: 0; }
html.js .mf-cov[data-io].is-in td span { opacity: 1; transition: opacity .4s var(--ease-out); }
html.js .mf-cov[data-io].is-in td.is-on span { animation: mf-wipe .55s var(--ease-out) backwards; }
html.js .mf-cov[data-io].is-in tr:nth-child(1) td span { animation-delay: .1s; transition-delay: .1s; }
html.js .mf-cov[data-io].is-in tr:nth-child(2) td span { animation-delay: .35s; transition-delay: .35s; }
html.js .mf-cov[data-io].is-in tr.is-nal td:nth-child(2) span { animation-delay: .7s; transition-delay: .7s; }
html.js .mf-cov[data-io].is-in tr.is-nal td:nth-child(3) span { animation-delay: 1.15s; transition-delay: 1.15s; }

.mf-pts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; margin: 20px 0 0; padding: 0; list-style: none; }
.mf-pts li { display: grid; grid-template-rows: subgrid; grid-row: span 3; gap: 0; padding: 22px 22px 24px; background: var(--white); border: 1px solid var(--line-strong); border-top: 5px solid var(--blue); }
.mf-pts .mfi { width: 52px; height: 52px; margin-bottom: 14px; }
.mf-pts b { font-size: 17px; line-height: 1.55; color: var(--navy); }
.mf-pts span { padding-top: 6px; font-family: 'Noto Sans JP', sans-serif; font-size: 15px; line-height: 1.85; color: var(--ink); }
html.js .mf-pts[data-io] li, html.js .mf-ind[data-io] li { opacity: 0; }
html.js .mf-pts[data-io].is-in li, html.js .mf-ind[data-io].is-in li { opacity: 1; animation: mf-rise .5s var(--ease-out) backwards; }
html.js .mf-pts[data-io].is-in .mfi, html.js .mf-ind[data-io].is-in .mfi { animation: mf-pop .5s var(--ease-out) .25s backwards; }
html.js .mf-pts[data-io].is-in li:nth-child(2), html.js .mf-ind[data-io].is-in li:nth-child(2) { animation-delay: 80ms; }
html.js .mf-pts[data-io].is-in li:nth-child(3), html.js .mf-ind[data-io].is-in li:nth-child(3) { animation-delay: 160ms; }
html.js .mf-ind[data-io].is-in li:nth-child(4) { animation-delay: 240ms; }
html.js .mf-ind[data-io].is-in li:nth-child(5) { animation-delay: 320ms; }
html.js .mf-ind[data-io].is-in li:nth-child(6) { animation-delay: 400ms; }

/* industries: one card per industry, pictogram on the left */
.mf-ind { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; margin: var(--sp-tight) 0 0; padding: 0; list-style: none; }
.mf-ind li { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 3; gap: 0 16px; padding: 18px 20px 18px 18px; background: var(--white); border: 1px solid var(--line-strong); }
.mf-ind__ic { grid-row: 1 / span 3; align-self: start; display: grid; place-items: center; width: 72px; height: 72px; background: var(--surface-2); }
.mf-ind__ic .mfi { width: 54px; height: 54px; }
.mf-ind b { align-self: start; padding-top: 2px; font-size: 17px; line-height: 1.5; color: var(--navy); }
.mf-ind__w { padding-top: 4px; font-size: 15px; line-height: 1.7; color: var(--ink); }
.mf-ind__tags { padding-top: 2px; margin-bottom: -8px; }
.mf-ind .mf-term { margin: 0 6px 0 0; }

/* --- delivered projects ---------------------------------------------------- */
.mf-feat { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); margin-top: var(--sp-tight); background: var(--white); border: 1px solid var(--line-strong); }
.mf-feat__num { margin: 0; display: flex; flex-direction: column; justify-content: center; padding: 28px; background: var(--navy); color: var(--white); }
.mf-feat__num b { font-size: clamp(52px, 6vw, 76px); font-weight: 900; line-height: 1; letter-spacing: .01em; }
.mf-feat__num span { margin-top: 10px; font-size: 16px; line-height: 1.6; color: var(--on-dark-muted); }
.mf-feat__body { padding: 26px 28px 24px; }
.mf-feat__k { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--mf-blue-text); }
.mf-feat__t { margin: 0 0 12px; font-size: 20px; font-weight: 700; line-height: 1.5; color: var(--navy); }
.mf-feat dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 15px; line-height: 1.75; color: var(--ink); }
.mf-feat dt { font-weight: 700; color: var(--navy); }
.mf-feat dd { margin: 0; }
.mf-feat__more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--mf-blue-text); text-underline-offset: 3px; }

.mf-sub { margin: var(--sp-tight) 0 12px; font-size: 18px; font-weight: 700; line-height: 1.5; color: var(--navy); }
.mf-ba { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line-strong); }
.mf-ba th, .mf-ba td { padding: 14px 16px; border-bottom: 1px solid var(--line-strong); text-align: left; vertical-align: top; font-size: 15px; line-height: 1.75; color: var(--ink); }
.mf-ba thead th { background: var(--navy); color: var(--white); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.mf-ba tbody th { width: 21%; font-weight: 700; color: var(--navy); }
.mf-ba tbody th .mf-term { margin-left: 6px; }
.mf-ba td.is-before { width: 30%; background: var(--surface); }
.mf-ba td.is-after { border-left: 4px solid var(--green); }
.mf-ba td.is-time { width: 13%; font-weight: 700; color: var(--navy); }

.mf-built { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.mf-built li { display: grid; grid-template-rows: subgrid; grid-row: span 4; gap: 0; padding: 20px 20px 22px; background: var(--white); border: 1px solid var(--line-strong); border-top: 5px solid var(--blue); }
.mf-built b { font-size: 17px; line-height: 1.5; color: var(--navy); }
.mf-built span { padding-top: 8px; font-size: 15px; line-height: 1.8; color: var(--ink); }
.mf-built em { padding-top: 12px; font-style: normal; font-size: 14px; font-weight: 700; color: var(--mf-blue-text); }

/* --- industries ------------------------------------------------------------ */
@media (max-width: 640px) {
}
.mf-robot { margin: 20px 0 0; font-size: 15px; line-height: 1.8; color: var(--ink); }
.mf-robot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--mf-blue-text); text-underline-offset: 3px; }
.mf-rel { margin-top: var(--sp-base); }

/* --- glossary popovers (.dc-term, site pattern from home-prototype.css; behaviour in solutions-chatops-terms.js) --- */
.dc-term.is-dismissed .dc-term-pop { display: none !important; }
.dc-term-q { font-size: 12px; font-weight: 700; }
.dc-term-btn { transition: color .2s var(--ease-out), background-color .2s var(--ease-out); }
.dc-term-btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.dc-term-pop { white-space: normal; letter-spacing: 0; text-transform: none; }
@media (hover: hover) and (max-width: 899px) { .dc-term:hover:not(:focus-within) .dc-term-pop { display: none; } }
/* on the navy hero and the navy chapter head the term is white with a pale mark */
.mf-hero .dc-term-btn, .mf-ch__k .dc-term-btn { padding: 2px 1px; color: inherit; box-shadow: inset 0 -1px 0 rgba(143, 201, 245, .7); }
/* each hero block animates in and so makes its own stacking context: lift the two that hold terms above what follows */
.mf-hero__lead.dc-hasterm, .mf-ch__k.dc-hasterm { position: relative; z-index: 5; }
@media (hover: hover) and (pointer: fine) {
  .mf-hero .dc-term-btn:hover, .mf-ch__k .dc-term-btn:hover { color: var(--blue-pale); }
  .mf-tagbtn:hover .mf-term { background: var(--surface-2); }
}
/* industry cards: the system tag itself is the button */
.mf-ind .dc-term { margin: 0 10px 0 0; }
.mf-tagbtn { min-height: 44px; padding: 0; box-shadow: none; }
.mf-tagbtn .mf-term { margin: 0; transition: background-color .2s var(--ease-out); }

@media (max-width: 1040px) {
  .mf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .mf-ind { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .mf-feat { grid-template-columns: 1fr; }
  .mf-cov { grid-template-columns: 1fr; }
  .mf-cov figcaption { border-left: 0; border-top: 6px solid var(--amber); padding: 20px 20px 22px; }
  .mf-pts { grid-template-columns: 1fr; gap: 14px; }
  .mf-pts li { grid-row: auto; grid-template-rows: none; grid-template-columns: 52px minmax(0, 1fr); gap: 0 16px; padding: 18px 18px 20px; }
  .mf-pts .mfi { grid-row: 1 / span 2; margin: 0; }
  .mf-ind { grid-template-columns: 1fr; gap: 12px; }
  .mf-ind li { grid-row: auto; grid-template-rows: none; }
  .mf-built { grid-template-columns: 1fr; gap: 16px; }
  .mf-built li { grid-row: auto; grid-template-rows: none; }
  /* before/after table turns into one card per project */
  .mf-ba, .mf-ba tbody, .mf-ba tr, .mf-ba th, .mf-ba td { display: block; width: auto; }
  .mf-ba thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mf-ba tr { border-bottom: 6px solid var(--surface-2); }
  .mf-ba tbody th { width: auto; padding-bottom: 6px; border-bottom: 0; font-size: 16px; }
  .mf-ba td.is-before, .mf-ba td.is-after, .mf-ba td.is-time { width: auto; }
  .mf-ba td::before { content: attr(data-l); display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--mf-blue-text); }
}
@media (max-width: 560px) {
  .mf-steps { grid-template-columns: 1fr; gap: 16px; }
  .mf-cov__fig { padding: 16px 12px 14px; }
  .mf-cov tbody th { width: 30%; padding-right: 8px; font-size: 14px; }
  .mf-cov td span { height: 46px; gap: 5px; font-size: 13px; }
  .mf-cov td.is-on span::before { width: 16px; height: 16px; }
  .mf-cov thead th { font-size: 12px; letter-spacing: .02em; }
  .mf-cov tr.is-nal th { font-size: 19px; }
  .mf-step { grid-row: auto; grid-template-rows: none; }
  .mf-feat dl { grid-template-columns: 1fr; gap: 2px; }
  .mf-feat dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .mf-cov *, .mf-pts *, .mf-ind * { animation: none !important; transition: none !important; }
  html.js .mf-cov[data-io] td span, html.js .mf-pts[data-io] li, html.js .mf-ind[data-io] li { opacity: 1; }
}
