/* Explorer page: full-bleed app below the masthead, in the site's paper-and-rubric palette. */
body.explorer { height: 100vh; overflow: hidden; }
body.explorer main.xmain { flex: 1; min-height: 0; padding: 0; }
.xapp { display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr) 360px; height: 100%; }

.xbar {
  grid-column: 1 / 3; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .55rem 1.25rem; border-bottom: 1px solid var(--rule); background: var(--paper-2); font-size: .95rem; z-index: 5;
}
.xbar h1 { font-size: 1.35rem; margin: 0; white-space: nowrap; }
.xstats { color: var(--muted); font-size: .85rem; font-style: italic; white-space: nowrap; }
.xsearch { position: relative; flex: 1; min-width: 200px; max-width: 380px; }
.xsearch input, .xbar select {
  width: 100%; font: inherit; font-size: .92rem; padding: .3rem .75rem;
  border: 1px solid var(--rule); border-radius: 999px; background: #fffdf8; color: var(--ink);
}
.xbar select { width: auto; border-radius: 8px; cursor: pointer; }
.xsearch input:focus, .xbar select:focus { outline: 2px solid rgba(142,43,29,.25); border-color: var(--rubric); }
.xres {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 62vh; overflow: auto; display: none; z-index: 30;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 18px 40px -20px rgba(40,25,10,.45); padding: .3rem;
}
.xres.on { display: block; }
.xres div { padding: .3rem .6rem; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; font-size: .92rem; }
.xres div.act, .xres div:hover { background: #efe5d2; }
.xres small { color: var(--muted); white-space: nowrap; font-variant-numeric: oldstyle-nums; }
.xres .f { color: var(--ink-2); font-style: italic; }
.xdepth { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-family: var(--caps); white-space: nowrap; }
.xdepth input { width: 120px; accent-color: var(--rubric); }
.xdepth b { color: var(--rubric); min-width: 2.6rem; }

#x-stage { position: relative; overflow: hidden; cursor: grab; touch-action: none; background: #fbf7ee; }
#x-stage.drag { cursor: grabbing; }
#x-stage svg { width: 100%; height: 100%; display: block; user-select: none; font-family: var(--serif); }
.node { cursor: pointer; transition: opacity .3s; }
.node:hover .card { filter: drop-shadow(0 2px 6px rgba(60,40,20,.25)); }
.node.anc .card { stroke: var(--rubric) !important; stroke-width: 2.4 !important; }
.node.sel .card { stroke: var(--ink) !important; stroke-width: 3 !important; filter: drop-shadow(0 3px 10px rgba(142,43,29,.35)); }
.node.nmhl .card { stroke: var(--gold); stroke-width: 3.2; filter: drop-shadow(0 0 5px rgba(169,124,47,.6)); }
.nm { font-size: 15px; font-weight: 600; fill: var(--ink); }
.lf { font-size: 12.5px; fill: var(--muted); font-variant-numeric: oldstyle-nums; }
.nt { font-size: 11.5px; font-style: italic; fill: #7a5a22; }
.pl { font-size: 10px; font-weight: 700; font-family: var(--serif); }
.onsite { fill: var(--rubric); }
.knob rect { fill: #fffdf8; stroke: var(--muted); stroke-width: 1.1; }
.knob text { font-size: 11.5px; font-weight: 700; fill: var(--ink-2); text-anchor: middle; pointer-events: none; }
.knob:hover rect { fill: var(--rubric); stroke: var(--rubric); }
.knob:hover text { fill: #fff8ee; }
#x-edges path { fill: none; opacity: .75; animation: xfi .4s ease .22s both; }
#x-edges path.hl { stroke: var(--rubric) !important; stroke-width: 3.2 !important; opacity: 1; }
@keyframes xfi { from { opacity: 0 } to { opacity: .75 } }
#x-genband { fill: rgba(251,247,238,.93); }
#x-gen text { font-family: var(--caps); font-size: 15px; fill: var(--rubric); text-anchor: middle; font-weight: 600; letter-spacing: .06em; }

.xpanel { border-left: 1px solid var(--rule); background: var(--paper-2); overflow: auto; padding: 1.1rem 1.3rem 2rem; font-size: 1rem; line-height: 1.45; }
.xpanel h2 { font-size: 1.5rem; margin: .1rem 0 .1rem; line-height: 1.15; }
.xpanel h3 { font-size: 1rem; letter-spacing: .06em; color: var(--rubric); border-bottom: 1px solid var(--rule); padding-bottom: .1rem; margin: 1.2rem 0 .35rem; }
.xpanel .sub { color: var(--muted); margin-bottom: .6rem; font-size: 1.05rem; font-variant-numeric: oldstyle-nums; }
.xpanel ul, .xpanel ol { margin: 0; padding: 0; list-style: none; }
.xpanel li { padding: .18rem 0; display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; border-bottom: 1px dotted var(--rule); }
.xpanel li:last-child { border: 0; }
.xpanel li small { color: var(--muted); white-space: nowrap; font-variant-numeric: oldstyle-nums; }
.xpanel a { cursor: pointer; }
.xpanel a[data-go] { color: var(--ink); text-decoration-color: rgba(142,43,29,.35); }
.xpanel a[data-go]:hover { color: var(--rubric); }
.xpanel .fsid { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.xpanel ol li { justify-content: flex-start; }
.xpanel ol .g { font-family: var(--caps); color: var(--rubric); font-size: .85rem; width: 2.4rem; flex: none; text-align: right; }
.xpanel ol li.me { font-weight: 600; }
.xchip, .xbadge { display: inline-block; padding: .05rem .6rem; border-radius: 999px; font-size: .8rem; margin: 0 .35rem .35rem 0; }
.xchip { border: 1.5px solid; font-family: var(--caps); font-weight: 600; letter-spacing: .03em; }
.xbadge { background: #efe5d2; color: var(--ink-2); }
.xbadge.gold { background: var(--gold); color: #fff8ee; }
.xbadge.warn { background: #fbf1df; color: #7a4a12; border: 1px dashed #c99a3e; }
.xnote { background: #f3ead8; border-left: 3px solid var(--gold); padding: .4rem .7rem; margin: .5rem 0; font-style: italic; color: var(--ink-2); font-size: .95rem; }
.xlinks, .xacts { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .7rem; }
.btn.primary { background: var(--rubric); border-color: var(--rubric); color: #fff8ee; }
.btn.primary:hover { background: var(--rubric-2); color: #fff8ee; }
.cnt { font-size: .75rem; color: var(--gold); border: 1px solid #e3cf9f; border-radius: 999px; padding: 0 .45rem; font-variant-numeric: lining-nums; }
.flash { animation: xfl 1.6s ease; }
@keyframes xfl { 0%, 40% { background: #f6e1c8 } 100% { background: transparent } }

.xfloat { position: absolute; background: rgba(251,248,241,.96); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.xlegend { left: 12px; bottom: 12px; padding: .55rem .75rem; font-size: .85rem; display: grid; gap: .2rem; max-width: 310px; }
.xlegend .sw { display: inline-block; width: 16px; height: 12px; border-radius: 3px; border: 2px solid; vertical-align: -1px; margin-right: .4rem; }
.xlegend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rubric); margin: 0 .55rem 0 .25rem; }
.xlegend .tog, .xnames .hd { font-family: var(--caps); font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.xlegend.min .row { display: none; }
.xnames { left: 12px; top: 48px; width: 250px; font-size: .88rem; display: flex; flex-direction: column; max-height: calc(100% - 130px); }
.xnames .hd { padding: .45rem .75rem; display: flex; justify-content: space-between; }
.xnames.min .bd { display: none; }
.xnames.min .hd .ar { transform: rotate(-90deg); }
.xnames .bd { padding: 0 .75rem .6rem; display: flex; flex-direction: column; min-height: 0; }
.xnames .ctl { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; color: var(--muted); }
.xnames .ctl select, .xnames .ctl input[type=number] { font: inherit; font-size: .82rem; padding: .1rem .3rem; border: 1px solid var(--rule); border-radius: 6px; background: #fffdf8; color: var(--ink); }
.xnames .ctl input[type=number] { width: 52px; }
.xnames .ctl label { display: flex; align-items: center; gap: .25rem; white-space: nowrap; }
.xnames .ctl input[type=checkbox] { accent-color: var(--rubric); }
#x-nmList { overflow: auto; min-height: 0; }
.nmrow { display: grid; grid-template-columns: 78px 1fr 30px; gap: .4rem; align-items: center; padding: .05rem .25rem; border-radius: 5px; cursor: pointer; }
.nmrow:hover { background: #efe5d2; }
.nmrow.on { background: #f6e9cf; }
.nmrow .nmn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nmrow .bar { height: 9px; border-radius: 5px; background: #cdbb9b; }
.nmrow.on .bar { background: var(--gold); }
.nmrow .c { text-align: right; color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.xnames .ft { margin-top: .35rem; color: var(--muted); font-size: .8rem; font-style: italic; }
.xzoom { right: 12px; top: 48px; display: flex; flex-direction: column; overflow: hidden; }
.xzoom button { all: unset; width: 38px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: var(--ink-2); cursor: pointer; }
.xzoom button:hover { background: #efe5d2; color: var(--rubric); }
.xzoom button + button { border-top: 1px solid var(--rule); }
.xzoom .pct { font-size: .7rem; color: var(--muted); text-align: center; padding: .15rem 0; border-top: 1px solid var(--rule); }
.xhint { right: 12px; bottom: 12px; font-size: .8rem; color: var(--muted); font-style: italic; padding: .3rem .7rem; }
kbd { font-family: var(--serif); font-style: normal; font-size: .75rem; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; background: #fffdf8; }
@media (max-width: 1300px) { .xhint { display: none; } }
@media (max-width: 900px) {
  .xapp { grid-template-columns: 1fr; grid-template-rows: auto 1fr 40%; }
  .xpanel { border-left: 0; border-top: 1px solid var(--rule); }
  .xstats { display: none; }
}
