/* My numbers (T-71, DECISIONS #242, #243): the salesperson's own effort and results. Built from the approved prototype
   (docs/prototypes/my-numbers/). Every class starts with mn-; the ring, the results path and the tip reuse the Dashboard parts
   (dsh-donut, dsh-fun, dsh-tip in dashboard.css). Tablet first; grids follow the screen's own room (@container), not the window. */
.mn { container: mn / inline-size; padding-bottom: 40px; }

/* period bar */
.mn-bar { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-4); }
.mn-step { display: inline-flex; align-items: center; gap: 6px; }
.mn-step .btn { width: 36px; height: 36px; padding: 0; justify-content: center; }
.mn-step .btn .ico { width: 16px; height: 16px; }
.mn-step .mn-back .ico { transform: scaleX(-1); }
.mn-when { min-width: 150px; text-align: center; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--c-ink); }

.mn .sbox { box-shadow: var(--card-shadow); }
.mn .sbox-n { font-size: var(--fs-table); color: var(--c-ink); }
.mn .sbox-fold .ico { transform: rotate(90deg); } /* the menu chevron points right; a section fold points down while open */

/* a channel: ring + group cards; the open group's results unfold under them */
.mn-ch { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--sp-4) var(--sp-5); align-items: center; }
.mn-ring .dsh-donut-c b { font-size: var(--fs-kpi); }
.mn-ring circle { fill: none; stroke-width: 14; }
.mn-ring .mn-track { stroke: var(--c-neutral-soft); }
.mn-ring .mn-arc { stroke: var(--c-success); stroke-linecap: round; transition: stroke-dasharray .5s; }
.mn-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-3); margin: 0; }
.mn-groups .stat, .mn-kids .stat { box-shadow: none; text-align: start; font: inherit; width: 100%; position: relative; cursor: pointer; }
.mn-groups .stat:hover, .mn-kids .stat:hover { border-color: var(--c-line-strong); box-shadow: var(--card-shadow); }
.mn-groups .stat .label { font-size: var(--fs-table); }
.mn-groups .stat:focus-visible, .mn-kids .stat:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mn-fold { position: absolute; inset-inline-end: 10px; inset-block-start: 10px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--c-line-strong); background: var(--c-card); color: var(--c-muted); transition: transform .2s; }
.mn-fold .ico { width: 15px; height: 15px; transform: rotate(90deg); }
.mn-groups .stat[aria-expanded="true"] { border-color: var(--acc-solid); }
.mn-groups .stat[aria-expanded="true"] .mn-fold { transform: rotate(180deg); color: var(--c-ink); }
.mn-delta { font-style: normal; font-weight: var(--fw-semibold); }
.mn-delta.up { color: var(--c-success); }
.mn-delta.down { color: var(--c-danger); }

.mn-kids-wrap { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.mn-kids-wrap.open { grid-template-rows: 1fr; }
.mn-kids-in { overflow: hidden; min-height: 0; }
.mn-kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-lg); background: var(--c-page); margin: 0; }
.mn-kids .stat { padding: 12px 14px; }
.mn-kids .stat .value { font-size: var(--fs-title); }
.mn-kids .stat .stat-ico { width: 36px; height: 36px; }
.mn-kids .stat .stat-ico .ico { width: 16px; height: 16px; }

/* results + charts */
.mn-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--sp-3); margin-top: var(--sp-3); }
.mn-grid > .sbox + .sbox { margin-top: 0; }
.mn-wide { grid-column: 1 / -1; }
.mn .dsh-fun-row { grid-template-columns: 130px minmax(0, 1fr) 56px; }
.mn .dsh-fun-name { white-space: normal; overflow: visible; }
.mn .dsh-fun-track i { background: var(--k); width: var(--w, 0%); }
.mn .dsh-fun-n { text-align: end; }
.mn-step-rate { display: block; font-size: var(--fs-hint); color: var(--c-muted); white-space: nowrap; }
.mn-step-rate b { color: var(--c-ink); font-weight: var(--fw-semibold); }

.mn-chart { position: relative; }
.mn-chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.mn-bok { fill: var(--c-success); }
.mn-bno { fill: color-mix(in srgb, var(--c-neutral) 30%, var(--c-card)); }
.mn-bwa { fill: var(--tint-green); opacity: .45; }
.mn-col { cursor: pointer; }
.mn-col:hover .mn-hit, .mn-col.on .mn-hit { fill: var(--c-page); }
.mn-hit { fill: transparent; }
.mn-ax { font-size: var(--fs-hint); fill: var(--c-muted); font-family: inherit; }
.mn-grid-l { stroke: var(--c-line); stroke-dasharray: 3 4; }
.mn-mdot { fill: var(--c-card); stroke: var(--tint-amber); stroke-width: 2.5; }
.mn-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: var(--sp-2); font-size: var(--fs-hint); color: var(--c-muted); }
.mn-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.mn-legend .l-ok { background: var(--c-success); }
.mn-legend .l-no { background: color-mix(in srgb, var(--c-neutral) 30%, var(--c-card)); }
.mn-legend .l-wa { background: color-mix(in srgb, var(--tint-green) 45%, var(--c-card)); }
.mn-legend .l-m { border-radius: 50%; border: 2.5px solid var(--tint-amber); box-sizing: border-box; }
.mn .dsh-tip { z-index: 5; transform: none; } /* placed by the page beside the column, inside the box (the Dashboard's tip floats above its point) */
.mn .dsh-sw { background: var(--c); }

.mn-best { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.mn-best b { font-size: var(--fs-kpi); letter-spacing: -.02em; color: var(--c-ink); }
.mn-best span { font-size: var(--fs-table); color: var(--c-muted); }
.mn-heat { display: grid; grid-template-columns: repeat(var(--cols, 13), minmax(0, 1fr)); gap: 4px; }
.mn-hr { display: grid; gap: 4px; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.mn-hr:hover i { border-color: var(--c-line-strong); }
.mn-hr i { display: block; height: 44px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--c-success) var(--p, 0%), var(--c-card)); border: 1px solid var(--c-line); transition: background .3s; }
.mn-hr.best i { box-shadow: 0 0 0 2px var(--c-ink); }
.mn-hr span { font-size: var(--fs-hint); color: var(--c-muted); text-align: center; }
.mn-hr:focus-visible { outline: none; }
.mn-hr:focus-visible i { box-shadow: var(--focus-ring); }
.mn-scale { display: flex; align-items: center; gap: 8px; margin-top: var(--sp-3); font-size: var(--fs-hint); color: var(--c-muted); }
.mn-scale i { flex: 0 0 120px; height: 8px; border-radius: var(--r-pill); background: linear-gradient(90deg, color-mix(in srgb, var(--c-success) 10%, var(--c-card)), var(--c-success)); }
.mn-none { color: var(--c-muted); font-size: var(--fs-table); padding: var(--sp-2) 0; }

@container mn (max-width: 820px) { .mn-grid { grid-template-columns: minmax(0, 1fr); } }
@container mn (max-width: 560px) {
  .mn-ch { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .mn-groups { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mn-groups .stat { padding-inline-end: 40px; }
  .mn-kids-wrap { justify-self: stretch; }
  .mn-kids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mn .dsh-fun-row { grid-template-columns: 124px minmax(0, 1fr) 40px; }
  .mn-heat { --cols: 7 !important; }
  .mn-when { min-width: 120px; }
}
