/* Shared pieces for the five business workflows. */

.wf-bar { padding-top: 16px; padding-bottom: 14px; border-bottom: 2px solid rgba(34, 50, 44, 0.1); }
.switch-b { text-decoration: none; color: var(--ink); }
.switch-b[aria-current="page"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.switch-b[aria-current="page"] .swatch { border-color: var(--white); }
a.back-btn { text-decoration: none; color: var(--ink); }

.wf-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.wf-sample { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }

/* Traced phrases: stronger than the site's hover so the link reads at a glance. */
mark.hot, .att.hot { background-color: var(--mustard) !important; }

.wf-foot { margin-top: clamp(48px, 7vw, 96px); padding-block: 28px; background: var(--ink); color: var(--paper); }
.wf-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.wf-foot img { height: 28px; width: auto; }
.wf-foot p { color: var(--on-ink-soft); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* The map walk workflow page. */

/* A wider page than the site's usual 1180px column, with slimmer side gutters, so the map and the chapter share the width. */
:root { --wrap: 1440px; --gut: clamp(16px, 2.2vw, 32px); }

.mw-intro { padding-top: clamp(28px, 4vw, 52px); }
.mw-h { font-size: clamp(2rem, 4.2vw, 3.4rem); max-width: 18em; }
.mw-lead { margin-top: 16px; color: var(--ink-soft); }

.mw-story { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 2.6vw, 40px); margin-top: clamp(28px, 4vw, 48px); align-items: start; }
.mw-stick { position: sticky; top: 14px; display: grid; gap: 10px; }

.mw-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.8rem; font-weight: 600; }
.mw-key li { display: inline-flex; align-items: center; gap: 7px; }
.mw-k-line { width: 22px; border-top: 2.5px solid var(--green); }
.mw-k-line.is-you { border-top: 2.5px dashed var(--brick); }
.mw-k-line.is-lock { border-top: 2.5px dotted var(--ink-soft); }

/* ---------- The map, top to bottom ---------- */
.mw-map { position: relative; display: grid; grid-template-columns: 58px minmax(0, 0.78fr) minmax(0, 1.11fr) minmax(0, 1.11fr); border: var(--line) solid var(--ink); border-radius: var(--r-lg); overflow: hidden; background: var(--white); }
.mw-wires { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; }
.mw-bg-cust { background: var(--white); }
.mw-bg-ai { background: rgba(213, 227, 208, 0.5); }
.mw-bg-team { background: rgba(241, 199, 172, 0.38); }

.mw-lane-h { display: grid; gap: 1px; padding: 9px 12px 8px; border-bottom: 2px solid var(--ink); border-left: 1px dashed rgba(34, 50, 44, 0.2); }
.mw-lane-n { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.02rem; line-height: 1.15; }
.mw-lane-s { font-size: 0.72rem; color: var(--ink-soft); line-height: 1.25; }
.mw-stage { grid-column: 1; display: grid; place-content: center; justify-items: center; gap: 2px; padding: 6px 2px; border-top: 2px dotted rgba(34, 50, 44, 0.22); background: var(--paper); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); text-align: center; }
.mw-stage span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink-soft); font-family: var(--serif); font-size: 0.82rem; letter-spacing: 0; color: var(--ink); background: var(--white); }
.mw-stage:nth-child(4) { border-top: 0; }
.mw-cell { display: grid; align-content: center; gap: 8px; min-height: 60px; padding: 9px 12px 9px 30px; border-top: 2px dotted rgba(34, 50, 44, 0.22); border-left: 1px dashed rgba(34, 50, 44, 0.2); }

