/* THE FORGE: Linear Programming. 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; }
.card-header .sym { text-transform: none; }
.card-header .tag { margin-left: 8px; }
.card-header .tag.ember { background: var(--ember); color: #fff; }
.card-header .tag.steel { background: #4a4a4a; color: var(--warm-white); }

/* sidebar controls this page adds */
.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.btn-row .btn { flex: 1; padding: 8px 6px; }
.radios.stack { flex-direction: column; }
.radios.stack button { padding: 6px 8px; text-align: left; }
.prob-note { color: var(--muted); font-size: 0.8em; line-height: 1.45; margin: 8px 0 0; }
.prob-note b { color: var(--warm-white); }

/* the tableau and the page's other tables */
.tab-wrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; font-size: 0.86em; margin: 0 auto; }
table.tbl th { color: var(--gold); font-weight: 600; padding: 4px 9px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
table.tbl td { padding: 5px 9px; text-align: right; border-bottom: 1px solid #3e3e3e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; font-family: inherit; font-weight: 600; color: var(--warm-white); }
table.tbl tr.zrow td { border-top: 2px solid #666; }
table.tbl tr.zrow.lit td { background: rgba(255,255,255,0.05); }
table.tbl .neg { color: var(--ember); font-weight: 700; }
table.tbl td.col, table.tbl th.col { background: rgba(197,165,90,0.13); }
table.tbl tr.prow td { background: rgba(197,165,90,0.13); }
table.tbl td.pel { background: rgba(197,165,90,0.32); box-shadow: inset 0 0 0 2px var(--gold); color: var(--warm-white); font-weight: 700; }
table.tbl td.ratio, table.tbl th.ratio { color: var(--steel); border-left: 1px dashed #555; }
table.tbl td.ratio.min { color: var(--gold); font-weight: 700; }
table.tbl td.rhs, table.tbl th.rhs { border-left: 1px solid #555; }
table.tbl td.gold { color: var(--gold); font-weight: 700; }
table.tbl td.muted, table.tbl tr.muted td { color: var(--muted); }
table.tbl td.ok { color: var(--green); }
table.tbl td.bad { color: #E74C3C; }
table.tbl td.txt { font-family: inherit; text-align: left; white-space: normal; color: var(--muted); font-size: 0.95em; }
table.tbl tr.pick { cursor: pointer; }
table.tbl tr.pick:hover td { background: rgba(255,255,255,0.05); }
table.tbl tr.sel td { background: rgba(197,165,90,0.14); }
table.tbl td.pick { cursor: pointer; }
table.tbl td.pick:hover { background: rgba(255,255,255,0.07); }
table.tbl td.tried { box-shadow: inset 0 0 0 1px var(--steel); }
table.tbl td.best { box-shadow: inset 0 0 0 2px var(--gold); }
table.tbl caption { caption-side: top; text-align: left; color: var(--muted); font-size: 0.86em; padding: 0 0 4px; }
table.tbl + table.tbl { margin-top: 14px; }
table.tbl input { width: 58px; background: #404040; color: var(--warm-white); border: 1px solid #555; border-radius: 4px; padding: 3px 5px; font: inherit; text-align: right; }
table.tbl input:focus { outline: none; border-color: var(--gold); }
.sw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.msg { color: var(--ember); font-size: 0.9em; margin: 8px 0 0; }

/* four tile columns, so two wide tiles share a row; room below the last tile for the Blueprint button */
.tiles { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.main { padding-bottom: 70px; }
.radios.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.radios.grid2 button { padding: 6px 8px; text-align: left; }

/* 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; }
.s-note p { margin: 0 0 8px; }
.s-note p:last-child { margin: 0; }
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; }

/* 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; }
.g-lines .katex, .t-mean .katex, .caption .katex { font-size: 1.05em; }

@media (max-width: 640px) {
  table.tbl th, table.tbl td { padding: 4px 3px; }
  table.tbl { font-size: 0.74em; }
  .t-math { font-size: 0.8em; }
}
@media (max-width: 900px) {
  .tab.active { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; }
  .main > .card, .main > .tiles, .main > .recipe { grid-column: 1 / -1; }
  .tile.wide { grid-column: auto; }
}

/* the edge table shares its row with the plot, so its cells sit closer together */
@media (min-width: 641px) { #g-edges table.tbl th, #g-edges table.tbl td { padding-left: 6px; padding-right: 6px; } }
