/* THE FORGE: Maximum Likelihood. Additions to forge.css for this page. */

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

/* model swatches and 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; }

/* the model table */
table.mtab { width: 100%; border-collapse: collapse; font-size: 0.86em; }
table.mtab th { color: var(--gold); font-weight: 600; text-align: right; padding: 4px 8px; 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 8px; 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.row { cursor: pointer; }
table.mtab tr.row:hover td { background: rgba(255,255,255,0.04); }
table.mtab tr.sel td { background: rgba(197,165,90,0.14); }
table.mtab tr.truth td { color: var(--muted); font-style: italic; cursor: default; }
table.mtab .sw-line { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 8px; vertical-align: 3px; }

/* Newton card: plot beside its iteration table */
.newton-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .newton-body { grid-template-columns: minmax(0, 1fr); } }
table.ntab td.now { color: var(--gold); }
table.ntab tr.done td { color: var(--muted); }

/* probability plots */
.qq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qq-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qq-title { font-size: 0.82em; font-weight: 700; margin: 0 0 2px 4px; }
.qq-title span { color: var(--muted); font-weight: 400; margin-left: 6px; }
@media (max-width: 1100px) { .qq-grid, .qq-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .qq-grid, .qq-grid.three { grid-template-columns: minmax(0, 1fr); } }

/* controls this page adds */
.radios.stack { flex-direction: column; }
.radios.stack button { padding: 6px 8px; text-align: left; }
.radios.n-chips { flex-wrap: wrap; }
.radios.n-chips button { flex: 0 0 auto; min-width: 46px; padding: 5px 8px; }

/* the recipe and wide tiles */
.tile.full { grid-column: 1 / -1; }
.t-mean b { color: var(--warm-white); font-weight: 600; }

/* 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; }
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; }
pre.printout.script .sec { scroll-margin-top: 80px; }

.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-arrow { color: #6a6a6a; font-size: 0.8em; padding: 0 2px; }
.recipe .r-item { display: inline-flex; align-items: center; gap: 4px; }
/* symbols with hats, drawn by KaTeX inside running text */
.g-lines .katex, .t-mean .katex, .caption .katex, .key .katex, table.mtab .katex { font-size: 1.08em; }
