/* Wave 15: revenue leak estimator, scoped under .w-w15. Reads shell tokens only (both themes). No external resources. */
.w-w15 { min-width: 0; }
.w-w15 .w15-grid { display: grid; gap: var(--s5, 24px); grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .w-w15 .w15-grid { grid-template-columns: minmax(0, 1fr); } }
.w-w15 .w15-in { margin: 0; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-lg, 14px); padding: 18px; display: grid; gap: 14px; }
@media (max-width: 520px) { .w-w15 .w15-in { padding: 14px; } }
.w-w15 .w15-legend { font-weight: 700; font-size: 1.0625rem; padding: 0 6px; }
.w-w15 .w15-row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 520px) { .w-w15 .w15-row { grid-template-columns: minmax(0, 1fr); } }
.w-w15 input { width: 100%; max-width: 100%; min-height: 44px; font-variant-numeric: tabular-nums; }
.w-w15 [aria-invalid="true"] { border-color: var(--bad); }
.w-w15 .w15-starter { margin: 0; padding: 8px 10px; border-left: 3px solid var(--warn); background: var(--warn-soft); border-radius: 0 6px 6px 0; font-size: .875rem; }
.w-w15 .w15-starter[hidden] { display: none; }
.w-w15 .w15-assume { border: 1px solid var(--line); border-radius: var(--radius, 10px); padding: 10px 12px; background: var(--surface-2); }
.w-w15 .w15-assume > summary { cursor: pointer; font-weight: 650; min-height: 32px; }
.w-w15 .w15-assume .w15-row { margin-top: 10px; }
.w-w15 .w15-out { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg, 14px); padding: 18px; min-width: 0; }
@media (max-width: 520px) { .w-w15 .w15-out { padding: 14px; } }
.w-w15 .w15-tag { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.w-w15 .w15-tagtxt { font-size: .875rem; font-weight: 650; color: var(--text-2); }
.w-w15 .w15-lead { margin: 0 0 10px; font-size: .9375rem; color: var(--text-2); }
.w-w15 .w15-k { margin: 0 0 2px; font-size: .8125rem; font-weight: 650; color: var(--text-2); }
.w-w15 .w15-big { margin: 0; font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.15; }
.w-w15 .w15-dl { margin: 14px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; font-size: .9rem; }
.w-w15 .w15-dl dt { color: var(--text-2); }
.w-w15 .w15-dl dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.w-w15 .w15-note { margin: 12px 0 0; font-size: .8125rem; color: var(--text-2); }
.w-w15 .w15-msg { margin: 0; color: var(--bad-text); font-weight: 650; }
.w-w15 .w15-msg:empty { display: none; }
.w-w15 [data-state="bad"] .w15-ok { display: none; }
.w-w15 .w15-cta { margin: 16px 0 0; }
.w-w15 .w15-cta .btn { width: 100%; justify-content: center; text-align: center; }
@media (max-width: 520px) {
  .w-w15 .w15-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .w-w15 .w15-dl dt { margin-top: 8px; font-size: .8125rem; }
  .w-w15 .w15-dl dd { text-align: left; }
}

/* ---- version 2: mode toggle, source chips, line table, share tools ---- */
.w15-list { margin: 0 0 16px; padding-left: 1.25em; max-width: 75ch; }
.w15-list li + li { margin-top: 8px; }
.w15-h3 { margin: 24px 0 10px; font-size: 1.125rem; }
.w-w15 .w15-grp { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius, 10px); padding: 12px; display: grid; gap: 12px; background: var(--surface); }
.w-w15 .w15-grp .w15-legend { font-size: 1rem; }
.w-w15 .w15-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .w-w15 .w15-row3 { grid-template-columns: minmax(0, 1fr); } }
.w-w15 .w15-mode { margin: 0; border: 1px solid var(--line); border-radius: var(--radius, 10px); padding: 10px 12px; background: var(--surface-2); min-width: 0; }
.w-w15 .w15-mode legend { font-weight: 700; padding: 0 6px; }
.w-w15 .w15-segs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.w-w15 .w15-seg { position: relative; display: inline-flex; }
.w-w15 .w15-seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; cursor: pointer; }
.w-w15 .w15-seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2, var(--line)); border-radius: 999px; background: var(--surface); font-weight: 650; }
.w-w15 .w15-seg input:checked + span { background: var(--accent-soft, var(--surface-2)); border-color: var(--accent, currentColor); box-shadow: inset 0 0 0 1px var(--accent, currentColor); }
.w-w15 .w15-seg input:focus-visible + span { outline: 3px solid var(--accent, currentColor); outline-offset: 2px; }
.w-w15 .hint { display: block; margin-top: 4px; font-size: .8125rem; color: var(--text-2); }
.w-w15 .w15-chip { display: block; margin-top: 6px; padding: 5px 8px; border-left: 3px solid var(--line-2, var(--line)); background: var(--surface-2); border-radius: 0 6px 6px 0; font-size: .78rem; line-height: 1.35; color: var(--text-2); overflow-wrap: anywhere; }
.w-w15 .w15-chip[data-tag="primary"] { border-left-color: var(--good, currentColor); }
.w-w15 .w15-chip[data-tag="secondary"] { border-left-color: var(--info, var(--accent, currentColor)); }
.w-w15 .w15-chip[data-tag="weak"], .w-w15 .w15-chip[data-tag="assumption"] { border-left-color: var(--warn); }
.w-w15 .w15-chip[data-state="off"] { opacity: .85; }
.w-w15 .w15-chip b { font-weight: 700; color: var(--text); }
.w-w15 .w15-chip a { color: inherit; text-decoration: underline; }
.w15-tagpill { display: inline-block; padding: 1px 8px; border: 1px solid var(--line-2, var(--line)); border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap; background: var(--surface-2); }
.w15-tagpill[data-tag="primary"] { border-color: var(--good, currentColor); }
.w15-tagpill[data-tag="weak"], .w15-tagpill[data-tag="assumption"] { border-color: var(--warn); }
.w-w15 .w15-big--y { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem); color: var(--text-2); margin-bottom: 8px; }
.w-w15 .w15-ok .w15-k + .w15-big { margin-bottom: 10px; }
.w-w15 [data-state="empty"] .w15-big { font-size: 1.125rem; letter-spacing: 0; }
.w-w15 .w15-tools { margin-top: 14px; display: grid; gap: 6px; }
.w-w15 .w15-linklab { font-size: .8125rem; font-weight: 650; color: var(--text-2); }
.w-w15 .w15-link { font-size: .8125rem; }
.w-w15 .w15-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.w-w15 .w15-lines { margin-top: 24px; }
.w-w15 .w15-lines td[data-o$="-b"] { font-size: .875rem; min-width: 18ch; }
.w-w15 .w15-compact .w15-assume, .w-w15.w15-compact .w15-assume { margin-top: 0; }
@media print {
  .w-w15 .w15-mode, .w-w15 .w15-btns, .w-w15 .w15-cta, .w-w15 .w15-tools { display: none !important; }
  .w-w15 .w15-grid { grid-template-columns: 1fr; }
}
