/* ==========================================================================
   Home and Work: page compositions on the Millennial Ultra system.
   Loads after /mu.css (tokens + .mu-* components) and /styles.css (site chrome).
   The idea is "Built, then running": the mark's four bars as a status meter,
   and one proof ledger per page. The gradient appears only as a hairline.
   Layouts follow the approved MU-Home and MU-Work artboards; every artboard
   inline style lives here as a class (the CSP allows no style attributes).
   ========================================================================== */

/* =============================================================== HOME == */

/* ---------------------------------------------------------- section frame */

.mh-sec { padding-block: 96px; border-top: 1px solid var(--line); }
.mh-sec--end { padding-bottom: 112px; }
.mh-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 56px;
}
.mh-stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
.mh-body { font-size: 17px; line-height: 1.65; }
.mh-self-start { justify-self: start; }
.mh-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------- hero */

.mh-hero-wrap { padding-block: 88px 96px; }
.mh-hero {
  display: grid;
  grid-template-columns: minmax(0, 13fr) minmax(0, 11fr);
  gap: 48px 72px;
  align-items: center;
}
.mh-hero__copy { display: grid; gap: 28px; align-content: start; min-width: 0; }
.mh-hero__title { max-width: 12ch; }
.mh-hero__lede { font-size: 19px; line-height: 1.65; max-width: 54ch; }
.mh-note {
  margin: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  font-size: 13px; line-height: 1.5; color: var(--text-soft);
}
.mh-note__place { display: inline-flex; align-items: center; gap: 8px; }
.mh-note__place svg { flex: none; }
.mh-note__sep { width: 1px; height: 14px; background: var(--line-strong); }

/* From business need to a working system */
.flow { min-width: 0; overflow: hidden; }
.flow__head { padding: 14px 24px; }
.flow__title { font-size: 12px; font-weight: 400; letter-spacing: 0.18em; line-height: 1.4; }
.flow__list { margin: 0; padding: 8px 0; list-style: none; }
.flow__row {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 14px;
  align-items: start;
  padding: 16px 28px 16px 20px;
}
.flow__row::before { content: ""; position: absolute; left: 33px; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.flow__row:first-child::before { top: 22px; }
.flow__row:last-child::before { bottom: auto; height: 22px; }
.flow__node {
  position: relative; z-index: 1; justify-self: center; margin-top: 3px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--text-faint);
}
.flow__row.is-run .flow__node { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.flow__copy { min-width: 0; }
.flow__n {
  display: flex; align-items: center; gap: 10px; margin: 0 0 4px;
  font-family: var(--mono); font-size: 11px; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint);
}
.flow__row.is-run .flow__n { color: var(--ok); }
.flow__dash { width: 16px; height: 1px; background: var(--line-strong); }
.flow__t { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.flow__b { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-soft); }
.flow__foot { margin: 0; padding: 14px 24px; }

/* Build · Connect · Review · Run: one bar per stage, the arrow lights at Run. */
.mh-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 80px 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.mh-stage {
  position: relative;
  display: grid; gap: 14px; align-content: start;
  padding: 28px 28px 32px 0;
  border-top: 1px solid var(--line-strong);
  min-width: 0;
}
.mh-stage + .mh-stage { padding-left: 28px; border-left: 1px solid var(--line); }
.mh-stage:last-child { border-top-color: transparent; }
.mh-stage:last-child::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--mus-gradient);
}
.mh-stage__word { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; color: var(--text); }
.mh-stage__what { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-soft); }
.phase-signal { --_h: 24px; }
.phase-signal i { background: var(--line-strong); }
.phase-signal[data-step="1"] i:nth-child(-n+1),
.phase-signal[data-step="2"] i:nth-child(-n+2),
.phase-signal[data-step="3"] i:nth-child(-n+3),
.phase-signal[data-step="4"] i { background: var(--text-soft); }
.phase-signal[data-step="4"] i:nth-child(4) { background: var(--ok); }
@media (forced-colors: active) {
  .phase-signal i { background: GrayText; }
  .phase-signal[data-step="1"] i:nth-child(-n+1),
  .phase-signal[data-step="2"] i:nth-child(-n+2),
  .phase-signal[data-step="3"] i:nth-child(-n+3),
  .phase-signal[data-step="4"] i { background: CanvasText; }
}

