/* QueueSim web games: One Line or Four, The Cliff, Hold or Hang Up. Loaded after /staff-the-day/staff-the-day.css
   (shared cards, tiles, buttons, board rows, forms) and before /css/qs-site.css. */

.qg .scene-wrap { display: flex; flex-direction: column; gap: 10px; }
.qg .scene-wrap svg { width: 100%; height: auto; display: block; }
.qg .note { font-family: var(--font-mono); font-size: 13px; color: var(--on-ground-3); margin-top: 8px; }
.qg .home-card .p { margin: 4px 0 12px; }
.qg .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }

/* play status + reveal button */
.qg .play-head .run { min-width: 210px; }

/* One Line or Four: one card per busy level, two guesses in each */
.olf-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.olf-col .lbl { margin-bottom: 6px; }
.guess { padding: 10px 0 6px; border-top: 1px solid var(--rule); }
.guess:first-of-type { border-top: 0; }
.guess .gtop { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.guess .gname { font-size: 16px; color: var(--on-ground); }
.guess .gval { font-family: var(--font-mono); font-size: 20px; color: var(--caramel); white-space: nowrap; }
.guess .gval.unset { color: var(--on-ground-3); }
.guess .gval small { font-size: 13px; color: var(--on-ground-3); margin-left: 3px; }
.gslider { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; touch-action: pan-y; cursor: pointer; }
.gslider:focus { outline: none; }
.gslider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.gslider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--ground-4, #3a3530); }
.gslider::-moz-range-track { height: 6px; border-radius: 3px; background: var(--ground-4, #3a3530); }
.gslider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--caramel); border: 3px solid var(--ground); }
.gslider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--caramel); border: 3px solid var(--ground); }
.gslider.unset::-webkit-slider-thumb { background: transparent; border: 2px dashed var(--caramel); }
.gslider.unset::-moz-range-thumb { background: transparent; border: 2px dashed var(--caramel); }
.gticks { position: relative; height: 16px; font: 12px var(--font-mono); color: var(--on-ground-3); margin: -4px 14px 0; }
.gticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* reveal (both guessing games) */
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }
.rv-sub { text-align: center; color: var(--on-ground-2); font-size: 16px; margin: 6px 0 14px; }
.big .bignum { font-size: clamp(56px, 11vw, 76px); font-weight: 700; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.legend2 { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 14px var(--font-mono); color: var(--on-ground-2); margin-bottom: 6px; }
.legend2 span { display: inline-flex; align-items: center; gap: 6px; }
.legend2 i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }
.legend2 .k-you { background: var(--caramel); }
.legend2 .k-eng { background: var(--q-blue, #4A90D9); }
.legend2 .k-dot { border-radius: 50%; }
.legend2 .k-line { width: 16px; height: 3px; border-radius: 2px; }
.rv-level { margin-top: 10px; }
.rv-row { display: grid; grid-template-columns: 6.6em minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.rv-row .k { font-size: 15px; color: var(--on-ground); white-space: nowrap; }
.rv-bars { display: flex; flex-direction: column; gap: 3px; }
.rv-bars i { display: block; height: 9px; border-radius: 3px; min-width: 2px; }
.rv-bars .you { background: var(--caramel); opacity: .9; }
.rv-bars .eng { background: var(--q-blue, #4A90D9); }
.rv-row .nums { font: 14px var(--font-mono); text-align: right; line-height: 1.35; white-space: nowrap; }
.rv-row .nums .y { color: var(--caramel); }
.rv-row .nums .e { color: var(--accent-soft); }
.rv-row .nums .m, .rv-row .nums .z { color: var(--on-ground-3); }
.rv-table { width: 100%; border-collapse: collapse; font: 15px var(--font-mono); }
.rv-table th { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ground-3); text-align: right; padding: 4px 0 8px; border-bottom: 1px solid var(--rule); }
.rv-table th:first-child, .rv-table td:first-child { text-align: left; }
.rv-table td { text-align: right; padding: 6px 0; color: var(--on-ground); }
.rv-table .y { color: var(--caramel); }
.rv-table .e { color: var(--accent-soft); }
.rv-table .z { color: var(--on-ground-3); }
.qg .tiles2 .tile .v.words { font-family: var(--font-text); font-size: 15px; font-weight: 500; white-space: normal; line-height: 1.35; margin-top: 4px; color: var(--on-ground-2); }

/* The Cliff: the dot chart */
.cliff-card { padding: 12px 10px 6px; }
.cliff-svg { display: block; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.cliff-svg .col { cursor: ns-resize; }
.cliff-svg .dot { cursor: grab; }
.cliff-svg .dot:focus { outline: none; }
.cliff-svg .dot:focus-visible circle.ring { stroke: var(--accent); stroke-width: 3; }
.cliff-help { font-size: 14px; color: var(--on-ground-3); margin-top: 6px; }

/* Hold or Hang Up: stepper, segmented hold limit, rule card */
.hold-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qg .stepper .sv { font-family: var(--font-mono); font-size: 40px; font-weight: 500; line-height: 1; text-align: center; min-width: 2.2em; }
.qg .stepper .sv small { display: block; font-size: 13px; color: var(--on-ground-3); margin-top: 4px; }
.stepper .iconbtn { width: 52px; height: 52px; font-size: 26px; }
.stepper .iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.agent-dots { display: flex; justify-content: space-between; margin-top: 12px; }
.agent-dots span { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 12px var(--font-mono); color: var(--on-ground-3); }
.agent-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--on-ground-3); }
.agent-dots i.on { background: rgba(74,222,128,.7); border-color: var(--green); }
.seg { display: flex; background: var(--ground-2); border: 1px solid var(--rule); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--on-ground-2); font: 600 15px var(--font-text); padding: 11px 4px; border-radius: 9px; cursor: pointer; min-height: 44px; }
.seg button[aria-checked="true"] { background: var(--q-blue, #4A90D9); color: var(--cream, #F0EDE6); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rule-text { font-size: 17px; font-weight: 600; line-height: 1.4; }
.tiles4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.tiles4 .tile .v { font-size: 20px; }
.tiles4 .tile .lbl, .tiles3 .tile .lbl { overflow-wrap: anywhere; }
.c-red { color: var(--red); }
.c-amber { color: var(--amber); }
.qg .avg-note { font-size: 14px; color: var(--on-ground-3); margin-top: 8px; }

@media (max-width: 860px) {
  .rv-grid, .hold-grid { grid-template-columns: minmax(0, 1fr); }
  .olf-cols { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 640px) {
  .qg .play-head .run { order: 5; flex: 1 1 100%; }
  .tiles4 { grid-template-columns: 1fr 1fr; }
  .rv-row { grid-template-columns: 5.6em minmax(0, 1fr) auto; gap: 8px; }
  .rv-row .k { font-size: 14px; }
  .qg .facts { grid-template-columns: 1fr; }
}

/* The Cliff: busy-level bars (a picture of the levels) */
.lvbars { display: flex; justify-content: space-between; gap: 6px; margin: 8px 0 10px; }
.lvbars span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lvbars b { font: 500 13px var(--font-mono); color: var(--on-ground-2); }

/* no inline style attributes (strict-CSP ready) */
.qg .mt8 { margin-top: 8px; }
.qg .mb12 { margin-bottom: 12px; }
.qg .push { margin-left: auto; }

/* Hold or Hang Up ladder: longer row names ("10 agents, no limit") than Staff the Day's */
.qg .lrow { grid-template-columns: 10.6em minmax(0, 1fr) 4.6em; }
@media (max-width: 640px) { .qg .lrow { grid-template-columns: 9.8em minmax(0, 1fr) 4.4em; } }

/* reveal order: on a phone the engine's numbers come right after the total, before the buttons */
.rv-grid { grid-template-areas: "head card" "foot card"; grid-template-rows: auto 1fr; }
.rv-head { grid-area: head; }
.rv-foot { grid-area: foot; }
.rv-card { grid-area: card; }
@media (max-width: 860px) { .rv-grid { grid-template-areas: "head" "card" "foot"; grid-template-rows: auto; } }
