/* THE FORGE: Genetic Algorithm. Additions to forge.css for this page. The step strip, captions, keys,
   tiles, and Script rules are the Maximum Likelihood page's (mle.css), so every Forge page works alike. */

.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; }

/* keys */
.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.dash { height: 0; border-top: 2px dashed; background: none !important; }
.key i.dot { width: 10px; height: 10px; border-radius: 50%; }
.key i.box { width: 12px; height: 12px; border-radius: 2px; }

/* 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-arrow { color: #6a6a6a; font-size: 0.8em; padding: 0 2px; }
.recipe .r-item { display: inline-flex; align-items: center; gap: 4px; }

/* tiles */
.tile.full { grid-column: 1 / -1; }
.t-mean b { color: var(--warm-white); font-weight: 600; }
.g-lines .katex, .t-mean .katex, .caption .katex { font-size: 1.08em; }

/* sidebar controls this page adds */
.checks { display: flex; flex-direction: column; gap: 2px; }
.checks label.check { margin: 3px 0; font-size: 0.88em; }
.checks .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 2px; }
.status { color: var(--muted); font-size: 0.8em; margin: 6px 0 0; line-height: 1.4; min-height: 1.1em; }
.status.ok { color: var(--green); } .status.warn { color: var(--gold); } .status.bad { color: var(--ember); }
.btn-row { display: flex; gap: 6px; }
.btn-row .btn { flex: 1; padding: 7px 4px; }
.hour-ctl { margin-top: 8px; }
.hour-ctl .slider-head label { margin: 0; font-size: 0.74em; }
.radios.chips { flex-wrap: wrap; }
.radios.chips button { flex: 0 0 auto; min-width: 42px; padding: 5px 7px; }
.sub-ctl { margin-top: 6px; }
.num-in { width: 100%; background: #404040; border: 1px solid #555; color: var(--warm-white); font: inherit; font-size: 0.9em; padding: 5px 8px; border-radius: 4px; }
#tab-converge .ctl[data-ctl="settings"] label { margin-top: 12px; }

/* gene tables: a chromosome is a column of ten genes */
table.genes { width: 100%; border-collapse: separate; border-spacing: 0 3px; font-size: 0.86em; }
table.genes th { color: var(--gold); font-weight: 600; font-size: 0.86em; text-align: center; padding: 2px 6px; }
table.genes th.gl { text-align: left; }
table.genes td { padding: 0; }
table.genes td.gl { color: var(--warm-white); padding-right: 10px; white-space: nowrap; }
table.genes td.gl .gi { color: var(--muted); display: inline-block; width: 22px; }
table.genes td.gl .gk { color: var(--muted); font-size: 0.86em; margin-left: 6px; }
table.genes .gv { display: block; margin: 0 4px; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700;
                  border-radius: 4px; padding: 3px 0; border: 2px solid transparent; }
table.genes .gv.on { background: rgba(74,144,217,0.30); color: var(--warm-white); }
table.genes .gv.off { background: #2f2f2f; color: #8a8a8a; }
table.genes .gv.p1 { background: rgba(74,144,217,0.42); color: var(--warm-white); }
table.genes .gv.p2 { background: rgba(232,114,58,0.42); color: var(--warm-white); }
table.genes .gv.rep { background: rgba(167,129,214,0.55); color: var(--warm-white); }
table.genes .gv.mut { border-color: var(--ember); }
table.genes .gv.lit { box-shadow: 0 0 0 2px var(--gold); }
table.genes td.gh { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--warm-white); padding-left: 8px; white-space: nowrap; }
table.genes td.gh.dim { color: #777; }
table.genes td.gz { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ember); padding-left: 8px; white-space: nowrap; font-size: 0.92em; }
table.genes tr.cut td { border-top: 2px dashed var(--warm-white); }
table.genes tr.split td { padding-top: 6px; }
table.genes tr.sum td { color: var(--muted); font-size: 0.92em; padding-top: 4px; }
table.genes tr.sum td.gv-sum { text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--warm-white); }

/* the Anvil */
table.a-edit { width: 100%; border-collapse: collapse; font-size: 0.8em; }
table.a-edit th { color: var(--muted); font-weight: 600; text-align: center; padding: 2px 2px 4px; font-size: 0.92em; }
table.a-edit td { padding: 2px; }
table.a-edit td.sw { width: 14px; }
table.a-edit td.sw i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
table.a-edit select { width: 100%; background: #404040; border: 1px solid #555; color: var(--warm-white); font: inherit; padding: 3px 2px; border-radius: 4px; }
table.a-edit select:disabled { opacity: 0.6; }
table.mtab { width: 100%; border-collapse: collapse; font-size: 0.84em; }
table.mtab th { color: var(--gold); font-weight: 600; text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--border); font-size: 0.92em; }
table.mtab th:first-child, table.mtab td:first-child { text-align: left; }
table.mtab td { text-align: right; padding: 6px; border-bottom: 1px solid #3e3e3e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
table.mtab td:first-child { font-family: inherit; font-weight: 600; }
table.mtab tr.truth td { color: var(--muted); font-style: italic; }
table.mtab .sw-line { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 8px; vertical-align: 3px; }
#a-verdict .verdict { margin: 12px 0 0; text-align: left; }
#a-verdict .verdict .msg { color: var(--warm-white); }

/* Blueprint table */
table.bp-tab { width: 100%; border-collapse: collapse; font-size: 0.92em; margin: 6px 0; }
table.bp-tab th { color: var(--gold); text-align: right; padding: 3px 6px; border-bottom: 1px solid var(--border); font-weight: 600; }
table.bp-tab td { text-align: right; padding: 3px 6px; border-bottom: 1px solid #333; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
table.bp-tab th:first-child, table.bp-tab td:first-child { text-align: left; font-family: inherit; }

/* 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; }
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); }
#k-download { text-transform: none; }
.card-header .sym { text-transform: none; }

@media (max-width: 1100px) { .card.span-7, .card.span-5, .card.span-6 { grid-column: span 12; } }

/* room under the last tile for the fixed BLUEPRINT button */
.main { padding-bottom: 76px; }
table.genes tr.grp td { color: var(--muted); font-size: 0.8em; padding: 8px 0 1px; }
#a-table { overflow-x: auto; }
.ctl.dim { opacity: 0.45; }
@media (max-width: 600px) { table.genes td.gl { padding-right: 4px; font-size: 0.92em; } table.genes .gv { margin: 0 2px; } table.mtab td, table.mtab th { padding: 5px 4px; } }
@media (max-width: 600px) { table.s-funcs td:first-child { white-space: normal; overflow-wrap: anywhere; } table.s-funcs { font-size: 0.82em; } }
/* phones: a long formula switches to its two-line version */
.t-math.t-two { display: none; }
@media (max-width: 600px) { .t-math.t-one { display: none; } .t-math.t-two { display: block; } .t-math { font-size: 0.82em; } }
.hint-line { color: var(--muted); font-size: 0.78em; margin: -2px 0 6px; line-height: 1.4; }
