/* Plot Studio: what the sheet at /construction/tools/plot-studio/ needs beyond the kit (assets/v3/tools.css).
   Colours are the kit's roles and vidastu.css tokens only. */

/* ---------- the three views, switched on the stage itself: a small segmented key at its top right.
   Each key is a full touch target; the mark the eye sees is the smaller chip inside it. ---------- */
.ps-stage{touch-action:pan-y}
.ps-views{position:absolute;right:.35rem;top:0;z-index:2;display:flex;gap:0}
.ps-views>button{display:grid;place-items:center;min-height:44px;padding:0 1px;border:0;background:transparent;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ps-views>button>span{display:block;padding:.34rem .62rem;border:1px solid var(--dk-ink-3);border-right-width:0;background:var(--dk-paper);font-family:var(--f-body);font-size:.75rem;font-weight:600;letter-spacing:0;text-transform:none;line-height:1.15;color:var(--dk-ink-2);
  transition:background-color .18s var(--ease-out),color .18s var(--ease-out),border-color .18s var(--ease-out),transform .16s var(--ease-out)}
.ps-views>button:first-child>span{border-radius:3px 0 0 3px}
.ps-views>button:last-child>span{border-right-width:1px;border-radius:0 3px 3px 0}
.ps-views>button[aria-checked="true"]>span{background:var(--dk-ink);border-color:var(--dk-ink);color:var(--dk-paper)}
.ps-views>button[aria-checked="true"] + button>span{border-left-color:var(--dk-ink)}
.ps-views>button:active>span{transform:scale(.97)}
.ps-views>button:focus-visible{outline:0}
.ps-views>button:focus-visible>span{outline:2px solid var(--dk-dim);outline-offset:2px}
:lang(hi) .ps-views>button>span{font-family:var(--f-body);font-size:.78rem;letter-spacing:0;text-transform:none}
@media (hover:hover) and (pointer:fine){.ps-views>button:not([aria-checked="true"]):hover>span{color:var(--dk-ink);border-color:var(--dk-ink-2)}}
.ps-stage canvas{touch-action:pan-y}
/* on a phone the label that says the drawing is a schematic sits at the foot of the stage, clear of the view keys */
@media (max-width:559.98px){
  .ps-stage .dk-stage-tag{top:auto;bottom:.42rem}
}
@media (min-width:1000px){.ps-views{right:.6rem;top:.15rem}.ps-views>button>span{padding:.4rem .78rem;font-size:.7rem}}
/* the link preview is a picture of the drawing, not of its keys */
html.dk-og .ps-views{display:none!important}

/* ---------- plot sizes: ten keys in two rows of five ---------- */
.ps-sizes{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.ps-sizes>button{padding:0 .2rem;font-family:var(--f-mono);font-size:.92rem;font-variant-numeric:tabular-nums}
.ps-sizes>button:last-child{font-family:var(--f-body);font-size:.84rem;white-space:nowrap}
:lang(hi) .ps-sizes>button{font-family:var(--f-body)}
:lang(hi) .ps-sizes>button:last-child{font-size:.8rem}

/* two figures side by side, each under its own small label */
.ps-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.3rem .6rem;align-items:end}
.ps-mini{font-size:.8rem;line-height:1.3;color:var(--fg-3)}
.ps-pair>.dk-affix>.dk-input{min-height:48px}

/* ---------- the floors: a stepper, the one command beside it, then a ruled slider for each floor (top floor first) ---------- */
.ps-row{display:flex;flex-wrap:wrap;gap:.6rem;align-items:stretch}
.ps-row>.dk-stepper{flex:none}
.ps-row .dk-step-v{flex-direction:column;align-items:center;gap:0;min-width:5.4rem}
.ps-row .dk-stepper output{font-size:1.28rem;line-height:1.15}
.ps-row .dk-step-u{font-size:.74rem;line-height:1.2;white-space:nowrap}
.ps-fit{flex:1 1 9rem;display:inline-flex;align-items:center;justify-content:center;gap:.55rem;min-height:52px;padding:.3rem .9rem;border:1.5px solid var(--fg);border-radius:var(--r-2);background:var(--surface);
  font-family:var(--f-display);font-size:.95rem;font-weight:600;letter-spacing:-.005em;line-height:1.2;text-align:left;color:var(--fg);
  transition:background-color .18s var(--ease-out),color .18s var(--ease-out),transform .16s var(--ease-out)}
.ps-fit svg{flex:none;width:19px;height:19px;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ps-fit:active{transform:scale(.97)}
.ps-fit[aria-pressed="true"]{background:var(--fg);color:var(--bg)}
@media (hover:hover) and (pointer:fine){.ps-fit:not([aria-pressed="true"]):hover{background:var(--bg-2)}}
.ps-floors{display:grid;gap:.5rem;min-width:0}
.ps-fl .dk-slider-top{align-items:baseline}
.ps-fl .dk-slider output,#psHourOut{font-size:1.16rem}
.ps-val{white-space:nowrap}
:lang(hi) .ps-fl .dk-slider output,:lang(hi) #psHourOut{font-family:var(--f-body);font-variant-numeric:tabular-nums}
.ps-fl[hidden]{display:none}

/* the schedule reads as part of the sheet on paper too */
#psBelow .dk-table td:first-child{font-weight:500}
#psNext a{color:var(--blue);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
/* a figure column followed by a word column: the kit gives the figure no room on its right */
/* the view chips work only with the script: it shows them */
.ps-views[hidden]{display:none}
#psTable .dk-table .n+:not(.n){padding-left:1.25rem}
@media print{.ps-views{display:none!important}
  .dk-sheet #psStage,.dk-sheet[data-bp="1"] #psStage{height:108mm}}

/* the drawing on a laptop: no taller than the first screen leaves under it (plot-studio.js sets --ps-h), within the kit's
   440 to 680 px */
@media (min-width:1000px){.dk-body>.ps-stage{height:var(--ps-h,calc(100svh - var(--nav-h) - 96px))}}

/* Table 1 allows more ground than these setbacks leave: the line under the status, and the note 4 switch beside it */
.ps-capnote{margin:-.2rem 0 .9rem;padding-left:1.4rem}
.ps-n4go{display:inline;min-height:44px;margin:0;padding:.6rem 0;border:0;background:none;font:inherit;font-weight:600;color:var(--blue);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;cursor:pointer}
.ps-capnote[hidden],.ps-n4go[hidden]{display:none}

/* with scripts off on a phone: the narrow plan, drawn for a phone, in place of the wide one */
.ps-still-mini{display:none}
.ps-still-mini svg{display:block;width:100%;height:auto}
@media (scripting:none) and (max-width:599.98px){.dk-body>#psStage{height:auto;min-height:0}#psDraw{position:relative}#psDraw>svg{display:none}#psDraw .ps-still-mini{display:block;padding:.4rem 0 2rem}}

/* a phone on its side: the heading and one sentence, then the drawing; the rest of the lead reads under the sheet, as on a
   phone held upright (the kit does this below 640 px wide) */
@media (min-width:640px) and (max-width:999.98px) and (max-height:500px){
  .dk{display:flex;flex-direction:column}
  .dk>*{order:5;width:100%}
  .dk-top,.dk-top-in,.dk-lead{display:contents}
  .dk-top-in>div{order:1;padding:calc(var(--nav-h) + .5rem) var(--pad) 0}
  .dk-kicker{margin-bottom:.35rem}
  .dk-top h1{font-size:1.7rem;line-height:1.05}
  .dk-top h1 br{display:none}
  .dk-lead-a{order:1;display:block;padding:.4rem var(--pad) .6rem;font-size:.95rem;line-height:1.45}
  .dk-wrap{order:2}
  .dk-lead-m{order:3;display:block;padding:1.1rem var(--pad) 0;font-size:.95rem;line-height:1.58;color:var(--fg-2)}
  .dk-crumbs{order:4;margin:0;padding:.55rem var(--pad) 0}
}

/* the sources: each address gets a full-height target (inline padding moves no text) and breaks rather than widen a phone */
.dk-srcs a{padding-block:13px;overflow-wrap:anywhere}
/* the floor schedule scrolls inside its own frame on a narrow phone; it never widens the page */
#psBelow,#psTable{min-width:0;max-width:100%}
/* the plot models under the sheet (build_tools.py models_strip, fourth round): one row of five on a wide screen, one row to swipe
   on a phone (the guide pages' swipe row), each model with its own caption */
.ps-models{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1rem;box-sizing:border-box;max-width:calc(var(--dk-max) + 2 * var(--pad));
  margin:clamp(2.4rem,5vw,3.6rem) auto 0;padding:0 var(--pad)}
.ps-models figure{margin:0;min-width:0}
.ps-models img{display:block;width:100%;height:auto;aspect-ratio:4 / 3;object-fit:contain;border-radius:12px;background:var(--bg-2)}
.ps-models figcaption{margin:.5rem 0 0;font-size:.8rem;line-height:1.45;color:var(--fg-3)}
@media (max-width:639.98px){
  .ps-models{order:2;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:78%;gap:.75rem;margin-top:2rem;overflow-x:auto;overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;scroll-padding-inline:var(--pad);scrollbar-width:none;padding-bottom:.3rem}
  .ps-models::-webkit-scrollbar{display:none}
  .ps-models>figure{scroll-snap-align:start}
}
@media print{.ps-models{display:none}}
