/* apple-design · /tools/ only · layered light, optical type, content before chrome */
body[data-view=tools]{font-family:var(--ap-font);font-optical-sizing:auto;background:var(--ap-background);color:var(--ap-label)}
body[data-view=tools] #main{position:relative;isolation:isolate;padding-bottom:var(--ap-space-6)}
body[data-view=tools] #main::before{content:'';position:absolute;z-index:-1;pointer-events:none;inset:8rem -3rem auto 25%;height:30rem;background:radial-gradient(ellipse closest-side,var(--ap-halo),transparent)}
body[data-view=tools] .tools-heading{position:relative;display:flex;align-items:center;justify-content:space-between;gap:var(--ap-space-4);padding:var(--ap-space-5) 0 var(--ap-space-4);max-width:none}
body[data-view=tools] .tools-heading h1{font-size:1.75rem;font-weight:650;line-height:1.25;letter-spacing:var(--ap-tracking-display);max-width:none;margin:0;text-wrap:balance}
body[data-view=tools] .tools-theme{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;border:1px solid var(--ap-rim);border-radius:var(--ap-radius-pill);background:var(--ap-glass);box-shadow:inset 0 1px 0 var(--ap-highlight),var(--ap-card-shadow);color:var(--ap-secondary)}
body[data-view=tools] .tools-theme svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5}
body[data-view=tools] .tools-theme svg path{fill:currentColor;stroke:none}
body[data-view=tools] .glass-panel{background:var(--ap-glass);border:1px solid var(--ap-rim);box-shadow:inset 0 1px 0 var(--ap-highlight),inset 0 0 0 .5px var(--ap-inner),0 0 0 .5px var(--ap-line),var(--ap-shadow)}
body[data-view=tools] .tools-journal-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--ap-space-5);position:relative;isolation:isolate;overflow:hidden;border-radius:var(--ap-radius-card);padding:var(--ap-space-4) var(--ap-space-5);margin:0 0 var(--ap-space-5)}
body[data-view=tools] .tools-journal-entry::before{content:'';position:absolute;pointer-events:none;inset:0;z-index:-1;background:radial-gradient(ellipse at 90% 0,var(--ap-glow),transparent 65%)}
body[data-view=tools] .tools-feature-copy{min-width:0}
body[data-view=tools] .tools-journal-entry h2{font-size:1.25rem;font-weight:600;line-height:1.3;letter-spacing:var(--ap-tracking-title);color:var(--ap-label);margin:0 0 var(--ap-space-2)}
body[data-view=tools] .tools-feature-stats{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ap-space-3);list-style:none;margin:0;padding:0;color:var(--ap-secondary)}
body[data-view=tools] .tools-feature-stats li{display:flex;align-items:baseline;gap:6px;padding:0 var(--ap-space-3) 0 0;border-right:1px solid var(--ap-line)}
body[data-view=tools] .tools-feature-stats li:last-child{padding-right:0;border:0}
body[data-view=tools] .tools-feature-stats strong{font-size:1rem;font-weight:600;line-height:1.3;letter-spacing:var(--ap-tracking-display);font-variant-numeric:tabular-nums;color:var(--ap-label)}
body[data-view=tools] .tools-feature-stats span{font-size:.75rem;line-height:1.5;letter-spacing:var(--ap-tracking-caption)}
body[data-view=tools] .tools-feature-stats .tools-feature-capability{align-items:center}
body[data-view=tools] .tools-feature-capability svg{width:18px;height:18px;fill:none;stroke:var(--ap-secondary);stroke-width:1.5}
body[data-view=tools] .tools-feature-side{display:flex;align-items:center;min-width:0}
body[data-view=tools] .tools-journal-cta{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.625rem 1.125rem;border:1px solid transparent;border-radius:var(--ap-radius-pill);background:var(--ap-action);color:var(--ap-action-label);font-size:.8125rem;font-weight:500;white-space:nowrap;box-shadow:var(--ap-card-shadow);transition:transform var(--ap-feedback) var(--ap-ease-out)}
body[data-view=tools] .tools-directory-heading{display:flex;align-items:baseline;justify-content:space-between;gap:var(--ap-space-4);margin:0 0 var(--ap-space-3)}
body[data-view=tools] .tools-section-title{font-size:1.25rem;line-height:1.3;font-weight:600;letter-spacing:var(--ap-tracking-title);margin:0;scroll-margin-top:110px}
body[data-view=tools] .tools-directory-summary{font-size:.8125rem;color:var(--ap-secondary);margin:0;letter-spacing:var(--ap-tracking-caption)}
body[data-view=tools] .tool-filters{display:grid;grid-template-columns:minmax(0,1fr) 210px;align-items:center;gap:var(--ap-space-3);padding:var(--ap-space-3);border-radius:var(--ap-radius-card);margin-bottom:var(--ap-space-2)}
body[data-view=tools] .tool-filters label{margin:0;font-size:.8125rem;font-weight:500;color:var(--ap-secondary);min-width:0}
body[data-view=tools] .tools-input-wrap{position:relative;display:block;margin:0}
body[data-view=tools] .tools-input-wrap>svg{position:absolute;left:14px;top:13px;width:18px;height:18px;fill:none;stroke:var(--ap-tertiary);stroke-width:1.6;pointer-events:none}
body[data-view=tools] .tool-filters :is(input,select){display:block;width:100%;height:44px;min-height:44px;border:1px solid var(--ap-line);border-radius:var(--ap-radius-control);background:var(--ap-input);color:var(--ap-label);font-family:inherit;font-size:.875rem;padding:0 var(--ap-space-3);margin:0}
body[data-view=tools] .tool-filters .tools-input-wrap input{padding-left:44px;margin:0}
body[data-view=tools] .tool-filters input::placeholder{color:var(--ap-tertiary);opacity:1}
body[data-view=tools] :is(.tool-link,.tools-theme,.tools-journal-cta,input,select):focus-visible{outline:2px solid var(--ap-action);outline-offset:4px}
body[data-view=tools] .tool-filters :is(input,select):focus{border-color:var(--ap-action)}
body[data-view=tools] #tool-count{font-size:.75rem;color:var(--ap-tertiary);margin:0 0 var(--ap-space-3);padding:0 var(--ap-space-2)}
body[data-view=tools] .tool-group{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:start;gap:var(--ap-space-3);margin:0 0 var(--ap-space-3)}
body[data-view=tools] .tool-group>h2{font-size:.8125rem;font-weight:600;line-height:1.5;color:var(--ap-secondary);margin:0;padding-top:var(--ap-space-3)}
body[data-view=tools] .tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ap-space-3)}
body[data-view=tools] .tool-link{display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto 1fr auto;gap:4px 10px;align-items:start;min-width:0;min-height:96px;margin:0;padding:var(--ap-space-3);border:1px solid var(--ap-line);border-radius:var(--ap-radius-control);background:var(--ap-card);color:var(--ap-label);text-decoration:none;box-shadow:inset 0 1px 0 var(--ap-highlight),var(--ap-card-shadow);transition:transform var(--ap-feedback) var(--ap-ease-out)}
body[data-view=tools] .tool-symbol{grid-column:1;grid-row:1/3;width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:var(--ap-tint);color:var(--ap-action);font-size:1rem;font-weight:600}
body[data-view=tools] .tool-symbol svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
body[data-view=tools] .tool-link>strong{grid-column:2;grid-row:1;font-size:.875rem;font-weight:600;line-height:1.35;letter-spacing:var(--ap-tracking-title);overflow-wrap:anywhere}
body[data-view=tools] .tool-link>p{grid-column:2;grid-row:2;font-size:.75rem;line-height:1.5;color:var(--ap-secondary);margin:0;overflow-wrap:anywhere}
body[data-view=tools] .tool-category-tag{display:none}
body[data-view=tools] .tool-open{grid-column:2;grid-row:3;justify-self:end;display:flex;align-items:center;gap:5px;font-size:.6875rem;color:var(--ap-action);line-height:1.5;min-height:22px;white-space:nowrap}
body[data-view=tools] .tool-open svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
body[data-view=tools] #tool-empty{background:var(--ap-surface);border:1px solid var(--ap-line);border-radius:var(--ap-radius-card);color:var(--ap-secondary)}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){body[data-view=tools] .glass-panel{-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%)}}
@media(hover:hover) and (pointer:fine){body[data-view=tools] .tool-link:hover{transform:translateY(-2px);border-color:var(--ap-rim);box-shadow:inset 0 1px 0 var(--ap-highlight),var(--ap-shadow)}body[data-view=tools] .tools-journal-cta:hover{transform:translateY(-1px);filter:brightness(1.04)}}
body[data-view=tools] :is(.tools-journal-cta,.tools-theme):active{transform:scale(.98)}
body[data-view=tools] .tool-link:active{transform:scale(.995)}
html[data-theme=dark] body[data-view=tools] .topbar{background:var(--ap-glass)}
html[data-theme=dark] body[data-view=tools] .nav a{color:var(--ap-secondary)}
@media(max-width:900px){body[data-view=tools] .tool-group{grid-template-columns:90px minmax(0,1fr)}body[data-view=tools] .tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 body[data-view=tools] .tools-heading{padding:var(--ap-space-4) 0 var(--ap-space-3)}
 body[data-view=tools] .tools-heading h1{font-size:1.5rem}
 body[data-view=tools] .tools-journal-entry{grid-template-columns:minmax(0,1fr);padding:var(--ap-space-4);gap:var(--ap-space-3);margin-bottom:var(--ap-space-4)}
 body[data-view=tools] .tools-journal-entry h2{font-size:1.125rem}
 body[data-view=tools] .tools-feature-stats{gap:var(--ap-space-2)}
 body[data-view=tools] .tools-feature-stats li{padding-right:var(--ap-space-2)}
 body[data-view=tools] .tools-feature-stats span{font-size:.6875rem}
 body[data-view=tools] .tools-feature-stats .tools-feature-capability{border:0;padding:0}
 body[data-view=tools] .tools-feature-capability svg{width:15px;height:15px}
 body[data-view=tools] .tools-feature-side{justify-content:flex-end}
 body[data-view=tools] .tools-directory-heading{align-items:center;gap:var(--ap-space-2);flex-wrap:wrap;margin-bottom:var(--ap-space-2)}
 body[data-view=tools] .tools-section-title{font-size:1.125rem}
 body[data-view=tools] .tools-directory-summary{font-size:.6875rem}
 body[data-view=tools] .tool-filters{grid-template-columns:minmax(0,1fr);gap:var(--ap-space-2);padding:var(--ap-space-2);border-radius:var(--ap-radius-control)}
 body[data-view=tools] .tool-group{grid-template-columns:minmax(0,1fr);gap:var(--ap-space-2);margin-bottom:var(--ap-space-4)}
 body[data-view=tools] .tool-group>h2{padding:0}
 body[data-view=tools] .tool-grid{grid-template-columns:minmax(0,1fr);gap:var(--ap-space-2)}
 body[data-view=tools] .tool-link{min-height:96px}
 body[data-view=tools] .tool-link>strong{font-size:.9375rem}
 body[data-view=tools] .tool-link>p{font-size:.8125rem}
 body[data-view=tools] .tool-open{font-size:.75rem}
}
body[data-view=tools] .footer{margin-top:var(--ap-space-6)}
/* Research Resources: two peer views, shared journal UI, quiet content surfaces. */
body[data-view=tools]{--jg-ink:var(--ap-label);--jg-copy:var(--ap-secondary);--jg-muted:var(--ap-tertiary);--jg-accent:var(--ap-action);--jg-solid:var(--ap-surface);--jg-panel:var(--ap-card);--jg-frost:var(--ap-glass);--jg-line:var(--ap-line);--jg-divider:var(--ap-line);--jg-inset:var(--ap-highlight);--jg-input:var(--ap-input)}
body[data-view=tools] #main::before{display:none}
body[data-view=tools] .resource-switcher-sentinel{height:1px;margin-top:12px;pointer-events:none}
/* finesse · component: resource-switcher · register=product
 * Inherit Apple tokens; keep 44px targets inside a 50px scroll surface. */
