/* Windoware Assistant: styles for the flow views (owned by agent "flows").
   Uses the app's tokens from styles.css, so light/dark follow the app theme. A few assistant-only tokens below. */
:root {
  --wa-navy: #1F3A5F; --wa-slat: #FBF8F2; --wa-slat-edge: #E7E0D2; --wa-slat-hi: #FFFFFF; --wa-fabric: #EEE9DF; --wa-roll: #8C9AA8; --wa-rail: #5E6C79;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --wa-navy: #C9D8EE; --wa-slat: #1E2521; --wa-slat-edge: #2F3934; --wa-slat-hi: #25302A; --wa-fabric: #D9D2C4; --wa-roll: #9AA7B3; --wa-rail: #B8C3CC; }
}
:root[data-theme="dark"] { --wa-navy: #C9D8EE; --wa-slat: #1E2521; --wa-slat-edge: #2F3934; --wa-slat-hi: #25302A; --wa-fabric: #D9D2C4; --wa-roll: #9AA7B3; --wa-rail: #B8C3CC; }

/* ---------- basics ---------- */
.wa-v { display: flex; flex-direction: column; gap: 12px; min-width: 0; font-size: 0.875rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.wa-v p, .wa-v ul, .wa-v dl, .wa-v h3, .wa-v h4 { margin: 0; }
.wa-v ul { padding-left: 18px; }
.wa-v li + li { margin-top: 2px; }
.wa-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 1rem; font-weight: 800; color: var(--wa-navy); }
.wa-v h4 { font-size: 0.8125rem; font-weight: 800; color: var(--wa-navy); margin-top: 4px; }
.wa-lead { font-size: 1rem; font-weight: 700; color: var(--wa-navy); }
.wa-sub { color: var(--muted); }
.wa-fine { font-size: 0.75rem; color: var(--muted); }
.wa-label { font-size: 0.75rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wa-note { background: var(--tint-blue); border: 1px solid var(--blue-bg); border-radius: var(--r-ctl); padding: 8px 10px; }
.wa-v .wa-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wa-v .btn .wa-ic { width: 16px; height: 16px; }
.wa-stack { display: flex; flex-direction: column; gap: 8px; }
.wa-btns, .wa-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wa-v .btn.small { min-height: 36px; }
.wa-link { background: none; border: 0; padding: 0; color: var(--link); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-height: 24px; }
.wa-v .wa-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.wa-v .wa-iconbtn:hover { background: var(--row-hover); color: var(--ink); }
.wa-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.wa-demochip { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 0.6875rem; font-weight: 700; white-space: nowrap; letter-spacing: 0.01em; }
.wa-v > .wa-demochip, .wa-v > p > .wa-demochip { align-self: flex-start; }
.wa-tag { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 6px; background: var(--chip-bg); color: var(--grey-ink); font-size: 0.6875rem; font-weight: 700; }
.wa-new { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; background: var(--blue-bg); color: var(--blue); font-size: 0.6875rem; font-weight: 700; }
.wa-count { display: inline-flex; min-width: 20px; justify-content: center; padding: 0 6px; border-radius: 999px; background: var(--chip-bg); font-size: 0.75rem; }
.wa-loading { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 10px 0; }
.wa-loading .wa-ic { animation: wa-pulse 1.4s ease-in-out infinite; }
@keyframes wa-pulse { 50% { opacity: 0.35; } }
.wa-warnline { display: flex; gap: 8px; align-items: flex-start; background: var(--amber-bg); color: var(--amber); border-radius: var(--r-ctl); padding: 8px 10px; font-weight: 600; }
.wa-warnline .wa-ic { margin-top: 1px; }
.wa-errbox { display: flex; flex-direction: column; gap: 8px; background: var(--red-bg); color: var(--red); border-radius: var(--r-ctl); padding: 10px 12px; }
.wa-errbox p { color: var(--ink); }
.wa-okbox { display: flex; gap: 10px; align-items: flex-start; background: var(--tint-good); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; }
.wa-okbox > .wa-ic { color: var(--good); width: 22px; height: 22px; }
.wa-okbox div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.wa-okbox.big b { font-size: 0.9375rem; }
.wa-ref { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1rem; font-weight: 700; color: var(--wa-navy); letter-spacing: 0.02em; }
.wa-box { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px 10px; background: var(--surface2); display: flex; flex-direction: column; gap: 4px; }
.wa-srefs { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 0.75rem; color: var(--muted); }
.wa-sref { display: inline-flex; align-items: center; min-height: 20px; padding: 0 6px; border-radius: 6px; background: var(--chip-bg); color: var(--grey-ink); font-size: 0.6875rem; font-weight: 600; }
.wa-sref.stale { background: var(--amber-bg); color: var(--amber); }
.wa-sref.bad { background: var(--red-bg); color: var(--red); }
.wa-form { display: flex; flex-direction: column; gap: 10px; }
.wa-v .fld textarea, .wa-v .fld input[type="number"], .wa-v .fld input[type="text"], .wa-v .fld select { width: 100%; max-width: 100%; }
.wa-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wa-grid2 .wa-btns, .wa-grid2 .wa-err { grid-column: 1 / -1; }
.wa-err { color: var(--red); font-size: 0.8125rem; margin: 0; }
.wa-v .fld .err { color: var(--red); font-size: 0.8125rem; }
.wa-check { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.wa-check input { width: 18px; height: 18px; }

/* ---------- home ---------- */
.wa-qa { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.wa-qbtn { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.wa-qbtn + .wa-qbtn { border-top: 1px solid var(--divider); }
.wa-qbtn:hover { background: var(--row-hover); }
.wa-qbtn .wa-ic { color: var(--blue-btn); }
.wa-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wa-mbtn { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.8125rem; font-weight: 600; text-align: left; cursor: pointer; }
.wa-mbtn:hover { background: var(--row-hover); }
.wa-mbtn .wa-ic { color: var(--muted); width: 16px; height: 16px; }
.wa-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wa-row:hover { background: var(--row-hover); border-color: var(--input); }
.wa-row span { color: var(--muted); font-size: 0.8125rem; }

/* ---------- answer ---------- */
.wa-ctx { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--blue-btn); border-radius: var(--r-ctl); background: var(--surface2); }
.wa-ctx b { color: var(--wa-navy); }
.wa-ctx span:not(.wa-demochip) { color: var(--muted); font-size: 0.8125rem; }
.wa-ctx .wa-demochip { margin-left: auto; }
.wa-headline { font-size: 0.9375rem; font-weight: 700; color: var(--wa-navy); padding: 10px 12px; background: var(--wa-slat); border: 1px solid var(--wa-slat-edge); border-radius: var(--r-ctl); box-shadow: inset 0 1px 0 var(--wa-slat-hi), 0 1px 2px rgba(0, 0, 0, 0.05); }
.wa-minitrack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; padding: 6px 0 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.6875rem; cursor: pointer; position: relative; }
.wa-minitrack::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 11px; height: 2px; background: var(--line); }
.wa-mt-stop { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.wa-mt-stop i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--input); }
.wa-mt-stop.past i { background: var(--good); border-color: var(--good); }
.wa-mt-stop.now i { background: var(--blue-btn); border-color: var(--blue-btn); box-shadow: 0 0 0 3px var(--blue-tint); }
.wa-mt-stop.now { color: var(--ink); font-weight: 700; }
.wa-minitrack:hover .wa-mt-stop { color: var(--ink); }
/* slats: rows that look like blind slats and tilt open */
.wa-slats { display: flex; flex-direction: column; gap: 6px; }
.wa-slat { border: 1px solid var(--wa-slat-edge); border-radius: 10px; background: var(--wa-slat); box-shadow: inset 0 1px 0 var(--wa-slat-hi), 0 2px 0 -1px var(--wa-slat-edge); overflow: hidden; }
.wa-slat-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; background: transparent; color: var(--wa-navy); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.wa-slat-h:hover { background: var(--wa-slat-hi); }
.wa-slat-h .wa-ic { transition: transform 0.22s ease; color: var(--muted); }
.wa-slat.open .wa-slat-h .wa-ic { transform: rotate(180deg); }
.wa-slat-b { display: flex; flex-direction: column; gap: 8px; padding: 2px 12px 12px; background: var(--surface); border-top: 1px solid var(--wa-slat-edge); padding-top: 10px; transform-origin: top center; }
.wa-slat.open .wa-slat-b { animation: wa-tilt 0.28s ease-out; }
@keyframes wa-tilt { from { transform: perspective(600px) rotateX(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
.wa-dl { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.wa-dl > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 8px; padding: 7px 10px; }
.wa-dl > div + div { border-top: 1px solid var(--divider); }
.wa-dl dt { color: var(--muted); font-size: 0.8125rem; }
.wa-dl dd { margin: 0; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.wa-dl dd small { font-weight: 400; color: var(--muted); font-size: 0.6875rem; }
.wa-dl dd.wa-unk { color: var(--amber); }
.wa-draft { font-family: inherit; }
.wa-draftview { white-space: pre-wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface2); font-size: 0.8125rem; }
.wa-checks { font-size: 0.8125rem; color: var(--grey-ink); }

/* ---------- workbench ---------- */
.wa-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wa-scard { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); position: relative; overflow: hidden; }
.wa-scard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--input); }
.wa-scard.ok::before { background: var(--good); }
.wa-scard.bad::before { background: var(--red); }
.wa-scard.stale::before { background: var(--amber-bar); }
.wa-scard.busy::before { background: var(--blue-btn); }
.wa-scard.open { border-color: var(--blue-btn); box-shadow: 0 0 0 1px var(--blue-btn); }
.wa-scard-h { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 84px; padding: 9px 10px 9px 13px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wa-scard-h:disabled { cursor: default; color: var(--ink); opacity: 1; }
.wa-scard-h:not(:disabled):hover { background: var(--row-hover); }
.wa-scard-t { font-weight: 700; font-size: 0.8125rem; color: var(--wa-navy); }
.wa-scard-s { font-size: 0.75rem; color: var(--muted); }
.wa-state { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 7px 0 5px; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; background: var(--chip-bg); color: var(--grey-ink); }
.wa-state .wa-ic { width: 13px; height: 13px; stroke-width: 2.2; }
.wa-state.ok { background: var(--tint-good); color: var(--good); }
.wa-state.bad { background: var(--red-bg); color: var(--red); }
.wa-state.stale { background: var(--amber-bg); color: var(--amber); }
.wa-state.busy { background: var(--blue-bg); color: var(--blue); }
.wa-scard.busy .wa-scard-h::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--blue-btn), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: wa-scan 1.1s linear infinite; }
@keyframes wa-scan { from { background-position: -100% 0; } to { background-position: 200% 0; } }
.wa-detail { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; background: var(--surface2); }
.wa-lines { list-style: none; padding: 0 !important; display: flex; flex-direction: column; font-size: 0.8125rem; }
.wa-lines li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--divider); margin: 0 !important; }
.wa-ls { font-weight: 600; color: var(--muted); white-space: nowrap; }
.wa-ls.ok { color: var(--good); }
.wa-ls.bad { color: var(--amber); }
.wa-find { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--wa-slat-edge); border-radius: var(--r-card); background: var(--wa-slat); }
.wa-find h4:first-child { margin-top: 0; }

