#hecke-explorer {
  --ink: #1c3529;
  --line: #cbd8ce;
  --green: #126649;
  --rust: #9a482b;
  max-width: 55rem;
  margin: 2rem 0;
  color: var(--ink);
}
#hecke-explorer h2 { margin: 2rem 0 .65rem; line-height: 1.15; }
#hecke-explorer p { max-width: 70ch; line-height: 1.55; }
#hecke-explorer button {
  color: var(--ink);
  background: white;
  border: 1px solid #869d8c;
  border-radius: .35rem;
  padding: .55rem .8rem;
  cursor: pointer;
}
#hecke-explorer button:disabled { opacity: .5; cursor: default; }
#hecke-explorer button:enabled:hover { background: #e4eee6; }
#hecke-explorer :focus-visible { outline: 3px solid #225f92; outline-offset: 2px; }
.hecke-toolbar, .hecke-editor, .hecke-replay { display: flex; align-items: center; gap: .65rem; }
.hecke-toolbar { justify-content: space-between; margin-bottom: .85rem; }
#hecke-explorer .hecke-toolbar h2 { margin: 0; }
.hecke-workbench { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--line); border-radius: .55rem; overflow: hidden; }
.hecke-drawing { background: #f4f8f4; display: flex; flex-direction: column; justify-content: space-between; }
.hecke-drawing svg { display: block; width: 100%; height: auto; margin: auto; }
.hecke-drawing [data-node][role="button"] { cursor: pointer; }
.hecke-drawing [data-node][aria-pressed="true"] circle,
.hecke-drawing [data-node]:focus-visible circle { stroke: #1e352b; stroke-width: 4; }
.hecke-drawing [data-pair].muted { opacity: .33; }
.hecke-switch { padding: .85rem 1rem; border-top: 1px solid var(--line); }
.hecke-switch label { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; }
.hecke-switch input { width: 1.1rem; height: 1.1rem; accent-color: var(--green); }
.hecke-matrix { align-self: stretch; display: grid; align-content: center; padding: 1.1rem; border-left: 1px solid var(--line); }
.hecke-matrix table { width: 100%; border-collapse: separate; border-spacing: .25rem; }
.hecke-matrix caption { text-align: left; font-size: 1.1rem; font-weight: bold; padding: 0 .25rem .4rem; }
.hecke-matrix th { font-size: .9rem; font-weight: normal; }
.hecke-matrix th[scope="row"] { text-align: left; padding-right: .3rem; }
#hecke-explorer [data-cell] { width: 100%; min-width: 2.85rem; min-height: 2.7rem; font: bold 1.2rem monospace; }
#hecke-explorer [data-cell][aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: white; }
#hecke-explorer [data-cell].traced { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.hecke-editor { border-top: 1px solid var(--line); margin-top: .65rem; padding-top: .75rem; justify-content: flex-end; gap: .3rem; }
.hecke-editor span { margin-right: auto; font: .9rem monospace; }
.hecke-editor button { min-width: 2.5rem; min-height: 2.5rem; }
.hecke-hint { color: #495c50; font-size: .95rem; }
.hecke-flows { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.hecke-flow { padding: .9rem 1rem; }
.hecke-flow span { display: block; font-weight: bold; color: var(--green); margin-bottom: .45rem; }
.hecke-flow:nth-child(2) span { color: var(--rust); }
.hecke-flow strong { font: 600 clamp(1rem, 2.3vw, 1.35rem) monospace; }
#hecke-balance { grid-column: 1 / -1; margin: 0; max-width: none !important; padding: .65rem 1rem; background: #eaf3eb; }
#hecke-balance[data-state="unequal"], #hecke-balance[data-state="empty"] { background: #f9eee6; }
.hecke-replay { flex-wrap: wrap; }
#hecke-replay:enabled { background: var(--green); color: white; border-color: var(--green); }
#hecke-replay:enabled:hover { background: #0d533c; }
#hecke-fixtures { font-weight: bold; }
@media (max-width: 44rem) {
  .hecke-workbench { grid-template-columns: 1fr; }
  .hecke-matrix { border-left: 0; border-top: 1px solid var(--line); }
  .hecke-flow { padding: .8rem .4rem; }
}
@media (max-width: 23rem) {
  .hecke-flows { grid-template-columns: 1fr; }
}
