/* Move the needle: Bean There's P&L against the coffee shop benchmarks.
   Builds on profit-and-loss.css (layout, options, feedback) and sales-price-quantity.css (tables, formula). */

/* Comparison tables can be wider than a phone: let them scroll, and let long cells wrap */
.mn-room .stage .pl-statement{overflow-x:auto}
.mn-room .stage .sq-tally td{white-space:normal}
.mn-room .stage .sq-tally td .mn-flag{white-space:nowrap}

/* The compact P&L in the sidebar (and the inline copy on phones) */
.mn-pl{margin:0;border:0;border-radius:0}
.mn-pl table{font-size:13px}
.mn-pl th,.mn-pl td{padding:7px 10px 7px 0}
.mn-pl th:first-child{padding-left:20px}
.mn-pl td:last-child{padding-right:20px;color:var(--muted);font-weight:700;width:3.5em}
.mn-pl .mn-sec>*{background:var(--wash);font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:var(--muted);padding-top:9px;padding-bottom:5px}
.mn-pl .subtotal td:last-child,.mn-pl .bottom td:last-child{color:var(--ink)}
.mn-pl .bottom>*{background:var(--tint)}
.mn-one{margin:0;padding:12px 20px;border-bottom:1px solid var(--line);font-size:13px;color:var(--muted);line-height:1.5}
.mn-one strong{display:block;font-size:15px;color:var(--ink);font-weight:800}

/* Inline P&L for phones, where the sidebar sits below the question */
.mn-pl-inline{display:none;margin:18px 0 0;border:2px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.mn-pl-inline summary{padding:11px 16px;font-weight:800;cursor:pointer}
.mn-pl-inline .mn-pl th:first-child{padding-left:16px}
.mn-pl-inline .mn-pl td:last-child{padding-right:16px}
@media(max-width:720px){.mn-pl-inline{display:block}}

/* Benchmark markers in the worked example */
.mn-flag{display:inline-block;font-size:11px;font-weight:850;letter-spacing:.04em;text-transform:uppercase;border-radius:999px;padding:2px 8px;margin-left:6px;vertical-align:1px}
.mn-flag.out{background:var(--tint);color:var(--dark)}
.mn-flag.edge{background:var(--amberbg);color:var(--amber)}
.mn-flag.in{background:var(--goodbg);color:var(--green)}

/* The four tags */
.mn-tag{display:inline-block;font-size:12px;font-weight:850;border-radius:999px;padding:3px 10px;white-space:nowrap}
.mn-tag.quick{background:var(--goodbg);color:var(--green)}
.mn-tag.slow{background:#e5eef8;color:#1d4b78}
.mn-tag.other{background:var(--amberbg);color:var(--amber)}
.mn-tag.back{background:var(--tint);color:var(--dark)}
.mn-tags{list-style:none;margin:0;padding:6px 20px 12px;font-size:13px;line-height:1.45;color:var(--muted)}
.mn-tags li{padding:6px 0}
.mn-tags .mn-tag{margin-right:6px}

/* Facts shown with each question */
.mn-facts{list-style:none;margin:18px 0;padding:0;border:2px solid var(--line);border-radius:14px;background:#fff;overflow:hidden}
.mn-facts li{padding:10px 16px;border-bottom:1px solid var(--line);font-size:15px;line-height:1.5}
.mn-facts li:last-child{border-bottom:0}

/* Practice: an option button gets its tag once revealed */
.pl-option .mn-tag{margin-left:8px;vertical-align:1px}
.pl-option.picked-ok{background:var(--goodbg);border-color:var(--green);color:var(--ink)}
.pl-option.picked-no{background:var(--amberbg);border-color:var(--amber);color:var(--ink)}

/* Practice: all three options revealed */
.pl-feedback.mn-open{background:#fff;border-color:var(--line)}
.mn-cards{display:grid;gap:10px;margin-top:14px}
.mn-card{border:2px solid var(--line);border-radius:12px;padding:12px 16px;background:var(--wash)}
.mn-card.mine{border-color:var(--ink);background:#fff}
.mn-card-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 6px}
.pl-room .stage .mn-card p{font-size:15px;line-height:1.5}
.pl-room .stage .mn-card p+p{margin-top:6px}
.mn-amount{font-weight:900;font-variant-numeric:tabular-nums}
.mn-when{font-size:13px;color:var(--muted);font-weight:700}
.mn-mine{font-size:12px;font-weight:850;color:var(--ink);margin-left:auto}

@media(max-width:520px){.mn-mine{margin-left:0;width:100%}}

/* Phone: the P&L is in a drop-down beside every question, and the sidebar lands below the lesson,
   so its copy of the P&L (heading and table) is hidden there. The rest of the sidebar stays.
   .mn-wide / .mn-narrow swap wording such as "beside you". */
@media(max-width:720px){.mn-pl-head,#sidebar-pl{display:none}.mn-wide{display:none}}
@media(min-width:721px){.mn-narrow{display:none}}
