/* THE FORGE: Fuzzy Set Similarity. Additions to forge.css for this page; the step strip, tiles, and Script
   rules are the Maximum Likelihood page's, so every Forge page works the same way. */

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

/* letter toggles for the two crisp sets */
.letters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin-top: 4px; }
.letters button { background: #404040; border: 1px solid #555; color: var(--warm-white); font: inherit; font-weight: 700; font-size: 0.86em;
                  padding: 5px 0; border-radius: 4px; cursor: pointer; }
.letters button:hover { border-color: #777; }
.letters button.on { background: var(--gold); border-color: var(--gold); color: var(--dark-bg); }
#j-A button.on { background: #4A90D9; border-color: #4A90D9; color: #fff; }
#j-B button.on { background: var(--ember); border-color: var(--ember); color: #fff; }
.letters button.mark { box-shadow: 0 0 0 2px var(--gold), 0 0 10px rgba(197,165,90,0.7); }

/* compact slider rows for a profile: label, slider, value */
.prof.pa { color: #6FA8E6 !important; }
.prof.pb { color: var(--ember) !important; }
.srows { display: flex; flex-direction: column; gap: 1px; }
.srow { display: grid; grid-template-columns: 26px minmax(0, 1fr) 38px; align-items: center; gap: 8px; border-radius: 4px; padding: 0 4px; }
.srow .sl { color: var(--muted); font-size: 0.8em; font-weight: 600; }
.srow .sv { color: var(--warm-white); font-weight: 700; font-size: 0.84em; text-align: right; font-variant-numeric: tabular-nums; }
.srow input[type=range] { margin: 4px 0; }
.srow.mark { box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(197,165,90,0.45); }
.setno { color: var(--muted); font-size: 0.78em; margin: 6px 0 0; }

/* tiles stacked in one column beside a figure */
.tiles.stack { grid-template-columns: minmax(0, 1fr); }
.tiles.stack .tile.wide { grid-column: auto; }

/* the per-axis table and the Anvil's score 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: 5px 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.total td { border-top: 1px solid var(--border); border-bottom: none; color: var(--gold); font-weight: 700; }
table.mtab td.dim, table.mtab th.dim { color: #5a5a5a; }
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 td.top { color: var(--gold); font-weight: 700; }
table.mtab .pa { color: #6FA8E6; } table.mtab .pb { color: var(--ember); }

/* the Anvil's verdict chips */
.verdict-line { margin-top: 10px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.metric-chip { display: inline-block; padding: 3px 9px; border-radius: 4px; font-size: 0.8em; font-weight: 600; }

/* radar facets */
.facets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.facets.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.strip-box { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.sub-head { color: var(--gold); font-weight: 600; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.3px; margin: 0 0 6px; }
.facet { cursor: pointer; border-radius: 6px; border: 1px solid transparent; }
.facet.sel { border-color: rgba(197,165,90,0.6); background: rgba(197,165,90,0.06); }
.facet-title { color: var(--gold); font-weight: 700; font-size: 0.82em; text-align: center; margin: 2px 0 0; }

/* key for plots */
.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 em { font-style: normal; }
.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.fill { height: 10px; width: 14px; border-radius: 2px; }

/* controls this page adds */
.radios.n-chips { flex-wrap: wrap; }
.radios.n-chips button { flex: 0 0 auto; min-width: 34px; padding: 5px 8px; }
.check { 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; }

/* wide 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.05em; }

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

@media (max-width: 1100px) { .facets.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { table.s-funcs td:first-child { white-space: normal; } }

/* room under the last tile, so the fixed BLUEPRINT button covers nothing when the page is scrolled to the end */
.main { padding-bottom: 72px; }
