/* Staff the Day (web). Loaded after /css/qs-tokens.css and before /css/qs-site.css.
   Espresso ground, Q blue accent, caramel buttons; Space Grotesk text, DM Mono labels and numbers.
   Chart colours as the simulator's hourly chart: blue wait bars, amber line-length line, green staff step. */

*, *::before, *::after { box-sizing: border-box; }
body.std-page { margin: 0; font-family: var(--font-text); font-size: 16px; line-height: 1.5; background: var(--ground); color: var(--on-ground); }
body.std-page h1, body.std-page h2, body.std-page h3, body.std-page h4, body.std-page p, body.std-page ul { margin: 0; }
body.std-page [hidden] { display: none !important; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

.std { padding: 22px 16px 56px; min-height: 70vh; }
.std-wrap { max-width: 1080px; margin: 0 auto; }
.std-wrap.wide { max-width: 1180px; }
.std-wrap.narrow { max-width: 560px; }

.std h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 700; letter-spacing: -1px; line-height: 1.05; }
.std .h1 { font-size: clamp(28px, 5vw, 38px); font-weight: 700; letter-spacing: -.5px; line-height: 1.1; margin-bottom: 10px; }
.std .h3 { font-size: 20px; font-weight: 700; }
.std .h4 { font-size: 17px; font-weight: 700; }
.std h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 700; line-height: 1.15; }
.std .std-lede { font-size: 18px; color: var(--on-ground-2); margin: 10px 0 20px; max-width: 46em; }
.std .p { font-size: 16px; color: var(--on-ground-2); }
.std .small { font-size: 14px; color: var(--on-ground-2); }
.std .faint { color: var(--on-ground-3); }
.std .mono { font-family: var(--font-mono); }
.std .lbl { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ground-3); }
.std .center { text-align: center; }
.std .c-caramel { color: var(--caramel); }
.std .c-green { color: var(--green); }
.std .c-blue { color: var(--accent-soft); }
.std a { color: var(--accent-soft); }

.std .card { background: var(--ground-3); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; }
.std .card-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.std .pill { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--accent-soft); border: 1px solid rgba(74,144,217,.5); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.std .tile { background: var(--ground-2); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.std .tile .v { font-family: var(--font-mono); font-size: 22px; font-weight: 500; margin-top: 2px; white-space: nowrap; }
.std .tile .s { font-size: 14px; color: var(--on-ground-3); }
.std .tiles2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 16px; }
.std .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.std .actions .grow { flex: 1 1 140px; }
.std .chart { width: 100%; }
.std .chart svg, .std .pg-chart svg { display: block; overflow: visible; }

/* buttons: shared .btn/.btn-primary/.btn-outline from qs-site.css; extras here */
body.qs .std .btn:disabled, body.qs .std .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
body.qs .std .btn-ghost { background: transparent; color: var(--on-ground); border: 1px solid var(--rule-strong); }
body.qs .std .btn-ghost:hover { background: rgba(240,237,230,.06); }
body.qs .std .btn.full { width: 100%; }
.std .linkbtn { background: none; border: 0; padding: 6px 0; font: 600 16px var(--font-text); color: var(--accent-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(74,144,217,.5); }
.std .linkbtn:hover { text-decoration-color: var(--accent); }
.std .linkbtn.danger { color: var(--red); text-decoration-color: rgba(248,113,113,.5); }
.std .back { background: none; border: 0; padding: 6px 0; font: 600 17px var(--font-text); color: var(--accent-soft); cursor: pointer; }
.std .iconbtn { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--rule-strong); background: transparent; color: var(--on-ground); font: 700 20px var(--font-display); cursor: pointer; }
.std .iconbtn:hover { background: rgba(240,237,230,.06); }
.std .topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }

.std .err { color: var(--red); font-size: 15px; margin: 12px 0 0; }
.std .ok { color: var(--green); font-size: 16px; margin: 12px 0; }
.std .toast { color: var(--green); font-size: 14px; text-align: center; margin-top: 8px; }

/* home */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.board-card .board-more { margin-top: 8px; }
.about { margin-top: 36px; max-width: 46em; }
.about p { color: var(--on-ground-2); margin-top: 10px; }

