/* THE FORGE: Link Functions. Additions to forge.css for this page.
   The guide, tile, key, and step-strip rules are the Maximum Likelihood page's (mle.css), with the same class names. */

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

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

/* tables: AIC, the predictions table, the family rule, the tally */
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 td.note { font-family: inherit; color: var(--muted); white-space: normal; text-align: left; font-size: 0.95em; }
table.mtab th.note { text-align: left; }
table.mtab tr.sel td { background: rgba(197,165,90,0.14); }
table.mtab .sw-line { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 8px; vertical-align: 3px; }
table.mtab.plain td, table.mtab.plain th { font-family: inherit; white-space: normal; text-align: left; }
.radios.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.radios.grid2 button { padding: 6px 6px; }
.f-note { color: var(--muted); font-size: 0.82em; line-height: 1.45; margin: 8px 0 0; }
.f-note b { color: var(--warm-white); font-weight: 600; }
.f-warn { color: var(--warm-white); font-size: 0.84em; line-height: 1.45; margin: 10px 0 0; padding: 6px 10px; border-left: 3px solid var(--ember); background: rgba(255,255,255,0.03); border-radius: 4px; }

/* the predictions table: truth across the top, prediction down the side */
table.cm { border-collapse: separate; border-spacing: 4px; width: 100%; font-size: 0.86em; }
table.cm th { color: var(--muted); font-weight: 600; text-align: center; padding: 2px 4px; }
table.cm th.side { text-align: left; white-space: nowrap; }
table.cm th.top { color: var(--gold); }
table.cm td { text-align: center; padding: 8px 6px; border-radius: 4px; }
table.cm td .n { font-size: 1.35em; font-weight: 700; display: block; }
table.cm td .lab { font-size: 0.8em; color: var(--muted); }
table.cm td.ok { background: rgba(76,175,80,0.10); } table.cm td.ok .n { color: var(--green); }
table.cm td.err { background: rgba(231,76,60,0.10); } table.cm td.err .n { color: var(--red); }

/* 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; }
.checks .check { margin: 6px 0; }
.check .sw-line { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin: 0 8px 0 2px; vertical-align: 3px; }
.sidebar .hint { margin: 4px 0 0; }
.score { margin-top: 14px; text-align: center; padding: 8px; border-radius: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.score .lab { color: var(--muted); font-size: 0.72em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.score .val { color: var(--gold); font-weight: 700; font-size: 1.3em; }
#a-verdict:empty { display: none; }
#a-verdict { margin-top: 12px; margin-bottom: 0; }

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

/* 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:not(:disabled) { color: var(--warm-white); border-color: #777; }
.recipe .r-step:disabled { opacity: 0.45; cursor: default; }
.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; }

/* the gate under a step card, and steps not yet reached */
.g-gate { margin: 8px 0 0; font-size: 0.85em; color: var(--ember); }
.g-dot:disabled { opacity: 0.35; cursor: default; }

/* 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; }
svg.plot circle title { pointer-events: none; }
/* symbols with hats, drawn by KaTeX inside running text */
.g-lines .katex, .t-mean .katex, .caption .katex, .key .katex, table.mtab .katex, .f-note .katex { font-size: 1.08em; }
@media (max-width: 600px) { table.s-funcs td:first-child { white-space: normal; overflow-wrap: anywhere; } }
