/* "Where a shot's time goes" lens (js/views/shots.js): waste by lever, cause-to-decision table, department, unit and
   sequence tables, the smooth-versus-troubled contrast, the brief's priorities. Reuses the savings lens's table and
   track styles (css/views/savings.css) and the site's cards. */

.sh-links { margin: .8rem 0 1.2rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.sh-sec { margin-top: 2.6rem; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.sh-brief { font-size: 1.15rem; line-height: 1.5; max-width: 80ch; margin: .6rem 0 1rem; }
.sh-brief b { font-weight: 600; }
.sh-show { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.sh-show a { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-size: .9em; }
.sh-show a.on { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.sh-show a small { color: var(--muted); margin-left: .35rem; }

.sh-levers { display: grid; gap: 6px; margin-top: 1rem; }
.sh-lever { display: grid; grid-template-columns: 19rem minmax(8rem, 1fr) 7rem 6rem; gap: 1rem; align-items: center; padding: .5rem .7rem; border-radius: 10px; }
.sh-lever .n { font-weight: 500; }
.sh-lever .n small { display: block; color: var(--muted); font-weight: 400; font-size: .85em; }
.sh-lever .v { text-align: right; font-variant-numeric: tabular-nums; }
.sh-lever .p { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.sh-lever .sv-track .b { background: var(--lc, var(--accent)); }
.sh-lever.process .sv-track .b { background: var(--warm, #f59e0b); }
.sh-lever.craft .sv-track .b { background: var(--accent); }
.sh-lever.other .sv-track .b { background: var(--muted); }
.sh-lgroup { margin-top: .7rem; }
.sh-lghd { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline; padding: .4rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .2rem; }
.sh-lghd span { color: var(--muted); font-size: .92em; }
.sh-lghd .num { margin-left: auto; color: var(--fg); }
.sh-lgroup.process .sh-lghd b { color: var(--warm, #f59e0b); }
.sh-lgroup.craft .sh-lghd b { color: var(--accent); }
.sh-lgroup .note { margin: .3rem .7rem 0; }
.sh-legend { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: .8rem; color: var(--muted); font-size: .9em; }
.sh-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; }
.sh-legend .process i { background: var(--warm, #f59e0b); }
.sh-legend .craft i { background: var(--accent); }

.sh-dec { display: inline-block; min-width: 1.5rem; padding: .05rem .45rem; border-radius: 6px; text-align: center; font-weight: 600; font-size: .85em;
  background: color-mix(in srgb, var(--accent2) 18%, transparent); color: var(--accent2); }
.sh-dec.none { background: transparent; color: var(--muted); font-weight: 400; }
.sh-verdict { display: inline-block; min-width: 2.2rem; padding: .1rem .45rem; border-radius: 6px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.sh-verdict.low { background: color-mix(in srgb, #ef4444 22%, transparent); }
.sh-verdict.mid { background: color-mix(in srgb, #f59e0b 22%, transparent); }
.sh-verdict.high { background: color-mix(in srgb, #22c55e 22%, transparent); }
.sh-cause { color: var(--muted); font-size: .9em; }
.sh-bar { position: relative; height: 10px; border-radius: 0 4px 4px 0; background: color-mix(in srgb, var(--accent) 10%, transparent); min-width: 5rem; }
.sh-bar i { position: absolute; left: 0; top: 0; height: 100%; border-radius: 0 4px 4px 0; background: var(--warm, #f59e0b); }
.sh-bar.cool i { background: var(--accent); }

.sh-fold { margin-top: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.sh-fold > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.sh-fold > summary::-webkit-details-marker { display: none; }
.sh-fold > summary small { color: var(--muted); font-weight: 400; }
.sh-fold > summary::after { content: '+'; color: var(--muted); font-weight: 300; font-size: 1.2em; }
.sh-fold[open] > summary::after { content: '−'; }
.sh-fold > div { padding: 0 1rem 1rem; }

.sh-table td.sent { max-width: 48ch; color: var(--muted); font-size: .9em; }
.sh-table td.sent b, .sh-table td.cn { color: var(--fg); }
.sh-table tr.dim td { color: var(--muted); }
.sh-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 1rem; }
.sh-two > div { padding-left: .9rem; border-left: 2px solid var(--line); }
.sh-two h4, .sh-list h4 { margin: 0 0 .4rem; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sh-list ol, .sh-list ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.sh-list li { margin: .35rem 0; }
.sh-list li small, .sh-owner { color: var(--muted); }
.sh-prio { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); margin-top: 1rem; }
.sh-prio .card { padding: 1rem 1.1rem; }
.sh-prio .no { font-size: 2rem; font-weight: 300; color: var(--accent2); line-height: 1; }
.sh-prio h3 { margin: .3rem 0 .4rem; font-size: 1.1rem; }
.sh-prio .why { color: var(--muted); font-size: .92em; }
.sh-prio ul { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .92em; }
.sh-prio .kpi { margin-top: .6rem; font-size: .9em; }
.sh-prio .kpi b { font-weight: 600; }
.sh-est { color: var(--muted); font-style: italic; }
.sh-contrast td.cls { font-weight: 600; }
.sh-contrast td.cls.troubled { color: var(--warm, #f59e0b); }
.sh-contrast td.cls.smooth { color: var(--accent2); }
.sh-caveat { color: var(--muted); font-size: .92em; max-width: 80ch; }
.sh-caveat li { margin: .3rem 0; }
.sh-mini .v small { color: var(--muted); font-weight: 400; }

@media (max-width: 900px) {
  .sh-lever { grid-template-columns: 1fr; gap: .3rem; }
  .sh-lever .v, .sh-lever .p { text-align: left; }
  .sh-two { grid-template-columns: 1fr; }
}
@media print {
  .sh-fold { border: 0; }
  .sh-fold > summary::after { content: ''; }
  .sh-fold > div { display: block; }
}
.sh-plain { margin: 0; padding-left: 1.1rem; }
.sh-plain li { margin: .25rem 0; }
.sh-plain li small { color: var(--muted); }
.sh-sparkwrap { margin: .6rem 0 1rem; }
.sh-sparkhd { display: flex; justify-content: space-between; font-size: .85em; color: var(--muted); margin-bottom: .25rem; }
.sh-spark { width: 100%; height: 82px; display: block; }
.sh-spark .lab { font-size: 11px; fill: var(--muted); font-family: inherit; }

/* ---- the micro end: one shot in full, and two shots side by side ---- */
.sh-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .55rem; font-size: .95rem; color: var(--muted); margin: .2rem 0 .6rem; }
.sh-crumbs a { color: var(--accent2); text-decoration: none; }
.sh-crumbs a:hover { text-decoration: underline; }
.sh-crumbs b { color: var(--text); font-weight: 600; }
.sh-tlwrap { width: 100%; overflow: hidden; margin-top: .6rem; }
.sh-tl { width: 100%; height: 210px; display: block; }
.sh-tl.small { height: 120px; }
.sh-tl text.ax { font-size: 11px; fill: var(--muted); font-family: inherit; }
.sh-gantt { width: 100%; height: auto; display: block; }
.sh-gantt text.lab { font-size: 11px; fill: var(--fg); font-family: inherit; }
.sh-gantt text.lab.r { fill: var(--muted); }
.sh-gantt text.ax { font-size: 11px; fill: var(--muted); font-family: inherit; }
.sh-ev { width: 100%; height: 150px; display: block; }
.sh-ev text.ax { font-size: 11px; fill: var(--muted); font-family: inherit; }
.sh-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin: .4rem 0 1rem; }
.sh-champ { margin: .3rem 0 0; padding-left: 1.3rem; }
.sh-champ li { margin: .2rem 0; }
.sh-champ small { color: var(--muted); }
@media (max-width: 900px) { .sh-three { grid-template-columns: 1fr; } }
.sh-tl-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.sh-tl-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.sh-tl-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--dc); display: inline-block; }
.sh-tl-legend .mk b { display: inline-block; width: 0; height: 0; }
.sh-tl-legend .mk b.ap { border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid var(--accent); }
.sh-tl-legend .mk b.cl { width: 8px; height: 8px; border-radius: 50%; background: var(--ember, #e85d2a); }
.sh-tl-legend .mk b.ro { border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 7px solid var(--warm, #f59e0b); }
.sh-shotpair { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-top: 1rem; }
.sh-shotcard { border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.sh-shotcard .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.sh-shotcard .hd a { font-weight: 600; text-decoration: none; font-size: 1.05rem; }
.sh-shotcard .cls { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sh-shotcard.troubled .cls { color: var(--ember, #e85d2a); }
.sh-shotcard.smooth .cls { color: var(--accent); }
.sh-shotcard .facts { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; color: var(--muted); margin: .6rem 0 .4rem; }
.sh-shotcard .facts b { color: var(--text); font-weight: 600; }
.sh-shotcard p { margin: .3rem 0 .7rem; }
.sh-chapters, .sh-trace { list-style: none; padding: 0; margin: 1rem 0 0; }
.sh-chapters li, .sh-trace li { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.sh-chapters li.turn .what > b { color: var(--ember, #e85d2a); }
.sh-chapters .what > b { margin-right: .5rem; }
.sh-chapters .when, .sh-trace .when { color: var(--muted); font-size: .9rem; }
.sh-chapters .when small, .sh-trace .when small { display: block; }
.sh-chapters .what p, .sh-trace .what p { margin: .25rem 0 0; }
.sh-trace .why { color: var(--muted); font-style: italic; }
.sh-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.sh-two h4 { margin: .6rem 0 .2rem; }
@media (max-width: 720px) { .sh-chapters li, .sh-trace li, .sh-two { grid-template-columns: 1fr; } }
/* handouts: a department page, a shot page or the pack prints without the chrome */
@media print {
  header.topbar, nav.lens-nav, aside.rail, footer.footer, .sh-links .btn, .sh-print, .sh-show { display: none !important; }
  main.main { max-width: none; padding: 0; }
  .sh-sec { break-inside: avoid; margin-top: 1.2rem; }
  .sh-fold { border: none; }
  .sh-fold > summary { padding: 0; font-weight: 600; }
  .sh-tl { height: 160px; }
  .sh-shotpair { grid-template-columns: 1fr 1fr; }
  body { background: #fff; color: #000; }
}
