.tldr-label {
  margin: 36px 0 8px !important;
  font-weight: 600;
  font-size: 12px;
  color: var(--ice);
  letter-spacing: 0.1em;
}
.tldr-body {
  border-left: 3px solid var(--ice);
  padding: 15px 0 15px 21px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--ice) 6%, transparent),
    transparent 80%
  );
}
.foldable {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 24px 0 28px;
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}
.foldable summary {
  cursor: pointer;
  user-select: none;
  padding: 14px 18px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}
.foldable summary::-webkit-details-marker {
  display: none;
}
.foldable summary:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}
.fold-chevron {
  position: relative;
  transition: transform 0.18s;
  font-size: 0;
  line-height: 1;
  height: 20px;
  width: 20px;
  display: block;
  flex: 0 0 20px;
}
.fold-chevron::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 7px;
  background: currentColor;
  clip-path: polygon(0 0, 50% 75%, 100% 0, 100% 25%, 50% 100%, 0 25%);
  transform: translate(-50%, -50%);
}
.foldable[open] .fold-chevron {
  transform: rotate(180deg);
}
.fold-content {
  padding: 14px 18px 4px;
  border-top: 1px solid var(--line);
}
.fold-content p {
  font-size: 15px;
}
.interactive-figure {
  margin: 30px -20px 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.coin-canvas,
.plot-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 2.1 / 1;
  display: block;
  touch-action: pan-y pinch-zoom;
  cursor: default;
}
.coin-canvas {
  aspect-ratio: 2.25 / 1;
}
.plot-canvas {
  /* One finger scrolls the page; two-finger zoom is handled by the plot. */
  touch-action: pan-y;
}
.figure-controls {
  border-top: 1px solid var(--line);
  padding: 14px 18px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 19px;
}
.coin-figure[data-mode='six'] .coin-controls,
.coin-figure[data-mode='twelve'] .coin-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.control {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.control-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 5px;
}
.control label {
  font-size: 13px;
  color: var(--muted);
}
.control output {
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
input[type='range'] {
  display: block;
  width: 100%;
  margin: 0;
  height: 18px;
  cursor: pointer;
  accent-color: var(--ice);
}
.plot-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
button.fig-button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 4px;
  padding: 8px 14px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
button.fig-button:hover,
button.fig-button:focus-visible {
  border-color: var(--ice);
}
.figure-footnote,
.plot-readout {
  font-size: 12px;
  line-height: 1.5;
  padding: 0 18px 12px;
  color: var(--muted);
}
.plot-readout {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
figcaption {
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 12px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.fig-num {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ice);
  font-weight: 600;
}
.flow-chart {
  display: block;
  width: 100%;
  padding: 20px;
  color: var(--ice);
}
.flow-nodes rect {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.5;
}
.flow-edges {
  fill: none;
  stroke: var(--ice);
  stroke-width: 2;
}
.flow-labels {
  font-size: 22px;
  fill: var(--text);
  font-family: Arial, sans-serif;
  text-anchor: middle;
}
@media (max-width: 680px) {
  .interactive-figure {
    margin-left: -12px;
    margin-right: -12px;
  }
  .coin-canvas {
    aspect-ratio: 1.75 / 1;
  }
  .plot-canvas {
    aspect-ratio: 1.7 / 1;
  }
  .figure-controls {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
  }
  .coin-figure[data-mode='six'] .coin-controls,
  .coin-figure[data-mode='twelve'] .coin-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 9px;
  }
  .control-head {
    flex-wrap: wrap;
  }
  .plot-canvas {
    min-height: 210px;
  }
  .flow-figure {
    overflow-x: auto;
  }
  .flow-chart {
    min-width: 520px;
  }
  .flow-figure figcaption {
    position: sticky;
    left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fold-chevron {
    transition: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.plot-canvas[data-touch-editing='true'] {
  touch-action: none;
}
.plot-options {
  border-top: 1px solid var(--line);
}
.plot-options summary {
  cursor: pointer;
  padding: 10px 18px;
  font-size: 12px;
  color: var(--muted);
}
.plot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}
.plot-fields {
  min-width: 0;
  border: 1px solid var(--line);
  margin: 0 18px 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.plot-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.plot-fields input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 5px;
  border: 1px solid var(--ice);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.plot-help {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  padding: 0 18px;
}
.plot-help-inline {
  font-size: 12px;
  color: var(--muted);
}
.touch-edit {
  display: none;
}
.article-body :is(.foldable, .interactive-figure) a {
  color: var(--accent-text);
}
@media (any-pointer: coarse) {
  .touch-edit {
    display: inline-block;
  }
  input[type='range'] {
    height: 44px;
  }
  .plot-fields input,
  button.fig-button {
    min-height: 44px;
  }
}
