/* /representations/ interactive note. Structure and look follow /open-society/ (claims, then tabbed tools). */
.essay { max-width: 920px; }
.essay h1 { margin-bottom: 0.6rem; }
.small { font-size: 0.82em; }
.thesis p { margin: 0.45rem 0; max-width: 78ch; font-size: 0.95em; }
.thesis strong { color: var(--phosphor); font-weight: 500; }
.thesis .src { margin-left: 0.4rem; font-size: 0.78em; }
.jump { margin-left: 0.6rem; white-space: nowrap; font-family: var(--mono); font-size: 0.85em; color: var(--phosphor); text-decoration: none; border-bottom: 1px dotted var(--phosphor); }
.jump:hover { border-bottom-style: solid; }
button.jump {
  display: inline; background: none; border: 0; padding: 0; border-radius: 0;
  font: inherit; font-family: var(--mono); font-size: 0.85em; color: var(--phosphor);
  cursor: pointer; border-bottom: 1px dotted var(--phosphor);
}
button.jump:hover { border-bottom-style: solid; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Claims */
.claims { margin-top: 1.1rem; }
.claims h2 { margin: 0 0 0.5rem; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); font-weight: 400; }
.claim-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.claim-list > li { max-width: none; margin: 0; border-bottom: 1px solid #133d13; }
.claim-list > li + li { margin-top: 0; }
.claim-row {
  display: grid; grid-template-columns: 1.6rem 1fr auto; align-items: baseline; gap: 0.6rem;
  width: 100%; padding: 0.32rem 0.2rem; border: 0; background: none; color: var(--ink);
  font: 0.84rem/1.42 var(--mono); text-align: left; cursor: pointer;
}
.claim-row:hover, .claim.open .claim-row { background: #032803; }
.claim-row strong { color: var(--link); font-weight: 500; margin-right: 0.15rem; }
.claim-n { color: var(--muted); font-size: 0.78em; text-align: right; }
.tag { font-size: 0.56rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; opacity: 0.7; }
.tag::after { content: " ▾"; }
.claim.open .tag::after { content: " ▴"; }
.claim-row:hover .tag, .claim.open .tag { opacity: 1; color: var(--phosphor); }
.claim-body { padding: 0.1rem 0.2rem 0.9rem 2.2rem; }
.argument { margin: 0.3rem 0 0; font-size: 0.86em; color: var(--muted); max-width: 78ch; }
.go-tab { margin-top: 0.5rem; padding: 0.3rem 0.7rem; border: 1px solid var(--phosphor); background: var(--well); color: var(--phosphor); font: 0.8rem var(--mono); cursor: pointer; }

/* Tools */
.inquiry { margin-top: 1.6rem; scroll-margin-top: 4rem; }
.inquiry h2 { margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--phosphor); font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; }
.inquiry-lede { margin: 0 0 0.7rem; max-width: 78ch; }
.tools { border: 1px solid var(--line); background: var(--panel); box-shadow: 4px 4px 0 #001400; scroll-margin-top: 4rem; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs [role="tab"] { padding: 0.6rem 0.9rem; border: 0; border-right: 1px solid #1f4a1f; background: none; color: var(--ink); font: 0.84rem var(--mono); cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { color: var(--phosphor); background: var(--well); box-shadow: inset 0 -2px 0 var(--phosphor); }
.tabs [role="tab"]:hover { color: var(--phosphor); }
.tab-panel { padding: 0.8rem 1rem 1rem; }
.tab-panel > p:first-child { margin-top: 0; }
.tab-panel button:not([role="tab"]):not(.cell9):not(.go-tab) { padding: 0.45rem 0.85rem; border: 1px solid var(--line); background: var(--well); color: var(--link); font: 0.84rem var(--mono); cursor: pointer; white-space: nowrap; }
.tab-panel button.primary { border-color: var(--phosphor); color: var(--phosphor); }
.tab-panel button:not([role="tab"]):hover { border-color: var(--phosphor); color: var(--phosphor); }
.tab-panel select { background: var(--well); color: var(--ink); border: 1px solid var(--line); font: 0.84rem var(--mono); padding: 0.3rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.5rem; }
.status { font-size: 0.78em; color: var(--muted); }
.t-short { display: none; }
.sub { margin: 1rem 0 0.4rem; font-size: 0.8rem; font-weight: 500; color: var(--link); letter-spacing: 0.04em; }
.tab-panel .sub:first-child { margin-top: 0; }
.sources { font-size: 0.86em; }
.split2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.5rem; margin-top: 0.8rem; align-items: start; }
details.more { margin: 0.9rem 0 0; }
details.more summary { cursor: pointer; color: var(--link); font-size: 0.82em; }
details.more p { max-width: 80ch; }

/* Plots */
.plot { display: block; width: 100%; height: auto; font-family: var(--mono); }
.plot .frame { fill: var(--well); stroke: var(--line); }
.plot .pt { font-size: 11px; font-weight: 600; }
.plot .nm { font-size: 8px; fill: var(--muted); }
.l0 { fill: #39ff14; color: #39ff14; } .l1 { fill: #5ec8ff; color: #5ec8ff; } .l2 { fill: #e0b040; color: #e0b040; }
.key-dot { display: inline-block; width: 0.6rem; height: 0.6rem; margin: 0 0.2rem 0 0.5rem; background: currentColor; vertical-align: middle; }
.key-dot.l0 { background: #39ff14; } .key-dot.l1 { background: #5ec8ff; } .key-dot.l2 { background: #e0b040; }
.legend-line { margin: 0.3rem 0 0; color: var(--muted); }
.plot .ax { stroke: var(--line); } .plot .gridl { stroke: var(--line); stroke-dasharray: 2 4; }
.plot .tick { fill: var(--muted); font-size: 10px; }
.plot path { fill: none; stroke-width: 2; }
.plot .l-mm { stroke: var(--phosphor); } .plot .l-cau { stroke: #5ec8ff; } .plot .l-eff { stroke: var(--muted); stroke-dasharray: 4 3; }
.plot .now { stroke: var(--ink); stroke-dasharray: 1 3; }
.sw { display: inline-block; width: 0.9rem; height: 2px; vertical-align: middle; margin: 0 0.25rem 0 0.4rem; }
.sw.mm { background: var(--phosphor); } .sw.cau { background: #5ec8ff; } .sw.eff { background: var(--muted); }

/* Meters */
.meters { display: grid; gap: 0.35rem; }
.meter { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 2.4rem; align-items: center; gap: 0.5rem; font-size: 0.76em; }
.meter .track { height: 0.55rem; background: var(--well); border: 1px solid var(--line); }
.meter .track span { display: block; height: 100%; background: var(--phosphor); transition: width 0.15s; }
.meter.cau .track span { background: #5ec8ff; } .meter.eff .track span { background: var(--muted); } .meter.gap .track span { background: #ff6a4d; }
.meter .v { text-align: right; color: var(--link); }

/* Tables */
table.mini { margin-top: 0.8rem; border-collapse: collapse; font-size: 0.76em; width: 100%; }
table.mini th, table.mini td { padding: 0.25rem 0.4rem; border-bottom: 1px solid #1f4a1f; text-align: left; vertical-align: bottom; }
table.mini th { color: var(--muted); font-weight: 400; }
table.mini td.bad { color: #ff6a4d; }
table.cmp td.on { color: var(--phosphor); }
.verdict { margin: 0.7rem 0 0; color: var(--phosphor); font-size: 0.86em; }

/* Animal grid */
.grid9 { display: grid; grid-template-columns: 3.8rem repeat(3, minmax(0, 1fr)); gap: 0.3rem; margin-top: 0.7rem; }
.grid9 .lab { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); align-self: center; }
.grid9 .lab.col { text-align: center; }
.cell9 { font: 0.74rem var(--mono); min-height: 2.4rem; padding: 0.25rem; border: 1px solid var(--line); background: var(--well); color: var(--ink); cursor: pointer; }
.cell9:hover, .cell9:focus-visible { border-color: var(--phosphor); }
.cell9.focus { background: var(--phosphor); color: var(--bg); border-color: var(--phosphor); }
.cell9.near { color: var(--phosphor); border: 1px dashed var(--phosphor); }
#div-nn b, #hyp-nn b { color: var(--link); font-weight: 500; }

/* Slider and segmented control */
.slider { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.7rem; font-size: 0.84em; color: var(--muted); }
.slider input { flex: 1 1 14rem; accent-color: var(--phosphor); }
.slider output { min-width: 3.5ch; color: var(--phosphor); }
.seg { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tab-panel .seg button[aria-pressed="true"] { color: var(--phosphor); border-color: var(--phosphor); }

/* Exploits */
.claims-out { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.25rem; max-width: 640px; }
.claims-out li { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 2.6rem 3.2rem; gap: 0.5rem; align-items: center; font-size: 0.78em; max-width: none; margin: 0; }
.claims-out .bar { height: 0.5rem; background: var(--well); border: 1px solid var(--line); }
.claims-out .bar span { display: block; height: 100%; background: var(--link); }
.claims-out .v { text-align: right; color: var(--muted); }
.claims-out .verdict-tag { font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.06em; }
.claims-out .ok .verdict-tag, .concl.ok span { color: var(--phosphor); }
.claims-out .bad .verdict-tag, .concl.bad span { color: #ff6a4d; }
.claims-out .bad .stmt { color: #ffb39f; }
.argument-box { margin-top: 0.5rem; padding: 0.6rem 0.8rem; border-left: 2px solid var(--line); background: #021a02; max-width: 640px; }
.steps { margin: 0; padding-left: 1.2rem; font-size: 0.84em; }
.concl { margin: 0.5rem 0 0; font-size: 0.9em; color: var(--link); }
.concl span { font-size: 0.85em; margin-left: 0.4rem; }

@media (max-width: 760px) {
  .split2 { grid-template-columns: 1fr; }
  .claim-row { grid-template-columns: 1fr auto; gap: 0.4rem; padding: 0.38rem 0.1rem; font-size: 0.8rem; line-height: 1.38; }
  .claim-row .claim-n { display: none; }
  .claim-body { padding-left: 0.4rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs [role="tab"] { flex: 1 1 auto; padding: 0.6rem 0.3rem; font-size: 0.78rem; }
  .t-long { display: none; } .t-short { display: inline; }
  .tab-panel { padding: 0.7rem 0.7rem 0.9rem; }
  .inquiry-lede { display: none; }
  .claims-out li { grid-template-columns: minmax(0, 1fr) 3.5rem 2.4rem 3rem; }
  .essay h1 { font-size: 1.45rem; }
}

/* Transfer a key */
.xfer-prompt {
  margin: 0.85rem 0 0.35rem; font: 1.05rem/1.5 var(--mono); color: var(--ink);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.4rem;
}
.xfer-prompt select { font-size: 1em; }
.xfer-blank, #xfer-answer {
  display: inline-block; min-width: 8ch; border-bottom: 1px dotted var(--muted);
  color: var(--muted); font-weight: 500; padding: 0 0.15rem;
}
#xfer-answer.filled { color: var(--ink); border-bottom-color: var(--line); }
#xfer-answer.flipped { color: var(--phosphor); border-bottom-color: var(--phosphor); }
.xfer-steps {
  list-style: none; display: flex; gap: 0; margin: 0.8rem 0 0.4rem; padding: 0;
  border: 1px solid var(--line); overflow: hidden;
}
.xfer-steps li {
  flex: 1; margin: 0; max-width: none; text-align: center; padding: 0.4rem 0.3rem;
  font: 0.78rem var(--mono); color: var(--muted); border-right: 1px solid var(--line);
  counter-increment: none;
}
.xfer-steps li:last-child { border-right: 0; }
.xfer-steps li::before { content: attr(data-xfer-step); }
.xfer-steps li[data-xfer-step="0"]::before { content: "1 · "; }
.xfer-steps li[data-xfer-step="1"]::before { content: "2 · "; }
.xfer-steps li[data-xfer-step="2"]::before { content: "3 · "; }
.xfer-steps li.on { color: var(--phosphor); background: var(--well); box-shadow: inset 0 -2px 0 var(--phosphor); }
.xfer-plots { margin-top: 0.6rem; }
.plot .pt.on { font-size: 13px; }
.plot .nm.on { fill: var(--phosphor); }
.plot .ghost { font-size: 11px; fill: var(--phosphor); opacity: 0.95; }
.plot .link { stroke: var(--phosphor); stroke-dasharray: 3 3; fill: none; stroke-width: 1; }
.plot .halo { fill: none; stroke: var(--phosphor); stroke-width: 1.2; opacity: 0.8; }
@media (max-width: 760px) {
  .xfer-prompt { font-size: 0.92rem; }
}

/* Write it in (imprint) tab */
.imp-slider { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.imp-slider input { width: min(16rem, 60vw); accent-color: #39ff14; }
.imp-plot { cursor: grab; touch-action: none; }
.imp-plot:active { cursor: grabbing; }
.imp-plot .imp-twin { stroke: #54794a; stroke-width: 0.5; opacity: 0.55; }
.imp-plot .imp-rec { stroke: none; }
.imp-plot .imp-don { fill: none; stroke-width: 1.1; }
.imp-plot .imp-rec.q0 { fill: #39ff14; } .imp-plot .imp-rec.q1 { fill: #5ec8ff; } .imp-plot .imp-rec.q2 { fill: #e0b040; } .imp-plot .imp-rec.q3 { fill: #ff7aa8; }
.imp-plot .imp-don.q0 { stroke: #39ff14; } .imp-plot .imp-don.q1 { stroke: #5ec8ff; } .imp-plot .imp-don.q2 { stroke: #e0b040; } .imp-plot .imp-don.q3 { stroke: #ff7aa8; }
.imp-plot .imp-lab { fill: var(--muted); font-size: 9px; }
.imp-readouts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 0.8rem 0 0.5rem; }
.imp-readouts .readout { margin: 0; display: flex; align-items: baseline; gap: 0.4rem; }
.imp-readouts .big { font: 500 1.35rem var(--mono); color: var(--phosphor); }
.imp-readouts .k { font-size: 0.8rem; color: var(--muted); }
.imp-grid { display: flex; flex-wrap: wrap; gap: 2px; max-width: 26rem; }
.imp-grid .sq { width: 9px; height: 9px; border: 1px solid #2f5a2f; background: transparent; transition: background-color 0.4s, border-color 0.4s; }
.imp-grid .sq.c0 { border-color: #54794a; }
.imp-grid .sq.fixed { background: #39ff14; border-color: #39ff14; }
.tab-panel button:disabled { opacity: 0.45; cursor: default; }
.imp-scroll { overflow-x: auto; }
.imp-table td, .imp-table th { white-space: nowrap; }
@media (max-width: 760px) {
  .imp-split { grid-template-columns: minmax(0, 1fr); }
}
#panel-imprint .math.display { overflow-x: auto; overflow-y: hidden; max-width: 100%; }

/* Rotation figure (tab "Train three models"): three maps, one rotation. */
.rot-lede { margin: 0 0 0.5rem; max-width: 70ch; font-size: 0.9rem; color: var(--ink); }
.rot-plot { max-height: 22rem; }
.rot-plot .rot-frame { fill: var(--well); stroke: var(--line); stroke-width: 1; }
.rot-plot .rot-axis { stroke-width: 0.8; }
.rot-plot .rot-axis-x { stroke: #2f6a2f; stroke-dasharray: 3 3; }
.rot-plot .rot-axis-y { stroke: #1f4a1f; stroke-dasharray: 1 3; }
.rot-plot .rot-pin-x { fill: var(--phosphor); }
.rot-plot .rot-pin-y { fill: none; stroke: #5b8a52; stroke-width: 1; }
.rot-plot .rot-title { fill: var(--muted); font-size: 10px; letter-spacing: 0.04em; }
.rot-plot .rot-dot { fill-opacity: 0.62; stroke: #021a02; stroke-width: 0.6; cursor: pointer; }
.rot-plot .rot-dot.on { fill-opacity: 1; stroke: var(--ink); stroke-width: 1.2; }
.rot-plot .rot-dot.l0 { fill: #39ff14; } .rot-plot .rot-dot.l1 { fill: #5ec8ff; } .rot-plot .rot-dot.l2 { fill: #e0b040; }
.rot-plot .rot-dot.c0 { fill: #ff7aa8; } .rot-plot .rot-dot.c1 { fill: #c9a8ff; } .rot-plot .rot-dot.c2 { fill: #f2f2f2; }
.rot-plot .rot-name { fill: var(--ink); font-size: 9.5px; }
.rot-plot .rot-group { fill: var(--phosphor); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.rot-plot .rot-leader { stroke: #3f7a3f; stroke-width: 0.8; stroke-dasharray: 1 3; }
.rot-plot .rot-hi { fill: var(--phosphor); font-size: 9.5px; font-weight: 600; pointer-events: none; }
.key-dot.c0 { background: #ff7aa8; } .key-dot.c1 { background: #c9a8ff; } .key-dot.c2 { background: #f2f2f2; }
.rot-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.6rem; }
.rot-controls[hidden] { display: none; }
.rot-slider { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.rot-slider input[type="range"] { width: 9rem; accent-color: var(--phosphor); }
.rot-caption { margin: 0.5rem 0 0.1rem; max-width: 70ch; font-size: 0.9rem; color: var(--phosphor); min-height: 1.4em; }
.rot-hover { margin: 0.2rem 0 0; min-height: 1.3em; }
#rot-legend { margin: 0.2rem 0 0; }
@media (max-width: 760px) {
  .rot-plot .rot-title { font-size: 8.5px; }
  .rot-slider input[type="range"] { width: 7rem; }
}
