/* THE FORGE: Regression & Regularization. Additions to forge.css for this page.
   The guide, the step strip (.recipe), and the tiles follow the Maximum Likelihood page's rules and 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-narrow { max-width: 760px; margin: 0 auto; }
.plot-mid { max-width: 980px; margin: 0 auto; }

/* controls this page adds */
.radios.stack { flex-direction: column; }
.radios.stack button { padding: 6px 8px; text-align: left; }
.sidebar .ctl > label.check:first-child { margin-top: 12px; }

/* the step card: a note when Next waits on the step's action */
.g-gate { color: var(--ember); font-size: 0.8em; margin: 8px 0 0; }

/* 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; }
.g-dot:disabled { opacity: 0.35; cursor: default; }

/* 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, .says .katex, table.rtab .katex { font-size: 1.05em; }

/* the Anvil's results table */
table.rtab { width: 100%; border-collapse: collapse; font-size: 0.82em; }
table.rtab th { color: var(--gold); font-weight: 600; text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.rtab td { text-align: right; padding: 5px 6px; border-bottom: 1px solid #3e3e3e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
table.rtab th:nth-child(-n+2), table.rtab td:nth-child(-n+2) { text-align: left; font-family: inherit; white-space: normal; }
#a-log { overflow-x: auto; }
table.rtab tr.best td { background: rgba(197,165,90,0.14); }
table.rtab tr.best td:last-child { color: var(--gold); font-weight: 700; }
table.rtab tr.now td:first-child { box-shadow: inset 3px 0 0 var(--ember); }
.empty { color: var(--muted); font-size: 0.85em; padding: 8px 2px; }

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

/* narrow screens: the Blueprint button sits in the flow below the sidebar, and tile math shrinks to fit */
@media (max-width: 960px) {
  .tab.active > .sidebar { order: 1; }
  .tab.active > .blueprint-fab { order: 2; position: static; justify-self: start; margin: 12px 16px 0; box-shadow: none; }
  .tab.active > .main { order: 3; }
}
@media (max-width: 600px) {
  .t-math { font-size: 0.72em; }
  table.rtab { font-size: 0.74em; }
}
@media (max-width: 600px) {
  table.s-funcs th, table.s-funcs td:first-child { white-space: normal; overflow-wrap: anywhere; }
}