body[data-view=tools] .resource-switcher{position:relative;top:auto;z-index:60;display:flex;justify-content:center;padding:3px 0;margin-bottom:8px;background:transparent}
body[data-view=tools] .resource-switcher.is-docked{box-shadow:none}
body[data-view=tools] .resource-tabs{display:inline-flex;gap:8px;max-width:100%;padding:0;border:0;border-radius:var(--ap-radius-pill);background:transparent;box-shadow:none;margin:0;flex-wrap:wrap;justify-content:center}
body[data-view=tools] .resource-tabs a{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:44px;padding:8px 20px;border:1px solid var(--ap-action);border-radius:var(--ap-radius-pill);font-size:14px;font-weight:500;line-height:1.3;white-space:nowrap;background:var(--ap-input);color:var(--ap-action);text-decoration:none;transition:background-color var(--ap-feedback),box-shadow var(--ap-feedback)}
body[data-view=tools] .resource-tabs a[aria-current]{background:var(--ap-tab-fill);color:var(--ap-tab-label);box-shadow:var(--ap-card-shadow)}
body[data-view=tools] .resource-tabs a:focus-visible{outline:2px solid var(--ap-action);outline-offset:2px}
body[data-view=tools] .journal-directory{padding-top:0}
body[data-view=tools] .journal-directory :is(.journal-card,.journal-category,.journal-filters){background:var(--ap-card);border:1px solid var(--ap-line);box-shadow:inset 0 1px 0 var(--ap-highlight),var(--ap-card-shadow);color:var(--ap-label)}
body[data-view=tools] .journal-directory .journal-card h2 a{color:var(--ap-label)}
body[data-view=tools] .journal-directory :is(.journal-subject-names,.journal-chinese,.journal-results-head){color:var(--ap-secondary)}
body[data-view=tools] .journal-directory .journal-filters :is(input,select){background:var(--ap-input);color:var(--ap-label);border-color:var(--ap-line)}
body[data-view=tools] .journal-directory .journal-filters .button:not(.primary){background:var(--ap-input);color:var(--ap-label);border-color:var(--ap-line)}
body[data-view=tools] .journal-directory .journal-category[aria-pressed=true]{border-color:var(--ap-action);box-shadow:0 0 0 1px var(--ap-action)}
body[data-view=tools] .journal-directory .journal-category>span:last-child{color:var(--ap-secondary)}
body[data-view=tools] .journal-directory .journal-card-top .journal-save{color:var(--ap-secondary)}
body[data-view=tools] .journal-directory .journal-top{color:var(--ap-action)}
body[data-view=tools] .journal-directory .journal-save[aria-pressed=true]{color:#8d621b;background:#fcf0ca}
body[data-view=tools] .tools-directory-heading{justify-content:flex-end;margin:6px 0 10px}
@media(max-width:600px){body[data-view=tools] .resource-switcher{top:auto;padding:3px 0}body[data-view=tools] .resource-tabs{display:flex;width:min(100%,380px);gap:6px;padding:0}body[data-view=tools] .resource-tabs a{flex:1;padding:8px 7px;font-size:12px;gap:4px}}

@media(prefers-reduced-transparency:reduce){body[data-view=tools] .journal-directory :is(.journal-card,.journal-category,.journal-filters){background:var(--ap-surface)}}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){body[data-view=tools] .resource-tabs a:not([aria-current]){background:var(--ap-glass);-webkit-backdrop-filter:blur(12px) saturate(160%);backdrop-filter:blur(12px) saturate(160%)}}
@media(hover:hover){body[data-view=tools] .resource-tabs a:hover{box-shadow:inset 0 0 0 1px var(--ap-action)}}
body[data-view=tools] .resource-tabs a:active{box-shadow:inset 0 0 0 2px var(--ap-action)}
@media(prefers-reduced-transparency:reduce){body[data-view=tools] .resource-switcher{background:var(--ap-background);-webkit-backdrop-filter:none;backdrop-filter:none}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){body[data-view=tools] .resource-tabs a:not([aria-current]){background:var(--ap-input);-webkit-backdrop-filter:none;backdrop-filter:none}}
@media(prefers-contrast:more){body[data-view=tools] .resource-switcher{background:var(--ap-background);-webkit-backdrop-filter:none;backdrop-filter:none}body[data-view=tools] .resource-tabs a{outline:1px solid var(--ap-action);outline-offset:0}}
@media(prefers-reduced-motion:reduce){body[data-view=tools] .resource-tabs a{transition:none}}
@media(prefers-reduced-transparency:reduce){body[data-view=tools] :is(.glass-panel,.glass-card,.tools-theme){background:var(--ap-surface);-webkit-backdrop-filter:none;backdrop-filter:none}}
@media(prefers-contrast:more){body[data-view=tools] :is(.glass-panel,.glass-card,.tools-theme,input,select){border-color:var(--ap-secondary);box-shadow:0 0 0 .5px var(--ap-secondary)}}
@media(prefers-reduced-motion:reduce){body[data-view=tools] :is(.tool-link,.tools-journal-cta,.tools-theme){transition:none;transform:none!important}}

