:root{
  --bg:#ffffff;
  --canvas:#f7f7f7;
  --border:#8a8a8a;
  --text:#111111;
  --muted:#4a4a4a;
  --soft:#6b6b6b;
  --x:#ef5350;--y:#66bb6a;--z:#42a5f5;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font-family:Arial,sans-serif}
body{min-height:100vh}
.wrap{max-width:900px;margin:0 auto;padding:34px 26px 58px}
h1{font-size:38px;line-height:1;margin:0 0 12px;font-weight:800;letter-spacing:-1.6px}
.lead{max-width:100%;margin:0;color:#f5f6f8;font-size:15px;line-height:1.42}
.section{margin-top:28px}
.section-title{font-size:13px;text-transform:uppercase;letter-spacing:.08em;font-weight:700;margin:0 0 10px;color:#f5f6f8}

/* INPUT */
.input-grid{display:grid;grid-template-columns:minmax(0,1fr) 130px 96px;gap:14px;align-items:stretch}
.arithmetic-label{
  margin:22px 0 10px;font-size:12px;letter-spacing:.06em;
  color:var(--muted);display:flex;align-items:center;gap:8px
}
.wip-tag{
  font-size:10px;letter-spacing:.08em;color:var(--soft);
  border:1px dashed var(--border);padding:2px 6px
}
.clear-btn{color:var(--soft);border-color:var(--border)}
.input-shell{position:relative}
input,button{font:inherit}
#phrase,#arithmetic,#neighborWord{
  width:100%;height:50px;padding:0 52px 0 14px;
  border-radius:0;border:1px dashed var(--border);
  background:#11151b;color:#fff;font-size:16px;outline:none
}
#phrase:focus,#arithmetic:focus,#neighborWord:focus{border-color:#aeb8c5}
.action-btn{
  height:50px;border-radius:0;border:1px dashed #d9dee5;
  background:transparent;color:#fff;font-size:15px;cursor:pointer
}
.action-btn:hover{background:#20262e}
.icon-btn{
  width:40px;height:40px;border-radius:0;border:1px dashed rgba(180,191,204,.72);
  background:rgba(17,21,27,.72);color:#fff;display:grid;place-items:center;cursor:pointer;padding:0
}
.icon-btn:hover{border-color:#fff;background:#171d24}
.random-btn{position:absolute;right:6px;top:5px;width:40px;height:40px;border-color:transparent;background:transparent}
.random-btn:hover{border-color:rgba(255,255,255,.5);background:transparent}
.random-btn svg,.fullscreen-btn svg,.reset-btn svg,.control-icon svg,.groups-tab svg{width:23px;height:23px;display:block}

/* VISUALIZATION */
.visual-wrap{position:relative}
canvas{width:100%;height:840px;display:block;background:var(--canvas);border-radius:0;cursor:grab;touch-action:none}
canvas.dragging{cursor:grabbing}
.hover-tip{
  position:absolute;z-index:10;display:none;pointer-events:none;min-width:0;max-width:172px;
  padding:0;border-radius:0;background:rgba(13,16,21,.56);
  border:1px dashed rgba(166,180,196,.42);color:rgba(220,228,237,.76);
  font-size:8px;line-height:1.15;box-shadow:none;font-family:'Lekton', monospace;overflow:hidden
}
.hover-tip .hover-card{display:block}
.hover-tip .hover-card-bar{
  height:4px;width:100%;background:linear-gradient(90deg,var(--bar-a),var(--bar-b));
}
.hover-tip .hover-title{
  display:block;margin:0;padding:5px 7px 0;color:rgba(255,255,255,.94);font-weight:700;font-size:8px;line-height:1.15;
  text-transform:none
}
.hover-tip .hover-line{
  display:block;margin:0;padding:2px 7px 0;color:rgba(220,228,237,.76);font-weight:400;font-size:8px;line-height:1.15
}
.hover-tip .hover-values{padding-bottom:5px}
.hover-tip .hover-muted{color:rgba(220,228,237,.76)}
.hover-tip strong{color:rgba(255,255,255,.94)}
.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}

.compare-overlay{
  position:absolute;left:14px;top:12px;z-index:6;
  max-width:76%;font-size:8.5px;line-height:1.20;color:rgba(238,242,247,.68);
  pointer-events:none
}
.arithmetic-overlay{left:14px;right:auto;top:12px;text-align:left;max-width:76%}
.compare-pair{margin:0 0 5px}
.compare-pair:last-child{margin-bottom:0}
.compare-pair .pair-name{font-weight:700;color:rgba(255,255,255,.78)}
.compare-pair .metric-line{white-space:normal}
.compare-overlay.selection-mode{color:rgba(245,248,252,.78)}
.compare-overlay.selection-mode .pair-name{color:rgba(255,255,255,.9)}

.visual-actions{
  position:absolute;right:14px;bottom:14px;z-index:8;display:flex;gap:14px;align-items:center
}
.visual-action-btn{
  position:static;width:auto;height:30px;padding:0;border:0!important;background:transparent!important;
  display:flex;align-items:center;gap:6px;color:rgba(245,247,250,.82)
}
.visual-action-btn:hover{color:#fff;background:transparent!important}
.visual-action-btn svg{width:16px!important;height:16px!important}
.visual-action-btn .action-text{
  font-size:9px;line-height:1;letter-spacing:.035em;white-space:nowrap
}

.visual-wrap:fullscreen{background:var(--canvas);padding:0}
.visual-wrap:fullscreen canvas{height:100vh;border-radius:0}
.visual-wrap:fullscreen .visual-actions{right:18px;bottom:18px}
.visual-wrap:fullscreen .compare-overlay{left:18px;top:16px}
.visual-wrap:fullscreen .hover-tip{z-index:11}

/* SEMANTIC GROUPS — custom transform panel */
.visual-groups{position:absolute;left:14px;bottom:14px;z-index:8}
.groups-tab{
  width:auto;height:30px;padding:0;border:0;background:transparent;
  color:rgba(245,247,250,.78);display:flex;align-items:center;gap:6px;
  font-size:9px;letter-spacing:.035em;cursor:pointer
}
.groups-tab:hover{color:#fff}
.groups-tab svg{width:16px;height:16px}
.groups-panel{
  position:absolute;left:0;bottom:42px;width:530px;max-width:72vw;
  padding:11px 12px 12px;border:0;
  background:rgba(17,21,27,.62);backdrop-filter:blur(3px);
  opacity:0;transform:translateY(12px);
  visibility:hidden;pointer-events:none;
  transition:
    opacity 150ms ease-out,
    transform 150ms ease-out,
    visibility 0s linear 150ms
}
.visual-groups.is-open .groups-panel{
  opacity:1;transform:translateY(0);visibility:visible;pointer-events:auto;
  transition:
    opacity 220ms ease-in,
    transform 220ms cubic-bezier(.42,0,1,1),
    visibility 0s linear 0s
}
.legend{display:grid;grid-template-columns:repeat(4,minmax(105px,1fr));gap:7px 14px}
.legend span{font-size:10.5px;color:#c7cfd8;white-space:nowrap}
.swatch{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:1px}

/* NAVIGATION */
.nav-grid{display:grid;grid-template-columns:360px 1fr;gap:24px;align-items:start}
.zoom-block{padding-top:2px}
#zoom{width:100%;margin:0}
.zoom-label{margin-top:7px;font-size:14px;color:var(--muted)}
.toggle-grid{display:grid;grid-template-columns:repeat(2,minmax(190px,1fr));gap:9px 22px}
.check{
  display:flex;gap:8px;align-items:center;color:rgba(231,235,240,.72);font-size:13px;
  white-space:nowrap;cursor:pointer;user-select:none
}
.check input{
  position:absolute;opacity:0;pointer-events:none;width:1px;height:1px
}
.control-icon{
  width:21px;height:21px;display:grid;place-items:center;color:#6f7a87;flex:0 0 21px;
  transition:color 130ms ease-out,transform 130ms ease-out
}
.control-icon svg{width:19px;height:19px}
.check:hover .control-icon{color:#aeb9c6}
.check input:checked + .control-icon{color:#35bfff}
.check input:checked ~ span:last-child{color:#f0f4f8}
.check:active .control-icon{transform:scale(.92)}

/* TEXT */
.instructions{font-size:13px;line-height:1.5;color:#d3d9e1}
.instructions p{margin:0 0 14px}
.instructions strong{color:#fff}
.status{display:none}
.metric{display:none!important}

@media(max-width:980px){
  .wrap{max-width:860px}
  .nav-grid{grid-template-columns:1fr}
  .groups-panel{width:500px}
}
@media(max-width:640px){
  .wrap{padding:24px 16px 40px}
  h1{font-size:30px}
  .input-grid{grid-template-columns:1fr 1fr}
  .input-grid .input-shell{grid-column:1/-1}
  canvas{height:620px}
  .toggle-grid{grid-template-columns:1fr}
  .compare-overlay{max-width:92%;font-size:8px}
  .arithmetic-overlay{max-width:92%;font-size:8px}
  .visual-groups{left:10px;bottom:10px}
  .groups-panel{width:calc(100vw - 52px);max-width:none}
  .legend{grid-template-columns:repeat(2,minmax(105px,1fr))}
}

/* PORTFOLIO COPY — v14 content pass */
.portfolio-header{margin-bottom:54px}
.portfolio-header h1{
  margin:0 0 9px;font-size:42px;line-height:.98;font-weight:800;
  letter-spacing:-1.8px
}
.portfolio-subtitle{
  margin:0;color:#cbd2dc;font-size:16px;line-height:1.4;font-style:italic
}
.copy-section{margin-top:58px}
.copy-section + .copy-section{margin-top:54px}
.copy-heading{
  margin:0 0 20px;font-size:14px;line-height:1.2;font-weight:800;
  letter-spacing:.075em;color:#fff
}
.copy-body{max-width:820px;color:#d7dde5;font-size:14px;line-height:1.68}
.copy-body p{margin:0 0 17px}
.copy-body strong{color:#fff}
.copy-body em{color:#eef2f6}
.copy-body ul{margin:0;padding-left:20px}
.copy-body li{margin:0 0 11px;padding-left:3px}
.copy-body li::marker{color:#8f9aa8}
.copy-body blockquote{
  margin:24px 0;padding:14px 18px;border-left:2px solid #717c89;
  background:rgba(255,255,255,.025);color:#f1f4f7
}
.copy-body blockquote p{margin:0}
.math-block{
  margin:18px 0;padding:12px 14px;border:1px dashed rgba(164,176,190,.38);
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:13px;line-height:1.5;color:#eef2f6;background:rgba(255,255,255,.018)
}
.editorial-note{
  margin:20px 0;padding:12px 14px;border-left:2px solid rgba(180,191,204,.55);
  background:rgba(255,255,255,.022);font-size:12px;line-height:1.52;color:#bcc5d0
}
.editorial-note strong{color:#f3f6f9}
.visualization-stage{margin-top:42px}
.post-visualization{margin-top:72px}
@media(max-width:640px){
  .portfolio-header{margin-bottom:42px}
  .portfolio-header h1{font-size:33px}
  .portfolio-subtitle{font-size:14px}
  .copy-section{margin-top:46px}
  .copy-body{font-size:13.5px}
}


/* v14.1 — controlled editorial pass */
.portfolio-header{
  margin-bottom:54px;
}
.portfolio-header h1{
  margin:0;
  font-size:74px;
  line-height:.86;
  font-weight:800;
  letter-spacing:-3px;
}
.portfolio-header h1 span{
  display:block;
}
.portfolio-subtitle{
  margin:26px 0 0;
  text-align:center;
  color:#f0f3f6;
  font-size:19px;
  line-height:1.2;
  font-style:italic;
  text-transform:uppercase;
  letter-spacing:.005em;
}

.copy-section{
  margin-top:58px;
}
.copy-section + .copy-section{
  margin-top:54px;
}
.section-number{
  margin:0 0 18px;
  font-size:54px;
  line-height:.82;
  font-weight:800;
  letter-spacing:-2px;
  color:#fff;
}
.copy-heading{
  margin:0 0 8px;
  font-size:16px;
  line-height:1.15;
  font-weight:800;
  letter-spacing:0;
  color:#fff;
}
.copy-body{
  max-width:100%;
  color:#d7dde5;
  font-size:14px;
  line-height:1.68;
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}
.copy-body p{
  margin:0 0 17px;
  text-align:justify;
  text-justify:inter-word;
}
.copy-body li{
  margin:0 0 11px;
  padding-left:3px;
  text-align:justify;
  text-justify:inter-word;
}

@media(max-width:640px){
  .portfolio-header h1{
    font-size:46px;
    letter-spacing:-2px;
  }
  .portfolio-subtitle{
    font-size:14px;
    margin-top:18px;
  }
  .section-number{
    font-size:44px;
    margin-bottom:14px;
  }
}


/* v15 — typography pass only */
html,body{
  font-family:'Poppins',Arial,sans-serif;
}
.portfolio-header h1,
.copy-heading,
.copy-body,
.action-btn,
#phrase,
.zoom-label,
.check,
.groups-tab,
.visual-action-btn,
.instructions,
.compare-overlay,
.hover-tip,
.legend span{
  font-family:'Poppins',Arial,sans-serif;
}

.portfolio-header h1{
  font-weight:800;
}

.portfolio-subtitle{
  font-family:'Libre Baskerville',Georgia,serif;
  font-style:italic;
  font-weight:400;
}

.section-number{
  font-family:'Libre Baskerville',Georgia,serif;
  font-weight:700;
  letter-spacing:-1.5px;
}

.copy-heading{
  font-weight:700;
}

.copy-body{
  font-weight:400;
}

.action-btn,
.groups-tab,
.visual-action-btn .action-text,
.check{
  font-weight:500;
}

/* Keep technical metrics monospaced where they already were */
.mono{
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
}


/* v16 — title alignment pass only */
.portfolio-header{
  margin-bottom:54px;
}
.hero-title{
  width:100%;
  display:block;
  margin:0;
  padding:0;
  font-family:'Poppins',Arial,sans-serif;
  font-weight:800;
  text-transform:uppercase;
  color:#f2f4f8;
}
.hero-line{
  display:block;
  margin:0;
  padding:0;
  white-space:nowrap;
  letter-spacing:-0.055em;
}
.hero-line-small{
  width:50%;
  font-family:'Libre Baskerville',Georgia,serif;
  font-size:43px;
  line-height:1;
  font-weight:700;
  letter-spacing:-0.045em;
}
.hero-line-large{
  width:100%;
  font-family:'Poppins',Arial,sans-serif;
  font-size:96px;
  line-height:.88;
  font-weight:800;
  letter-spacing:-0.055em;
}
.portfolio-subtitle{
  width:100%;
  margin:34px 0 0;
  text-align:center;
  font-family:'Libre Baskerville',Georgia,serif;
  font-style:italic;
  font-weight:400;
  font-size:19px;
  line-height:1.2;
  text-transform:uppercase;
  color:#f0f3f6;
}

@media(max-width:640px){
  .portfolio-header{padding-top:42px}
  .hero-line-small{width:58%;font-size:7.4vw}
  .hero-line-large{font-size:13.6vw}
  .portfolio-subtitle{font-size:12px;margin-top:22px}
}


/* v23 — restore hero top air */
.portfolio-header{
  padding-top:66px;
}
@media(max-width:640px){
  .portfolio-header{
    padding-top:44px;
  }
}
/* v29 — LIGHT THEME OVERRIDE
   White background / black typography, preserving the existing composition. */
html,body{
  background:#ffffff !important;
  color:#111111 !important;
}

.hero-title,
.hero-line,
.section-number,
.copy-heading,
.copy-body strong,
.instructions strong,
.portfolio-subtitle,
.section-title{
  color:#111111 !important;
}

.copy-body,
.instructions,
.lead,
.zoom-label,
.arithmetic-label,
.check,
.legend span{
  color:#222222 !important;
}

.copy-body em{
  color:#222222 !important;
}

.copy-body blockquote,
.math-block,
.editorial-note{
  color:#1a1a1a !important;
  background:#f7f7f7 !important;
}

.copy-body blockquote{
  border-left-color:#777 !important;
}

.math-block{
  border-color:#9a9a9a !important;
}

.editorial-note{
  border-left-color:#888 !important;
}

#phrase,#arithmetic,#neighborWord{
  background:#ffffff !important;
  color:#111111 !important;
  border-color:#8a8a8a !important;
}

#phrase:focus,#arithmetic:focus,#neighborWord:focus{
  border-color:#222222 !important;
}

.action-btn{
  color:#111111 !important;
  border-color:#666666 !important;
  background:#ffffff !important;
}

.action-btn:hover{
  background:#f1f1f1 !important;
}

.clear-btn{
  color:#555555 !important;
  border-color:#888888 !important;
}

canvas{
  background:#f7f7f7 !important;
}

.hover-tip{
  background:rgba(13,16,21,.56) !important;
  border-color:rgba(166,180,196,.42) !important;
  color:rgba(220,228,237,.76) !important;
}

.hover-tip strong,
.hover-tip .hover-title{
  color:rgba(255,255,255,.94) !important;
}

.hover-tip .hover-line,
.hover-tip .hover-muted{
  color:rgba(220,228,237,.76) !important;
}

.compare-overlay,
.compare-overlay.selection-mode{
  color:rgba(20,20,20,.68) !important;
}

.compare-pair .pair-name,
.compare-overlay.selection-mode .pair-name{
  color:rgba(0,0,0,.82) !important;
}

.visual-action-btn,
.groups-tab{
  color:rgba(20,20,20,.72) !important;
}

.visual-action-btn:hover,
.groups-tab:hover{
  color:#000 !important;
}

.groups-panel{
  background:rgba(255,255,255,.82) !important;
}

.check input:checked ~ span:last-child{
  color:#111 !important;
}

.check:hover .control-icon{
  color:#333 !important;
}

.visual-wrap:fullscreen{
  background:#f7f7f7 !important;
}

/* v30 — LIGHT TYPOGRAPHIC / CONTROL REFINEMENT */

/* INPUT */
#phrase,
#arithmetic,
#neighborWord{
  height:38px !important;
  padding:0 44px 0 12px !important;
  font-family:'Lekton',ui-monospace,monospace !important;
  font-size:15px !important;
  color:#111111 !important;
  background:#ffffff !important;
}

#neighborWord{
  padding-right:12px !important;
}

#phrase::placeholder,
#arithmetic::placeholder,
#neighborWord::placeholder{
  color:#9a9a9a !important;
  opacity:1;
}

.input-grid{
  grid-template-columns:minmax(0,1fr) 130px 96px;
  gap:12px;
}

.action-btn{
  height:38px !important;
  background:#000000 !important;
  color:#ffffff !important;
  border:1px solid #000000 !important;
  font-family:'Poppins',Arial,sans-serif !important;
  font-size:13px !important;
  font-weight:700 !important;
}

.action-btn:hover{
  background:#222222 !important;
}

.clear-btn{
  background:#000000 !important;
  color:#ffffff !important;
  border-color:#000000 !important;
}

.random-btn{
  top:0 !important;
  right:2px !important;
  width:38px !important;
  height:38px !important;
  color:#000000 !important;
  border-color:transparent !important;
  background:transparent !important;
}

.random-btn:hover{
  color:#000000 !important;
  background:#f3f3f3 !important;
  border-color:transparent !important;
}

.random-btn svg{
  width:21px !important;
  height:21px !important;
}

.arithmetic-label{
  font-family:'Lekton',ui-monospace,monospace !important;
  color:#222222 !important;
}

/* NAVIGATION */
.check,
.zoom-label{
  font-family:'Lekton',ui-monospace,monospace !important;
  color:#111111 !important;
}

.control-icon,
.check:hover .control-icon,
.check input:checked + .control-icon{
  color:#000000 !important;
}

.check input:checked ~ span:last-child{
  color:#000000 !important;
}

#zoom{
  appearance:none;
  -webkit-appearance:none;
  height:18px;
  background:transparent;
  cursor:pointer;
}

#zoom::-webkit-slider-runnable-track{
  height:2px;
  background:#000000;
  border:0;
}

#zoom::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:18px;
  height:18px;
  margin-top:-8px;
  border-radius:50%;
  background:#ffffff;
  border:2px solid #000000;
}

#zoom::-moz-range-track{
  height:2px;
  background:#000000;
  border:0;
}

#zoom::-moz-range-thumb{
  width:16px;
  height:16px;
  border-radius:50%;
  background:#ffffff;
  border:2px solid #000000;
}

#zoom::-moz-range-progress{
  height:2px;
  background:#000000;
}

/* VISUALIZATION INFORMATION */
.compare-overlay,
.compare-overlay.selection-mode,
.arithmetic-overlay,
.hover-tip,
.groups-tab,
.legend span,
.visual-action-btn,
.visual-action-btn .action-text{
  font-family:'Lekton',ui-monospace,monospace !important;
}

.compare-overlay,
.compare-overlay.selection-mode{
  color:rgba(0,0,0,.68) !important;
}

.compare-pair .pair-name,
.compare-overlay.selection-mode .pair-name{
  color:rgba(0,0,0,.86) !important;
}

.hover-tip{
  color:#111111 !important;
}

.hover-tip strong{
  color:#000000 !important;
}

.groups-tab,
.visual-action-btn{
  color:#000000 !important;
}

.legend span{
  color:#111111 !important;
}

/* v31 — INPUT LABELS / SPACING / NAV CENTERING */

.input-label,
.arithmetic-label{
  font-family:'Lekton',ui-monospace,monospace !important;
  font-size:12px !important;
  letter-spacing:.06em;
  color:#111111 !important;
}

.input-label{
  margin:0 0 8px;
}

.arithmetic-label{
  margin:10px 0 8px !important;
}

/* Reduce the vertical gap between the two input systems */
.visualization-stage .input-grid + .arithmetic-label{
  margin-top:10px !important;
}

/* Center the toggle column more clearly between zoom block and right-side edge */
.nav-grid{
  grid-template-columns:360px 1fr !important;
  gap:24px !important;
}

.toggle-grid{
  justify-self:center;
  width:max-content;
  grid-template-columns:repeat(2,minmax(190px,1fr));
}

@media(max-width:980px){
  .toggle-grid{
    justify-self:start;
    width:100%;
  }
}

/* The block above forces a fixed 360px + 1fr layout (with !important) and a
   2-column toggle grid unconditionally -- neither collapses to a single
   column on narrow screens, which was pushing the second column (all the
   checkboxes) off the right edge of the viewport on mobile, leaving a
   large blank gap. Restore the single-column collapse below this point in
   the cascade so it actually wins. */
@media(max-width:640px){
  .nav-grid{
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .toggle-grid{
    grid-template-columns:1fr !important;
    justify-self:stretch !important;
    width:100% !important;
  }
}


/* v33 — unified hover / selection micro-tag */
.hover-tip{
  min-width:0 !important;
  max-width:260px !important;
  padding:0 !important;
  background:rgba(13,16,21,.56) !important;
  border:1px dashed rgba(166,180,196,.42) !important;
  color:rgba(220,228,237,.76) !important;
  font-family:'Lekton',ui-monospace,monospace !important;
  font-size:10px !important;
  line-height:1.2 !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
.hover-tip .hover-card-bar{
  height:4px !important;
  width:100% !important;
  background:linear-gradient(90deg,var(--bar-a),var(--bar-b)) !important;
}
.hover-tip .hover-title{
  margin:0 !important;
  padding:6px 7px 0 !important;
  color:rgba(255,255,255,.94) !important;
  font-family:'Lekton',ui-monospace,monospace !important;
  font-size:10px !important;
  line-height:1.2 !important;
  font-weight:700 !important;
}
.hover-tip .hover-line,
.hover-tip .hover-muted{
  margin:0 !important;
  padding:2px 7px 0 !important;
  color:rgba(220,228,237,.76) !important;
  font-family:'Lekton',ui-monospace,monospace !important;
  font-size:10px !important;
  line-height:1.2 !important;
}
.hover-tip .hover-values{padding-bottom:6px !important;}
.hover-tip .mono{
  font-size:10px !important;
}


/* v33 — exact tag normalization */
.hover-tip{
  width:auto !important;
  min-width:0 !important;
  max-width:190px !important;
  padding:0 !important;
  font-size:9px !important;
  line-height:1.18 !important;
}
.hover-tip .hover-title,
.hover-tip .hover-line,
.hover-tip .hover-muted,
.hover-tip .mono{
  font-size:9px !important;
  line-height:1.18 !important;
  white-space:nowrap !important;
}
.hover-tip .hover-title{
  padding:6px 7px 0 !important;
}
.hover-tip .hover-line,
.hover-tip .hover-muted{
  padding:2px 7px 0 !important;
}
.hover-tip .hover-values{padding-bottom:6px !important;}


/* v33 — two-line compact tag format */
.hover-tip{
  width:auto !important;
  min-width:0 !important;
  max-width:176px !important;
  font-size:7.5px !important;
  line-height:1.12 !important;
}
.hover-tip .hover-title,
.hover-tip .hover-line,
.hover-tip .hover-muted,
.hover-tip .mono{
  font-size:7.5px !important;
  line-height:1.12 !important;
  white-space:nowrap !important;
}
.hover-tip .hover-title{
  padding:5px 7px 0 !important;
}
.hover-tip .hover-line{
  padding:2px 7px 0 !important;
}
.hover-tip .hover-values{
  padding-bottom:5px !important;
}


/* v33 — compact exact tag format */
.hover-tip{
  max-width:164px !important;
  font-size:7px !important;
  line-height:1.08 !important;
}
.hover-tip .hover-title,
.hover-tip .hover-line,
.hover-tip .hover-muted,
.hover-tip .mono{
  font-size:7px !important;
  line-height:1.08 !important;
  white-space:nowrap !important;
  letter-spacing:0 !important;
}
.hover-tip .hover-title{padding:4px 6px 0 !important;}
.hover-tip .hover-line{padding:2px 6px 0 !important;}
.hover-tip .hover-values{padding-bottom:4px !important;}

/* v34 — semantic groups palette panel (narrower refinement) */
.groups-panel{
  width:140px !important;
  max-width:24vw !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  backdrop-filter:none !important;
  box-shadow:none !important;
}
.legend{
  display:block !important;
  width:100%;
  padding:0;
  margin:0;
}
.semantic-family{
  display:block;
  margin:0 0 3px 0;
  padding:0;
  border:0;
  border-radius:0;
  overflow:hidden;
  background:transparent;
}
.semantic-family:last-child{margin-bottom:0;}
.semantic-family-head{
  min-height:16px;
  padding:2px 4px 1px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  background:#111317;
  color:#ffffff;
  border:0;
  border-radius:0;
  font-family:'Lekton',ui-monospace,monospace;
  font-size:6.3px;
  font-weight:700;
  letter-spacing:.02em;
  line-height:1;
  text-transform:uppercase;
}
.semantic-family-head span{
  color:#ffffff !important;
  white-space:nowrap;
}
.semantic-family-rows{
  display:block;
  margin:0;
  padding:0;
}
.semantic-row{
  min-height:13px;
  margin:0;
  padding:1px 4px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
  background:var(--semantic-bg);
  color:#ffffff !important;
  border:0;
  border-radius:0;
  font-family:'Lekton',ui-monospace,monospace;
  font-size:6.3px;
  line-height:1;
}
.semantic-name{
  font-weight:700;
  text-transform:lowercase;
  white-space:nowrap;
  color:#ffffff !important;
}

.semantic-count{
  margin-left:auto;
  font-size:6px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  color:#ffffff !important;
  opacity:1;
}
@media(max-width:640px){
  .groups-panel{
    width:min(130px,calc(100vw - 28px)) !important;
    max-width:none !important;
  }
  .semantic-family-head{min-height:15px;font-size:5.9px;}
  .semantic-row{min-height:12px;font-size:5.9px;}
  .semantic-count{font-size:5.6px;}
}

/* v37 — TITLE FX / micro-parallax echo
   The colored echo is generated from each real title line itself, so the
   existing fit-to-width logic remains the single source of typography. */
.hero-title#heroParallax{
  position:relative;
  isolation:isolate;
  --echo-x:0px;
  --echo-y:0px;
}
.hero-title#heroParallax .hero-line{
  position:relative;
  z-index:1;
}
.hero-title#heroParallax .hero-line::before{
  content:attr(data-echo);
  position:absolute;
  inset:0 auto auto 0;
  z-index:-1;
  display:block;
  width:100%;
  height:100%;
  font:inherit;
  font-size:inherit;
  font-weight:inherit;
  line-height:inherit;
  letter-spacing:inherit;
  white-space:inherit;
  text-transform:inherit;
  pointer-events:none;
  color:transparent !important;
  -webkit-text-fill-color:transparent !important;
  background:linear-gradient(90deg,
    #0B6F7A 0%,
    #8E0F2C 15%,
    #E85D62 28%,
    #E95C0C 42%,
    #1C9B6C 57%,
    #3149A8 72%,
    #8B78DD 86%,
    #D6B800 100%
  );
  -webkit-background-clip:text;
  background-clip:text;
  transform:translate(var(--echo-x),var(--echo-y));
  opacity:.88;
  will-change:transform;
}
@media (prefers-reduced-motion:reduce){
  .hero-title#heroParallax .hero-line::before{transform:none !important;}
}


/* v38 — PARALLAX
   Background is the true-3D SVG grid room (see spatial-grid-svg / grid-plane
   rules in index.html's inline <style>). This file only keeps the header
   stacking context so the title/subtitle paint above it. The old flat
   six-plane .depth-dots system (dead code, no longer in the markup) and its
   conflicting .hero-depth-field absolute-positioning rules were removed --
   they were fighting the inline position:fixed rule and causing the field
   to render squashed into a ~450px box instead of the full viewport. */
.portfolio-header{
  position:relative;
  isolation:isolate;
  overflow:visible;
}
.hero-title,
.portfolio-subtitle{
  position:relative;
  z-index:2;
}

/* v47 — Semantic Neighbors random control */
#neighborWord{padding-right:44px !important;}

/* v50 — navigation toolbox / fullscreen controls */
.toolbox-btn{display:none!important}
.fullscreen-toolbox{display:none}
.visual-wrap:fullscreen .toolbox-btn{display:flex!important}
.visual-wrap:fullscreen .fullscreen-toolbox{
  position:absolute;right:18px;bottom:58px;z-index:12;
  width:250px;padding:10px;background:rgba(255,255,255,.94);
  border:1px solid rgba(0,0,0,.18);font-family:'Lekton',ui-monospace,monospace;
  opacity:0;visibility:hidden;transform:translateY(6px);
  transition:opacity 120ms ease,transform 120ms ease,visibility 0s linear 120ms;
}
.visual-wrap:fullscreen .fullscreen-toolbox.is-open{
  opacity:1;visibility:visible;transform:translateY(0);
  transition:opacity 140ms ease,transform 140ms ease,visibility 0s;
}
.toolbox-title{font-size:9px;font-weight:700;letter-spacing:.06em;margin:0 0 9px;color:#111}
.toolbox-zoom{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;margin:0 0 8px}
.toolbox-zoom span{font-size:8px;color:#111}
#toolboxZoom{width:100%;margin:0;appearance:none;-webkit-appearance:none;height:16px;background:transparent;cursor:pointer}
#toolboxZoom::-webkit-slider-runnable-track{height:2px;background:#000;border:0}
#toolboxZoom::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;margin-top:-6px;border-radius:50%;background:#fff;border:2px solid #000}
#toolboxZoom::-moz-range-track{height:2px;background:#000;border:0}
#toolboxZoom::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid #000}
.toolbox-toggle{
  width:100%;height:26px;padding:0 2px;border:0;border-top:1px solid rgba(0,0,0,.10);
  background:transparent;color:#666;display:flex;align-items:center;justify-content:space-between;
  font-family:'Lekton',ui-monospace,monospace;font-size:8px;letter-spacing:.025em;cursor:pointer
}
.toolbox-toggle:hover{background:#f4f4f4;color:#000}
.toolbox-toggle.is-on{color:#000}
.toolbox-state{font-weight:700;min-width:22px;text-align:right}

/* Grid belongs with the persistent viewer visibility controls below the canvas. */
.grid-check{grid-column:2}

@media(max-width:640px){
  .visual-wrap:fullscreen .fullscreen-toolbox{right:12px;bottom:54px;width:min(240px,calc(100vw - 24px))}
  .visual-wrap:fullscreen .visual-actions{right:12px;bottom:12px;gap:10px}
  .grid-check{grid-column:auto}
}


/* v51 — navigation fixes */
/* Keep the third row aligned: LABELS on the left, GRID on the right. */
.grid-check{grid-column:auto!important}

/* Toolbox exists only in fullscreen, but must remain in layout so its open state can render. */
.visual-wrap:fullscreen .fullscreen-toolbox{display:block!important}

/* Zoom is a persistent fullscreen camera control, separate from the show/hide toolbox. */
.fullscreen-zoom-control{display:none}
.visual-wrap:fullscreen .fullscreen-zoom-control{
  position:absolute;left:18px;bottom:18px;z-index:12;
  width:min(360px,38vw);display:grid;grid-template-columns:minmax(120px,1fr) auto;
  gap:10px;align-items:center;padding:0;
  font-family:'Lekton',ui-monospace,monospace;color:#111;
}
.fullscreen-zoom-control span{font-size:9px;letter-spacing:.035em;white-space:nowrap}
#fullscreenZoom{
  width:100%;margin:0;appearance:none;-webkit-appearance:none;
  height:18px;background:transparent;cursor:pointer;
}
#fullscreenZoom::-webkit-slider-runnable-track{height:2px;background:#000;border:0}
#fullscreenZoom::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:18px;height:18px;margin-top:-8px;
  border-radius:50%;background:#fff;border:2px solid #000;
}
#fullscreenZoom::-moz-range-track{height:2px;background:#000;border:0}
#fullscreenZoom::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:#fff;border:2px solid #000}

@media(max-width:640px){
  .visual-wrap:fullscreen .fullscreen-zoom-control{
    left:12px;bottom:12px;width:min(280px,48vw);
  }
}


/* v52 — fullscreen navigation layout */
/* Semantic Groups remains independent at bottom-left; it is not part of Toolbox. */

/* Fullscreen viewer actions become a vertical stack on the right:
   TOOLBOX → RESET → FOCUS → EXIT FULL SCREEN. */
.visual-wrap:fullscreen .visual-actions{
  right:18px !important;
  bottom:18px !important;
  top:auto !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-end !important;
  gap:10px !important;
}
.visual-wrap:fullscreen .toolbox-btn{order:1 !important}
.visual-wrap:fullscreen .reset-btn{order:2 !important}
.visual-wrap:fullscreen .focus-content-btn{order:3 !important}
.visual-wrap:fullscreen .fullscreen-btn{order:4 !important}

/* Toolbox opens to the left of the vertical action stack, aligned near its top. */
.visual-wrap:fullscreen .fullscreen-toolbox{
  right:160px !important;
  bottom:118px !important;
}

/* Fullscreen zoom lives centered along the bottom edge. */
.visual-wrap:fullscreen .fullscreen-zoom-control{
  left:50% !important;
  right:auto !important;
  bottom:18px !important;
  transform:translateX(-50%) !important;
  width:min(440px,42vw) !important;
}

@media(max-width:640px){
  .visual-wrap:fullscreen .visual-actions{
    right:12px !important;
    bottom:12px !important;
    gap:8px !important;
  }
  .visual-wrap:fullscreen .fullscreen-toolbox{
    right:128px !important;
    bottom:104px !important;
    width:min(230px,calc(100vw - 152px)) !important;
  }
  .visual-wrap:fullscreen .fullscreen-zoom-control{
    left:50% !important;
    bottom:12px !important;
    width:min(260px,52vw) !important;
  }
}

/* v53 — Fullscreen-only selection history.
   A compact, scrollable trail of explicit point selections. */
.fullscreen-selection-history{display:none}
.visual-wrap:fullscreen .fullscreen-selection-history{
  position:absolute;
  left:18px;
  top:50%;
  transform:translateY(-50%);
  z-index:9;
  display:flex;
  flex-direction:column;
  width:150px;
  max-height:62vh;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(0,0,0,.16);
  backdrop-filter:blur(4px);
  font-family:'Lekton',ui-monospace,monospace;
  color:#111;
}
.selection-history-head{
  flex:0 0 auto;
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:6px 7px 5px;
  border-bottom:1px solid rgba(0,0,0,.16);
  font-size:8px;
  font-weight:700;
  letter-spacing:.04em;
}
.selection-history-list{
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#777 transparent;
}
.selection-history-item{
  width:100%;
  min-height:24px;
  padding:4px 7px;
  display:grid;
  grid-template-columns:7px 20px minmax(0,1fr);
  gap:5px;
  align-items:center;
  border:0;
  border-bottom:1px solid rgba(0,0,0,.09);
  border-radius:0;
  background:transparent;
  color:#111;
  cursor:pointer;
  text-align:left;
  font-family:'Lekton',ui-monospace,monospace;
  font-size:9px;
  line-height:1;
}
.selection-history-item:last-child{border-bottom:0}
.selection-history-item:hover{background:rgba(0,0,0,.055)}
.selection-history-item.is-a,
.selection-history-item.is-b{background:rgba(0,0,0,.085)}
.selection-history-item.is-a .selection-history-word::after{content:'  A';font-weight:700}
.selection-history-item.is-b .selection-history-word::after{content:'  B';font-weight:700}
.selection-history-dot{width:7px;height:7px;border-radius:50%;display:block}
.selection-history-number{color:#777;font-variant-numeric:tabular-nums}
.selection-history-word{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}

@media(max-width:640px){
  .visual-wrap:fullscreen .fullscreen-selection-history{
    left:10px;
    width:116px;
    max-height:56vh;
  }
  .selection-history-head{font-size:7px;padding:5px 6px 4px}
  .selection-history-item{
    min-height:22px;
    padding:4px 6px;
    grid-template-columns:6px 16px minmax(0,1fr);
    gap:4px;
    font-size:8px;
  }
  .selection-history-dot{width:6px;height:6px}
}

/* v54 — fullscreen word panel / eye toolbox / semantic group refinement */

/* WORD PANEL: transparent, editorial, no card chrome. */
.visual-wrap:fullscreen .fullscreen-selection-history{
  background:transparent !important;
  border:0 !important;
  backdrop-filter:none !important;
  box-shadow:none !important;
  width:158px !important;
  color:#767676 !important;
}
.selection-history-head{
  padding:0 0 7px !important;
  border:0 !important;
  color:#777 !important;
  font-weight:400 !important;
  letter-spacing:.045em !important;
}
.selection-history-list{padding:0 !important;}
.selection-history-item{
  min-height:19px !important;
  padding:2px 0 !important;
  grid-template-columns:7px 20px minmax(0,1fr) !important;
  gap:5px !important;
  border:0 !important;
  background:transparent !important;
  color:#777 !important;
  font-size:8.5px !important;
}
.selection-history-item:hover{background:transparent !important;color:#111 !important;}
.selection-history-item.is-a,
.selection-history-item.is-b{background:transparent !important;}
.selection-history-item.is-chain-word .selection-history-word{color:#111 !important;font-weight:700 !important;}
.selection-history-item.is-neighbor-word .selection-history-word,
.selection-history-item.is-other-word .selection-history-word{color:#8b8b8b !important;font-weight:400 !important;}
.selection-history-number{color:#aaa !important;}
.selection-history-dot{width:6px !important;height:6px !important;}
.selection-history-item.is-a .selection-history-word::after,
.selection-history-item.is-b .selection-history-word::after{color:#777;font-weight:700;}

/* TOOLBOX: eye trigger opens a transparent vertical viewer menu. */
.visual-wrap:fullscreen .fullscreen-toolbox{
  right:18px !important;
  bottom:150px !important;
  width:184px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}
.toolbox-title{display:none !important;}
.toolbox-toggle{
  width:100% !important;
  min-height:26px !important;
  display:grid !important;
  grid-template-columns:18px minmax(0,1fr) 26px !important;
  gap:7px !important;
  align-items:center !important;
  padding:2px 0 !important;
  border:0 !important;
  background:transparent !important;
  color:#777 !important;
  text-align:left !important;
  font-family:'Lekton',ui-monospace,monospace !important;
  font-size:8.5px !important;
  letter-spacing:.02em !important;
}
.toolbox-toggle:hover{background:transparent !important;color:#000 !important;}
.toolbox-toggle.is-on{color:#111 !important;}
.toolbox-item-icon{width:16px;height:16px;display:grid;place-items:center;}
.toolbox-item-icon svg{width:16px;height:16px;display:block;}
.toolbox-state{font-size:7.5px !important;color:#999 !important;font-weight:400 !important;text-align:right !important;}
.toolbox-toggle.is-on .toolbox-state{color:#111 !important;}

/* SEMANTIC GROUPS: family names float on the canvas; only categories are bars. */
.semantic-family{
  margin:0 0 5px 0 !important;
  overflow:visible !important;
}
.semantic-family-head{
  min-height:0 !important;
  padding:0 2px 2px !important;
  background:transparent !important;
  color:#111 !important;
  font-size:6.3px !important;
  font-weight:700 !important;
  letter-spacing:.035em !important;
}
.semantic-family-head span{color:#111 !important;}
.semantic-row{
  min-height:13px !important;
  padding:1px 4px !important;
  color:#fff !important;
}
.semantic-name,
.semantic-count{color:#fff !important;}

@media(max-width:640px){
  .visual-wrap:fullscreen .fullscreen-selection-history{width:120px !important;}
  .selection-history-item{font-size:7.5px !important;grid-template-columns:6px 16px minmax(0,1fr) !important;}
  .visual-wrap:fullscreen .fullscreen-toolbox{right:10px !important;bottom:138px !important;width:158px !important;}
  .toolbox-toggle{font-size:7.5px !important;grid-template-columns:16px minmax(0,1fr) 22px !important;}
}
\n\n/* v55 — verified fullscreen navigation corrections */\n\n/* TOOLBOX: same transparent control language as the navigation panel.\n   The menu lives ABOVE the trigger, never over it. */\n.visual-wrap:fullscreen .fullscreen-toolbox{\n  right:18px !important;\n  bottom:188px !important;\n  width:196px !important;\n  padding:0 !important;\n  border:0 !important;\n  background:transparent !important;\n  box-shadow:none !important;\n  backdrop-filter:none !important;\n}\n.visual-wrap:fullscreen .fullscreen-toolbox.is-open{\n  display:flex !important;\n  flex-direction:column !important;\n  gap:5px !important;\n}\n.visual-wrap:fullscreen .toolbox-toggle{\n  min-height:26px !important;\n  grid-template-columns:18px minmax(0,1fr) 28px !important;\n  padding:2px 0 !important;\n  border:0 !important;\n  outline:0 !important;\n  box-shadow:none !important;\n}\n.visual-wrap:fullscreen .toolbox-toggle:focus,\n.visual-wrap:fullscreen .toolbox-toggle:focus-visible{\n  outline:0 !important;\n  box-shadow:none !important;\n}\n\n/* SEMANTIC GROUPS: force white lettering inside colored rows.\n   .legend span previously had a more specific !important rule, which is why\n   the intended white text was not actually winning in the cascade. */\n.legend .semantic-row,\n.legend .semantic-row .semantic-name,\n.legend .semantic-row .semantic-count,\n.groups-panel .semantic-row,\n.groups-panel .semantic-row .semantic-name,\n.groups-panel .semantic-row .semantic-count{\n  color:#ffffff !important;\n}\n\n/* WORD PANEL: current Word Vector terms black; neighbor/exploration terms gray. */\n.visual-wrap:fullscreen .selection-history-item.is-chain-word .selection-history-word{\n  color:#111111 !important;\n  font-weight:700 !important;\n}\n.visual-wrap:fullscreen .selection-history-item.is-neighbor-word .selection-history-word,\n.visual-wrap:fullscreen .selection-history-item.is-other-word .selection-history-word{\n  color:#8b8b8b !important;\n  font-weight:400 !important;\n}\n\n@media(max-width:640px){\n  .visual-wrap:fullscreen .fullscreen-toolbox{\n    right:12px !important;\n    bottom:166px !important;\n    width:170px !important;\n  }\n}\n
/* v56 — fullscreen toolbox: true popover + Auto Rotation */
/* Hidden unless explicitly opened. The position is calculated from the
   TOOLBOX trigger so the menu always sits above it and can never overlap it. */
.visual-wrap:fullscreen .fullscreen-toolbox{
  display:none !important;
  position:absolute !important;
  width:196px !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  opacity:1 !important;
  visibility:visible !important;
  transform:none !important;
  z-index:20 !important;
}
.visual-wrap:fullscreen .fullscreen-toolbox.is-open{
  display:flex !important;
  flex-direction:column !important;
  gap:5px !important;
}
.visual-wrap:fullscreen .toolbox-toggle{
  width:100% !important;
  min-height:26px !important;
  display:grid !important;
  grid-template-columns:18px minmax(0,1fr) 28px !important;
  gap:7px !important;
  align-items:center !important;
  padding:2px 0 !important;
  margin:0 !important;
  border:0 !important;
  outline:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#777 !important;
  text-align:left !important;
}
.visual-wrap:fullscreen .toolbox-toggle.is-on{color:#111 !important;}
.visual-wrap:fullscreen .toolbox-toggle:hover{color:#000 !important;background:transparent !important;}
.visual-wrap:fullscreen .toolbox-state{font-size:7.5px !important;color:#999 !important;font-weight:400 !important;}
.visual-wrap:fullscreen .toolbox-toggle.is-on .toolbox-state{color:#111 !important;}

/* v57 — preserve the original Word Vector chain during neighbor exploration
   and add the orphan-point visibility control to normal navigation + fullscreen toolbox. */
.orphan-check{grid-column:1;}
@media(max-width:640px){.orphan-check{grid-column:auto;}}

/* v58 — navigation re-layout */
.nav-grid.nav-grid-three{
  grid-template-columns:180px minmax(0,1fr) !important;
  gap:22px !important;
  align-items:start !important;
}
.nav-grid.nav-grid-three .zoom-block{
  width:180px !important;
}
.toggle-grid.toggle-grid-three{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:10px 18px !important;
  width:100% !important;
  justify-self:stretch !important;
  align-items:start !important;
}
.toggle-grid-three .toggle-column{
  display:flex !important;
  flex-direction:column !important;
  gap:9px !important;
  min-width:0 !important;
}
.toggle-grid-three .check{
  min-width:0 !important;
  white-space:nowrap !important;
}
.orphan-check{grid-column:auto !important;}

@media(max-width:980px){
  .nav-grid.nav-grid-three{
    grid-template-columns:150px minmax(0,1fr) !important;
  }
  .nav-grid.nav-grid-three .zoom-block{width:150px !important;}
  .toggle-grid.toggle-grid-three{gap:10px 12px !important;}
}
@media(max-width:640px){
  .nav-grid.nav-grid-three{
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .nav-grid.nav-grid-three .zoom-block{width:50% !important;min-width:150px !important;}
  .toggle-grid.toggle-grid-three{
    grid-template-columns:1fr !important;
  }
}

/* v60 — Toolbox close UX */
.visual-wrap:fullscreen .toolbox-btn{
  min-width:84px !important;
  min-height:32px !important;
  justify-content:flex-start !important;
  cursor:pointer !important;
}
.visual-wrap:fullscreen .fullscreen-toolbox{
  pointer-events:auto !important;
}

/* v61 — Toolbox close architecture
   The menu and trigger are one structural unit. The popover is anchored above
   the trigger itself, so no JS coordinate math or overlap is involved. */
.visual-wrap:fullscreen .visual-actions{
  overflow:visible !important;
}
.visual-wrap:fullscreen .toolbox-cluster{
  order:1 !important;
  position:relative !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-end !important;
  overflow:visible !important;
  z-index:40 !important;
}
.visual-wrap:fullscreen .toolbox-cluster .toolbox-btn{
  display:flex !important;
  order:initial !important;
  position:relative !important;
  z-index:42 !important;
  min-width:0 !important;
  min-height:30px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  justify-content:flex-end !important;
  pointer-events:auto !important;
}
.visual-wrap:fullscreen .toolbox-cluster .toolbox-btn.is-open{
  color:#000 !important;
}
.visual-wrap:fullscreen .toolbox-cluster .fullscreen-toolbox{
  display:none !important;
  position:absolute !important;
  right:0 !important;
  bottom:calc(100% + 14px) !important;
  top:auto !important;
  width:196px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  transform:none !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:none !important;
  z-index:41 !important;
}
.visual-wrap:fullscreen .toolbox-cluster .fullscreen-toolbox.is-open{
  display:flex !important;
  flex-direction:column !important;
  gap:5px !important;
  pointer-events:auto !important;
}
.visual-wrap:fullscreen .toolbox-cluster .toolbox-toggle{
  pointer-events:auto !important;
}
/* The remaining fullscreen controls keep their established stack order. */
.visual-wrap:fullscreen .reset-btn{order:2 !important}
.visual-wrap:fullscreen .focus-content-btn{order:3 !important}
.visual-wrap:fullscreen .fullscreen-btn{order:4 !important}

@media(max-width:640px){
  .visual-wrap:fullscreen .toolbox-cluster .fullscreen-toolbox{
    width:170px !important;
    right:0 !important;
    bottom:calc(100% + 10px) !important;
  }
}


/* v63 — Stable primary information + additive A/B comparison */
.info-stack{
  position:absolute;
  left:14px;
  top:12px;
  z-index:6;
  max-width:76%;
  pointer-events:none;
  font-family:'Lekton',ui-monospace,monospace;
  font-size:8.5px;
  line-height:1.20;
  color:rgba(0,0,0,.68);
}
.info-stack .compare-overlay,
.info-stack .arithmetic-overlay,
.info-stack .pair-overlay{
  position:static !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  max-width:none !important;
  color:inherit !important;
}
.info-stack .compare-overlay:empty,
.info-stack .arithmetic-overlay:empty,
.info-stack .pair-overlay:empty{display:none !important;}
.info-stack .pair-overlay:not(:empty){
  margin-top:8px;
  padding-top:6px;
  border-top:1px dashed rgba(0,0,0,.24);
}
.info-stack .pair-overlay .pair-name{color:rgba(0,0,0,.88) !important;}
.info-stack .primary-neighbor-info .pair-name{font-weight:700;color:rgba(0,0,0,.88) !important;}
.info-stack .neighbor-list{margin-top:2px;color:rgba(0,0,0,.58);}
.visual-wrap:fullscreen .info-stack{left:18px;top:16px;}
@media(max-width:640px){
  .info-stack{max-width:92%;font-size:8px;}
}


/* v65 — navigation architecture: two group containers, controls in three equal columns */
.nav-grid.nav-grid-three{
  display:grid !important;
  grid-template-columns:minmax(0, 38%) minmax(0, 1fr) !important;
  column-gap:64px !important;
  align-items:start !important;
  width:100% !important;
}

/* Group 1: Zoom occupies its own complete container */
.nav-grid.nav-grid-three .zoom-block{
  width:100% !important;
  min-width:0 !important;
  padding-top:6px !important;
}
.nav-grid.nav-grid-three .zoom-block #zoom{
  width:100% !important;
}

/* Group 2: one container, internally divided into three equal columns */
.toggle-grid.toggle-grid-three{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  column-gap:34px !important;
  row-gap:0 !important;
  width:100% !important;
  min-width:0 !important;
  justify-self:stretch !important;
  justify-content:stretch !important;
  align-items:start !important;
}

.toggle-grid-three .toggle-column{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:12px !important;
  width:100% !important;
  min-width:0 !important;
}

.toggle-grid-three .check{
  width:100% !important;
  min-width:0 !important;
  justify-content:flex-start !important;
  white-space:nowrap !important;
}

/* Keep the whole controls group flush to the right edge of the navigation measure */
.toggle-grid.toggle-grid-three .toggle-column:last-child{
  justify-self:stretch !important;
}

@media(max-width:980px){
  .nav-grid.nav-grid-three{
    grid-template-columns:minmax(150px, 32%) minmax(0, 1fr) !important;
    column-gap:36px !important;
  }
  .toggle-grid.toggle-grid-three{
    column-gap:18px !important;
  }
}

@media(max-width:640px){
  .nav-grid.nav-grid-three{
    grid-template-columns:1fr !important;
    row-gap:18px !important;
  }
  .nav-grid.nav-grid-three .zoom-block{
    width:55% !important;
    min-width:150px !important;
    padding-top:0 !important;
  }
  .toggle-grid.toggle-grid-three{
    grid-template-columns:1fr !important;
    row-gap:10px !important;
    width:100% !important;
  }
}
