/* FlyScope visual system for the explorer, specimen, whole-CNS and account pages.
   Loaded after each page's own stylesheet; mirrors the homepage: ink, paper and lime,
   square controls with white rules, uppercase bold panel titles, Inter Tight throughout. */
:root{
  --bg:#0e100f;--panel:#121413;--surface:#1b1e1c;--line:#343833;--muted:#a3a6a0;--text:#f4f4ef;--accent:#d8fa4b;
  --ink:#0e100f;--lime:#d8fa4b;--lavender:#ada4e4;--rule:rgba(244,244,239,.38);--rule-strong:rgba(244,244,239,.62);
  --fy-font:"Inter Tight","PingFang SC","Hiragino Sans GB","Noto Sans SC","Microsoft YaHei",system-ui,sans-serif;
  font-family:var(--fy-font);font-size:14px;
}
body{font-family:var(--fy-font);-webkit-font-smoothing:antialiased}
body *:not(svg):not(svg *){font-family:inherit!important}
*:not(i,.dot,.swatch,.live-dot,.spinner,.whole-progress){border-radius:0!important}
::selection{background:var(--lime);color:var(--ink)}
button:hover{background:rgba(216,250,75,.08)}
input,select{background:var(--ink);border:1.5px solid var(--rule-strong);color:var(--text);font-size:13px}
input:focus,select:focus{border-color:var(--lime);outline:none}
input[type=checkbox],input[type=radio],input[type=range]{accent-color:var(--lime)}
input[type=checkbox]{width:15px!important;height:15px!important}
dd,small,kbd,.count,strong,.stats,.paper-counts{font-variant-numeric:tabular-nums}

/* Header: wordmark, actions as navigation, square outlined controls. */
/* Same header as the homepage: wordmark | Connectome Explorer, an inset white rule,
   navigation with a lime current item, outlined primary action. */
.header{position:relative;height:64px;padding:0 clamp(16px,2.4vw,40px);gap:clamp(14px,2vw,32px);background:var(--bg);border-bottom:0}
.header::after{content:"";position:absolute;left:clamp(16px,2.4vw,40px);right:clamp(16px,2.4vw,40px);bottom:0;height:1px;background:rgba(244,244,239,.85)}
.brand{gap:0;align-items:center}
.brand svg{display:none}
.brand strong{font-size:28px;font-weight:750;letter-spacing:-.035em;line-height:1}
.header .brand>span{display:flex;align-items:center;gap:clamp(14px,1.4vw,22px);margin-left:clamp(14px,1.4vw,22px);font-size:17px;font-weight:500;letter-spacing:-.01em;color:var(--text)}
.header .brand>span::before{content:"";width:1px;height:32px;background:rgba(244,244,239,.85)}
body.cns-overview #whole-home,body:has(#tab-paper[aria-selected=true]) #paper-home{background:var(--lime);color:var(--ink)}
.header .dataset{display:none}
.header-actions{gap:clamp(4px,.9vw,16px)}
.header-actions button{font-size:15px;font-weight:500;letter-spacing:-.01em;padding:.38em .62em;color:var(--text)}
.header-actions button:hover{background:var(--lime);color:var(--ink)}
.header-actions #paper-home,.header-actions #findings-home{color:var(--text)}
.header-actions .outline,.header-actions #share{border:1.5px solid var(--text);font-weight:650;padding:.42em .75em}
.header-actions .outline:hover{background:var(--text);color:var(--ink)}
.header-actions select,.header #specimen-switch,.header #language{width:auto;min-width:0;font-size:14px;font-weight:600;padding:8px 10px;border:1.5px solid var(--rule-strong);background:var(--ink);color:var(--text);margin:0}
.header #specimen-switch{min-width:170px}
.header #language{border-color:transparent}
.header #language:hover{border-color:var(--rule-strong)}

