/* ==========================================================================
   Art · Study of Progress cover
   Loaded only on /art/sop-fractal/. Builds on site.css (tokens, fonts, page
   header, prose). The drawing keeps its own red/cream/ink in both themes.
   ========================================================================== */

.panel h3, .btn, .seg button, .art-foot {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.page-header .label { color: var(--muted); margin: 0 0 0.9rem; }

/* ---------- Drawing + panel ---------- */
.art { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 3rem; align-items: start; }
@media (max-width: 960px) { .art { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }

.art-stage { position: sticky; top: 6.5rem; }
@media (max-width: 960px) { .art-stage { position: static; } }
.art-stage canvas {
  display: block; margin: 0 auto; background: #b8141a; cursor: pointer;
  width: min(100%, calc((100vh - 10rem) * 2 / 3)); min-width: min(100%, 18rem); aspect-ratio: 2 / 3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 12px 40px -12px rgba(0, 0, 0, 0.35);
}
.art-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; margin: 0.9rem auto 0; color: var(--muted); font-size: 0.62rem; max-width: 40rem; }
@media (max-width: 700px) { .art-keys { display: none; } }

/* Panel */
.panel { border-top: 1px solid var(--ink); }
.panel section { padding: 1.1rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.panel section:last-child { border-bottom: 0; }
.panel h3 { color: var(--ink); display: flex; align-items: center; gap: 0.75rem; margin: 0 0 0.9rem; }
.panel h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.btn {
  font-family: var(--mono); background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0;
  padding: 0.5rem 0.8rem; cursor: pointer; line-height: 1.2;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-wide { flex: 1; }

.seed-row { display: flex; gap: 0.4rem; }
.seed-in {
  width: 5.5rem; min-width: 0; font-family: var(--mono); font-size: 0.85rem; text-align: center; font-variant-numeric: tabular-nums;
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0; padding: 0.3rem 0.4rem;
  -moz-appearance: textfield; appearance: textfield;
}
.seed-in::-webkit-inner-spin-button, .seed-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.seg { display: flex; border: 1px solid var(--ink); }
.seg button {
  flex: 1; min-width: 0; background: var(--paper); color: var(--ink); border: 0; border-left: 1px solid var(--ink);
  border-radius: 0; padding: 0.45rem 0.2rem; cursor: pointer; line-height: 1.2; font-size: 0.58rem; letter-spacing: 0.06em;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--wash); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.2rem; }
.ctl-head label { font-size: 0.88rem; color: var(--ink-soft); }
.ctl-head output { font-family: var(--mono); font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.hint { font-size: 0.8rem; line-height: 1.45; color: var(--muted); margin: 0.5rem 0 0; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 1.4rem; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
input[type="range"]::-moz-range-track { height: 1px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 0.85rem; height: 0.85rem; margin-top: calc(-0.425rem + 0.5px); background: var(--paper); border: 1px solid var(--ink); border-radius: 0; }
input[type="range"]::-moz-range-thumb { width: 0.85rem; height: 0.85rem; background: var(--paper); border: 1px solid var(--ink); border-radius: 0; }
input[type="range"]:hover::-webkit-slider-thumb { background: var(--ink); }
input[type="range"]:hover::-moz-range-thumb { background: var(--ink); }

.check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--ink-soft); cursor: pointer; }
.check input { -webkit-appearance: none; appearance: none; width: 0.85rem; height: 0.85rem; border: 1px solid var(--ink); margin: 0; cursor: pointer; }
.check input:checked { background: var(--ink); box-shadow: inset 0 0 0 2px var(--paper); }
.checks { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-top: 1rem; }

.art-prose { margin-top: 4rem; }

/* ---------- Source code ---------- */
.code-block { max-width: 46rem; margin: 0.5rem 0 2rem; border: 1px solid var(--line); }
.code-head {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem 0.5rem 0.5rem 1rem;
  border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
}
.code-head .btn { font-size: 0.62rem; padding: 0.35rem 0.7rem; text-decoration: none; text-transform: uppercase; letter-spacing: 0.12em; }
.code-block pre {
  margin: 0; max-height: 32rem; overflow: auto; padding: 1rem 1.25rem; background: var(--wash);
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.55; tab-size: 2;
}
