/* The proposed components. Uses the tokens in tokens.css.
   Each "@c name" marker starts one component; the library shows that part under "Specs and CSS". */

/* @c base */
.w { font: 400 14px/20px var(--font); color: var(--text); }
.w, .w * { box-sizing: border-box; }
.w svg { flex: none; display: block; }
.w :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.w a { color: var(--accent-text); }
.w-id { font: 500 13px/20px var(--mono); }
.w-num { font-variant-numeric: tabular-nums; }
.w-sub { font: 400 13px/18px var(--font); color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .w *, .w *::before, .w *::after { animation: none !important; transition: none !important; } }

/* @c buttons */
.w-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h-md); padding: 0 14px; border: 1px solid transparent; border-radius: var(--r-md); background: none; color: var(--text); font: 500 14px/20px var(--font); white-space: nowrap; cursor: pointer; transition: background-color var(--t-fast), border-color var(--t-fast); }
.w-btn--primary { background: var(--accent); color: var(--on-accent); }
.w-btn--primary:hover { background: var(--accent-hover); }
.w-btn--primary:active { background: var(--accent-press); }
.w-btn--secondary { background: var(--surface); border-color: var(--border-strong); }
.w-btn--secondary:hover { background: var(--hover); }
.w-btn--quiet { color: var(--text-2); }
.w-btn--quiet:hover { background: var(--hover); color: var(--text); }
.w-btn--danger { background: var(--danger); color: #FFFFFF; }
.w-btn--danger:hover { background: var(--danger-hover); }
.w-btn--danger-quiet { color: var(--danger-text); }
.w-btn--danger-quiet:hover { background: var(--danger-soft); }
.w-btn--sm { height: var(--h-sm); padding: 0 10px; gap: 6px; font-size: 13px; }
.w-btn--lg { height: var(--h-lg); padding: 0 18px; }
.w-btn--icon { width: var(--h-md); padding: 0; }
.w-btn--icon.w-btn--sm { width: var(--h-sm); }
.w-btn.is-focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.w-btn[disabled] { background: var(--neutral-soft); border-color: transparent; color: var(--disabled); cursor: not-allowed; }
.w-btn.is-loading { cursor: progress; }
.w-btn.is-loading svg { animation: w-spin 1s linear infinite; }
@keyframes w-spin { to { transform: rotate(360deg); } }

/* @c risk */
.w-risk { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: var(--r-full); font: 600 13px/24px var(--font); white-space: nowrap; }
.w-risk svg { width: 12px; height: 12px; }
.w-risk--low { background: var(--low-soft); color: var(--low-text); }
.w-risk--med { background: var(--med-soft); color: var(--med-text); }
.w-risk--high { background: var(--high-soft); color: var(--high-text); }
.w-risk--none { background: none; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border-strong); font-weight: 500; }
.w-shape { width: 12px; height: 12px; }
.w-shape--low { color: var(--low); }
.w-shape--med { color: var(--med); }
.w-shape--high { color: var(--high); }

/* @c status */
.w-status { display: inline-flex; align-items: center; gap: 6px; font: 400 14px/20px var(--font); color: var(--text); white-space: nowrap; }
.w-status { vertical-align: middle; }
.w-status svg { width: 16px; height: 16px; color: var(--text-3); }
.w-status--run svg { color: var(--accent-text); }
.w-status--hold svg { color: var(--med-text); }
.w-status--fail svg { color: var(--danger-text); }
.w-status--busy svg { animation: w-spin 1.2s linear infinite; }
.w-status--off { color: var(--text-3); }

/* @c tags */
.w-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); background: var(--neutral-soft); color: var(--neutral-text); font: 500 12px/22px var(--font); white-space: nowrap; }
.w-method { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: var(--r-xs); background: var(--surface); color: var(--text); font: 600 12px/20px var(--font); white-space: nowrap; }
.w-method svg { width: 12px; height: 12px; color: var(--text-3); }
a.w-method { text-decoration: none; color: var(--text); }
a.w-method:hover { border-color: var(--accent); }
.w-body { display: inline-block; }
.w-body .p { fill: var(--border-strong); }
.w-body .off { fill: var(--border); }
.w-body .on { fill: var(--accent); }
.w-body .low { fill: var(--low); }
.w-body .med { fill: var(--med); }
.w-body .high { fill: var(--high); }
.w-limbs { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/18px var(--font); color: var(--text-2); }