/* ---------- progress track ---------- */
.wa-track { position: relative; padding: 34px 0 4px; }
.wa-rail { position: absolute; left: 12.5%; right: 12.5%; top: 47px; height: 4px; border-radius: 2px; background: var(--line); }
.wa-rail-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--blue-btn); width: 0; }
.wa-rail-fill[data-stage="1"] { width: 33.333%; } .wa-rail-fill[data-stage="2"] { width: 66.666%; } .wa-rail-fill[data-stage="3"] { width: 100%; }
.wa-stops { list-style: none; padding: 0 !important; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wa-stops li { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0 !important; position: relative; }
.wa-stops button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 2px; min-height: 44px; color: var(--muted); font: inherit; font-size: 0.75rem; cursor: pointer; border-radius: 8px; overflow-wrap: normal; word-break: keep-all; max-width: 100%; }
.wa-stops button[aria-pressed="true"] { color: var(--ink); background: var(--blue-tint); }
.wa-stops .wa-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--input); position: relative; z-index: 1; }
.wa-stops .past .wa-dot { background: var(--good); border-color: var(--good); }
.wa-stops .now .wa-dot { background: var(--blue-btn); border-color: var(--blue-btn); box-shadow: 0 0 0 4px var(--blue-tint); }
.wa-stops .now .wa-stn { font-weight: 800; color: var(--wa-navy); }
.wa-carrier { position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.wa-c-roll { width: 26px; height: 6px; border-radius: 3px; background: var(--wa-roll); }
.wa-c-fab { position: relative; width: 22px; height: 18px; background: var(--wa-fabric); border-bottom: 3px solid var(--wa-rail); border-radius: 0 0 2px 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.wa-c-fab i { position: absolute; top: 6px; width: 4px; height: 5px; border-radius: 50%; background: #2B3A4A; }
.wa-c-fab i:first-child { left: 5px; } .wa-c-fab i:last-child { right: 5px; }
.wa-block { display: inline-flex; min-height: 20px; align-items: center; padding: 0 7px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 0.6875rem; font-weight: 700; }
.wa-qty { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-qty span { display: inline-flex; gap: 4px; align-items: baseline; padding: 4px 9px; border-radius: 8px; background: var(--chip-bg); font-size: 0.8125rem; }
.wa-qty span.ok { background: var(--tint-good); color: var(--good); }
.wa-qty span.bad { background: var(--amber-bg); color: var(--amber); }

/* ---------- watchlist ---------- */
.wa-watch { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 8px; }
.wa-watch > li { margin: 0 !important; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.wa-watch > li.changed { border-color: var(--blue-btn); background: var(--tint-blue); }
.wa-w-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-w-r { color: var(--muted); font-size: 0.8125rem; }
.wa-w-top .wa-new { margin-left: auto; }
.wa-sdot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue-btn); flex: none; }
.wa-sdot.bad { background: var(--amber-bar); } .wa-sdot.ok { background: var(--good); }

/* ---------- compare ---------- */
.wa-fld-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-fld-inline label { font-size: 0.8125rem; font-weight: 600; color: var(--grey-ink); }
.wa-fld-inline select { flex: 1 1 140px; min-width: 0; min-height: 36px; border: 1px solid var(--input); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); padding: 0 8px; font: inherit; }
.wa-mbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wa-mb { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px 8px 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface2); }
.wa-mb.req { border-color: var(--blue-btn); }
.wa-mbs.bad .wa-mb.req { border-color: var(--red); }
.wa-mb-frame { height: 112px; display: flex; align-items: flex-start; justify-content: center; }
.wa-mb-blind { position: relative; width: 60px; height: 80px; transition: width 0.3s ease, height 0.3s ease; }
.wa-mb-roll { position: absolute; left: -4px; right: -4px; top: 0; height: 8px; border-radius: 4px; background: var(--wa-roll); }
.wa-mb-fab { position: absolute; left: 0; right: 0; top: 6px; bottom: 4px; background: repeating-linear-gradient(0deg, var(--wa-fabric) 0 6px, color-mix(in srgb, var(--wa-fabric) 92%, #000) 6px 7px); }
.wa-mb.req .wa-mb-fab { background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--wa-fabric) 85%, var(--blue-btn)) 0 6px, color-mix(in srgb, var(--wa-fabric) 78%, var(--blue-btn)) 6px 7px); }
.wa-mb-rail { position: absolute; left: -1px; right: -1px; bottom: 0; height: 5px; border-radius: 2px; background: var(--wa-rail); }
.wa-mb-cord { position: absolute; top: 4px; width: 2px; height: 70%; background: var(--wa-rail); }
.wa-mb-cord.l { left: -8px; } .wa-mb-cord.r { right: -8px; }
.wa-mb figcaption { display: flex; flex-direction: column; font-size: 0.75rem; text-align: center; }
.wa-mb figcaption span { color: var(--muted); }
.wa-verdict { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--chip-bg); font-weight: 600; }
.wa-verdict.check { background: var(--amber-bg); color: var(--amber); }
.wa-verdict.bad { background: var(--red-bg); color: var(--red); }
.wa-verdict.diff { background: var(--tint-blue); color: var(--blue); }
.wa-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; align-self: flex-start; max-width: 100%; }
.wa-seg button { min-height: 34px; padding: 0 10px; border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.wa-seg button + button { border-left: 1px solid var(--line); }
.wa-seg button[aria-pressed="true"] { background: var(--blue-tint); color: var(--blue-ink); }
.wa-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.8125rem; }
.wa-table th, .wa-table td { text-align: left; vertical-align: top; padding: 6px; border-bottom: 1px solid var(--divider); overflow-wrap: anywhere; }
.wa-table thead th { font-size: 0.75rem; color: var(--muted); font-weight: 700; }
.wa-table thead th:first-child { width: 28%; }
.wa-table tbody th { font-weight: 600; color: var(--grey-ink); }
.wa-table td small { display: block; color: var(--muted); font-size: 0.6875rem; margin-top: 2px; }
.wa-lv { display: table; margin-top: 3px; padding: 1px 6px; border-radius: 6px; font-size: 0.6875rem; font-weight: 700; background: var(--chip-bg); color: var(--grey-ink); }
.wa-lv.diff { background: var(--tint-blue); color: var(--blue); }
.wa-lv.check { background: var(--amber-bg); color: var(--amber); }
.wa-lv.bad { background: var(--red-bg); color: var(--red); }
.wa-table tr.same td { color: var(--muted); }

