/* Topic-only CSS for interpolation. Loaded after dev_basic/style.css.
   Tokens only. If a second topic needs any of this, move it to dev_basic/style.css. */

/* "How to use this" on the calculator. Closed it costs one line; #app is a
   column flex at height:100%, so every line here is a line taken from the grids.
   Open, the body is absolutely positioned and floats over the grids instead of
   resizing them - .how-to owns the positioning context, so #app stays untouched
   and no other page inherits this. */
.how-to {
  flex: none;
  position: relative;
}
/* Inside .panel-hints the ROW is the positioning context, so this must not be
   one. dev_basic/style.css sets position:static there; this rule stays for any
   page that uses the panel on its own. */
.how-to > summary {
  cursor: pointer;
  width: fit-content;
  padding: 2px 4px;
  /* reads as one with the toolbar's "Output X start" labels */
  font-size: 13px;
  line-height: 1.5;
  color: var(--label-fg);
}
.how-to > summary:hover,
.how-to[open] > summary {
  color: var(--accent);
}

.how-to-body {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(760px, calc(100vw - 60px));
  /* Both values are viewport-relative, so this panel was already responsive
     before anything else was. Keep it that way.
     The cap was written because body is overflow:hidden and an over-tall panel
     would be unreachable. Below 900px the body scrolls instead, but the cap
     still earns its place: a manual taller than the screen, floating over the
     grids, is worse than one that scrolls inside itself. */
  max-height: min(60vh, 520px);
  overflow-y: auto;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--active-bg);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  line-height: 1.6;
  color: var(--header-fg);
}
/* Sits above the steps: what the tool is for, before how to drive it. Slightly
   darker than the steps so it reads as the opening, not as another note. */
.how-to-intro {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--cell-fg);
}

.how-to-body ol {
  margin: 0 0 10px;
  padding-left: 20px;
}
.how-to-body li { margin: 4px 0; }
.how-to-body p { margin: 8px 0 0; }
.how-to-body strong { color: var(--cell-fg); font-weight: 600; }

/* ---- Blog article: elements dev_basic/style.css does not cover ---- */

/* Figures are SVG, generated by gen_figs.py. Centred, never wider than the column. */
.post img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
}

.post table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  font-size: 14px;
}
.post th,
.post td {
  border: 1px solid var(--border);
  padding: 7px 10px;
  text-align: left;
  color: var(--header-fg);
}
.post th {
  background: var(--header-bg);
  color: var(--cell-fg);
  font-weight: 600;
}

/* Display equation. Same shaded box as a code fence so a formula reads as a
   block, not as prose. MathJax fills it after load; the box is there before. */
.post .eq {
  background: var(--header-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 20px 0;
  overflow-x: auto;
  text-align: center;
}