/* @c table */
.w-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.w-scroll { overflow-x: auto; }
.w-table { width: 100%; border-collapse: separate; border-spacing: 0; font: 400 14px/20px var(--font); }
.w-table th { height: 40px; padding: 0 12px; background: var(--sunken); border-bottom: 1px solid var(--border); color: var(--text-2); font: 500 13px/16px var(--font); text-align: left; white-space: nowrap; }
.w-table td { height: 48px; padding: 6px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.w-table tbody tr:last-child td { border-bottom: 0; }
.w-table tbody tr:hover td { background: var(--hover); }
.w-table tbody tr.is-selected td { background: var(--selected); }
.w-table th:first-child, .w-table td:first-child { padding-left: 16px; }
.w-table th:last-child, .w-table td:last-child { padding-right: 12px; }
.w-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.w-table .fit { width: 1px; }
.w-table th .sort { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.w-table th .sort svg { width: 14px; height: 14px; }
.w-table .w-rowlink { color: var(--text); font-weight: 600; text-decoration: none; }
.w-table .w-rowlink:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.w-table .w-row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.w-stack { display: flex; flex-direction: column; min-width: 0; }
.w-inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.w-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 12px 9px 16px; border-top: 1px solid var(--border); color: var(--text-2); font: 400 13px/18px var(--font); }
.w-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px 6px 16px; background: var(--selected); border-bottom: 1px solid var(--border); font: 500 14px/20px var(--font); }
.w-bulk .sp { flex: 1; }

/* @c toolbar */
.w-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.w-search { display: flex; align-items: center; gap: 8px; width: 260px; max-width: 100%; height: var(--h-md); padding: 0 12px; border: 1px solid var(--border-control); border-radius: var(--r-md); background: var(--surface); color: var(--text-3); }
.w-search svg { width: 16px; height: 16px; }
.w-search input { flex: 1; min-width: 0; border: 0; padding: 0; outline: 0; background: none; color: var(--text); font: 400 14px/20px var(--font); }
.w-search input::placeholder { color: var(--text-3); opacity: 1; }
.w-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.w-search kbd { font: 500 12px/18px var(--font); padding: 0 6px; border: 1px solid var(--border); border-radius: var(--r-xs); color: var(--text-3); }
.w-filter { display: inline-flex; align-items: center; gap: 6px; height: var(--h-md); padding: 0 10px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); color: var(--text); font: 500 14px/20px var(--font); white-space: nowrap; cursor: pointer; }
.w-filter span { color: var(--text-3); font-weight: 400; }
.w-filter svg { width: 16px; height: 16px; color: var(--text-3); }
.w-filter:hover { background: var(--hover); }
.w-filter.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.w-filter.is-on span, .w-filter.is-on svg { color: var(--accent-text); }

/* @c tabs */
.w-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.w-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-2); font: 500 14px/20px var(--font); white-space: nowrap; cursor: pointer; }
.w-tab:hover { color: var(--text); }
.w-tab.is-on { color: var(--text); border-bottom-color: var(--accent); }
.w-tab:focus-visible { outline-offset: -2px; }
.w-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--neutral-soft); color: var(--neutral-text); font: 500 12px/20px var(--font); text-align: center; font-variant-numeric: tabular-nums; }
.w-count--act { background: var(--accent); color: var(--on-accent); }
.w-seg { display: inline-flex; padding: 3px; border-radius: var(--r-md); background: var(--neutral-soft); }
.w-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-xs); background: none; color: var(--text-2); font: 500 14px/20px var(--font); cursor: pointer; }
.w-seg button.is-on { background: var(--raised); color: var(--text); }

