/* Gentle interactions live outside the reading text; no automatic page fade. */
/* Shared design tokens for the main site and the standalone diagnosis page. */
:root{
 --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;
 --space-5:24px;--space-6:32px;--space-7:40px;
 --radius-card:17px;--radius-control:10px;
 --shadow-card:0 8px 28px rgba(25,52,60,.065);
 --shadow-card-hover:0 12px 32px rgba(25,52,60,.11);
 --border-width:1px;
 --duration-feedback:.25s;
 --dur-fast:.15s;--dur-base:.25s;--dur-transition:.4s;
 --ease:cubic-bezier(.2,.8,.2,1);
}
.page-enter{animation:none!important}
.finpath-motion-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:40px;padding:7px 9px;border-radius:8px;border:1px solid #d3e3d9;background:#f3f8f4;color:#28594c;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer}
.finpath-motion-toggle:disabled{cursor:default;opacity:1}
.finpath-motion-toggle .motion-dot{width:7px;height:7px;border-radius:50%;background:#2b8064}
.finpath-motion-toggle[aria-pressed="true"] .motion-dot{background:#71847b}
.finpath-motion-toggle:focus-visible{outline:3px solid #66894e;outline-offset:3px}
.career-card,.lesson-card,.module-card,.catalog-card,.paper-card{transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
.button,.icon-button,.filter-button,.module-chip,.finpath-motion-toggle{transition:background-color .25s ease,border-color .25s ease,transform .25s ease}
.button:active:not(:disabled),.filter-button:active:not(:disabled),.finpath-motion-toggle:active:not(:disabled){transform:scale(.97)}
/* Source links stay visibly underlined; a small accent adds feedback without recolouring text. */
:is(.paper-unit,.reading-section,.catalog-source,.major-resource) a:not(.button):not(.module-chip){position:relative;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
:is(.paper-unit,.reading-section,.catalog-source,.major-resource) a:not(.button):not(.module-chip)::after{content:"";position:absolute;left:0;bottom:-3px;width:0;height:2px;background:#649a78;transition:width .25s ease;pointer-events:none}
@media(hover:hover) and (pointer:fine){
 .career-card:hover,.lesson-card:hover,.module-card:hover,.catalog-card:hover,.paper-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(24,74,67,.10)}
 :is(.paper-unit,.reading-section,.catalog-source,.major-resource) a:not(.button):not(.module-chip):hover::after{width:60%}
 .finpath-motion-toggle:hover:not(:disabled){background:#e6f1e9}
}
@media(hover:none){.career-card:hover,.lesson-card:hover,.module-card:hover,.catalog-card:hover,.paper-card:hover,.button:hover{transform:none;box-shadow:none}}
@media(max-width:767px){.finpath-motion-toggle{min-height:44px;font-size:11px;padding:6px 7px}.finpath-motion-toggle .motion-dot{display:none}}
html[data-motion="off"]{scroll-behavior:auto!important}
html[data-motion="off"] *,html[data-motion="off"] *::before,html[data-motion="off"] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.topbar-left { min-width:0; }
.breadcrumb > .breadcrumb-prefix { padding:0; flex:none; }
.breadcrumb b { min-width:0; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
/* The compact header shows the destination, leaving room for both rows of a long title. */
@media (max-width:760px) {
 .topbar { height:auto; min-height:calc(66px + var(--safe-top)); }
 .topbar-left { flex:1 1 0; }
 .topbar-right { flex:none; }
 .breadcrumb { min-width:0; }
 .breadcrumb::before { flex:none; }
}
@media (max-width:767px) {
 .diagnosis-top{gap:6px}
 .diagnosis-top #diagnosis-return{font-size:12px;white-space:nowrap}
}
/* Use the same breakpoint as the desktop sidebar. */
@media (760px < width <= 1190px) {
 .topbar { gap:10px; }
 .topbar-left { flex:1 1 0; }
 .breadcrumb { display:flex; align-items:center; min-width:0; }
 .topbar-right{flex:0 1 auto;min-width:0;gap:8px}
 .topbar-right .search-box{width:clamp(120px,18vw,220px);min-width:100px;flex:0 1 auto}
}