/* board rows */
.brows { list-style: none; padding: 0; margin: 0; }
.brows li { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.brows li:last-child { border-bottom: 0; }
.brows .r { font-family: var(--font-mono); color: var(--on-ground-3); }
.brows .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brows .w { font-family: var(--font-mono); color: var(--accent-soft); white-space: nowrap; }
.brows li.me { background: rgba(74,144,217,.12); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.brows .rep { background: none; border: 0; color: var(--on-ground-3); font: 14px var(--font-mono); cursor: pointer; padding: 4px 0 4px 8px; }
.brows .rep:hover { color: var(--red); }
.brows.full li { grid-template-columns: 2em minmax(0, 1fr) auto auto; }
.brows li.sample { opacity: .55; }
.brows .tag { display: inline-block; margin-left: 8px; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 4px; font: 11px var(--font-mono); letter-spacing: .5px; color: var(--on-ground-3); vertical-align: 2px; }
.sample-note { margin-top: 8px; }
.board-full { padding: 4px 16px; margin: 14px 0 12px; }
.board-full .bhead { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.board-empty { text-align: center; padding: 26px 8px 22px; }
.board-empty .h4 { margin-bottom: 6px; }
.acct { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.acct-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }

/* intro */
.dots { display: flex; gap: 8px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ground-4); }
.dots i.on { background: var(--accent); }
.intro-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; min-height: 300px; }
.intro-text .lbl { margin-bottom: 10px; }
.intro-text h2 { margin-bottom: 12px; }
.intro-vis { min-height: 240px; }
.intro-vis .lbl { margin-bottom: 8px; }
.intro-vis .tiles3 { margin-top: 12px; }
.intro-vis .small { margin-top: 14px; }
.intro-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.intro-nav .btn { min-width: 120px; }
.scene { width: 100%; max-width: 460px; height: auto; display: block; }

/* play */
.play-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ph-title { flex: 1; min-width: 0; }
.ph-title h2 { font-size: 24px; line-height: 1.1; }
.ph-title .status { font-size: 14px; color: var(--on-ground-2); }
body.qs .std .run { min-width: 190px; }
.pg, .lane { display: grid; grid-template-columns: var(--gut, 86px) minmax(0, 1fr); }
.pg { margin-bottom: 8px; }
.pg-gut { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 0 6px 44px 0; }
.pg-gut .lbl { line-height: 1.25; }
.pg-staff { margin-bottom: -16px; }
.lanes { touch-action: pan-y; }
.lane { align-items: center; height: 42px; }
.lane-gut { display: flex; align-items: center; min-width: 0; padding-right: 8px; }
.lane-lab { font-family: var(--font-mono); font-size: 14px; color: var(--on-ground-3); white-space: nowrap; }
.lane-lab .sh { display: inline; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1.5px dashed var(--green); background: rgba(74,222,128,.10); color: var(--green); font: 500 14px var(--font-mono); cursor: grab; touch-action: pan-y; white-space: nowrap; }
.chip::before { content: '\22EE\22EE'; letter-spacing: -2px; }
.chip.sel { background: rgba(74,222,128,.28); border-style: solid; }
.track { position: relative; height: 34px; border-radius: 8px; cursor: pointer; touch-action: pan-y;
  background-image: linear-gradient(to right, rgba(240,237,230,.07) 1px, transparent 1px); background-size: calc(100% / 12) 100%; }
.track.empty { outline: 1px dashed rgba(240,237,230,.14); outline-offset: -1px; }
.bar { position: absolute; top: 2px; bottom: 2px; padding: 0; border-radius: 8px; border: 1.2px solid var(--green); background: rgba(74,222,128,.18); color: var(--cream); font: 500 14px var(--font-mono); cursor: grab; touch-action: pan-y; white-space: nowrap; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.bar:hover { background: rgba(74,222,128,.26); }
.bar.sel { border-width: 2px; background: rgba(74,222,128,.34); }
.bar.sel::before, .bar.sel::after { position: absolute; color: var(--green); font-size: 18px; top: 50%; transform: translateY(-52%); }
.bar.sel::before { content: '\2039'; left: 8px; }
.bar.sel::after { content: '\203A'; right: 8px; }
body.qs .std .bar:focus-visible, body.qs .std .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { margin-top: 12px; min-height: 48px; font-size: 15px; color: var(--on-ground-2); }
.hint .warn { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--red); background: rgba(248,113,113,.10); border-radius: 10px; padding: 8px 12px; color: var(--on-ground); }
.hint .warn b { color: var(--on-ground); }
.hint .warn .ic { color: var(--red); font-size: 18px; line-height: 1.2; }
.play-foot { margin-top: 6px; }

/* result */
.res-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.res-left h2.lbl { font-size: 14px; margin-bottom: 2px; }
.big { text-align: center; line-height: 1; font-family: var(--font-display); }
.big #rWait { font-size: clamp(56px, 11vw, 76px); font-weight: 700; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.big .unit { font-size: 24px; font-weight: 700; color: var(--on-ground-2); }
.delta { text-align: center; font-size: 16px; font-weight: 600; margin: 8px 0 14px; }
.delta .better { color: var(--accent-soft); }
.delta .worse { color: var(--amber); }
.delta .match { display: block; color: var(--green); margin-top: 4px; }
.ladder { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.lrow { display: grid; grid-template-columns: 9.2em minmax(0, 1fr) 6.2em; align-items: center; gap: 8px; }
.lrow .k { font-size: 15px; color: var(--on-ground-2); white-space: nowrap; }
.lrow.you .k { color: var(--on-ground); font-weight: 700; }
.lrow .bw { height: 12px; }
.lrow .b { height: 12px; border-radius: 3px; min-width: 3px; }
.lrow.best .b { background: rgba(74,144,217,.35); }
.lrow.you .b { background: var(--caramel); }
.lrow.flat .b { background: rgba(240,237,230,.2); }
.lrow .v { font-family: var(--font-mono); font-size: 15px; text-align: right; white-space: nowrap; color: var(--on-ground-2); }
.lrow.best .v { color: var(--accent-soft); }
.lrow.you .v { color: var(--on-ground); font-weight: 500; }
.tiles3 { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; margin-top: 12px; }
.tiles3 .tile .lbl { overflow-wrap: anywhere; }
.tiles3 .tile .v { font-size: 20px; }
.tiles3 .tile .v.words { font-family: var(--font-display); font-weight: 700; font-size: 17px; white-space: normal; line-height: 1.2; margin-top: 4px; }
.hourly { padding: 14px 14px 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--on-ground-2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; }
.legend .k-blue { width: 10px; height: 10px; background: var(--q-blue); border-radius: 2px; }
.legend .k-amber { width: 14px; height: 2px; background: var(--amber); }
.legend .k-green { width: 10px; height: 10px; border: 1px solid var(--green); border-radius: 2px; }
.peak { color: var(--accent-soft); font-size: 14px; margin: 6px 0 8px; }
.empty-note { color: var(--red); font-size: 14px; margin-top: 6px; }
.res-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.res-actions .row2 { display: flex; gap: 10px; }
.res-actions .row2 .grow { flex: 1; }
.res-actions .share { gap: 8px; }

/* forms */
.sumcard { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0 18px; padding: 12px 16px; }
.sumcard .right { text-align: right; }
.sumcard .sv { font-size: 19px; margin-top: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 14px 0 6px; }
.fields.one { grid-template-columns: 1fr; }
/* a label that wraps to two lines must not push its box below its neighbour's: boxes line up along the bottom */
.fields > div { display: flex; flex-direction: column; justify-content: flex-end; }
.fields .t { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ground-3); margin-bottom: 6px; }
.fields .t .opt { text-transform: none; letter-spacing: 0; font-size: 12px; }
.in { width: 100%; font: 16px var(--font-text); color: var(--on-ground); background: var(--ground-2); border: 1px solid var(--rule-strong); border-radius: 8px; padding: 11px 12px; min-height: 46px; }
.in:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.in.code { font-family: var(--font-mono); font-size: 22px; letter-spacing: .3em; max-width: 220px; }
.ck { display: flex; gap: 10px; align-items: center; font-size: 15px; margin: 12px 0 6px; cursor: pointer; }
.ck input { width: 20px; height: 20px; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ts { margin: 12px 0 0; min-height: 0; }
.ts:not(:empty) { min-height: 65px; }
#asName { margin-top: 6px; font-size: 14px; }
form .small { margin-top: 14px; }
.needs { margin: 16px 0 4px; }
.needs ul { margin: 6px 0 0; padding-left: 20px; color: var(--on-ground); font-size: 15px; }
.needs li { padding: 3px 0; }
#s-sign .center, #s-lead .center { margin-top: 16px; }

/* phone */
@media (max-width: 860px) {
  .home-grid, .res-grid, .intro-grid { grid-template-columns: minmax(0, 1fr); }
  .intro-grid { gap: 16px; min-height: 0; }
}
@media (max-width: 640px) {
  .std { padding: 16px 16px 44px; }
  .play-head { flex-wrap: wrap; gap: 10px; }
  .play-head .run { order: 5; flex: 1 1 100%; }
  .pg, .lane { --gut: 54px; }
  .lane { height: 40px; }
  .lane-lab .sh { display: none; }
  .chip { padding: 0 5px; gap: 2px; }
  .bar.sel::before { left: 4px; } .bar.sel::after { right: 4px; }
  .pg-gut .lbl { font-size: 12px; letter-spacing: .02em; }
  .fields { grid-template-columns: 1fr; }
  .tiles3 { grid-template-columns: 1fr 1fr; }
  .tiles3 .tile:nth-child(2) { grid-column: span 2; order: -1; }
  .lrow { grid-template-columns: 8.4em minmax(0, 1fr) 5.8em; }
  .lrow .k, .lrow .v { font-size: 14px; }
}