/* ------------------------------------------------- proof: selected work ledger */

.proof-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 64px;
  align-items: end;
  margin-bottom: 56px;
}
/* "What we do": the right column (lede and two routes) is the taller one, so the heading starts level with it. */
.proof-head--top { align-items: start; }
.proof-title { font-size: clamp(36px, 1.6rem + 2.4vw, 56px); line-height: 1.08; }
.proof-title > span { display: block; }
.proof-title__soft { color: var(--text-soft); }
.mh-legend { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.mh-legend li {
  display: grid;
  grid-template-columns: minmax(112px, max-content) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.5; color: var(--text-soft);
}
.mh-legend .mu-status { color: var(--text); }
.proof-after {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; margin-top: 20px;
}
.proof-after p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-soft); max-width: 70ch; }

.run-ledger { box-shadow: var(--shadow-raised); border-color: var(--line-strong); border-radius: var(--radius-lg); }
.run-ledger .mu-ledger__head { padding: 16px 24px; }
.run-ledger .mu-ledger__row,
.run-ledger .mu-ledger__cols {
  grid-template-columns: 4ch minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.25fr) 19ch;
  grid-template-areas: "time ref method amount state";
  gap: 4px 24px;
  padding: 8px 24px;
  min-height: 64px;
}
.run-ledger .mu-ledger__cols { padding-block: 10px; min-height: 0; }
.run-col-time { grid-area: time; }
.run-col-ref { grid-area: ref; }
.run-col-method { grid-area: method; }
.run-col-amount { grid-area: amount; }
.run-col-state { grid-area: state; justify-self: end; }
.run-ledger .mu-ledger__ref { display: grid; gap: 2px; white-space: normal; overflow: visible; }
.run-name { font-family: var(--sans); font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.run-sector { font-family: var(--sans); font-size: 13px; line-height: 1.4; color: var(--text-faint); }
.run-ledger .mu-ledger__method { white-space: normal; font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--text-soft); }
.run-ledger .mu-ledger__amount { text-align: left; overflow: hidden; text-overflow: ellipsis; }
.run-link {
  display: inline-flex; align-items: center; min-height: 44px; max-width: 100%;
  color: var(--link); text-decoration: none; border-radius: 3px;
}
.run-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.run-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.run-ledger .mu-ledger__state { color: var(--text-soft); }
.run-ledger .mu-ledger__foot { margin: 0; padding: 14px 24px; font-size: 12px; line-height: 1.6; letter-spacing: 0; }

@container (max-width: 760px) {
  .run-ledger .mu-ledger__cols { display: none; }
  .run-ledger .mu-ledger__row {
    grid-template-columns: 3ch minmax(0, 1fr) auto;
    grid-template-areas:
      "time ref state"
      ". amount amount"
      ". method method";
    gap: 0 12px;
    padding: 10px 16px;
  }
  .run-ledger .mu-ledger__head, .run-ledger .mu-ledger__foot { padding: 12px 16px; }
}
/* "Deployed software" is about 140px wide: below this the status sits under the name. */
@container (max-width: 420px) {
  .run-ledger .mu-ledger__row {
    grid-template-columns: 3ch minmax(0, 1fr);
    grid-template-areas:
      "time ref"
      ". state"
      ". amount"
      ". method";
  }
  .run-ledger .mu-ledger__state { justify-self: start; margin-top: 4px; }
}

/* ------------------------------------------------------------- what we do */

