/* /gate/deep: the decision mesh one level down. Layout and inks come from dissertation/opening.css; this adds the
   controls, the step headings and the colours the runs are drawn in (the same as /gate/how). */
.gatedeep .howbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 2rem 0 0; font: 0.9rem Newsreader, Georgia, serif; color: var(--ink-2); }
.gatedeep .howbar label { display: inline-flex; align-items: center; gap: 8px; }
/* (shapes round 2 and 3, 11-09) the list sits on the site's pencil line (partials/header.html). The button beside it
   is drawn as the buttons on /decisionmesh/ and the explorer are: one light pencil line a side (js/scribble.js, set on
   the button in templates/gate-deep.html), its words in the accent as the page's one action; the pencil darkens under
   the pointer and turns accent when pressed or focused. The ruled edge shows only if the script does not load */
.gatedeep .howbar select { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--rule); padding: 0.35rem 0.8rem; }
.gatedeep .howbar button { position: relative; font: inherit; font-size: 0.88rem; line-height: 22px; font-weight: 600; color: var(--accent); --scr-ink: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 0; padding: 7px 14px; }
.gatedeep .howbar button:hover:not(:disabled) > .scr { opacity: 0.95; }
.gatedeep .howbar button:active:not(:disabled) > .scr { color: var(--accent); opacity: 1; }
/* on touch screens the button takes the finger 4px beyond its box each way (46px), and the list is 44px tall with its
   words still level with its label and its line still close under them */
@media (pointer: coarse) { .gatedeep .howbar button::after { content: ""; position: absolute; inset: -5px -2px; }
  .gatedeep .howbar select { padding-top: 19px; padding-bottom: 9px; position: relative; top: -5px; }
  html .gatedeep .howbar select:not([multiple]):not([size]) { background-position: right 0.3em top calc(50% + 5px), left bottom !important; } }
.gatedeep .howbar button { cursor: pointer; }
.gatedeep .howbar button:hover { border-color: var(--accent); }
.gatedeep .howbar input[type=range] { width: 120px; accent-color: var(--accent); }
.gatedeep .howbar .val { font: 0.8rem ui-monospace, Menlo, monospace; color: var(--ink); min-width: 2.2em; }
.gatedeep .howstatus { font: 0.78rem ui-monospace, Menlo, monospace; letter-spacing: 0.06em; color: var(--ink-3); }
.gatedeep .howstatus.busy::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; animation: deeppulse 1s infinite ease-in-out; }
@keyframes deeppulse { 50% { opacity: 0.2; } }
.gatedeep .ideahead .lede a { color: var(--accent); text-decoration: none; }
.gatedeep [data-v] { font-variant-numeric: tabular-nums; }
.gatedeep .step h2 { font: 600 0.74rem Newsreader, Georgia, serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.9rem; }
.gatedeep .step h2 i { text-transform: none; }
.gatedeep .step em { font-style: italic; }
.gatedeep .step sub, .gatedeep .step sup { font-size: 0.65em; line-height: 0; }
.gatedeep .warmword { color: var(--warm); }
@media (max-width: 820px) {
  .gatedeep .step h2 { padding: 0.3rem 0.2rem; align-self: flex-start; }
}
#stage .pos { fill: var(--accent); }
#stage .neg { fill: var(--warm); }
#stage .ink { fill: currentColor; }
#stage .meshline { fill: none; stroke: currentColor; stroke-width: 0.6; stroke-opacity: 0.3; }
#stage .meshdark { fill: none; stroke: currentColor; stroke-width: 0.9; stroke-opacity: 0.6; }
#stage .shade { fill: var(--accent); fill-opacity: 0.13; }
#stage .shadew { fill: var(--warm); fill-opacity: 0.16; }
#stage .shade2 { fill: var(--accent); fill-opacity: 0.34; }
#stage .shadew2 { fill: var(--warm); fill-opacity: 0.36; }
#stage .shadeink { fill: currentColor; fill-opacity: 0.07; }
#stage .ring { fill: none; stroke: currentColor; stroke-width: 1.4; }
/* axes, frames and outlines in the pencil hand (Sketch.hand): lighter than the lines that carry the data */
#stage .pencil.hand.axis { stroke-opacity: 0.5; }
#stage .ease { transition: opacity 0.35s; }
/* The words in the drawings: the page's serif, never the dimmest ink. The drawing is 600 units wide and is shown
   at about 550 px beside the text, so 15 units is about 14 px there. */
#stage text.title { font-size: 16px; fill: var(--ink-2); }
#stage text.note { font-size: 15px; fill: var(--ink-2); }
#stage text.num { font-size: 16px; fill: currentColor; font-variant-numeric: tabular-nums; }
#stage text.label { font-size: 16px; }
#stage text.formula { font: italic 18px Newsreader, Georgia, serif; fill: currentColor; }
#stage text.strong { font-weight: 600; }
#stage tspan.it { font-style: italic; }
#stage tspan.up { font-style: normal; }
#stage text.note.acc, #stage tspan.acc { fill: var(--accent); }
#stage text.note.warmt, #stage tspan.warmt { fill: var(--warm); }
#stage text.note.halo { paint-order: stroke; stroke: color-mix(in srgb, var(--paper) 70%, transparent); stroke-width: 5px; stroke-linejoin: round; }
#stage .stagebusy { font-size: 16px; fill: var(--ink-2); }
/* Where the drawing is shown small (a phone: about 360 px; a narrow window beside the text: 390 to 500 px), its words
   are set at 19 units, about 11.5 px on the phone. Every label is written short enough to fit at this size. */
@media (max-width: 1060px) {
  .gatedeep #stage text, .gatedeep #stage text.label, .gatedeep #stage text.title, .gatedeep #stage text.note,
  .gatedeep #stage text.num, .gatedeep #stage .stagebusy { font-size: 19px; }
  .gatedeep #stage text.formula { font-size: 20px; }
}
/* Phones: the drawing stays on top and the text passes under it, as in the dissertation's own stories
   (dissertation/opening.css applies that layout only to its own pages; without it this page's long steps are drawn
   over the drawing). :where() keeps these at the base rules' weight, so the foldable layouts of css/fold.css win. */
@media (max-width: 820px) {
  :where(#gatedeep) .stage { height: calc(3.5rem + 44vh); height: calc(3.5rem + 44svh); top: 0; padding-top: 3.5rem; box-sizing: border-box;
    z-index: 3; --stage-fade: 94%; }
  :where(#gatedeep) .stage > svg { width: min(92vw, 42vh); width: min(92vw, 42svh); }
  :where(#gatedeep) .steps { z-index: 1; padding-top: 50vh; padding-top: 50svh; }
  /* a step here is often longer than the room under the drawing: it keeps its own height and scrolls through that room */
  :where(#gatedeep) .step { min-height: calc(56vh - 3.5rem); min-height: calc(56svh - 3.5rem); justify-content: flex-start; padding: 2vh 0 10vh; }
}
@media (max-width: 820px) and (max-height: 700px) {   /* css/fold.css shrinks the stage on short screens; keep room for the header */
  html:not(.fold-book):not(.fold-table) main#gatedeep .story .stage { height: calc(3.5rem + 42vh); height: calc(3.5rem + 42svh); }
}
@media (prefers-reduced-motion: reduce) { #stage .ease { transition: none; } .gatedeep .howstatus.busy::before { animation: none; } }
/* dark theme: the controls' native parts (a select's list and arrow) in dark too, or WebKit draws them white */
.dark .gatedeep { color-scheme: dark; }
