/* Simulator pages (Ergo-Veil, Spiral-Hymn): the hub look around the instrument. Load after hub-page.css.
   The simulators read --a, --b, --hot, --amber, --mute from the body to colour their canvases, so those are mapped to the hub's
   current genome here (plain colour values, no color-mix, so canvases can use them). Paper mode (their print view) is kept. */
.hp.sim { --a: var(--accent); --b: var(--edge); --mute: var(--muted); --dim: var(--muted); --ink: var(--text); --line2: var(--edge); }
body.hp.sim.paper {
  --g0: #ffffff; --g1: #f3f3f3; --g2: #e8e8e8; --line: #d4d4d4; --edge: #9a9a9a; --text: #000; --muted: #333; --panel: #fafafa;
  --accent: #006c7a; --second: #007a4a; --tert: #8a5a00; --a: #006c7a; --b: #4b2a9a; --hot: #b0002a; --amber: #8a5a00; --ok: #007a4a; --mute: #666; --dim: #333; --ink: #000;
  background: #fff;
}
body.hp.sim.paper #gl, body.hp.sim.paper::after, body.hp.sim.paper .nav { display: none; }
body.hp.sim.paper main.wrap { padding-top: 24px; }

.hp.sim main.wrap { max-width: 1480px; }
.hp.sim .hero { padding-top: 3vh; padding-bottom: 0; }
.hp.sim .hero h1 { font-size: clamp(38px, 6vw, 76px); }
.hp.sim .lede { font-size: 17px; max-width: 60em; }

.hp.sim .grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; font-family: var(--f-mono); font-size: 13px; }
.hp.sim .lower { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; font-family: var(--f-mono); font-size: 13px; }
.hp.sim .lower .full { grid-column: 1 / 3; }

.hp.sim .card {
  display: block; padding: 0; border-radius: 18px; overflow: hidden; transform: none; transition: none;
  background: var(--panel); border: 1px solid color-mix(in oklab, var(--line) 85%, transparent);
  backdrop-filter: blur(8px) saturate(1.1); -webkit-backdrop-filter: blur(8px) saturate(1.1);
}
.hp.sim .card::before { display: none; }
.hp.sim .card:hover { transform: none; border-color: color-mix(in oklab, var(--line) 85%, transparent); }
.hp.sim .lower .card { padding: 16px 18px; }
.hp.sim .card h2 { margin: 0 0 10px; }
.hp.sim .card h2::before { display: none; }
.hp.sim canvas { display: block; width: 100%; touch-action: none; }
.hp.sim #view { height: min(74vh, 820px); min-height: 380px; cursor: grab; }
.hp.sim #view:active { cursor: grabbing; }
.hp.sim #sky { aspect-ratio: 1 / 1; max-height: 82vh; cursor: crosshair; }
.hp.sim #inner { height: 420px; }
.hp.sim #scope { height: 200px; }
.hp.sim #spec { height: 260px; }

.hp.sim .bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-top: 1px solid color-mix(in oklab, var(--line) 70%, transparent); }
.hp.sim button {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em; color: var(--text); cursor: pointer;
  min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--edge);
  background: color-mix(in oklab, var(--g1) 70%, transparent); transition: border-color .2s, color .2s, background .2s;
}
.hp.sim button:hover { border-color: var(--a); color: var(--a); }
.hp.sim button.on { border-color: var(--a); color: var(--a); background: color-mix(in oklab, var(--a) 14%, transparent); }
.hp.sim #bSound { flex: 1; min-width: 140px; border-color: var(--hot); color: var(--hot); }
.hp.sim #bSound.on { background: color-mix(in oklab, var(--hot) 14%, transparent); }

.hp.sim aside { display: flex; flex-direction: column; gap: 10px; font-family: var(--f-mono); font-size: 13px; }
.hp.sim details { background: var(--panel); border: 1px solid color-mix(in oklab, var(--line) 85%, transparent); border-radius: 14px; padding: 0 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hp.sim summary { cursor: pointer; padding: 11px 0; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--a); list-style: none; }
.hp.sim summary::-webkit-details-marker { display: none; }
.hp.sim summary::before { content: "+ "; color: var(--mute); }
.hp.sim details[open] summary::before { content: "− "; }
.hp.sim details > div { padding: 2px 0 14px; }
.hp.sim .row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin: 8px 0; }
.hp.sim .row label { color: var(--muted); font-size: 12px; letter-spacing: 0; }
.hp.sim .row output { font-size: 12px; text-align: right; color: var(--text); }
.hp.sim .row input[type=range] { grid-column: 1 / 3; width: 100%; accent-color: var(--a); margin: 0; height: 20px; }
.hp.sim .chk { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--muted); font-size: 12px; cursor: pointer; letter-spacing: 0; }
.hp.sim .chk input { accent-color: var(--a); }
.hp.sim .seg { display: flex; gap: 8px; margin: 8px 0; }
.hp.sim .seg button { flex: 1; padding: 0 8px; }
.hp.sim .hole { border-left: 2px solid var(--edge); padding-left: 10px; margin: 10px 0; }
.hp.sim .hole h3 { margin: 0; font-family: var(--f-mono); font-size: 12px; font-weight: 400; color: var(--b); letter-spacing: .1em; }
.hp.sim .presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hp.sim .pipe { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.hp.sim .pipe span.s { border: 1px solid var(--edge); border-radius: 8px; padding: 2px 10px; }
.hp.sim .pipe i { color: var(--a); font-style: normal; }
.hp.sim table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 0; }
.hp.sim td { padding: 4px 0; border: 0; border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent); vertical-align: top; }
.hp.sim td:first-child { color: var(--muted); padding-right: 10px; }
.hp.sim td:last-child { text-align: right; color: var(--text); white-space: nowrap; }
.hp.sim .ro { margin-top: 8px; color: var(--muted); font-size: 12px; min-height: 5.5em; max-width: none; }
.hp.sim .ro b { font-weight: 400; color: var(--amber); }
.hp.sim .note { color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.55; max-width: none; }

@media (max-width: 980px) {
  .hp.sim .grid, .hp.sim .lower { grid-template-columns: 1fr; }
  .hp.sim .lower .full { grid-column: auto; }
  .hp.sim #view { height: 62vh; }
}
