/* Workflow Mapper: page-specific styles. Builds on /styles.css tokens. */

/* Hero */
.wm-hero { padding-bottom: clamp(110px, 12vw, 170px); }
.wm-hero .phero__title { max-width: 17ch; }
.wm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.wm-btn-line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #c9ccd2; }
.wm-btn-line:hover { box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.wm-actions .ar, .wm-actions .btn:hover .ar { transform: none; }
.wm-actions .btn:hover .ar { transform: translateY(2px); }
.wm-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #646973; }
.wm-meta span { display: inline-flex; align-items: center; gap: 10px; }
.wm-meta span::before { content: ""; width: 5px; height: 5px; background: var(--blue); }
.wm-meta a { color: var(--blue); border-bottom: 1px solid currentColor; }

/* Section heads */
.wm-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: 48px; }
.wm-head h2 { margin-top: 14px; font-size: clamp(34px, 4.2vw, 56px); max-width: 18ch; }
.wm-head > p { color: var(--text); max-width: 32em; }
.wm-head strong { color: var(--ink); font-weight: 600; }

/* Demo */
.wm-demo { background: var(--bg-2); padding: clamp(96px, 12vw, 160px) 0; }
.wm-stage { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.wm-notes, .wm-out { background: #fff; border: 1px solid var(--line); }
.wm-notes { display: flex; flex-direction: column; padding: 24px; position: sticky; top: 88px; }
.wm-notes__top, .wm-out__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wm-notes__top .mono, .wm-out__top > .mono { color: #646973; }
.wm-tag { padding: 4px 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.wm-notes__src { margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 14px; color: #646973; }
.wm-notes__list { counter-reset: n; display: grid; gap: 2px; margin-top: 12px; }
.wm-notes__list li { counter-increment: n; position: relative; padding: 8px 8px 8px 30px; font-size: 14.5px; line-height: 1.5; color: var(--text); transition: background-color .35s ease, color .35s ease; }
.wm-notes__list li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 4px; top: 10px; font-family: var(--mono); font-size: 10.5px; color: #b5b9c0; transition: color .35s ease; }
.wm-notes__list li::after { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--blue); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--ease); }
.wm-notes__list li.is-read { color: var(--ink); }
.wm-notes__list li.is-read::before { color: var(--blue); }
.wm-notes__list li.is-read::after { transform: scaleY(1); }
.wm-notes__list li.is-hit { background: #eef1ff; }
.wm-notes__list li:last-child { font-family: var(--serif); font-size: 15.5px; }
.wm-notes__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.wm-notes__foot .btn[disabled] { opacity: .6; cursor: progress; }
.wm-status { font-size: 13px; color: #646973; min-height: 1.4em; }

.wm-out { min-width: 0; }
.wm-out__top { padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--line); }

/* Tabs */
.wm-tabs { display: flex; gap: 4px; }
.wm-tabs [role="tab"] { height: 36px; padding: 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #3c4047; background: var(--bg-2); transition: background-color .25s ease, color .25s ease; }
.wm-tabs [role="tab"]:hover { color: var(--blue); background: #eceef4; }
.wm-tabs [role="tab"][aria-selected="true"] { background: var(--blue); color: #fff; }
.wm-panel { padding: 20px 24px 24px; }
.js .wm-panel.is-in { animation: panelIn .45s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Legend */
.wm-swipe { display: none; margin: -4px 0 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--blue); }
.wm-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #646973; }
.wm-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg { display: inline-block; width: 18px; height: 12px; }
.lg--node { background: #fff; box-shadow: inset 0 0 0 1px #9aa0a8; }
.lg--wait { background: #f2f4ff; outline: 1.5px dashed var(--blue); outline-offset: -1.5px; }
.lg--hand { height: 2px; background: var(--blue); position: relative; }
.lg--hand::after { content: ""; position: absolute; left: 6px; top: -2px; width: 6px; height: 6px; background: var(--blue); }
.lg--exc { height: 0; border-top: 2px dashed var(--blue); }

/* Diagram */
.wm-scroll { overflow-x: auto; overscroll-behavior-x: contain; background: #fff; border: 1px solid var(--line); scrollbar-width: thin; }
.wm-svg { width: 100%; min-width: 660px; height: auto; font-family: var(--sans); }
.wm-svg .lane { fill: #fff; }
.wm-svg .lane--alt { fill: #fafafb; }
.wm-svg .lane__rule { stroke: var(--line); stroke-width: 1; }
.wm-svg .lane__head { fill: var(--navy); }
.wm-svg .lane__name { fill: #fff; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; }

.wm-svg .edge__line { fill: none; stroke: #9aa0a8; stroke-width: 1.5; stroke-linejoin: round; stroke-dasharray: var(--len, 2000); stroke-dashoffset: 0; }
.wm-svg .edge--hand .edge__line { stroke: var(--blue); }
.wm-svg .edge__dot { fill: var(--blue); }
.wm-svg .edge__label rect { fill: #fff; stroke: var(--line); }
.wm-svg .edge__label text { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; fill: var(--blue); }
.wm-svg.is-done .edge--exc .edge__line { stroke-dasharray: 5 4; }

.wm-svg .node { cursor: pointer; outline: none; }
.wm-svg .node__in { transition: transform .35s var(--ease); }
.wm-svg .node__box { fill: #fff; stroke: #9aa0a8; stroke-width: 1; transition: stroke .25s ease, fill .25s ease; }
.wm-svg .node__id { font-family: var(--mono); font-size: 10.5px; fill: var(--blue); }
.wm-svg .node__title { font-size: 12.5px; font-weight: 500; fill: var(--ink); letter-spacing: -.01em; }
.wm-svg .node__meta { font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; fill: var(--soft); }
.wm-svg .node__diamond { fill: var(--blue); }
.wm-svg .node--start .node__box, .wm-svg .node--end .node__box { fill: var(--navy); stroke: var(--navy); }
.wm-svg .node--start text, .wm-svg .node--end text { fill: #fff; }
.wm-svg .node--start .node__meta, .wm-svg .node--end .node__meta { fill: rgba(255, 255, 255, .7); }
.wm-svg .node--start .node__id, .wm-svg .node--end .node__id { fill: #9fb0ff; }
.wm-svg .node--wait .node__box { fill: #f2f4ff; stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 5 3; }
.wm-svg .node--wait .node__meta { fill: var(--blue); }
.wm-svg .node:hover .node__in, .wm-svg .node.is-on .node__in { transform: translateY(-3px); }
.wm-svg .node:hover .node__box, .wm-svg .node.is-on .node__box { stroke: var(--blue); stroke-width: 2; }
.wm-svg .node:focus-visible .node__box { stroke: var(--blue); stroke-width: 3; }
.wm-svg .node, .wm-svg .edge { transition: opacity .3s ease; }
.wm-svg.is-focus .node:not(.is-on), .wm-svg.is-focus .edge:not(.is-on) { opacity: .28; }
.wm-svg.is-focus .edge.is-on .edge__line { stroke-width: 2.4; }

/* Draw-in (only when JS is running the sequence) */
.wm-svg .node { opacity: 0; }
.wm-svg .node__in { transform: translateY(10px); }
.wm-svg .edge__line { stroke-dashoffset: var(--len, 2000); }
.wm-svg .edge { opacity: 0; }
.wm-svg .edge__label, .wm-svg .edge__dot { opacity: 0; }
.wm-svg.is-drawn .edge { opacity: 1; transition: opacity .15s linear var(--d); }
.wm-svg.is-drawn .node { opacity: 1; transition: opacity .5s var(--ease) var(--d); }
.wm-svg.is-drawn .node__in { transform: none; transition: transform .6s var(--ease) var(--d); }
.wm-svg.is-drawn .edge__line { stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease) var(--d); }
.wm-svg.is-drawn .edge__label, .wm-svg.is-drawn .edge__dot { opacity: 1; transition: opacity .4s ease var(--d); }
.wm-svg.is-done .node, .wm-svg.is-done .edge, .wm-svg.is-done .node__in, .wm-svg.is-done .edge__label, .wm-svg.is-done .edge__dot { transition-delay: 0s; }
.wm-svg.is-done .node__in { transition: transform .35s var(--ease); }
.wm-svg.is-done .node:hover .node__in, .wm-svg.is-done .node.is-on .node__in { transform: translateY(-3px); }

/* Detail */
.wm-detail { margin-top: 14px; min-height: 92px; padding: 16px 18px; background: var(--bg-2); }
.wm-detail__hint { font-size: 14px; color: #646973; }
.wm-detail__grid { display: grid; grid-template-columns: 180px 1fr; gap: 10px 24px; align-items: start; animation: panelIn .35s var(--ease) both; }
.wm-detail__title { display: grid; gap: 4px; }
.wm-detail__title .mono { color: var(--blue); }
.wm-detail__title strong { font-size: 18px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.wm-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.wm-detail dt { font-size: 10.5px; color: var(--soft); }
.wm-detail dd { font-size: 14px; color: var(--ink); margin-top: 2px; }
.wm-detail__flags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.wm-flag { display: inline-block; padding: 3px 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: #3c4047; background: #fff; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.wm-flag--wait { color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.wm-flag--hand { color: #fff; background: var(--blue); box-shadow: none; }

/* Tables */
.wm-table { font-size: 14.5px; }
.wm-table th, .wm-table td { padding: 12px 14px; }
.wm-table td:first-child { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--blue); }
.wm-table td .wm-flag { margin: 1px 0; }
.wm-sub { margin-top: 28px; font-size: 22px; letter-spacing: -.025em; }
.wm-bottles { counter-reset: b; display: grid; gap: 12px; margin-top: 14px; }
.wm-bottles li { counter-increment: b; position: relative; padding-left: 34px; font-size: 15px; color: var(--text); }
.wm-bottles li::before { content: counter(b, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 12px; color: var(--blue); }
.wm-bottles strong { color: var(--ink); font-weight: 600; }

/* Code */
.wm-code { position: relative; background: var(--navy-2); color: #e6e9f5; }
.wm-code pre { margin: 0; padding: 20px 22px; padding-right: 84px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6; tab-size: 2; }
.wm-code--sm pre { padding: 16px 18px; padding-right: 84px; font-size: 13px; }
.wm-copy { position: absolute; top: 10px; right: 10px; height: 30px; padding: 0 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); transition: background-color .25s ease; z-index: 1; }
.wm-copy:hover { background: rgba(255, 255, 255, .2); }
.wm-copy.is-ok { background: var(--blue); box-shadow: none; }
.wm-note { margin-top: 12px; font-size: 14px; color: #646973; }
code { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { padding: 1px 5px; background: #eef0f4; color: var(--ink); }

/* Opportunities */
.wm-opps { margin-top: 64px; }
.wm-opps__head { display: flex; justify-content: space-between; align-items: end; gap: 12px 40px; flex-wrap: wrap; margin-bottom: 20px; }
.wm-opps__head h3 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.03em; }
.wm-opps__head p { color: var(--text); max-width: 30em; font-size: 15.5px; }
.wm-score { background: #fff; }
.wm-score tbody tr:nth-child(odd) { background: #fff; }
.wm-score tbody tr { border-bottom: 1px solid var(--line); }
.wm-score tbody tr.is-top { background: #eef1ff; }
.wm-score td:nth-child(2) { font-weight: 500; color: var(--ink); min-width: 190px; }
.wm-score td:nth-child(3) { font-family: var(--mono); font-size: 12px; color: #646973; white-space: nowrap; }
.wm-meter { display: inline-flex; align-items: center; gap: 3px; }
.wm-meter i { width: 8px; height: 8px; background: #dfe2e8; }
.wm-meter i.on { background: var(--blue); }
.wm-meter b { margin-left: 6px; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); }
.wm-total { font-size: 22px; font-weight: 500; letter-spacing: -.03em; color: var(--blue); }
.wm-of { font-family: var(--mono); font-size: 11px; color: var(--soft); margin-left: 2px; }
.wm-first { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 32px 48px; margin-top: 20px; padding: 36px; background: var(--navy); color: #fff; }
.wm-first__lead .mono { opacity: .7; }
.wm-first__lead h3 { margin-top: 12px; font-size: clamp(26px, 2.6vw, 34px); }
.wm-first__lead p:not(.mono) { margin-top: 12px; color: rgba(255, 255, 255, .78); font-size: 15.5px; }
.wm-first__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.wm-first__grid div { padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); }
.wm-first__grid dt { opacity: .7; }
.wm-first__grid dd { margin-top: 8px; font-size: 15px; color: rgba(255, 255, 255, .9); }

/* What's inside */
.wm-inside { padding: clamp(96px, 12vw, 160px) 0; }
.wm-inside__in { display: grid; grid-template-columns: 1fr minmax(0, 620px); gap: 64px; align-items: start; }
.wm-inside__left { position: sticky; top: 100px; }
.wm-inside__left h2 { margin-top: 14px; font-size: clamp(34px, 4.2vw, 56px); max-width: 12ch; }
.wm-inside__left p:not(.mono) { margin-top: 22px; color: var(--text); max-width: 26em; }
.wm-inside__list li { position: relative; display: grid; grid-template-columns: 170px 1fr; gap: 6px 24px; padding: 26px 0 28px; border-top: 1px solid var(--line); }
.wm-inside__list li::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.wm-inside__list li:hover::before { transform: scaleX(1); }
.wm-inside__list .mono { grid-row: span 2; color: var(--blue); padding-top: 6px; text-transform: none; }
.wm-inside__list h3 { font-size: 22px; letter-spacing: -.025em; }
.wm-inside__list p { font-size: 15.5px; color: var(--text); }

/* Install */
.wm-install { background: var(--bg-2); padding: clamp(96px, 12vw, 160px) 0; }
.wm-ibox { background: #fff; border: 1px solid var(--line); }
.wm-tabs--lg { padding: 12px; border-bottom: 1px solid var(--line); }
.wm-tabs--lg [role="tab"] { height: 44px; padding: 0 20px; font-size: 13px; }
.wm-ipanel { padding: 36px; }
.wm-steps { display: grid; gap: 32px; max-width: 760px; }
.wm-steps li { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 20px; }
.wm-steps li > div { min-width: 0; }
.wm-steps .num { font-size: 32px; margin: 0; }
.wm-steps h3, .wm-opt h3 { font-size: 22px; letter-spacing: -.025em; }
.wm-steps p, .wm-opt p:not(.mono) { margin-top: 8px; color: var(--text); font-size: 15.5px; }
.wm-steps strong { color: var(--ink); font-weight: 600; }
.wm-steps .wm-code { margin-top: 14px; }
.wm-link { color: var(--blue); border-bottom: 1px solid currentColor; }
.wm-link:hover { color: var(--blue-deep); }
.wm-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.wm-opt { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.wm-opt > .mono { color: var(--blue); margin-bottom: 12px; }
.wm-opt .wm-code { margin-top: 14px; }

/* FAQ */
.wm-faq .faq__grid { max-width: 1000px; margin-left: auto; margin-right: auto; }

/* Lead capture */
.wm-lead { background: var(--navy); color: #fff; padding: clamp(80px, 9vw, 120px) 0; }
.wm-lead__in { display: grid; grid-template-columns: 1.2fr auto; gap: 40px 64px; align-items: end; }
.wm-lead .mono { opacity: .7; }
.wm-lead h2 { margin-top: 14px; font-size: clamp(32px, 3.8vw, 50px); max-width: 16ch; }
.wm-lead p:not(.mono) { margin-top: 18px; max-width: 34em; color: rgba(255, 255, 255, .8); }
.wm-lead__row { display: flex; flex-direction: column; gap: 12px; }
.wm-btn-white { background: #fff; color: var(--navy); justify-content: space-between; }
.wm-btn-white:hover { background: #e9edff; }
.wm-btn-ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); justify-content: space-between; }
.wm-btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* Tablet */
@media (max-width: 1100px) {
  .wm-stage { grid-template-columns: 1fr; }
  .wm-notes { position: static; }
  .wm-notes__list { grid-template-columns: 1fr 1fr; column-gap: 16px; }
}
@media (max-width: 1000px) {
  .wm-head { grid-template-columns: 1fr; align-items: start; }
  .wm-first { grid-template-columns: 1fr; }
  .wm-inside__in { grid-template-columns: 1fr; gap: 40px; }
  .wm-inside__left { position: static; }
  .wm-opts { grid-template-columns: 1fr; gap: 48px; }
  .wm-lead__in { grid-template-columns: 1fr; align-items: start; }
  .wm-lead__row { flex-direction: row; flex-wrap: wrap; }
}

/* Phone */
@media (max-width: 760px) {
  .wm-actions .btn { width: 100%; justify-content: space-between; }
  .wm-notes { padding: 20px 18px; }
  .wm-notes__list { grid-template-columns: 1fr; }
  .wm-out__top { padding: 14px 16px; }
  .wm-tabs { width: 100%; }
  .wm-tabs [role="tab"] { flex: 1 1 0; padding: 0 8px; }
  .wm-panel { padding: 16px; }
  .wm-ipanel { padding: 24px 18px; }
  .wm-tabs--lg { padding: 10px; }
  .wm-detail__grid { grid-template-columns: 1fr; }
  .wm-detail__flags { grid-column: 1; }
  .wm-detail dl { grid-template-columns: 1fr 1fr; }
  .wm-first { padding: 28px 22px; }
  .wm-first__grid { grid-template-columns: 1fr; }
  .wm-inside__list li { grid-template-columns: 1fr; }
  .wm-inside__list .mono { grid-row: auto; padding-top: 0; }
  .wm-steps li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .wm-swipe { display: block; }
  .wm-lead__row { flex-direction: column; }
  .wm-lead__row .btn { width: 100%; }
  .wm-code pre, .wm-code--sm pre { font-size: 12px; padding: 48px 16px 16px; }
  .wm-code pre::before { content: ""; position: absolute; left: 0; right: 0; top: 40px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .wm-code { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  .wm-svg .node, .wm-svg .edge, .wm-svg .edge__label, .wm-svg .edge__dot { opacity: 1; }
  .wm-svg .node__in { transform: none; }
  .wm-svg .edge__line { stroke-dashoffset: 0; }
  .js .wm-panel.is-in { animation: none; }
}

/* ---------- Hero figure ---------- */
.wm-hero .lx-hero { position: relative; z-index: 2; }

/* ---------- Try it: pick or type a workflow ---------- */
.wt { padding: clamp(96px, 12vw, 160px) 0 clamp(80px, 10vw, 130px); background: #fff; }
.wt-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; margin-bottom: 28px; }
.wt-pick .lx-why { grid-column: 2; margin-top: 0; }
.wt-chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; grid-row: span 2; }
.wt-chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 500 15px var(--sans); cursor: pointer; transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .25s var(--ease); }
.wt-chip:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.wt-chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.wt-chip:focus-visible, .wt-lens:focus-visible, .wt-form input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wt-form label { display: block; margin-bottom: 8px; font-size: 11.5px; color: #646973; }
.wt-form__row { display: flex; gap: 8px; }
.wt-form input { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid #c9ccd2; border-radius: 0; background: #fff; font: 400 16px var(--sans); color: var(--ink); transition: border-color .2s ease; }
.wt-form input:focus { border-color: var(--blue); }
.wt-form .btn { height: 48px; }
.wt-hint { margin-top: 8px; min-height: 1.5em; font-size: 13.5px; color: #646973; transition: color .2s ease; }
.wt-hint.is-live { color: var(--blue); }

.wt-run { border: 1px solid var(--line); background: var(--bg-2); }
.wt-run__top { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; padding: 22px 24px 0; }
.wt-run__label { font-size: 11px; color: #646973; }
.wt-run__name { margin-top: 6px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.wt-status { font-size: 11.5px; color: var(--blue); min-height: 1.4em; }
.wt-rail { margin: 6px 24px 0; }

.wt-stage { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; padding: 20px 24px 24px; align-items: start; }
.wt-map { min-width: 0; background: #fff; border: 1px solid var(--line); }
.wt-map > .wm-tabs { padding: 12px 12px 0; }
.wt-map .wm-panel { padding: 12px; }
.wt-scroll { border: 0; }

/* Map drawing */
.wt-svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.wt-svg .lane { fill: #fff; }
.wt-svg .lane--alt { fill: #fafafb; }
.wt-svg .lane__rule { stroke: var(--line); }
.wt-svg .lane__head { fill: var(--navy); }
.wt-svg .lane__name { fill: #fff; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; }
.wt-svg .edge__line { fill: none; stroke: #9aa0a8; stroke-width: 1.5; stroke-linejoin: round; stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); }
.wt-svg .edge--hand .edge__line { stroke: var(--blue); }
.wt-svg .edge__dot { fill: var(--blue); opacity: 0; transform-box: fill-box; transform-origin: center; }
.wt-svg .edge__label { opacity: 0; }
.wt-svg .edge__label rect { fill: #fff; stroke: var(--line); }
.wt-svg .edge__label text { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; fill: #3c4047; }
.wt-svg .edge__label--exc text { fill: var(--blue); }
.wt-svg .edge__label--exc rect { stroke: var(--blue); }
.wt-svg .node { cursor: pointer; outline: none; opacity: 0; }
.wt-svg .node__in { transform: translateY(10px); transition: transform .35s var(--ease); }
.wt-svg .node__box { fill: #fff; stroke: #9aa0a8; stroke-width: 1; transition: stroke .25s ease, fill .25s ease; }
.wt-svg .node__id { font-family: var(--mono); font-size: 10.5px; fill: var(--blue); }
.wt-svg .node__title { font-size: 12.5px; font-weight: 500; fill: var(--ink); letter-spacing: -.01em; }
.wt-svg .node__meta { font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; fill: var(--soft); }
.wt-svg .node__diamond { fill: var(--blue); }
.wt-svg .node__bar { fill: var(--navy); }
.wt-svg .node--start .node__box, .wt-svg .node--end .node__box { fill: var(--navy); stroke: var(--navy); }
.wt-svg .node--start text, .wt-svg .node--end text { fill: #fff; }
.wt-svg .node--start .node__meta, .wt-svg .node--end .node__meta { fill: rgba(255, 255, 255, .7); }
.wt-svg .node--start .node__id, .wt-svg .node--end .node__id { fill: #9fb0ff; }
.wt-svg .node--wait .node__box { fill: #f2f4ff; stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 5 3; }
.wt-svg .node--wait .node__meta { fill: var(--blue); }
.wt-svg .node--exc .node__box { stroke: var(--blue); }
.wt-svg .node--hitl .node__box { stroke: var(--navy); stroke-width: 1.5; }
.wt-svg .node:hover .node__box, .wt-svg .node.is-on .node__box { stroke: var(--blue); stroke-width: 2; }
.wt-svg .node:focus-visible .node__box { stroke: var(--blue); stroke-width: 3; }
.wt-svg .mk { opacity: 0; transform: translateY(4px); transition: opacity .4s ease, transform .5s var(--ease); }
.wt-svg .mk text { font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; }
.wt-svg .mk--agent rect { fill: #fff; stroke: var(--blue); }
.wt-svg .mk--agent text { fill: var(--blue); }
.wt-svg .mk--agent.is-high rect { fill: var(--blue); }
.wt-svg .mk--agent.is-high text { fill: #fff; }
.wt-svg .mk--hitl rect { fill: var(--navy); }
.wt-svg .mk--hitl text { fill: #fff; }

/* Draw sequence: is-drawn (steps), is-friction (hand-offs, waits), is-agents (markers) */
.wt-svg.is-drawn .node { opacity: 1; transition: opacity .5s var(--ease) var(--d); }
.wt-svg.is-drawn .node__in { transform: none; transition: transform .6s var(--ease) var(--d); }
.wt-svg.is-drawn .edge__line { stroke-dashoffset: 0; transition: stroke-dashoffset .8s var(--ease) var(--d); }
.wt-svg.is-drawn .edge__label { opacity: 1; transition: opacity .4s ease calc(var(--d) + .4s); }
.wt-svg.is-friction .edge__dot { opacity: 1; animation: wtPop .7s var(--ease) both; }
.wt-svg.is-friction .edge--exc .edge__line { stroke-dasharray: 5 4; }
.wt-svg.is-friction .node--wait .node__box { animation: wtPulse 1s ease 1; }
.wt-svg.is-agents .mk { opacity: 1; transform: none; }
.wt-svg.is-agents .node:nth-child(2n) .mk { transition-delay: .12s; }
.wt-svg.is-done .node, .wt-svg.is-done .node__in, .wt-svg.is-done .edge__label { transition-delay: 0s; }
.wt-svg.is-done .node:hover .node__in, .wt-svg.is-done .node.is-on .node__in { transform: translateY(-3px); }
@keyframes wtPop { 0% { transform: scale(0); } 60% { transform: scale(1.8); } 100% { transform: scale(1); } }
@keyframes wtPulse { 50% { fill: #dfe5ff; } }

/* Lenses dim everything that is not part of the lens */
.wt-svg .node, .wt-svg .edge, .wt-svg .edge__label { transition: opacity .3s ease; }
.wt-svg.has-lens .node:not(.is-lens), .wt-svg.has-lens .edge:not(.is-lens), .wt-svg.has-lens .edge__label:not(.is-lens) { opacity: .16; }
.wt-svg.has-lens .edge.is-lens .edge__line { stroke-width: 2.6; }

/* Reading panel */
.wt-read { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wt-read__label { font-size: 11.5px; color: var(--blue); }
.wt-read__intro { font-size: 14.5px; color: var(--text); }
.wt-lenses { display: grid; gap: 4px; }
.wt-lens { display: grid; grid-template-columns: 22px 20px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.wt-lens:hover { border-color: var(--blue); }
.wt-lens[aria-pressed="true"] { border-color: var(--blue); background: #eef1ff; box-shadow: inset 3px 0 0 var(--blue); }
.wt-lens__n { padding-top: 2px; font-size: 11px; color: var(--soft); }
.wt-lens__body { display: grid; gap: 2px; min-width: 0; }
.wt-lens__body b { font-weight: 600; font-size: 15px; color: var(--ink); }
.wt-lens__body > span { font-size: 13.5px; line-height: 1.45; color: var(--text); }
.wt-lens__c { margin-left: 6px; font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--blue); }
.wt-sw { display: block; width: 18px; height: 12px; margin-top: 4px; }
.wt-sw--hand { height: 2px; margin-top: 9px; background: var(--blue); position: relative; }
.wt-sw--hand::after { content: ""; position: absolute; left: 6px; top: -2.5px; width: 7px; height: 7px; background: var(--blue); }
.wt-sw--wait { background: #f2f4ff; outline: 1.5px dashed var(--blue); outline-offset: -1.5px; }
.wt-sw--exc { height: 0; margin-top: 10px; border-top: 2px dashed var(--blue); }
.wt-sw--agent { background: var(--blue); }
.wt-sw--hitl { background: var(--navy); }
.wt-detail { min-height: 120px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); }
.wt-detail__top { display: flex; gap: 10px; align-items: baseline; animation: panelIn .35s var(--ease) both; }
.wt-detail__top .mono { color: var(--blue); font-size: 12px; }
.wt-detail__top strong { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.wt-detail__dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; margin-top: 10px; }
.wt-detail__dl dt { font-size: 10.5px; color: var(--soft); }
.wt-detail__dl dd { margin-top: 2px; font-size: 14px; color: var(--ink); }
.wt-detail__why { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--text); }
.wt-detail .wm-detail__flags { margin-top: 10px; }
.wm-flag.wt-flag--agent { color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: #eef1ff; }
.wm-flag.wt-flag--hitl { color: #fff; background: var(--navy); box-shadow: none; }

/* Result */
.wt-result { position: relative; padding: 0 24px 28px; opacity: .35; transition: opacity .6s var(--ease); }
.wt-result.is-in { opacity: 1; }
.wt-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; background: var(--line); border: 1px solid var(--line); }
.wt-stats li { display: grid; gap: 6px; padding: 16px 16px 14px; background: #fff; }
.wt-stat__n { font-size: clamp(30px, 3vw, 42px); font-weight: 500; letter-spacing: -.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.wt-stats li:nth-child(5) .wt-stat__n { color: var(--blue); }
.wt-stats li:nth-child(6) .wt-stat__n { color: var(--navy); }
.wt-stats .mono { font-size: 11px; color: #646973; }
.wt-means { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.wt-means__text { padding: 22px 24px; background: #fff; border: 1px solid var(--line); }
.wt-means__label { font-size: 11.5px; color: var(--blue); margin-bottom: 10px; }
.wt-means__text p { font-size: 16px; line-height: 1.6; color: var(--text); }
.wt-means__text p + p { margin-top: 12px; }
.wt-means__text b { color: var(--ink); font-weight: 600; }
.wt-means__insight { padding-left: 14px; border-left: 2px solid var(--blue); color: var(--ink) !important; }
.wt-means__aside { font-size: 14px !important; color: #646973 !important; }
.wt-first { padding: 22px 24px; background: var(--navy); color: #fff; }
.wt-first .mono { font-size: 11px; color: #9fb0ff; }
.wt-first h4 { margin: 8px 0 14px; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.wt-first dl { display: grid; gap: 10px; }
.wt-first dt { font-size: 10.5px; color: #9fb0ff; }
.wt-first dd { margin-top: 2px; font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, .9); }
.wt-opps { margin-top: 20px; padding: 22px 24px; background: #fff; border: 1px solid var(--line); }
.wt-opps__title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.wt-opps__title span { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; color: #646973; }
.wt-oplist { margin-top: 12px; }
.wt-oplist li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 130px 64px; gap: 14px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--line); }
.wt-oplist li.is-top { background: #eef1ff; }
.wt-op__rank { font-size: 12px; color: var(--blue); }
.wt-op__name { display: grid; gap: 2px; font-weight: 500; color: var(--ink); }
.wt-op__name small { font-size: 10.5px; color: var(--soft); font-weight: 400; }
.wt-op__bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; align-items: end; height: 26px; }
.wt-op__bars i { display: block; height: calc(var(--v) * 100%); background: var(--blue); opacity: .85; transform-origin: bottom; }
.wt-result.is-in .wt-op__bars i { animation: wtGrow .8s var(--ease) both; }
.wt-oplist li:nth-child(2) .wt-op__bars i { animation-delay: .1s; }
.wt-oplist li:nth-child(3) .wt-op__bars i { animation-delay: .2s; }
@keyframes wtGrow { from { transform: scaleY(0); } }
.wt-op__tot { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--soft); }
.wt-op__tot b { font-family: var(--sans); font-size: 22px; font-weight: 500; color: var(--ink); }
.wt-opps .lx-why { margin-top: 14px; }
.wt-actions { margin-top: 20px; align-items: center; }

/* Field note and myth placement */
.wm-fieldnote { margin-top: 20px; }
.wm-myth { margin-top: 32px; }

@media (max-width: 1100px) {
  .wt-stage { grid-template-columns: 1fr; }
  .wt-lenses { grid-template-columns: 1fr 1fr; }
  .wt-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .wt-pick { grid-template-columns: 1fr; }
  .wt-pick .lx-why { grid-column: 1; }
  .wt-chips { grid-row: auto; }
  .wt-means { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wm-tabs [role="tab"] { height: 44px; }
  .wt-run__top { padding: 18px 16px 0; }
  .wt-rail { margin: 6px 16px 0; }
  .wt-stage { padding: 16px; }
  .wt-map .wm-panel { padding: 10px; }
  .wt-lenses { grid-template-columns: 1fr; }
  .wt-result { padding: 0 16px 20px; }
  .wt-stats li { padding: 12px; }
  .wt-means__text, .wt-first, .wt-opps { padding: 18px; }
  .wt-oplist li { grid-template-columns: 22px minmax(0, 1fr) 56px; gap: 10px; }
  .wt-op__bars { grid-column: 2; grid-row: 2; width: 120px; height: 18px; }
  .wt-op__tot { grid-column: 3; grid-row: 1 / span 2; }
  .wt-detail__dl { grid-template-columns: 1fr 1fr; }
  .wt-actions .btn { width: 100%; justify-content: space-between; }
  .wt-form__row { flex-direction: column; }
  .wt-form .btn { justify-content: space-between; }
  .wt-chip { flex: 1 1 calc(50% - 4px); padding: 0 10px; font-size: 14px; }
}
@media (max-width: 420px) {
  .wt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .wt-svg .node, .wt-svg .edge__label, .wt-svg .edge__dot, .wt-svg .mk { opacity: 1; animation: none; }
  .wt-svg .node__in, .wt-svg .mk { transform: none; }
  .wt-svg .edge__line { stroke-dashoffset: 0; }
  .wt-svg .node--wait .node__box { animation: none; }
  .wt-result.is-in .wt-op__bars i { animation: none; }
}
@media print {
  .wt-pick, .wt-lenses, .wt-read__intro, .wm-tabs, .wm-swipe, .wm-hero .wm-actions { display: none !important; }
  .wt-svg .node, .wt-svg .edge__label, .wt-svg .edge__dot, .wt-svg .mk { opacity: 1 !important; }
  .wt-svg .edge__line { stroke-dashoffset: 0 !important; }
  .wt-stage, .wt-means { grid-template-columns: 1fr; }
  .wt-result { opacity: 1; }
}
