/* AP stages: the illustration of how the head-office view grows (uses the tokens and components of app.css) */
.keys { color: var(--brand-mut); font-size: 12px; white-space: nowrap; }
.phead h1 { font-size: 24px; }
.phead .sub { font-size: 14px; max-width: 760px; }

/* stepper */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 2px 0 12px; }
.step { position: relative; display: flex; gap: 10px; align-items: flex-start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad); padding: 12px 14px; box-shadow: var(--shadow); color: var(--ink); min-width: 0; transition: border-color .2s, background .2s; }
.step:hover { border-color: var(--accent); }
.step .sn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 1.5px solid var(--axis); color: var(--muted); background: var(--surface-2); flex-shrink: 0; transition: background .2s, color .2s, border-color .2s; }
.step .sb { min-width: 0; }
.step .st { display: block; font-weight: 700; font-size: 14px; }
.step .ss { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.step .tag { margin-top: 6px; }
.step.done .sn { border-color: var(--accent); color: var(--accent-ink); background: var(--surface); }
.step.on { border-color: var(--accent); background: var(--accent-soft); }
.step.on .sn { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.on .ss { color: var(--ink-2); }

/* meter row */
.meter { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad); box-shadow: var(--shadow); }
.mgroup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.mgroup.where { margin-left: auto; }
.ml { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.segs { display: inline-flex; gap: 2px; }
.segs i { width: 11px; height: 12px; border-radius: 2px; background: var(--deemph-2); transition: background .3s; }
.segs i.on { background: var(--s1); }
.segs i.new { background: var(--s1); outline: 2px solid var(--accent-soft); outline-offset: 0; }
.meter .tog button { padding: 4px 10px; }

/* layout: the step card on the right on wide screens, first on narrow ones */
.stg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "dash step"; gap: 14px; align-items: start; }
.stepcard { grid-area: step; position: sticky; top: 70px; }
.dash { grid-area: dash; min-width: 0; }

/* question tiles: not links here */
.q { cursor: default; position: relative; transition: border-color .25s; }
.q:hover { border-color: var(--line); }
.q.upd, .q.upd:hover { border-color: var(--accent); }
.q .flag { position: absolute; top: 12px; right: 12px; }
.q .qv small { white-space: nowrap; }

/* advisor cards */
.adv { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.advc { position: relative; transition: opacity .3s, border-color .3s; }
.advc .flag { position: absolute; top: 10px; right: 10px; }
.advc.off { opacity: .55; border-left-color: var(--deemph); border-style: dashed; border-left-style: solid; background: transparent; box-shadow: none; }
.advc.off h3 { color: var(--muted); font-weight: 600; }
.advc.new { border-color: var(--accent); }
.advc .plus { font-size: 12.5px; color: var(--accent-ink); font-weight: 600; }
.advc .k { padding-right: 56px; }

/* head-office tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); transition: opacity .3s, border-color .3s, background .3s; min-width: 0; }
.tile h3 { font-size: 13.5px; font-weight: 700; padding-right: 46px; }
.tile p { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.tile .lv { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.tile .lv .mchip { cursor: default; }
.tile .flag { position: absolute; top: 9px; right: 9px; }
.tile.off { opacity: .5; border-style: dashed; background: transparent; box-shadow: none; }
.tile.off h3 { color: var(--muted); }
.tile.new { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.from { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mchip { cursor: default; }

/* step card */
.stepcard .ch { padding-bottom: 2px; }
.stepcard .kk { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.stepcard h2 { font-size: 17px !important; margin-top: 2px; }
.stepcard dl { margin: 0; display: grid; gap: 10px; }
.stepcard dt { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stepcard dd { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.stepcard dd b { color: var(--ink); }
.stepcard .srcs { margin-top: 2px; }
.stepcard .nav { display: flex; justify-content: space-between; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }

/* store plan */
.fpw { margin: 4px 0 2px; }
.fp { display: block; width: 100%; height: auto; }
.fp text { fill: var(--muted); font-size: 9.5px; font-family: var(--font); }
.fp text.on { fill: var(--accent-ink); font-weight: 700; }
.fp .shell { fill: var(--surface-2); stroke: var(--axis); stroke-width: 1.2; }
.fp .room { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.fp .rack { fill: var(--deemph-2); }
.fp .door { stroke: var(--surface-2); stroke-width: 4; }
.fp .cone { fill: var(--deemph); opacity: .14; transition: fill .3s, opacity .3s; }
.fp .cone.on { fill: var(--accent); opacity: .24; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .fp .cone.on { opacity: .45; } }
:root[data-theme="dark"] .fp .cone.on { opacity: .45; }
.fp .cam { fill: var(--deemph); stroke: var(--surface); stroke-width: 1.5; transition: fill .3s; }
.fp .cam.on { fill: var(--accent); }
.fp .ped { fill: var(--deemph); transition: fill .3s; }
.fp .ped.on { fill: var(--accent); }
.fp .box { fill: var(--surface); stroke: var(--axis); stroke-width: 1; }
.fp .box.on { fill: var(--accent); stroke: var(--accent); }
.fp .boxt { font-size: 8px; font-weight: 700; fill: var(--muted); }
.fp .boxt.on { fill: #fff; }
.fp .wave { fill: none; stroke: var(--deemph); stroke-width: 1.4; opacity: 0; transition: opacity .3s; }
.fp .wave.on { stroke: var(--accent); opacity: 1; }
.fp .till { fill: var(--surface); stroke: var(--axis); }
.fp .till.on { stroke: var(--accent); stroke-width: 1.6; }
.fpcap { font-size: 12px; color: var(--muted); margin-top: 4px; }

.foot { color: var(--muted); font-size: 12px; margin: 6px 0 0; max-width: 900px; }

/* responsive */
@media (max-width: 1180px) {
  .stg-grid { grid-template-columns: 1fr; grid-template-areas: "step" "dash"; }
  .stepcard { position: static; }
  .stepcard .fpw { max-width: 420px; }
}
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mgroup.where { margin-left: 0; }
}
@media (max-width: 640px) {
  .phead h1 { font-size: 20px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 8px; }
  .step { padding: 10px; gap: 8px; }
  .step .ss, .step .tag { display: none; }
  .keys { display: none; }
  .segs i { width: 8px; }
  .meter .tog button { padding: 4px 7px; font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .step, .tile, .advc, .q, .segs i, .fp * { transition: none !important; }
}
