/* THE FORGE: Support Vector Machines. 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; }

/* plots */
.svgwrap svg { display: block; width: 100%; height: auto; }
.canvaswrap { position: relative; width: 100%; }
.canvaswrap canvas { display: block; border-radius: 3px; touch-action: pan-y; }
.svgwrap.dragzone { touch-action: none; }
canvas.grabbing { cursor: grabbing; }
.canvaswrap.rotatable canvas { cursor: grab; }
.canvaswrap.pickable canvas, .svgwrap.pickable svg { cursor: pointer; }
.canvaswrap.placing canvas { cursor: crosshair; }
svg .handle { cursor: grab; }
svg .handle:active { cursor: grabbing; }
svg .pick { cursor: pointer; }

/* a column holding a card and the tiles under it */
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tiles.stack { grid-template-columns: minmax(0, 1fr); align-content: start; }

/* keys under plots */
.key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.8em; color: var(--warm-white); margin: 6px 2px 0; }
.key:empty { display: none; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
/* dashes drawn as a gradient: a 2px dashed border on an 18px icon renders solid */
.key i.dash { height: 2px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--dash) 0 5px, transparent 5px 8px) !important; }
.key i.dash.fine { background: repeating-linear-gradient(90deg, var(--dash) 0 2px, transparent 2px 5px) !important; }
.key i.dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #1E1E1E; }
.key i.ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--warm-white); background: none !important; }
.key i.band { width: 18px; height: 10px; border-radius: 2px; }

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

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

/* tables */
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.txt { font-family: inherit; }
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.total td { border-top: 1px solid var(--border); color: var(--gold); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.mtab .pos { color: var(--blue); }
.mtab .neg { color: var(--ember); }

/* the kernel trick's coordinate table */
.pair table.mtab td { padding: 5px 7px; }
.pair .feat { font-size: 0.82em; color: var(--muted); margin: 8px 2px 0; line-height: 1.45; }
.pair .feat b { color: var(--warm-white); }
.pair .vec { white-space: normal; word-break: break-word; text-align: left; font-size: 0.92em; }

/* controls this page adds */
.radios.stack { flex-direction: column; }
.radios.stack button { padding: 6px 8px; text-align: left; }
.rotate-hint { margin-top: 2px; }
.a-msg { color: var(--gold); font-size: 0.88em; margin: 10px 2px 0; min-height: 1.2em; line-height: 1.45; }
.a-msg:empty { display: none; }

/* 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 { min-width: 220px; }
table.s-funcs code { color: var(--gold); word-break: break-word; }
#s-download { text-transform: none; }
.card-header .sym { text-transform: none; }

@media (max-width: 600px) {
  table.s-funcs td:first-child { min-width: 0; }
  .recipe .r-step { font-size: 0.8em; padding: 4px 8px; }
}

/* room below the last card for the floating BLUEPRINT button */
.main { padding-bottom: 76px; }
.sidebar .hint.rotate-hint, #k-hint, #a-hint { margin-top: 10px; }
.t-math { overflow-x: auto; overflow-y: hidden; }
.key i.cross { width: auto; height: auto; background: none; font-style: normal; font-weight: 700; color: var(--warm-white); }
.pair table.feat-table { margin-top: 10px; }
.pair table.feat-table td:first-child { font-family: inherit; font-weight: 500; }
.t-mean:empty { display: none; }
@media (max-width: 420px) { .t-math .katex-display > .katex { font-size: 0.86em; } }
@media (max-width: 600px) {
  table.mtab { font-size: 0.78em; }
  table.mtab th, table.mtab td:first-child { white-space: normal; }
  table.mtab th, table.mtab td { padding: 5px 4px; }
}