.mw-node { position: relative; z-index: 3; display: grid; gap: 1px; padding: 6px 10px 7px; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--white); color: var(--ink); text-decoration: none; box-shadow: 0 3px 0 var(--ink); transition: background-color 0.35s var(--ease-snap), opacity 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, color 0.35s ease; }
.mw-node:hover { border-color: var(--ink); opacity: 1; }
.mw-node-k { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.mw-node-t { font-weight: 700; font-size: 0.9rem; line-height: 1.22; }
.mw-node.mw-ai { background: var(--green-wash); }
.mw-node.is-gate { border-color: var(--brick); border-width: 3px; background: var(--blush); }
.mw-node.is-keep { border-style: dashed; border-color: var(--brick); background: var(--white); }
.mw-node.is-lockbox:not(.is-open) { border-style: dotted; border-color: var(--ink-soft); background: var(--paper); box-shadow: none; color: var(--ink-soft); }

/* Walking states: ahead is quiet, behind is ticked, here is lit. */
.mw-node.is-future { opacity: 0.45; box-shadow: none; }
.mw-node::after { content: ""; opacity: 0; transform: scale(0.4); transition: opacity 0.25s ease, transform 0.3s var(--ease-snap); }
.mw-node.is-done::after { opacity: 1; transform: none; position: absolute; right: -7px; top: -7px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5 L7 11.5 L12 5' fill='none' stroke='%23fffbf1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.mw-node.is-now { background: var(--mustard); border-color: var(--ink); border-style: solid; color: var(--ink); opacity: 1; box-shadow: 0 3px 0 var(--ink), 0 0 0 5px rgba(227, 167, 47, 0.35); }
.mw-node.is-now .mw-node-k { color: var(--ink); }

/* Each handoff: a faint base line, and a live line that draws itself in from source to target when reached. */
.mw-base { fill: none; stroke: var(--ink); stroke-width: 1.6; opacity: 0.2; stroke-linejoin: round; }
.k-you .mw-base { stroke: var(--brick); stroke-dasharray: 6 4; opacity: 0.35; }
.k-lock .mw-base { stroke: var(--ink-soft); stroke-dasharray: 2 5; stroke-linecap: round; opacity: 0.6; }
.mw-base.mw-arrow { stroke-dasharray: none; }
.mw-prog { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.mw-prog-arrow { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; opacity: 0; }
.mw-ready .mw-prog { transition: stroke-dashoffset 0.6s cubic-bezier(0.45, 0, 0.2, 1), stroke 0.35s ease; }
.mw-ready .mw-prog-arrow { transition: opacity 0.2s ease, stroke 0.35s ease; }
.is-reached .mw-prog { stroke-dashoffset: 0; }
.is-reached .mw-prog-arrow { opacity: 1; transition-delay: 0.45s; }
.is-hot .mw-prog, .is-hot .mw-prog-arrow { stroke: var(--ink); stroke-width: 2.8; }
/* Dashed handoffs can't draw in along a dash, so they fade in instead. */
.k-you .mw-prog, .k-lock .mw-prog { stroke-dashoffset: 0; opacity: 0; }
.k-you .mw-prog { stroke: var(--brick); stroke-dasharray: 6 4; }
.k-lock .mw-prog { stroke-dasharray: 2 5; stroke-linecap: round; }
.mw-ready .k-you .mw-prog, .mw-ready .k-lock .mw-prog { transition: opacity 0.4s ease; }
.k-you.is-reached .mw-prog, .k-lock.is-reached .mw-prog { opacity: 1; }
.k-you .mw-prog-arrow { stroke: var(--brick); }
.k-you.is-hot .mw-prog, .k-you.is-hot .mw-prog-arrow { stroke: var(--brick); }

/* ---------- The progress bar under the map ---------- */
.mw-bar { display: flex; gap: 4px; padding: 2px 0; }
.mw-seg { position: relative; flex: 1 1 0; height: 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); overflow: hidden; }
.mw-seg::after { content: ""; position: absolute; inset: -8px 0; } /* a taller hit area than the bar itself */
.mw-seg-fill { position: absolute; inset: 0; background: var(--green); transform: scaleX(0); transform-origin: left center; }
.mw-seg[aria-current="step"] { border-color: var(--ink); }
.mw-seg[aria-current="step"] .mw-seg-fill { background: var(--mustard); }
.mw-seg:hover { background: var(--mustard-wash); }
.mw-now { display: none; }


/* ---------- Chapters ---------- */
.mw-view { display: grid; }
.mw-ch { min-height: 66vh; padding-block: 6vh; scroll-margin-top: 14px; opacity: 0.45; transition: opacity 0.45s var(--ease-snap); display: grid; gap: 14px; align-content: start; }
.mw-ch:first-child { padding-top: 0; }
.mw-ch:last-child { min-height: 80vh; }
.mw-ch.is-on { opacity: 1; }
.mw-ch h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.mw-ch h2:focus { outline: none; }
.mw-ch > p { font-size: 1.02rem; max-width: 36em; }
/* Named with its chapter so the paragraph size above does not win over it. */
.mw-ch > .mw-ch-k { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.mw-lane-chip { padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); letter-spacing: 0; text-transform: none; font-size: 0.82rem; color: var(--ink); background: var(--white); }
.mw-chip-ai { background: var(--green-wash); }
.mw-chip-team { background: var(--blush); }

.mw-steps { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.mw-steps li { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.mw-steps .tiny { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--green-wash); border: 2px solid var(--green); }
.mw-src { border-top: 2px dotted rgba(34, 50, 44, 0.3); padding-top: 6px; }
.mw-src summary { min-height: 40px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.mw-src .req { margin-top: 8px; box-shadow: none; }
.mw-src .req p { font-size: 0.97rem; }
.mw-keep .person-note { margin: 0; padding: 12px 16px; border-left-width: 6px; background: var(--white); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 1.05rem; }
.mw-mini { font-family: var(--sans); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.mw-you { display: grid; gap: 6px; }
.mw-you li { position: relative; padding-left: 22px; font-weight: 600; }
.mw-you li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 11px; height: 11px; border-radius: 3px; background: var(--brick); border: 2px solid var(--ink); }
.mw-also { margin-top: 12px; padding-top: 10px; border-top: 2px dotted rgba(34, 50, 44, 0.3); font-size: 0.92rem; color: var(--ink-soft); }
.mw-linkish { font-weight: 700; color: var(--ink); text-decoration-color: var(--brick); text-underline-offset: 3px; }
.mw-ok { font-size: 0.9rem; padding: 6px 14px; }
.mw-locked { padding: 20px 22px; border: 2px dashed var(--ink-soft); border-radius: var(--r-md); color: var(--ink-soft); }
.mw-locked .btn { margin-top: 14px; }

/* ---------- Pinned steps ----------
   With motion allowed (html.mw-pin, set by js/workflow/map-walk.js) the
   chapters are stacked in a view that stays pinned beside the map, and
   scrolling on hands over from one step to the next. js/steps.js runs it
   and "Pinned steps" in css/styles.css lays it out; these are this page's
   own sizes. Without it, and with reduced motion, the chapters above are a
   plain feed. */
html.mw-pin .mw-ch { min-height: 0; padding-block: 0 48px; }

@media (max-width: 1100px) {
  .mw-story { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .mw-lane-s { display: none; }
}
@media (max-width: 900px) {
  .mw-story { grid-template-columns: 1fr; gap: 0; }
  .mw-stick { top: 0; z-index: 5; margin-inline: calc(-1 * var(--gut)); padding: 8px var(--gut); background: var(--paper); border-bottom: 2px solid rgba(34, 50, 44, 0.14); }
  .mw-map, .mw-map-top { display: none; }
  .mw-now { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.86rem; font-weight: 600; }
  .mw-now-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mw-bar { padding-top: 2px; }
  .mw-seg { height: 8px; }
  .mw-ch { min-height: 0; padding-block: 32px; opacity: 1; scroll-margin-top: 104px; }
  /* A block, so the bar and the view both stay pinned for the whole story. */
  html.mw-pin .mw-story { display: block; }
  html.mw-pin .mw-ch { padding-block: 20px 48px; }
}

.workflow-sample { margin-block: 48px 24px; color: var(--ink-soft); font-size: 0.95rem; }

/*
  The page is drawn by js/workflow/. On a first visit the browser can paint
  before those scripts run, which would put the footer (and its dark band) at
  the top of the screen for a frame, just as a door crossing lands here.
  Hold a full screen for the content so the footer always starts below the fold.
*/
#main { min-height: 100vh; min-height: 100svh; }