/* ---------- remake ---------- */
.wa-stepof { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.wa-steps { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: none; }
.wa-steps li { display: flex; align-items: center; gap: 8px; margin: 0 !important; padding: 4px 8px; border-radius: 8px; color: var(--muted); font-size: 0.8125rem; }
.wa-steps li.now { background: var(--blue-tint); color: var(--blue-ink); font-weight: 700; }
.wa-steps li.done { color: var(--grey-ink); }
.wa-stepn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--input); font-size: 0.75rem; font-weight: 700; flex: none; background: var(--surface); }
.wa-steps li.now .wa-stepn { background: var(--blue-btn); border-color: var(--blue-btn); color: var(--on-accent); }
.wa-steps li.done .wa-stepn { background: var(--tint-good); border-color: var(--good); color: var(--good); }
.wa-stepbody { border-top: 1px solid var(--divider); padding-top: 12px; }
.wa-radios { display: flex; flex-direction: column; gap: 6px; }
.wa-radios legend { margin-bottom: 6px; }
.wa-radio { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); cursor: pointer; }
.wa-radio:hover { background: var(--row-hover); }
.wa-radio:has(input:checked) { border-color: var(--blue-btn); background: var(--blue-tint); }
.wa-radio input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.wa-radio span { display: flex; flex-direction: column; min-width: 0; }
.wa-radio small { color: var(--muted); font-size: 0.75rem; }
.wa-radios input[aria-invalid="true"] { outline: 2px solid var(--red); }
.wa-stepnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.wa-stepnav .wa-link { margin-left: auto; color: var(--muted); }
.wa-confirm { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--amber-bg); color: var(--ink); margin-top: 8px; }
.wa-review { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.wa-review > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 8px 10px; }
.wa-review > div + div { border-top: 1px solid var(--divider); }
.wa-review dt { color: var(--muted); font-size: 0.75rem; grid-column: 1; }
.wa-review dd { margin: 0; grid-column: 1; font-weight: 600; white-space: pre-wrap; }
.wa-review .wa-link { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* ---------- attachments ---------- */
.wa-afs { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 8px; }
.wa-af { margin: 0 !important; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.wa-af.bad { border-color: var(--red); }
.wa-af-top { display: flex; align-items: center; gap: 10px; }
.wa-af-ic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 44px; flex: none; border-radius: 6px; background: var(--chip-bg); color: var(--grey-ink); font-size: 0.625rem; font-weight: 800; letter-spacing: 0.03em; }
.wa-af.ok .wa-af-ic { background: var(--blue-bg); color: var(--blue); }
.wa-af.bad .wa-af-ic { background: var(--red-bg); color: var(--red); }
.wa-af-m { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wa-af-m b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-af-m > span { color: var(--muted); font-size: 0.75rem; }
.wa-fstat { font-weight: 700; color: var(--grey-ink); }
.wa-af-msg { font-size: 0.8125rem; color: var(--grey-ink); background: var(--surface2); border-radius: 8px; padding: 6px 8px; }
.wa-af.bad .wa-af-msg { color: var(--red); background: var(--red-bg); }
.wa-result { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--divider); padding-top: 8px; }
.wa-raw summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: 0.8125rem; min-height: 28px; }
.wa-raw pre { white-space: pre-wrap; font: inherit; font-size: 0.8125rem; background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin: 6px 0 0; }
.wa-samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wa-sample { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 8px; border: 1px dashed var(--input); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; }
.wa-sample:hover { border-style: solid; background: var(--row-hover); }
.wa-sample span { color: var(--muted); font-size: 0.6875rem; }
.wa-photo { position: relative; height: 96px; border-radius: 8px; background: linear-gradient(160deg, #D9D4CB, #BFB8AC); overflow: hidden; }
.wa-ph-plate { position: absolute; left: 50%; top: 50%; width: 70px; height: 56px; transform: translate(-50%, -50%); border-radius: 6px 6px 18px 6px; background: linear-gradient(135deg, #F5F5F2, #CFCFCB); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); }
.wa-ph-hole { position: absolute; left: calc(50% - 22px); top: calc(50% - 14px); width: 8px; height: 8px; border-radius: 50%; background: #8A857C; }
.wa-ph-hole.b { top: calc(50% + 8px); }
.wa-matches { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 6px; }
.wa-matches li { margin: 0 !important; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.wa-matches li span:not(.wa-tag) { color: var(--muted); font-size: 0.8125rem; }

/* ---------- briefing ---------- */
.wa-brief { list-style: none; padding: 0 !important; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }
.wa-bgrp { margin: 0 !important; }
.wa-bgrp + .wa-bgrp { border-top: 1px solid var(--divider); }
.wa-bhead { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.wa-bhead:disabled { cursor: default; color: var(--muted); opacity: 1; }
.wa-bhead:not(:disabled):hover { background: var(--row-hover); }
.wa-bhead span:nth-child(2) { flex: 1; }
.wa-bhead .wa-ic { color: var(--muted); transition: transform 0.2s ease; }
.wa-bgrp.open .wa-bhead .wa-ic { transform: rotate(180deg); }
.wa-bnum { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; background: var(--blue-btn); color: var(--on-accent); font-size: 0.75rem; font-weight: 800; }
.wa-bgrp:first-child .wa-bnum:not(.zero) { background: #C0503F; }
.wa-bnum.zero { background: var(--chip-bg); color: var(--muted); }
.wa-bitems { list-style: none; padding: 0 12px 10px !important; display: flex; flex-direction: column; gap: 6px; }
.wa-bitems li { margin: 0 !important; }
.wa-bitem { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface2); color: var(--ink); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; }
.wa-bitem:hover { border-color: var(--blue-btn); }
.wa-bitem span { color: var(--muted); font-size: 0.75rem; }

/* ---------- help mode (outside the panel) ---------- */
.wa-help-layer { position: fixed; inset: 0; z-index: 2147483000; background: rgba(22, 35, 29, 0.12); font-family: var(--font); font-size: 0.875rem; color: var(--ink); }
.wa-help-layer .wa-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wa-help-bar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 20px)); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-pop); }
.wa-help-bar > span { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; flex-wrap: wrap; }
.wa-help-bar .wa-ic { color: var(--blue-btn); }
.wa-help-t { position: fixed; border: 2px dashed var(--blue-btn); border-radius: 10px; background: rgba(68, 113, 184, 0.06); cursor: pointer; padding: 0; }
.wa-help-t:hover, .wa-help-t:focus-visible, .wa-help-t.sel { border-style: solid; background: rgba(68, 113, 184, 0.12); outline: 3px solid var(--blue-tint); outline-offset: 2px; }
.wa-help-tag { position: absolute; left: -2px; top: -22px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 7px; border-radius: 6px 6px 6px 0; background: var(--blue-btn); color: var(--on-accent); font-size: 0.6875rem; font-weight: 700; }
.wa-help-card { position: fixed; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-pop); }
.wa-hc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--wa-navy); }
.wa-hc-body p { margin: 0 0 4px; }
.wa-help-card .wa-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-help-card .btn.small[aria-pressed="true"] { background: var(--blue-tint); border-color: var(--blue-btn); color: var(--blue-ink); }
.wa-help-layer .wa-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.wa-help-layer .wa-fine { font-size: 0.75rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .wa-slat.open .wa-slat-b, .wa-loading .wa-ic, .wa-scard.busy .wa-scard-h::after { animation: none; }
  .wa-slat-h .wa-ic, .wa-bhead .wa-ic, .wa-mb-blind { transition: none; }
}
@media (max-width: 380px) {
  .wa-samples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