.mh-do__title { max-width: 18ch; }
.mh-do {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.mh-do--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mh-do__item {
  display: grid; gap: 12px; align-content: start; min-width: 0;
  padding: 28px 28px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.mh-do__item:hover { background: var(--surface); }
.mh-do__n { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--accent); }
.mh-do__t { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.mh-do__b { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-soft); }
.mh-do__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ------------------------------------------------------- starting options */
/* The cards come from lib/packages.mjs (shared with /packages); only their look changes here. */

.mh-offer {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 48px 64px;
  align-items: start;
}
.mh-offer__title { font-size: clamp(30px, 1.4rem + 1.2vw, 40px); }
.mh-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mh-packs .pack {
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.mh-packs .pack > * { order: 3; margin: 0; }
.mh-packs .pack-head { order: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mh-packs .card-no {
  display: inline-flex; align-items: center; flex: none; height: 24px; margin: 0; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  font-size: 11px; line-height: 1; font-weight: 600; letter-spacing: 0.12em; color: var(--text-soft);
}
.mh-packs .pack-engagement {
  margin: 0 !important; font-size: 12px !important; line-height: 1.4; font-weight: 400;
  color: var(--text-faint) !important; text-align: right;
}
.mh-packs .pack h3 { order: 1; margin: 0; font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; }
.mh-packs .pack-tagline { order: 1; margin: -12px 0 0 !important; font-size: 15px !important; line-height: 1.55; color: var(--text-soft) !important; }
.mh-packs .pack-price {
  order: 2; display: grid; gap: 4px; margin: 0 !important; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.mh-packs .pack-price b { font-size: 32px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.mh-packs .pack-price span { font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.mh-packs .pack-price b .pack-fig { font: inherit; letter-spacing: inherit; color: inherit; }
.mh-packs .pack-price b .pack-pre { margin-right: 8px; font-size: 14px; line-height: inherit; font-weight: 500; letter-spacing: 0; color: var(--text-soft); }
.mh-packs .pack-then {
  order: 2; margin: -14px 0 0 !important; padding-bottom: 16px; border-bottom: 1px solid var(--line);
  font-size: 13px !important; line-height: 1.5; font-weight: 400; color: var(--text-soft) !important;
}
.mh-packs .pack .plain-list { gap: 10px; margin: 0 0 auto; }
.mh-packs .pack .plain-list li { padding-left: 22px; font-size: 14px; line-height: 1.55; }
.mh-packs .pack .plain-list li::before { left: 2px; top: 9px; width: 10px; height: 1px; }
.mh-packs .pack .note,
.mh-packs .pack-proof,
.mh-packs .pack-scope { margin: 0 !important; padding: 0; border: 0; font-size: 13px !important; line-height: 1.55; color: var(--text-faint) !important; }
.mh-packs .pack-cta { order: 4; margin: 0 !important; }
.mh-packs .pack-cta .btn {
  display: flex; width: 100%;
  background: transparent; border-color: var(--line-strong); box-shadow: none; color: var(--text);
}
.mh-packs .pack-cta .btn:hover { border-color: var(--accent); background-color: var(--surface-2); filter: none; }

/* ----------------------------------------------------------- selected work */

.mh-more { margin: 32px 0 0; }

/* --------------------------------------------------------------- approach */

.mh-way {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 64px;
  align-items: start;
}
.mh-way__rule { width: 96px; height: 2px; }
.mh-way__list { margin: 0; padding: 0; list-style: none; }
.mh-way__row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 16px;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.mh-way__row:last-child { border-bottom: 1px solid var(--line); }
.mh-way__n { font-family: var(--mono); font-size: 13px; line-height: 28px; letter-spacing: 0.08em; color: var(--accent); }
.mh-way__copy { display: grid; gap: 8px; min-width: 0; }
.mh-way__t { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.mh-way__b { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-soft); max-width: 60ch; }

/* ------------------------------------------------------------------ start */

.mh-cta {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 48px 64px;
  align-items: start;
  padding: 56px;
}
.mh-cta__copy { display: grid; gap: 24px; align-content: start; min-width: 0; }
.mh-cta__title { max-width: 14ch; }
.mh-cta__note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-soft); }
.mh-steps { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.mh-step {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.mh-step__n { font-family: var(--mono); font-size: 13px; line-height: 26px; letter-spacing: 0.08em; color: var(--accent); }
.mh-step__copy { display: grid; gap: 6px; min-width: 0; }
.mh-step__t { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.mh-step__b { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-soft); }

/* =============================================================== WORK == */

.mw-sec { padding-block: 96px; border-top: 1px solid var(--line); }
.mw-sec--cta { border-top: 0; padding-top: 0; }
.mw-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 56px;
}
.mw-head__lead { display: grid; gap: 20px; min-width: 0; }
.mw-head__note { padding-bottom: 6px; }
.mw-head__note--sm { font-size: 15px; line-height: 1.6; }
.mw-stack-24 { display: grid; gap: 24px; min-width: 0; }
.mw-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------- hero */

.mw-hero { position: relative; padding-top: 88px; padding-bottom: 96px; overflow: hidden; }
.mw-hero__lines {
  opacity: 1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 72% 58% at 28% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 58% at 28% 0%, #000 25%, transparent 78%);
}
.mw-hero__inner { position: relative; }
.mw-hero__top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 64px;
  align-items: end;
}
.mw-hero__title { max-width: 17ch; }
.mw-hero__side { padding-bottom: 8px; }
/* The stage (status key beside the review log) sits in the "How we label and review work" section. */
.mw-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px;
  align-items: stretch;
}

/* Status key: what each label means, and how many entries carry it. */
.mw-key { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); }
.mw-key__head { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.mw-key__rows { margin: 0; padding: 0; list-style: none; }
.mw-key__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px;
  padding: 18px 20px; border-top: 1px solid var(--line);
}
.mw-key__rows > li:first-child { border-top: 0; }
.mw-key__word { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.mw-key__count { font-size: 32px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.mw-key__def { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.mw-key__foot { margin: auto 0 0; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--text-soft); }

/* Review log, built on .mu-ledger. */
.mw-log { display: flex; flex-direction: column; border-radius: var(--radius-lg); }
.mw-log .mu-ledger__foot { margin-top: auto; }
.mw-log__title {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font: inherit; letter-spacing: inherit; color: var(--text);
}
.mw-log__title svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.mw-log__cols,
.mw-log__row {
  display: grid;
  grid-template-columns: 11ch minmax(0, 1.25fr) minmax(0, 1fr) auto;
  grid-template-areas: "date what sector state";
  align-items: center;
  gap: 4px 24px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.mw-log__cols { padding-block: 8px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.mw-log__cols > :last-child { justify-self: end; }
.mw-log__rows { margin: 0; padding: 0; list-style: none; }
.mw-log__rows > li:last-child { border-bottom: 0; }
.mw-log__row { position: relative; min-height: 62px; }
.mw-log__date { grid-area: date; color: var(--text-faint); white-space: nowrap; }
.mw-log__what { grid-area: what; display: grid; gap: 2px; min-width: 0; }
.mw-log__name { font-family: var(--sans); font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-log__host { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-log__sector { grid-area: sector; font-family: var(--sans); font-size: 14px; color: var(--text-soft); min-width: 0; }
.mw-log__state { grid-area: state; justify-self: end; }
.mw-log__rows > li:first-child { background: var(--surface-2); }
.mw-log__rows > li:first-child::before {
  content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--mus-gradient);
}
@container (max-width: 560px) {
  .mw-log__cols { display: none; }
  .mw-log__row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "what state" "date sector";
    gap: 6px 12px;
  }
  .mw-log__sector { justify-self: end; text-align: right; }
  /* Long names wrap instead of being cut off on a phone. */
  .mw-log__name, .mw-log__host { white-space: normal; overflow-wrap: anywhere; }
}

/* ---------------------------------------------------- selected work chapters */
/* .chapter.mw-ch outranks the shared .chapter card rules in styles.css. */

/* One dated line above the stories. The date is rendered from REVIEWED_ON. */
.mw-reviewed { margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: var(--text-soft); max-width: 68ch; }
.mw-chapters { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.chapter.mw-ch {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) minmax(0, 400px);
  gap: 32px 56px;
  align-items: start;
  padding: 56px 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  scroll-margin-top: 6rem;
}
.chapter.mw-ch + .chapter.mw-ch { margin-top: 0; }
.chapter.mw-ch:hover { border-color: var(--line); }
.mw-ch__aside { display: grid; gap: 16px; align-content: start; justify-items: start; }
.mw-ch__n { margin: 0; font-size: 56px; line-height: 1; font-weight: 600; letter-spacing: -0.045em; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.mw-ch .status { min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text-soft); }
.mw-ch .status .mu-signal { --_h: 16px; }
.mw-ch__kind { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.mw-ch__main { display: grid; gap: 14px; align-content: start; min-width: 0; }
.mw-ch__name { margin: 0; font-size: 34px; line-height: 1.12; font-weight: 600; letter-spacing: -0.03em; color: var(--text); }
.mw-ch__sector { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--accent); }
/* Story facts: the need, what we built, who it is for. Labels match the scope-boundary summary. */
.mw-facts { display: grid; gap: 16px; margin: 6px 0 0; min-width: 0; }
.mw-fact { display: grid; gap: 6px; min-width: 0; }
.mw-fact dt { font-family: var(--mono); font-size: 12px; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }
.mw-fact dd { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-soft); max-width: 64ch; overflow-wrap: anywhere; }
.mw-limits { margin: 6px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line-strong); }
.mw-limits summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  cursor: pointer; list-style: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-soft); border-radius: 4px;
}
.mw-limits summary::-webkit-details-marker { display: none; }
.mw-limits summary svg { width: 14px; height: 14px; flex: none; }
.mw-limits[open] summary svg { transform: rotate(90deg); }
.mw-limits summary:hover { color: var(--text); }
.mw-limits summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mw-limits p { margin: 0 0 6px; font-size: 15px; line-height: 1.6; color: var(--text-soft); max-width: 64ch; }

/* Workflow outline: the mark's rising grammar as plain bars. */
.mw-flow { margin: 0; padding: 20px 22px 18px; display: grid; gap: 20px; }
.mw-flow__cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.mw-flow__name { font-size: 14px; font-weight: 600; color: var(--text); }
.mw-flow__note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.mw-flow__steps {
  position: relative; margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.mw-flow__steps::before { content: ""; position: absolute; left: 0; right: 0; top: 96px; height: 1px; background: var(--line-strong); }
.mw-step { display: grid; grid-template-rows: 96px auto auto; row-gap: 10px; min-width: 0; }
.mw-step__bar { align-self: end; display: block; width: 12px; border-radius: 999px; background: var(--text-faint); }
.mw-step:nth-child(1) .mw-step__bar { height: 38px; }
.mw-step:nth-child(2) .mw-step__bar { height: 57px; }
.mw-step:nth-child(3) .mw-step__bar { height: 76px; }
.mw-step:nth-child(4) .mw-step__bar { height: 96px; background: var(--accent); }
.mw-step__n { margin-top: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--text-faint); }
.mw-step:nth-child(4) .mw-step__n { color: var(--accent); }
.mw-step__label { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--text); overflow-wrap: break-word; }
.mw-flow__foot { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5; color: var(--text-faint); }

/* --------------------------------------------------------- portfolio index */

.mw-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 8px; padding: 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.mw-tools__label { padding: 0 12px 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.mw-chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; color: var(--text-soft); text-decoration: none;
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.mw-chip:hover { background: var(--surface-2); color: var(--text); }
.mw-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mw-chip__n { font-family: var(--mono); font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.mw-band {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px 48px;
  padding: 48px 0; border-top: 1px solid var(--line);
}
.mw-band:first-of-type { border-top: 0; }
.mw-band__aside { display: grid; gap: 12px; align-content: start; }
.mw-band__title { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.mw-band__count { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.mw-band__def { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-soft); max-width: 34ch; }
.mw-cards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mw-card {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 20px 20px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.mw-card:hover { border-color: var(--line-strong); }
.mw-card__kind { margin: 0; font-family: var(--mono); font-size: 11px; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.mw-card__name { margin: 4px 0 0; font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.mw-card__sector { margin: 0; font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--accent); }
.mw-card__desc { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-soft); }
.mw-card__foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.mw-card__foot .mu-arrow-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-card__none { display: flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--text-faint); }
.mw-card__ch { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin-top: -6px; font-size: 14px; }

/* ------------------------------------------------------------------ closing */

.mw-cta {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 64px;
  align-items: end;
  padding: 56px;
}
.mw-cta__side { padding-bottom: 4px; }

/* ============================================================== RESPONSIVE */

@media (max-width: 1080px) {
  .mh-hero, .mh-offer, .mh-way, .mh-cta { grid-template-columns: minmax(0, 1fr); }
  .mh-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mh-stage:nth-child(3) { padding-left: 0; border-left: 0; }
  .mh-do { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mw-stage { grid-template-columns: minmax(0, 1fr); }
  .chapter.mw-ch { grid-template-columns: 120px minmax(0, 1fr); }
  .mw-ch .mw-flow { grid-column: 2 / -1; }
  .mw-band { grid-template-columns: minmax(0, 1fr); }
  .mw-band__def { max-width: 60ch; }
}
@media (max-width: 720px) {
  .mh-sec { padding-block: 64px; }
  .mh-sec--end { padding-bottom: 112px; }
  .mh-hero-wrap { padding-block: 48px 64px; }
  .mh-head, .proof-head { grid-template-columns: minmax(0, 1fr); margin-bottom: 32px; }
  .mh-actions .mu-btn { flex: 1 1 100%; }
  .flow__row { grid-template-columns: 24px minmax(0, 1fr); padding: 14px 16px 14px 12px; }
  .flow__row::before { left: 23px; }
  .flow__head, .flow__foot { padding-inline: 16px; }
  .mh-stages { margin-top: 56px; }
  .mh-stage { padding: 22px 16px 24px 0; }
  .mh-stage + .mh-stage { padding-left: 16px; }
  .mh-stage:nth-child(3) { padding-left: 0; }
  .mh-stage__word { font-size: 24px; }
  .mh-legend li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .mh-do { grid-template-columns: minmax(0, 1fr); }
  .mh-do__item { padding: 24px 20px; }
  .mh-packs { grid-template-columns: minmax(0, 1fr); }
  .mh-packs .pack { padding: 22px; }
  .mh-way__row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 22px 0; }
  .mh-cta { padding: 28px 20px; }

  .mw-sec { padding-block: 64px; }
  .mw-sec--cta { padding-top: 0; }
  .mw-hero { padding-top: 48px; padding-bottom: 64px; }
  .mw-hero__top, .mw-head, .mw-cta { grid-template-columns: minmax(0, 1fr); }
  .mw-head { margin-bottom: 32px; }
  .mw-actions .btn { flex: 1 1 100%; }
  .chapter.mw-ch { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 40px 0; }
  .mw-ch .mw-flow { grid-column: auto; }
  .mw-ch__aside { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
  .mw-ch__n { font-size: 40px; width: 100%; }
  .mw-ch__name { font-size: 28px; }
  .mw-flow { padding: 16px; }
  .mw-flow__steps { gap: 8px; }
  .mw-step__label { font-size: 12px; }
  .mw-tools { border-radius: var(--radius); }
  .mw-tools__label { width: 100%; padding: 8px 10px 4px; }
  .mw-chip { flex: 1 1 calc(50% - 6px); justify-content: space-between; padding: 0 12px; }
  .mw-band { padding: 36px 0; }
  .mw-cards { grid-template-columns: minmax(0, 1fr); }
  .mw-cta { padding: 28px 20px; }
}