/* Panels */
.library,.inspector{background:var(--panel)}
.library{border-right:1px solid var(--rule)}
.inspector{border-left:1px solid var(--rule)}
.eyebrow,.section-top .eyebrow,.inspector-top .eyebrow,.viewport-head .eyebrow,.atlas-heading .eyebrow{font-size:19px;font-weight:750;letter-spacing:.01em;color:var(--text);text-transform:uppercase;line-height:1.1}
.section-top h1,.atlas-heading h1{font-size:15px;font-weight:500;color:var(--muted);margin:8px 0 4px;letter-spacing:-.01em}
.section-top p,.atlas-heading p{font-size:12px;line-height:1.5}
p{line-height:1.55}
.library-switch{margin:16px 18px 4px;padding:0;gap:0;min-height:40px;border:1.5px solid var(--rule-strong)}
.library-switch button{flex:1;font-size:14px;font-weight:650;color:var(--text);padding:9px 6px;border-bottom:0}
.library-switch button+button{border-left:1.5px solid var(--rule-strong)}
.library-switch button[aria-pressed=true]{background:var(--lime);color:var(--ink)}
.search{border:1.5px solid var(--rule-strong);background:transparent;margin:0 18px}
.search:focus-within{border-color:var(--lime)}
.search input{font-size:14px;padding:12px 0;border:0}
.search svg{stroke:var(--text);width:18px;height:18px}
.filters select{font-size:13px;padding:9px 10px}
.list-heading{font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:650;border-top:1px solid var(--rule)}
.neuron-row{min-height:56px;padding:11px 20px;border-bottom:1px solid rgba(244,244,239,.09)}
.neuron-row:hover{background:rgba(216,250,75,.07)}
.neuron-copy strong{font-size:14px;font-weight:600}
.neuron-copy small{font-size:11px}
.neuron-row.selected{background:var(--lime);color:var(--ink);box-shadow:none}
.neuron-row.selected small,.neuron-row.selected .neuron-icon,.neuron-row.selected .add-sign{color:rgba(14,16,15,.7)}
.neuron-row.selected .side{border-color:rgba(14,16,15,.5);color:var(--ink)}
.side{font-size:10px;border-color:var(--rule-strong)}
.selection-head{border-top:1px solid var(--rule)}
.selection-head .eyebrow,.evidence-foot>span,.library-foot{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.selected-item{font-size:13px}
.selected-item.active{background:rgba(216,250,75,.12);box-shadow:inset 3px 0 var(--lime)}
.selected-item button:nth-child(2){font-size:13px}
.library-foot{border-top:1px solid var(--rule);font-weight:600}

/* Viewport */
.viewport{background:var(--bg)}
.viewport-head h2{font-size:21px;font-weight:650;letter-spacing:-.02em;margin-top:8px}
.viewport-head>span{font-size:12px}
.view-tools>button,.axis-views{background:rgba(14,16,15,.88);border:1.5px solid var(--rule-strong);font-size:12px;font-weight:600}
.view-tools>button{padding:8px 11px}
.view-tools>button:hover{border-color:var(--lime);color:var(--lime);background:rgba(14,16,15,.88)}
.axis-views button{font-size:12px;font-weight:650;padding:8px 11px}
.axis-views button.active{background:var(--lime);color:var(--ink)}
/* Layer switches run along the bottom of the view, as in the concept's explorer. */
.layer-controls{left:0;right:0;bottom:0;background:var(--panel);border:0;border-top:1px solid var(--rule);font-size:14px;gap:clamp(14px,2.2vw,34px);padding:12px clamp(16px,1.8vw,26px);min-height:50px}
.layer-controls label{color:var(--text);gap:9px}
.layer-controls input[type=checkbox]{width:17px!important;height:17px!important}
.layer-controls .size-control input{width:80px}
.scene-footer{bottom:66px}
.scene-prompt{bottom:128px}
.point-inspector{bottom:128px}
.scene-prompt{border-left:2px solid var(--lime);background:linear-gradient(90deg,rgba(14,16,15,.94),rgba(14,16,15,0))}
.scene-prompt h3{font-size:24px;font-weight:700;letter-spacing:-.03em}
.scene-prompt p{font-size:13px;color:#d0d2cc}
.scene-footer{font-size:11px}
#scale-bar{border-color:var(--text)}
.legend{font-size:12px}
.output{background:var(--lavender)}
.loading{background:var(--ink);border:1.5px solid var(--rule-strong);font-size:13px}
.spinner{border-color:#4a4e48;border-top-color:var(--lime)}
.point-inspector{background:var(--panel);border:1.5px solid var(--rule-strong);font-size:13px;box-shadow:0 18px 50px rgba(0,0,0,.45)}
.point-inspector strong{font-size:16px;font-weight:700}
.point-inspector p{font-size:12px}
.point-inspector button{font-size:12px;font-weight:650}

/* Inspector */
.inspector-top h2{font-size:28px;font-weight:750;letter-spacing:-.035em;margin:10px 0 6px;line-height:1.05}
.inspector-top p{font-size:12px}
.stats strong{font-size:30px;font-weight:750;letter-spacing:-.03em}
.stats span{font-size:11px;letter-spacing:.06em;text-transform:uppercase;font-weight:600}
.tabs{margin:14px 20px;padding:0;gap:0;border:1.5px solid var(--rule-strong)}
.tabs button{flex:1 1 auto;padding:10px 2px;font-size:12.5px;font-weight:650;letter-spacing:-.01em;white-space:nowrap;color:var(--text);border-bottom:0}
.tabs button+button{border-left:1px solid var(--rule)}
.tabs button[aria-selected=true],.tabs [aria-pressed=true]{background:var(--lime);color:var(--ink)}
.connection-filters{border-bottom:1px solid var(--rule)}
.connection-filters>label,.compare-label,.minimum{font-size:11px;letter-spacing:.07em;text-transform:uppercase;font-weight:650}
.connection-summary{font-size:12px;line-height:1.6}
.partner-row{border-bottom:1px solid rgba(244,244,239,.09);padding:11px 20px}
.partner-row:hover{background:rgba(216,250,75,.06)}
.partner-name strong{font-size:14px;font-weight:600}
.partner-name small{font-size:11px}
.partner-row .count{font-size:13px;color:var(--text);font-weight:600}
.partner-row .row-add{border:1.5px solid var(--rule-strong);color:var(--lime)}
.partner-row .row-add:hover{background:var(--lime);color:var(--ink);border-color:var(--lime)}
.partner-row .weight-bar{background:rgba(216,250,75,.35);height:2px}
.more{border:1.5px solid var(--rule-strong);color:var(--text);font-size:13px;font-weight:650}
.more:hover{border-color:var(--lime);color:var(--ink);background:var(--lime)}
.primary{background:var(--lime);color:var(--ink);font-size:14px;font-weight:700;padding:12px 18px}
.primary:hover{background:#e6ff6e;color:var(--ink)}
.empty-state p{font-size:14px;color:var(--text)}
.empty-state small{font-size:12px}
.evidence-foot{border-top:1px solid var(--rule)}
.evidence-foot p{font-size:12px}
.export{font-size:12px;font-weight:650}
.pair-focus{background:rgba(216,250,75,.1);font-size:12px}
#research-values{font-size:12px}
.paper-intro .eyebrow{font-size:12px;letter-spacing:.12em;color:var(--lime)}
.paper-intro>p{font-size:13px;line-height:1.6}
.paper-counts>strong{font-size:44px;font-weight:800;letter-spacing:-.04em}
.paper-views button{border:1.5px solid var(--rule-strong);font-size:12px;font-weight:650;color:var(--text)}
.paper-views button[aria-pressed=true]{background:var(--lime);border-color:var(--lime);color:var(--ink)}
.paper-edge{font-size:13px;border-bottom:1px solid var(--rule)}
.paper-edges h3{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:700}

/* Circuit atlas and guide */
#atlas-controls{padding:16px 18px 0}
.atlas-filters select{font-size:12px;padding:8px 6px}
.atlas-row{border-bottom:1px solid rgba(244,244,239,.09)}
.atlas-row:hover{background:rgba(216,250,75,.05)}
.atlas-row.active{background:rgba(216,250,75,.12);border-left:3px solid var(--lime);padding-left:13px}
.atlas-row-source{font-size:12px;color:#d9dbd4}
.atlas-row-source em{border-color:var(--lime);color:var(--lime);font-size:9px;font-weight:700}
.atlas-row-select strong{font-size:14px;font-weight:650;color:var(--text)}
.atlas-row-select small{font-size:11px}
.role-row{font-size:12px}
.guide-step{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:var(--muted)}
.guide-roles button{border:1.5px solid var(--rule-strong);background:var(--ink);color:var(--text)}
.guide-roles button:hover{border-color:var(--lime)}
.guide-roles button[aria-pressed=true],.guide-roles button.active{border-color:var(--lime);box-shadow:inset 0 0 0 1px var(--lime)}
.guide-roles button>b{font-size:20px;font-weight:800}

/* Dialogs, toast, status bar */
dialog{background:var(--panel);border:1.5px solid var(--rule-strong);padding:clamp(24px,3vw,42px);color:var(--text)}
dialog::backdrop{background:rgba(14,16,15,.82);backdrop-filter:blur(4px)}
dialog h2{font-size:clamp(26px,2.6vw,38px);font-weight:800;letter-spacing:-.045em;line-height:1;margin:12px 0 18px}
dialog p{font-size:14px;line-height:1.6}
dialog a{font-size:14px;font-weight:600;text-decoration:underline;text-underline-offset:.2em}
dialog .eyebrow{font-size:12px;letter-spacing:.14em;color:var(--lime)}
dialog .close{font-size:30px;color:var(--text)}
dialog dl{font-size:13px}
.toast{background:var(--lime);color:var(--ink);border:0;font-size:14px;font-weight:650;padding:14px 22px}
.statusbar{background:var(--bg);border-top:1px solid var(--rule);font-size:11px;color:var(--muted);letter-spacing:.02em}
.skip-to-view{background:var(--lime);color:var(--ink);font-weight:700}

/* Specimen pages (species.html) */
body>header{height:64px;padding:0 clamp(16px,2.4vw,40px);gap:clamp(14px,2vw,32px);border-bottom:1px solid rgba(244,244,239,.85);background:var(--bg)}
body>header .brand{font-size:0;letter-spacing:0}
body>header .brand strong{font-size:28px;font-weight:750;letter-spacing:-.035em}
.specimen-label{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:650}
.specimen-label select{font-size:14px;font-weight:600;padding:8px 10px;border:1.5px solid var(--rule-strong);letter-spacing:0;text-transform:none}
body>header nav button,body>header nav select{font-size:15px;font-weight:500;padding:.38em .62em}
body>header nav button:hover{background:var(--lime);color:var(--ink)}
body>header nav select{border:1.5px solid transparent;width:auto}
.library .intro h1{font-size:30px;font-weight:800;letter-spacing:-.045em;line-height:1}
.library .intro p,.stage-title p{font-size:12px}
.library .tabs{margin:14px 18px;padding:0;border:1.5px solid var(--rule-strong)}
.library .tabs button{padding:10px 4px;font-size:14px}
.library .tabs button+button{border-left:1.5px solid var(--rule-strong)}
.filters input[type=search]{border:1.5px solid var(--rule-strong);font-size:14px;padding:11px 12px}
.list-row{border-bottom:1px solid rgba(244,244,239,.08)}
.list-row strong{font-size:14px;font-weight:650}
.list-row small{font-size:11px}
.list-row em{font-weight:700}
.list-row.active{background:var(--lime);color:var(--ink);border-left-color:var(--lime)}
.list-row.active small,.list-row.active em{color:rgba(14,16,15,.75)}
.stage{background:var(--bg)}
.stage-title h2{font-size:24px;font-weight:700;letter-spacing:-.03em}
.toolbar button{border:1.5px solid var(--rule-strong);background:rgba(14,16,15,.88);font-size:12px;font-weight:600}
.toolbar button:hover{border-color:var(--lime);color:var(--lime)}
.detail{background:var(--panel);border-left:1px solid var(--rule)}
.detail h2{font-size:30px;font-weight:800;letter-spacing:-.045em;line-height:1}
.detail strong{font-weight:750;letter-spacing:-.03em}
.source-foot button,.source-foot a{font-size:12px;font-weight:650}
body>footer{background:var(--bg);border-top:1px solid var(--rule);font-size:11px}
#toast{background:var(--lime);color:var(--ink);font-weight:650}
#error{background:var(--panel);border:1.5px solid var(--rule-strong)}

/* Sign-in and account pages */
.access-header{height:64px;margin:0 clamp(16px,2.4vw,40px);padding:0;border-bottom:1px solid rgba(244,244,239,.85)}
.access-header .wordmark{font-size:0}
.access-header .wordmark::after{content:"FlyScope";font-size:28px;font-weight:750;letter-spacing:-.035em}
.access-header select{border:1.5px solid var(--rule-strong)}
.identity h1{font-size:clamp(56px,7vw,120px);font-weight:800;letter-spacing:-.055em;line-height:.9}
.identity .brand-dot{color:var(--lime)}
.login-page .eyebrow,.account-page .eyebrow{font-size:12px;font-weight:700;letter-spacing:.14em;color:var(--lime)}
.login-form-region h2{font-size:clamp(32px,3vw,46px);font-weight:800;letter-spacing:-.045em}
.login-page label,.account-page label{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:650}
.login-page input,.account-page input{border:1.5px solid var(--rule-strong);background:var(--ink);height:50px}
.login-page .primary,.account-page .primary{font-size:16px;font-weight:750;min-height:54px}
.access-footer{border-top:1px solid var(--rule);font-size:11px}

@media (max-width:1280px){.header .brand>span{display:none}}
@media (max-width:900px){
  body>header{height:auto;min-height:58px;flex-wrap:wrap;padding-block:8px}
  body>header .brand strong{font-size:23px}
  .header{height:58px}
  .layer-controls{gap:12px;font-size:12px;padding:9px 14px;min-height:42px}
  .scene-footer{bottom:52px}
  .brand strong{font-size:23px}
  .header-actions button{font-size:13px;padding:.3em .45em}
  .header #specimen-switch{min-width:0;max-width:150px}
  .eyebrow,.section-top .eyebrow,.inspector-top .eyebrow,.viewport-head .eyebrow,.atlas-heading .eyebrow{font-size:16px}
  .inspector-top h2{font-size:23px}
}

/* Distance shading legend ("A + B inputs on C") */
#distance-legend{position:absolute;left:clamp(16px,1.8vw,26px);bottom:118px;z-index:4;width:min(300px,calc(100% - 32px));background:rgba(14,16,15,.9);border:1px solid var(--rule-strong);padding:10px 12px 9px;font-size:12px;color:var(--text)}
body:not(.finding-mode) #distance-legend{display:none}
#distance-legend .dl-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
#distance-legend strong{font-size:12px;font-weight:700;letter-spacing:.02em}
#distance-legend button{border:1.5px solid var(--rule-strong);padding:3px 10px;font-size:11px;font-weight:700}
#distance-legend button[aria-pressed=true]{background:var(--lime);border-color:var(--lime);color:var(--ink)}
#distance-legend .dl-bar{height:9px;margin-top:9px}
#distance-legend .dl-ticks{position:relative;height:16px;margin-top:3px;font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
#distance-legend .dl-ticks span{position:absolute;transform:translateX(-50%)}
#distance-legend .dl-ticks span:first-child{transform:none}
#distance-legend .dl-ticks span:nth-last-child(2){transform:translateX(-100%)}
#distance-legend .dl-ticks em{position:absolute;right:0;top:14px;font-style:normal}
#distance-legend p{font-size:10.5px;line-height:1.4;margin-top:10px;color:var(--muted)}
