/* Digital Steppe — explore (digital twin) */
body.explore { overflow: hidden; }
.ex { position: fixed; inset: 64px 0 0; }
#stage.ex-stage { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: auto; }
.ex-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.ex-stage canvas:active { cursor: grabbing; }
.ex-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.ex-loading span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--green); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ex-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); font-size: 12.5px; color: var(--muted); background: rgba(5, 10, 20, .6); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.ex-hint.gone { opacity: 0; }

.ex-labels { position: absolute; inset: 0; pointer-events: none; }
.tag { position: absolute; left: 0; top: 0; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: rgba(5, 10, 20, .72); border: 1px solid; white-space: nowrap; transition: opacity .3s; opacity: 0; text-align: center; line-height: 1.3; }
.tag small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); }
.tag.seq { color: var(--green); border-color: rgba(127, 217, 154, .5); }
.tag.con { color: var(--sky); border-color: rgba(127, 208, 255, .5); }
.probe { position: absolute; left: 0; top: 0; pointer-events: none; font: 600 11.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--soft); background: rgba(5, 10, 20, .8); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 9px; white-space: nowrap; }
.probe b { color: var(--green); }

.ex-panel { position: absolute; top: 16px; width: 330px; max-height: calc(100% - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 20px; backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); scrollbar-width: thin; }
.ex-left { left: 16px; }
.ex-right { right: 16px; }
.ex-panel .eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.ex-panel .eyebrow.gold { color: var(--gold); }
.ex-panel h1, .ex-panel h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; margin-bottom: 6px; }
.ex-panel .muted { color: var(--muted); font-size: 14px; }
.ex-panel fieldset { border: 0; padding: 0; margin: 16px 0 0; }
.ex-panel legend { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; padding: 0; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--soft); }
.seg input:checked + span { background: var(--green); color: #04140a; border-color: var(--green); }
.seg input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.ex-panel .legend { margin-top: 10px; font-size: 12.5px; }
.legend .ramp { width: 90px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #12423a, #809e4d 35%, #9e7045 70%, #f2ede6); align-self: center; }

.toggles { display: grid; gap: 4px; }
.sw { display: grid; grid-template-columns: 36px 1fr; align-items: center; column-gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; padding: 3px 0; }
.sw small { grid-column: 2; color: var(--muted); font-weight: 500; font-size: 12px; margin-top: -2px; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw span { grid-row: span 2; width: 36px; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, .14); position: relative; transition: background .2s; }
.sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw input:checked + span { background: var(--green-2); }
.sw input:checked + span::after { transform: translateX(16px); }
.sw input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

.range { display: block; font-size: 13.5px; font-weight: 600; margin-top: 16px; }
.range output { float: right; color: var(--green); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--green); margin: 8px 0 0; }

.views { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.views button { font: 600 12.5px var(--font); color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.views button:hover { background: rgba(255, 255, 255, .12); }

.prov { margin-top: 16px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.prov summary { cursor: pointer; font-weight: 700; color: var(--soft); }
.prov ul { padding-left: 18px; margin: 8px 0 0; }
.prov li { margin-bottom: 6px; }
.prov b { color: var(--soft); }

.warn { font-size: 12.5px; color: #ffe2a6; background: rgba(255, 210, 122, .1); border: 1px solid rgba(255, 210, 122, .35); border-radius: 10px; padding: 9px 11px; }
.calc label { display: block; font-size: 13.5px; font-weight: 600; margin-top: 12px; }
.calc .v { float: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.calc input[type=range] { accent-color: var(--gold); }
.calc small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.out { margin: 14px 0 4px; display: grid; gap: 6px; }
.out div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.out dt { font-size: 13px; color: var(--muted); }
.out dd { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.out .hi dd { color: var(--gold); font-size: 26px; }
.ex-right .btn { width: 100%; justify-content: center; font-size: 14px; margin-top: 18px; }

@media (max-width: 1000px) {
  body.explore { overflow: auto; }
  .ex { position: static; padding-top: 64px; }
  #stage.ex-stage { position: relative; inset: auto; height: 62vh; height: 62svh; }
  .ex-panel { position: static; width: auto; max-height: none; margin: 14px var(--gutter); }
  .ex-hint { font-size: 11.5px; }
}
@media (hover: none) { .probe { display: none; } }