/* @c fields */
.w-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.w-form .full { grid-column: 1 / -1; }
.w-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.w-label { font: 500 13px/18px var(--font); color: var(--text); }
.w-label i { font-style: normal; font-weight: 400; color: var(--text-3); }
.w-input { display: flex; align-items: center; gap: 8px; width: 100%; height: var(--h-md); padding: 0 12px; border: 1px solid var(--border-control); border-radius: var(--r-md); background: var(--surface); color: var(--text); font: 400 14px/20px var(--font); }
input.w-input:disabled { border-color: var(--border-strong); background: var(--neutral-soft); color: var(--text-3); -webkit-text-fill-color: var(--text-3); opacity: 1; }
input.w-input::placeholder { color: var(--text-3); opacity: 1; }
.w-input svg { width: 16px; height: 16px; margin-left: auto; color: var(--text-3); }
.w-input input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0; background: none; color: inherit; font: inherit; }
.w-input .unit { color: var(--text-3); }
.w-input:focus-within, input.w-input:focus { outline: 0; border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.w-help { font: 400 13px/18px var(--font); color: var(--text-3); }
.w-field.is-error .w-input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.w-error { display: flex; gap: 6px; font: 400 13px/18px var(--font); color: var(--danger-text); }
.w-error svg { width: 16px; height: 16px; margin-top: 1px; }

/* @c choice */
.w-check { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--border-control); border-radius: var(--r-xs); background: var(--surface) center / 14px no-repeat; cursor: pointer; vertical-align: middle; }
.w-check:checked, .w-check.is-mixed { border-color: var(--accent); background-color: var(--accent); }
.w-check:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.w-check.is-mixed { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.w-check:disabled { border-color: var(--border-strong); background-color: var(--neutral-soft); cursor: not-allowed; }
.w-switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 36px; height: 20px; margin: 0; border-radius: var(--r-full); background: var(--border-control); cursor: pointer; transition: background-color var(--t-fast); }
.w-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: transform var(--t-mid) var(--ease); }
.w-switch:checked { background: var(--accent); }
.w-switch:checked::after { transform: translateX(16px); }
.w-choice { display: flex; align-items: flex-start; gap: 10px; font: 400 14px/20px var(--font); cursor: pointer; }
.w-choice .w-check { margin-top: 1px; }

/* @c metrics */
.w-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.w-metric { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: var(--surface); min-width: 0; }
.w-metric dt { font: 400 13px/18px var(--font); color: var(--text-2); }
.w-metric dd { margin: 0; font: 600 24px/32px var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.w-metric dd small { font: 400 14px/20px var(--font); color: var(--text-3); letter-spacing: 0; }
.w-delta { display: inline-flex; align-items: center; gap: 4px; font: 400 13px/18px var(--font); color: var(--text-2); }
.w-delta svg { width: 14px; height: 14px; }
.w-delta b { font-weight: 500; color: var(--text); }
.w-metric a { font: 500 13px/18px var(--font); text-decoration: none; }
.w-metric a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* @c risksum */
.w-risksum { display: grid; grid-template-columns: 200px minmax(0, 1fr) 132px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.w-risksum > * { padding: 20px; min-width: 0; }
.w-risksum > * + * { border-left: 1px solid var(--border); }
.w-rs-level { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; font: 600 32px/40px var(--display); letter-spacing: -.02em; }
.w-rs-level svg { width: 24px; height: 24px; }
.w-rs-level--high { color: var(--high-text); }
.w-rs-level--high svg { color: var(--high); }
.w-rs-h { font: 500 13px/18px var(--font); color: var(--text-2); }
.w-drivers { list-style: none; margin: 8px 0 0; padding: 0; }
.w-drivers li { display: grid; grid-template-columns: minmax(0, 1fr) auto 92px; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); }
.w-drivers li:first-child { border-top: 0; }
.w-drivers .w-risk { justify-self: start; }
.w-drivers .m { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.w-drivers .m b { color: var(--text); font-weight: 600; }
.w-rs-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.w-zones { display: flex; gap: 2px; height: 24px; margin-top: 6px; border-radius: var(--r-xs); overflow: hidden; }
.w-zones span { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 24px; font: 600 12px/24px var(--font); }
.w-zones svg { width: 10px; height: 10px; }
.w-zones .low { background: var(--low-soft); color: var(--low-text); }
.w-zones .med { background: var(--med-soft); color: var(--med-text); }
.w-zones .high { background: var(--high-soft); color: var(--high-text); }
@media (max-width: 760px) { .w-risksum { grid-template-columns: 1fr; } .w-risksum > * + * { border-left: 0; border-top: 1px solid var(--border); } .w-drivers li { grid-template-columns: minmax(0, 1fr) auto; } .w-drivers .m { grid-row: 2; } }

/* @c exposure */
.w-exp { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.w-exp-g { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--sunken); border-bottom: 1px solid var(--border); font: 600 14px/20px var(--font); }
.w-exp-g span { font: 400 13px/18px var(--font); color: var(--text-2); }
.w-exp-r { display: grid; grid-template-columns: 190px minmax(0, 1fr) 72px 92px 84px; align-items: center; gap: 16px; min-height: 40px; padding: 6px 16px; border-bottom: 1px solid var(--border); }
.w-exp-r:last-child { border-bottom: 0; }
.w-exp-r .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.w-exp-r .l { text-align: right; color: var(--text-3); font: 400 13px/18px var(--font); font-variant-numeric: tabular-nums; }
.w-track { position: relative; height: 8px; border-radius: var(--r-xs); background: var(--neutral-soft); }
.w-track i { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-xs); background: var(--text-3); }
.w-track.over i { background: var(--high); }
.w-track::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: 66.667%; width: 2px; background: var(--text); }
.w-track.is-open { background: none; height: 0; border-top: 1px dashed var(--border-strong); }
.w-track.is-open::after { content: none; }
@media (max-width: 760px) { .w-exp-r { grid-template-columns: minmax(0, 1fr) 64px 84px; gap: 8px; } .w-exp-r .w-track { grid-column: 1 / -1; grid-row: 2; } .w-exp-r .w-risk { grid-column: 1 / -1; justify-self: start; } }

