/* THE FORGE: Permutation Test. Additions to forge.css for this page (the step strip, tiles, and
   Script tab rules are the Maximum Likelihood page's, so every Forge page works the same way). */

.caption { color: var(--muted); font-size: 0.8em; margin: 6px 2px 0; line-height: 1.45; }
.caption b { color: var(--warm-white); font-weight: 600; }
.clickable svg { cursor: crosshair; }

/* keys under the plots */
.key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.8em; color: var(--warm-white); margin: 0 0 6px; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.key i.box { width: 12px; height: 12px; border-radius: 2px; }
.key i.dash { height: 0; border-top: 2px dashed; background: none !important; }

/* controls this page adds */
.radios.stack { flex-direction: column; }
.radios.stack button { padding: 6px 8px; text-align: left; }
.ctl-note { color: var(--muted); font-size: 0.8em; margin: 6px 0 0; min-height: 1.2em; }
.ctl-note b { color: var(--warm-white); }
.sidebar input[type=number] { width: 100%; background: #404040; border: 1px solid #555; color: var(--warm-white); font: inherit; font-size: 0.9em; padding: 6px 8px; border-radius: 4px; margin-top: 6px; }
.sidebar input[type=number]:focus { outline: none; border-color: var(--gold); }
.g-gate { color: var(--ember); font-size: 0.8em; margin: 8px 0 0; }
.card-header .tag.muted { background: #555; color: var(--warm-white); }

/* the recipe and wide tiles */
.tile.full { grid-column: 1 / -1; }
.t-mean b { color: var(--warm-white); font-weight: 600; }
.t-verdicts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 4px; font-size: 0.86em; }
.t-verdicts span { white-space: nowrap; }
.t-verdicts .rej { color: var(--ember); font-weight: 700; }
.t-verdicts .keep { color: var(--steel); font-weight: 700; }
.tile.split { border-color: var(--ember); }

/* The Script */
#tab-script .sidebar label { margin-top: 20px; }
.s-jumps { display: flex; flex-direction: column; gap: 6px; }
.s-jumps button { background: #404040; border: 1px solid #555; color: var(--warm-white); font: inherit; font-size: 0.86em; padding: 6px 10px; border-radius: 4px; cursor: pointer; text-align: left; }
.s-jumps button:hover { background: #4a4a4a; }
.s-msg { color: var(--gold); font-size: 0.82em; min-height: 1.2em; margin: 8px 0 0; }
.s-note { margin-top: 20px; font-size: 0.84em; line-height: 1.5; }
pre.printout.script { white-space: pre; overflow-x: auto; font-size: 0.82em; line-height: 1.5; max-height: none; }
pre.printout.script .sec { color: var(--gold); font-weight: 700; scroll-margin-top: 80px; }
pre.printout.script .cmt { color: var(--muted); }
table.s-funcs { width: 100%; border-collapse: collapse; font-size: 0.88em; }
table.s-funcs th { color: var(--gold); text-align: left; font-weight: 600; padding: 4px 10px; border-bottom: 1px solid var(--border); }
table.s-funcs td { padding: 6px 10px; border-bottom: 1px solid #3e3e3e; vertical-align: top; line-height: 1.45; }
table.s-funcs td:first-child { white-space: nowrap; }
table.s-funcs code { color: var(--gold); }
#s-download { text-transform: none; }

.card-header .sym { text-transform: none; }

/* the step strip above each tab's plots: every step's name in order, the current one lit */
.recipe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; }
.recipe .r-step { display: inline-flex; align-items: center; gap: 7px; background: none; border: 1px solid #555; border-radius: 4px; color: var(--muted); font: inherit; font-size: 0.84em; padding: 5px 10px; cursor: pointer; }
.recipe .r-step:hover { color: var(--warm-white); border-color: #777; }
.recipe .r-num { color: var(--gold); font-weight: 700; }
.recipe .r-step.done { color: var(--warm-white); }
.recipe .r-step.now { color: var(--gold); border-color: var(--gold); background: rgba(197,165,90,0.12); font-weight: 600; }
.recipe .r-step:disabled { opacity: 0.4; cursor: default; }
.recipe .r-step:disabled:hover { color: var(--muted); border-color: #555; }
.recipe .r-arrow { color: #6a6a6a; font-size: 0.8em; padding: 0 2px; }
.recipe .r-item { display: inline-flex; align-items: center; gap: 4px; }
.g-dot:disabled { opacity: 0.35; cursor: default; }
/* symbols with hats and bars, drawn by KaTeX inside running text */
.g-lines .katex, .t-mean .katex, .caption .katex, .key .katex, .ctl-note .katex, .t-verdicts .katex { font-size: 1.08em; }

/* phones: the function table wraps, and the last tile clears the BLUEPRINT button */
@media (max-width: 600px) {
  table.s-funcs td:first-child { white-space: normal; word-break: break-word; }
  table.s-funcs code { word-break: break-word; }
  .main { padding-bottom: 72px; }
}

/* a tile with several pieces of math wraps them onto new lines on narrow screens */
.t-math.multi { display: flex; flex-wrap: wrap; align-items: center; gap: 0 30px; }
.t-math.multi .katex-display { margin: 0.3em 0 0.1em; }