/* apple-design · live aurora and layered materials, scoped to Research Navigation.
 * The backdrop moves via transform only; card blur stays constant. */
body[data-view=tools]{position:relative;isolation:isolate}
body[data-view=tools]::before{content:'';position:fixed;inset:-20%;z-index:-1;pointer-events:none;background:radial-gradient(40% 40% at 20% 25%,var(--ap-aurora-purple),transparent 70%),radial-gradient(45% 45% at 80% 20%,var(--ap-aurora-blue),transparent 70%),radial-gradient(50% 50% at 65% 80%,var(--ap-aurora-pink),transparent 70%),radial-gradient(40% 40% at 15% 85%,var(--ap-aurora-teal),transparent 70%);filter:blur(40px);opacity:var(--ap-aurora-opacity);animation:tools-aurora-drift 28s ease-in-out infinite alternate}
@keyframes tools-aurora-drift{to{transform:translate3d(4%,-3%,0) scale(1.1)}}
body[data-view=tools] :is(.tool-link,.journal-directory .journal-card,.journal-directory .journal-category,.journal-directory .journal-filters){box-shadow:inset 0 1px 0 var(--ap-highlight),inset 0 0 0 .5px var(--ap-inner),var(--ap-card-shadow)}
body[data-view=tools] .journal-directory :is(.journal-card-actions a,.journal-results-head a){color:var(--ap-action)}
body[data-view=tools] .journal-directory .button.primary{background:var(--ap-action);color:var(--ap-action-label);border-color:transparent}
body[data-view=tools] .journal-directory .journal-filters input::placeholder{color:var(--ap-tertiary);opacity:1}
body[data-view=tools] .tool-group>h2{color:var(--ap-label)}
body[data-view=tools] :is(.journal-directory .journal-tags span,.journal-directory .journal-top){color:var(--ap-label)}
body[data-view=tools] .resource-tabs{position:relative;isolation:isolate}
body[data-view=tools] .resource-tabs a{position:relative;z-index:1;font-size:.875rem}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
 body[data-view=tools] .topbar,html[data-theme=dark] body[data-view=tools] .topbar{background:var(--ap-glass);-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);box-shadow:inset 0 1px 0 var(--ap-highlight),0 1px 0 var(--ap-line)}
 body[data-view=tools] :is(.tool-link,.journal-directory .journal-card,.journal-directory .journal-category,.journal-directory .journal-filters){-webkit-backdrop-filter:blur(16px) saturate(150%);backdrop-filter:blur(16px) saturate(150%)}
 body[data-view=tools] .journal-directory .journal-card :is(.journal-save,.journal-card-actions a){-webkit-backdrop-filter:none;backdrop-filter:none}
}
@media(max-width:600px){body[data-view=tools] .resource-tabs a{font-size:.75rem}body[data-view=tools]::before{animation-duration:36s}}
@media(prefers-reduced-motion:reduce){body[data-view=tools]::before{animation:none}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){
 body[data-view=tools]::before{display:none}
 body[data-view=tools] :is(.topbar,.tool-link,.glass-panel,.journal-directory .journal-card,.journal-directory .journal-category,.journal-directory .journal-filters),html[data-theme=dark] body[data-view=tools] .topbar{background:var(--ap-surface);-webkit-backdrop-filter:none;backdrop-filter:none}
}

/* Five peer resource views share the existing pills; small screens wrap 3 + 2. */
body[data-view=tools] .atlas-loading,body[data-view=tools] .atlas-load-error{margin:0 0 24px;padding:24px;border:1px solid var(--ap-line);border-radius:18px;background:var(--ap-surface);color:var(--ap-secondary)}
@media(max-width:600px){body[data-view=tools] .resource-tabs{width:min(100%,440px);flex-wrap:wrap;justify-content:center}body[data-view=tools] .resource-tabs a{flex:0 1 calc((100% - 12px)/3);min-height:48px;padding:8px 7px;white-space:normal;text-align:center}}

@media(max-width:600px){body[data-view=tools] #main .resource-tabs{justify-content:center}}

@media(max-width:600px){body[data-view=tools] #main .resource-tabs a{white-space:normal;min-height:48px;padding:8px 7px}body[data-view=tools] #main .resource-tabs a>span{white-space:normal;min-width:0}}