/* @c queue */
.w-queue { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.w-qi { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto; align-items: center; gap: 12px 16px; padding: 12px 16px; border-top: 1px solid var(--border); }
.w-qi:first-child { border-top: 0; }
.w-qi:hover { background: var(--hover); }
.w-qi > svg { width: 20px; height: 20px; color: var(--text-3); }
.w-qi > svg.fail { color: var(--danger-text); }
.w-qi > svg.hold { color: var(--med-text); }
.w-qi > svg.run { color: var(--accent-text); }
.w-qi b { font-weight: 600; }
.w-qi .age { color: var(--text-3); font: 400 13px/18px var(--font); white-space: nowrap; }
@media (max-width: 560px) { .w-qi { grid-template-columns: 20px minmax(0, 1fr) auto; } .w-qi .age { display: none; } }

/* @c approval */
.w-appr { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 12px 20px; padding: 14px 16px; border-top: 1px solid var(--border); }
.w-appr:first-child { border-top: 0; }
.w-appr .acts { display: flex; gap: 4px; }
.w-wait { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.w-wait svg { width: 16px; height: 16px; color: var(--text-3); }
.w-wait--long { color: var(--med-text); font-weight: 500; }
.w-wait--long svg { color: var(--med-text); }
@media (max-width: 760px) { .w-appr { grid-template-columns: 1fr; gap: 8px; } }

/* @c sidebar */
.w-side { display: flex; flex-direction: column; width: 232px; min-height: 100%; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--border); }
.w-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 32px; padding: 0 8px; margin-bottom: 16px; }
.w-brand img { height: 20px; width: auto; max-width: none; }
.w-org { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: none; color: var(--text); font: 500 14px/20px var(--font); text-align: left; cursor: pointer; }
.w-org > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-org svg { width: 16px; height: 16px; color: var(--text-3); }
.w-nav-h { padding: 16px 8px 4px; font: 500 12px/16px var(--font); color: var(--text-3); }
.w-nav { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; border-radius: var(--r-md); color: var(--text-2); font: 500 14px/20px var(--font); text-decoration: none; cursor: pointer; }
.w-nav svg { width: 18px; height: 18px; }
.w-nav .w-count { margin-left: auto; }
.w-nav:hover { background: var(--hover); color: var(--text); }
.w a.w-nav { color: var(--text-2); }
.w a.w-nav.is-on { background: var(--selected); color: var(--accent-text); font-weight: 600; }
.w-side .sp { flex: 1; min-height: 16px; }

/* @c header */
.w-top { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.w-top .sp { flex: 1; }
.w-top .w-search { width: 360px; }
.w-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.w-head h1 { margin: 0; font: 600 24px/32px var(--display); letter-spacing: -.015em; }
.w-head p { margin: 2px 0 0; max-width: 62ch; color: var(--text-2); }
.w-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.w-crumb { display: inline-flex; align-items: center; gap: 6px; font: 400 14px/20px var(--font); color: var(--text-2); }
.w-crumb svg { width: 14px; height: 14px; color: var(--text-3); }
.w-bell { position: relative; }
.w-bell i { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }

/* @c identity */
.w-ava { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; font: 600 12px/1 var(--font); color: var(--neutral-text); background: var(--neutral-soft); }
.w-ava--person { border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.w-ava--org { border-radius: var(--r-md); }
.w-ava--worker { border-radius: 50%; background: none; box-shadow: inset 0 0 0 1.5px var(--border-strong); color: var(--text-3); }
.w-ava svg { width: 16px; height: 16px; }
.w-ident { display: flex; align-items: center; gap: 10px; min-width: 0; }
.w-ident b { font-weight: 600; }
.w-ident .w-stack > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* @c menus */
.w-menu { width: 232px; padding: 4px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-menu); }
.w-mi { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: none; color: var(--text); font: 400 14px/20px var(--font); text-align: left; cursor: pointer; }
.w-mi svg { width: 16px; height: 16px; color: var(--text-3); }
.w-mi:hover, .w-mi.is-hi { background: var(--hover); }
.w-mi .end { margin-left: auto; color: var(--accent-text); }
.w-mi--danger { color: var(--danger-text); }
.w-mi--danger svg { color: var(--danger-text); }
.w-mi--danger:hover { background: var(--danger-soft); }
.w-sep { height: 1px; margin: 4px 0; background: var(--border); }
.w-menu-h { padding: 8px 10px 4px; font: 500 12px/16px var(--font); color: var(--text-3); }

/* @c dialog */
.w-dialog { width: 440px; max-width: 100%; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-dialog); }
.w-dialog h2 { margin: 0; font: 600 16px/24px var(--font); }
.w-dialog-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 0 24px; }
.w-dialog-b { padding: 8px 24px 24px; color: var(--text-2); }
.w-dialog-b p { margin: 0; }
.w-dialog-b ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.w-dialog-b li { display: flex; gap: 8px; }
.w-dialog-b li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--text-3); }
.w-dialog-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px; border-top: 1px solid var(--border); }
.w-stage-dim { padding: 32px 16px; display: flex; justify-content: center; background: var(--scrim); border-radius: var(--r-md); }

/* @c messages */
.w-toast { display: flex; align-items: center; gap: 12px; width: 400px; max-width: 100%; min-height: 48px; padding: 10px 8px 10px 16px; border-radius: var(--r-lg); background: var(--pop); color: var(--pop-text); box-shadow: var(--shadow-menu); }
.w-toast > svg { width: 18px; height: 18px; opacity: .9; }
.w-toast .w-stack { flex: 1; }
.w-toast b { font-weight: 500; }
.w-toast .w-sub { color: #C7CCDA; }
.w-toast button { height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: none; color: #FFFFFF; font: 600 14px/20px var(--font); cursor: pointer; }
.w-toast button:hover { background: rgba(255, 255, 255, .12); }
.w-toast button.x { width: 32px; padding: 8px; }
.w-toast button.x svg { width: 16px; height: 16px; }
.w-toast--busy > svg { animation: w-spin 1.2s linear infinite; }
.w-note { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--neutral-soft); color: var(--text); }
.w-note > svg { width: 18px; height: 18px; margin-top: 1px; color: var(--text-2); }
.w-note .grow { flex: 1; min-width: 0; }
.w-note--info { background: var(--accent-soft); }
.w-note--info > svg { color: var(--accent-text); }
.w-note--warn { background: var(--med-soft); }
.w-note--warn > svg { color: var(--med-text); }
.w-note--error { background: var(--danger-soft); }
.w-note--error > svg { color: var(--danger-text); }

/* @c empty */
.w-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 24px; text-align: center; }
.w-empty > svg { width: 24px; height: 24px; margin-bottom: 8px; color: var(--text-3); }
.w-empty b { font: 600 16px/24px var(--font); }
.w-empty p { margin: 0; max-width: 46ch; color: var(--text-2); }
.w-empty .acts { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }

/* @c meter */
.w-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.w-meter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.w-meter .t { display: flex; justify-content: space-between; gap: 8px; font: 500 14px/20px var(--font); }
.w-meter .t span { font-weight: 400; color: var(--text-2); font-variant-numeric: tabular-nums; }
.w-bar { height: 6px; border-radius: var(--r-xs); background: var(--neutral-soft); overflow: hidden; }
.w-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.w-bar--near i { background: var(--med); }
.w-bar--full i { background: var(--high); }
.w-meter .n { font: 400 13px/18px var(--font); color: var(--text-3); }
.w-meter .n--near { color: var(--med-text); }

/* @c timeline */
.w-tl { list-style: none; margin: 0; padding: 4px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.w-tl li { display: grid; grid-template-columns: 48px 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 16px; }
.w-tl time { color: var(--text-3); font-variant-numeric: tabular-nums; }
.w-tl svg { width: 18px; height: 18px; color: var(--text-3); }
.w-tl .flag svg { color: var(--high); }
.w-tl .flag b { font-weight: 600; }
