/* Runtime shell adapters. Keep base.css and page compositions intact. */
html{scrollbar-gutter:stable}
html:has(#fy-reading-modes dialog[open]){overflow:hidden}
#fy-reading-modes .chapter-nav>summary{min-height:44px;padding-top:10px;padding-bottom:10px}
#fy-reading-modes .fy-main .fy-search-heading h1,#fy-reading-modes .fy-main .page-heading h1{text-wrap:balance;word-break:normal;overflow-wrap:normal;line-break:strict}
@media(max-width:620px){
  #fy-reading-modes .fy-topbar,#fy-reading-modes[data-mode="workbench"] .fy-topbar{height:auto;min-height:0;padding-top:8px;align-content:flex-start}
  #fy-reading-modes .fy-mode button,#fy-reading-modes .fy-language,#fy-reading-modes .fy-account{min-height:44px}
  #fy-reading-modes .fy-topnav,#fy-reading-modes[data-mode="workbench"] .fy-topnav{height:44px;margin-top:4px}
}
#fy-reading-modes .fy-topnav a[data-route]{display:flex;align-items:center;min-width:0;position:relative}
#fy-reading-modes .fy-topnav a[data-route][aria-current="page"],#fy-reading-modes .fy-topnav a[data-route][aria-current="true"]{color:var(--fy-ink)}
#fy-reading-modes .fy-topnav a[data-route][aria-current="page"]::after,#fy-reading-modes .fy-topnav a[data-route][aria-current="true"]::after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--fy-accent)}
#fy-reading-modes .fy-side-nav a[data-route][aria-current="page"],#fy-reading-modes .fy-side-nav a[data-route][aria-current="true"]{background:#41413f;box-shadow:inset 2px 0 #ba7e69;color:#f5f5f3}
#fy-reading-modes .fy-side-nav a[data-route]{min-width:0}
#fy-reading-modes .fy-side-nav a[data-route]>span:last-child{min-width:0;overflow-wrap:anywhere}
#fy-reading-modes .fy-main{min-width:0}
#fy-reading-modes .fy-main :is(h1,h2,h3,p,dd,a,code){overflow-wrap:anywhere}
#fy-reading-modes .fy-main> :last-child{margin-bottom:0}
#fy-reading-modes .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
#fy-reading-modes .skip-link{position:absolute;top:8px;left:12px;z-index:100;background:var(--fy-paper);border:1px solid var(--fy-accent);border-radius:3px;color:var(--fy-accent);padding:10px 15px;font-size:13px;line-height:1.5;transform:translateY(-160%)}
#fy-reading-modes .skip-link:focus{transform:translateY(0)}
#fy-reading-modes :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--fy-accent);outline-offset:3px}
#fy-reading-modes #main-content:focus-visible{outline:2px solid var(--fy-accent);outline-offset:-5px}
#fy-reading-modes :is(button,a)[aria-disabled="true"]{cursor:default}

/* Match the actual account dialog and toast elements in index.html. */
#fy-reading-modes .account-dialog .dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:19px;min-width:0}
#fy-reading-modes .account-dialog .dialog-heading h2{min-width:0;margin:0 0 14px;overflow-wrap:anywhere}
#fy-reading-modes .account-dialog .dialog-heading>button{flex:none;width:30px;min-height:30px;padding:0;background:transparent;border:0;color:#787876;font-size:24px;line-height:1}
#fy-reading-modes .account-dialog>button{margin-top:10px}
#fy-reading-modes .app-toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:50;max-width:calc(100% - 32px);width:max-content;padding:12px 18px;border-radius:4px;background:#31312f;color:#fff;font-size:12px;line-height:1.75;overflow-wrap:anywhere;box-shadow:0 6px 20px #23232120}
#fy-reading-modes .app-toast a,#fy-reading-modes .app-toast button{color:inherit;background:transparent;border:0;font:inherit;text-decoration:underline;text-underline-offset:3px}

/* Optional routed case directory components. Data and interaction stay in app.js. */
#fy-reading-modes .filter-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 21px;background:var(--fy-warm);margin:0 0 24px;min-width:0}
#fy-reading-modes .search-field{display:flex;align-items:center;flex:1 1 300px;min-width:0;padding:5px 6px 5px 13px;gap:9px;background:var(--fy-paper);border:1px solid #c0c0be;border-radius:3px}
#fy-reading-modes .search-field input{min-width:0;width:100%;flex:1;border:0;background:transparent;color:var(--fy-ink);font-size:13px;line-height:1.6;min-height:34px;padding:5px 0;appearance:none}
#fy-reading-modes .search-field input::placeholder{color:#888886}
#fy-reading-modes .search-field input:focus-visible{outline-offset:1px}
#fy-reading-modes .search-field button{flex:none;border:0;border-radius:2px;background:var(--fy-ink);color:#fff;padding:8px 16px;font-size:12px;line-height:1.5;min-height:34px;white-space:nowrap}
#fy-reading-modes .search-field .search-symbol{font-size:21px;line-height:1;color:#737371;flex:none}
#fy-reading-modes .filter-select{min-width:0;max-width:210px;min-height:46px;border:1px solid #c5c5c3;background:var(--fy-paper);color:#666664;border-radius:3px;padding:10px 32px 10px 12px;font-size:12px;line-height:1.6;flex:0 1 175px}
#fy-reading-modes label.filter-select{display:flex;align-items:center;gap:9px;padding:0;border:0;background:transparent;max-width:none}
#fy-reading-modes label.filter-select select{min-width:0;max-width:210px;width:100%;min-height:46px;border:1px solid #c5c5c3;background:var(--fy-paper);border-radius:3px;padding:10px 29px 10px 12px;font-size:12px;line-height:1.6}
#fy-reading-modes .saved-filter{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;padding:10px 12px;min-height:42px;border:1px solid #c9c9c7;border-radius:3px;background:transparent;color:#6f6f6d;font-size:12px;line-height:1.6;max-width:100%}
#fy-reading-modes .saved-filter[aria-pressed="true"],#fy-reading-modes .saved-filter.is-active{color:var(--fy-accent);border-color:#ba9488;background:#f3eae4}
#fy-reading-modes .saved-filter input{margin:0;accent-color:var(--fy-accent);width:14px;height:14px;flex:none}
#fy-reading-modes .section-link{display:inline-flex;align-items:center;gap:6px;color:var(--fy-accent);font-size:12px;line-height:1.7;padding:3px 0;border:0;background:transparent;text-align:left;max-width:100%;overflow-wrap:anywhere}
#fy-reading-modes .section-link:hover{text-decoration:underline;text-underline-offset:3px}
#fy-reading-modes .case-card{background:var(--fy-paper);padding:24px 28px 14px;min-width:0;margin-top:24px}
#fy-reading-modes .case-card-head{display:flex;align-items:flex-end;justify-content:space-between;gap:17px;padding-bottom:16px;border-bottom:1px solid #b9b9b7;min-width:0}
#fy-reading-modes .case-card-head>div{min-width:0}
#fy-reading-modes .case-card-head h2{font-size:19px;line-height:1.5;font-weight:500;margin:0}
#fy-reading-modes .case-card-head p{margin:5px 0 0;font-size:12px;color:var(--fy-muted);line-height:1.8}
#fy-reading-modes .case-card-head .section-link{flex:none;max-width:45%;font-size:11px}
#fy-reading-modes .case-browser{display:grid;grid-template-columns:minmax(0,1fr);gap:22px;align-items:start;min-width:0}
#fy-reading-modes .case-results{min-width:0}
#fy-reading-modes .case-row{display:grid;grid-template-columns:115px minmax(0,1fr) 92px;align-items:center;gap:20px;padding:21px 0;border-bottom:1px solid var(--fy-line);min-width:0}
#fy-reading-modes .case-row-code{font:13px Consolas,"Courier New",monospace;line-height:1.7;color:#656563;overflow-wrap:anywhere;min-width:0}
#fy-reading-modes .case-row-code.is-symptom{font:12px "Segoe UI","Microsoft YaHei",sans-serif;color:#80807e}
#fy-reading-modes .case-row-main{min-width:0}
#fy-reading-modes .case-row-main h3,#fy-reading-modes .case-row-main h2{font-size:16px;line-height:1.55;font-weight:500;letter-spacing:0;margin:0}
#fy-reading-modes .case-row-main>a,#fy-reading-modes .case-row-main>button{display:inline-block;font-size:16px;line-height:1.55;font-weight:500;border:0;padding:0;background:transparent;text-align:left;max-width:100%}
#fy-reading-modes .case-row-main p,#fy-reading-modes .case-row-meta{display:flex;align-items:baseline;gap:7px 11px;flex-wrap:wrap;font-size:12px;line-height:1.8;color:#7c7c7a;margin:6px 0 0;min-width:0}
#fy-reading-modes .case-row-meta>span,#fy-reading-modes .case-row-meta>code{min-width:0;overflow-wrap:anywhere}
#fy-reading-modes .case-row-meta code{font:11px Consolas,"Courier New",monospace}
#fy-reading-modes .case-row-side{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;min-width:0;color:#81817f;font-size:11px;text-align:right}
#fy-reading-modes .case-row-side>span{display:block;width:100%;line-height:1.7}
#fy-reading-modes .case-row-side>button:not(.quiet-button):not(.primary-button){border:0;background:transparent;font-size:19px;line-height:1;padding:5px;color:#91918f;min-width:32px;min-height:32px}
#fy-reading-modes .case-row-side>button:not(.quiet-button):not(.primary-button)[aria-pressed="true"]{color:var(--fy-accent)}
#fy-reading-modes .case-row.is-selected .case-row-main h3,#fy-reading-modes .case-row.is-selected .case-row-main>a,#fy-reading-modes .case-row.is-selected .case-row-main>button{color:var(--fy-accent)}
#fy-reading-modes .case-preview{min-width:0;padding:23px 24px;background:#f5f5f3;margin-top:18px;overflow-wrap:anywhere}
#fy-reading-modes .case-preview .preview-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px;font-size:11px;color:#848482}
#fy-reading-modes .case-preview h2,#fy-reading-modes .preview-content h2{font-size:20px;line-height:1.55;font-weight:500;letter-spacing:-.2px;margin:0 0 12px}
#fy-reading-modes .case-preview h3,#fy-reading-modes .preview-content h3{font-size:13px;font-weight:500;line-height:1.7;margin:20px 0 9px}
#fy-reading-modes .case-preview p,#fy-reading-modes .preview-content p{font-size:12px;line-height:1.9;color:#7d7d7b;margin:12px 0}
#fy-reading-modes .case-preview dl,#fy-reading-modes .preview-content dl{font-size:12px;line-height:1.8;margin:16px 0;padding:15px 0;border-top:1px solid #d8d8d6;border-bottom:1px solid #d8d8d6}
#fy-reading-modes .case-preview dt,#fy-reading-modes .preview-content dt{font-size:11px;color:#858583;margin:0 0 3px}
#fy-reading-modes .case-preview dd,#fy-reading-modes .preview-content dd{font-size:12px;margin:0 0 10px;color:#696967}
#fy-reading-modes .case-preview dd:last-child,#fy-reading-modes .preview-content dd:last-child{margin-bottom:0}
#fy-reading-modes .case-preview code{font:12px Consolas,"Courier New",monospace;overflow-wrap:anywhere}
#fy-reading-modes .preview-content{min-width:0}
#fy-reading-modes .case-preview .preview-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-top:20px}
#fy-reading-modes .case-preview .preview-close{border:0;background:transparent;font-size:11px;padding:4px 0;color:#80807e;flex:none}
#fy-reading-modes .case-results>.empty-state{background:transparent}

/* Workbench changes density and columns, not access or available actions. */
#fy-reading-modes[data-mode="workbench"] .case-card{background:transparent;padding:0;margin-top:24px}
#fy-reading-modes[data-mode="workbench"] .case-browser:has(>.case-preview:not([hidden])){grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:23px;margin-top:17px}
#fy-reading-modes[data-mode="workbench"] .case-preview{position:sticky;top:24px;background:var(--fy-paper);border:1px solid #dcdcda;border-radius:3px;margin-top:0;padding:22px}
#fy-reading-modes[data-mode="workbench"] .case-row{grid-template-columns:minmax(0,1fr) 34px;gap:5px 12px;padding:17px 10px 17px 0}
#fy-reading-modes[data-mode="workbench"] .case-row-code{grid-column:1;grid-row:1;font-size:11px}
#fy-reading-modes[data-mode="workbench"] .case-row-main{grid-column:1;grid-row:2}
#fy-reading-modes[data-mode="workbench"] .case-row-main h3,#fy-reading-modes[data-mode="workbench"] .case-row-main h2,#fy-reading-modes[data-mode="workbench"] .case-row-main>a,#fy-reading-modes[data-mode="workbench"] .case-row-main>button{font-size:15px}
#fy-reading-modes[data-mode="workbench"] .case-row-meta,#fy-reading-modes[data-mode="workbench"] .case-row-main p{font-size:11px;gap:6px 9px}
#fy-reading-modes[data-mode="workbench"] .case-row-side{grid-column:2;grid-row:1 / 3;justify-content:center;gap:5px}
#fy-reading-modes[data-mode="workbench"] .case-row-side>span{display:none}
#fy-reading-modes[data-mode="workbench"] .case-row-side .quiet-button,#fy-reading-modes[data-mode="workbench"] .case-row-side .primary-button{padding:6px 5px;font-size:11px;min-height:32px;overflow-wrap:anywhere}
#fy-reading-modes[data-mode="workbench"] .case-row.is-selected{background:#ebebe9;padding-left:13px;box-shadow:inset 2px 0 #a57160}
#fy-reading-modes[data-mode="workbench"] .case-preview h2{font-size:19px}

@media(max-width:1120px){
  #fy-reading-modes .case-row{grid-template-columns:102px minmax(0,1fr) 70px;gap:16px}
  #fy-reading-modes .filter-bar{gap:10px;padding:17px 19px}
  #fy-reading-modes .filter-select{max-width:175px;flex-basis:155px}
  #fy-reading-modes .search-field{flex-basis:250px}
  #fy-reading-modes[data-mode="workbench"] .case-browser:has(>.case-preview:not([hidden])){gap:18px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  #fy-reading-modes[data-mode="workbench"] .case-preview{padding:19px}
}
@media(max-width:900px){
  #fy-reading-modes .case-browser,#fy-reading-modes[data-mode="workbench"] .case-browser:has(>.case-preview:not([hidden])){grid-template-columns:minmax(0,1fr);gap:18px}
  #fy-reading-modes[data-mode="workbench"] .case-preview{position:static;margin-top:0}
  #fy-reading-modes[data-mode="workbench"] .case-row{grid-template-columns:100px minmax(0,1fr) 40px;gap:15px}
  #fy-reading-modes[data-mode="workbench"] .case-row-code{grid-column:1;grid-row:1}
  #fy-reading-modes[data-mode="workbench"] .case-row-main{grid-column:2;grid-row:1}
  #fy-reading-modes[data-mode="workbench"] .case-row-side{grid-column:3;grid-row:1}
}
@media(max-width:620px){
  #fy-reading-modes .fy-topnav a[data-route]{font-size:12px}
  #fy-reading-modes .account-dialog .dialog-heading{gap:12px}
  #fy-reading-modes .account-dialog .dialog-heading h2{font-size:20px}
  #fy-reading-modes .app-toast{bottom:16px;font-size:12px;padding:11px 14px}
  #fy-reading-modes .filter-bar{padding:16px;gap:10px;margin-bottom:20px}
  #fy-reading-modes .search-field{flex-basis:100%;width:100%;padding-left:11px}
  #fy-reading-modes .search-field input{font-size:16px;min-height:37px}
  #fy-reading-modes .search-field input::placeholder{font-size:13px}
  #fy-reading-modes .search-field button{padding:10px 13px;min-height:38px}
  #fy-reading-modes .filter-select{flex:1 1 130px;min-height:44px;max-width:100%;font-size:16px}
  #fy-reading-modes label.filter-select select{min-height:44px;font-size:16px;max-width:100%}
  #fy-reading-modes .saved-filter{min-height:44px;font-size:12px;padding:9px 11px}
  #fy-reading-modes .case-card{padding:21px 19px 12px;margin-top:20px}
  #fy-reading-modes .case-card-head{gap:12px;align-items:flex-start;padding-bottom:14px}
  #fy-reading-modes .case-card-head h2{font-size:18px}
  #fy-reading-modes .case-card-head p{font-size:11px;line-height:1.8}
  #fy-reading-modes .case-card-head .section-link{max-width:38%}
  #fy-reading-modes .case-row,#fy-reading-modes[data-mode="workbench"] .case-row{grid-template-columns:minmax(0,1fr) 31px;gap:4px 10px;padding:18px 0}
  #fy-reading-modes .case-row-code,#fy-reading-modes[data-mode="workbench"] .case-row-code{grid-column:1;grid-row:1;font-size:11px}
  #fy-reading-modes .case-row-main,#fy-reading-modes[data-mode="workbench"] .case-row-main{grid-column:1;grid-row:2}
  #fy-reading-modes .case-row-side,#fy-reading-modes[data-mode="workbench"] .case-row-side{grid-column:2;grid-row:1 / 3;justify-content:center}
  #fy-reading-modes .case-row-main h3,#fy-reading-modes .case-row-main h2,#fy-reading-modes .case-row-main>a,#fy-reading-modes .case-row-main>button{font-size:15px;line-height:1.6}
  #fy-reading-modes .case-row-meta,#fy-reading-modes .case-row-main p{font-size:11px;gap:5px 8px}
  #fy-reading-modes .case-row-side>span{display:none}
  #fy-reading-modes .case-row-side .quiet-button,#fy-reading-modes .case-row-side .primary-button{font-size:11px;padding:5px 3px;min-width:29px;min-height:34px;overflow-wrap:anywhere}
  #fy-reading-modes .case-preview,#fy-reading-modes[data-mode="workbench"] .case-preview{padding:20px 18px}
  #fy-reading-modes .case-preview h2,#fy-reading-modes[data-mode="workbench"] .case-preview h2{font-size:18px}
  #fy-reading-modes .case-preview .preview-actions{align-items:stretch;gap:8px}
}
@media(max-width:360px){
  #fy-reading-modes .fy-tools{gap:6px}
  #fy-reading-modes .fy-mode button{padding-left:7px;padding-right:7px}
  #fy-reading-modes .filter-bar{padding:14px}
  #fy-reading-modes .saved-filter{font-size:11px;padding-left:9px;padding-right:9px}
  #fy-reading-modes .case-card{padding-left:15px;padding-right:15px}
  #fy-reading-modes .case-row,#fy-reading-modes[data-mode="workbench"] .case-row{column-gap:8px}
}
@media(pointer:coarse){
  #fy-reading-modes .case-row-side>button,#fy-reading-modes .section-link,#fy-reading-modes .saved-filter,#fy-reading-modes .preview-close,#fy-reading-modes .account-dialog .dialog-heading>button{min-height:44px}
  #fy-reading-modes .case-row-side>button{min-width:31px}
  #fy-reading-modes .case-row-main>a,#fy-reading-modes .case-row-main>button{padding:4px 0}
}
@media(prefers-reduced-motion:no-preference){
  #fy-reading-modes .fy-main>.page-wrap,#fy-reading-modes .fy-main.is-entering{animation:fy-route-enter 180ms ease-out both}
  #fy-reading-modes .case-row,#fy-reading-modes .saved-filter,#fy-reading-modes .case-row-main a,#fy-reading-modes .case-row-main button{transition:background-color 140ms ease,color 140ms ease,border-color 140ms ease}
  #fy-reading-modes .saved-filter:hover{background:#ebebe9}
  #fy-reading-modes .case-row-main a:hover{color:var(--fy-accent)}
  @keyframes fy-route-enter{from{opacity:.8}to{opacity:1}}
}
@media(prefers-reduced-motion:reduce){
  #fy-reading-modes .fy-main,#fy-reading-modes .fy-main>.page-wrap,#fy-reading-modes .case-row,#fy-reading-modes .saved-filter,#fy-reading-modes .case-row-main a,#fy-reading-modes .case-row-main button{animation:none;transition:none;scroll-behavior:auto}
}

@media(pointer:coarse) and (max-width:620px){#fy-reading-modes .case-row,#fy-reading-modes[data-mode="workbench"] .case-row{grid-template-columns:minmax(0,1fr) 44px}#fy-reading-modes .case-row-side>button,#fy-reading-modes .case-row-side .quiet-button,#fy-reading-modes .case-row-side .primary-button{min-width:44px;min-height:44px}}

/* Readability and concrete routed content added in the second pass. */
#fy-reading-modes{--fy-muted:#666663}
#fy-reading-modes .catalog-meta,#fy-reading-modes .catalog-content p,#fy-reading-modes .catalog-count,#fy-reading-modes .record-missing,#fy-reading-modes .record-missing p,#fy-reading-modes .reading-aside,#fy-reading-modes .reading-progress,#fy-reading-modes .related-list p,#fy-reading-modes .related-list small,#fy-reading-modes .note-card p,#fy-reading-modes .note-card .eyebrow,#fy-reading-modes .note-meta,#fy-reading-modes .case-row-meta,#fy-reading-modes .case-row-main p,#fy-reading-modes .case-row-code.is-symptom,#fy-reading-modes .case-row-side>span,#fy-reading-modes .case-preview p,#fy-reading-modes .case-preview dt,#fy-reading-modes .preview-content p,#fy-reading-modes .preview-content dt,#fy-reading-modes .case-preview .preview-heading,#fy-reading-modes .fy-footer,#fy-reading-modes .fy-search-heading p,#fy-reading-modes .fy-search-help,#fy-reading-modes .fy-file-caption,#fy-reading-modes .fy-file-meta,#fy-reading-modes .account-dialog p{color:var(--fy-muted)}
#fy-reading-modes .chapter-nav a:not([aria-current="location"]):not(.is-active),#fy-reading-modes .related-list a{color:var(--fy-muted)}
#fy-reading-modes .chapter-nav a:hover,#fy-reading-modes .related-list a:hover{color:var(--fy-accent)}
#fy-reading-modes .search-field input::placeholder,#fy-reading-modes .catalog-toolbar input::placeholder{color:var(--fy-muted)}
#fy-reading-modes .case-row-code small{display:block;font-family:"Segoe UI","Microsoft YaHei",sans-serif;font-size:11px;line-height:1.7;color:var(--fy-muted);margin-top:4px;letter-spacing:0}
#fy-reading-modes .case-row-code code{font:inherit;overflow-wrap:anywhere}
#fy-reading-modes .supplement-body{padding-top:19px;min-width:0}
#fy-reading-modes .supplement-body .eyebrow{font-size:11px;line-height:1.6;color:var(--fy-muted);letter-spacing:.035em;margin:0 0 9px}
#fy-reading-modes .supplement-body h3{font-size:16px;line-height:1.6;font-weight:500;margin:0 0 9px;color:var(--fy-ink);overflow-wrap:anywhere}
#fy-reading-modes .supplement-body h3 a{color:inherit}
#fy-reading-modes .supplement-body h3 a:hover{color:var(--fy-accent)}
#fy-reading-modes .supplement-body p{font-size:13px;line-height:1.85;color:var(--fy-muted);margin:0 0 17px;max-width:65ch;overflow-wrap:anywhere}
#fy-reading-modes .supplement-body>.section-link,#fy-reading-modes .supplement-body>.quiet-button{margin-top:1px}
#fy-reading-modes .source-note{margin-top:30px;padding:18px 0 0;border-top:1px solid var(--fy-line);font-size:12px;line-height:1.8;color:var(--fy-muted)}
#fy-reading-modes .source-note strong{font-size:12px;font-weight:500;color:#52534e}
#fy-reading-modes .article-paper .source-note p{font-size:12px;line-height:1.8;color:var(--fy-muted);margin:6px 0 0;max-width:none}
#fy-reading-modes .article-end{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:13px 20px;margin-top:26px;padding-top:21px;border-top:1px solid var(--fy-line);font-size:12px;line-height:1.8;color:var(--fy-muted)}
#fy-reading-modes .article-end>span{min-width:0;overflow-wrap:anywhere}
#fy-reading-modes .article-end .quiet-button{max-width:100%}
#fy-reading-modes .resource-download{background:var(--fy-warm);padding:18px 21px;margin:0 0 25px;min-width:0}
#fy-reading-modes .resource-download>.primary-button,#fy-reading-modes .resource-download>.quiet-button{max-width:100%}
#fy-reading-modes .article-paper .resource-download p{font-size:12px;line-height:1.85;color:var(--fy-muted);margin:11px 0 0;max-width:none}
#fy-reading-modes .saved-list{background:var(--fy-paper);padding:0 28px;min-width:0}
#fy-reading-modes .saved-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center;padding:26px 0;border-bottom:1px solid var(--fy-line);min-width:0}
#fy-reading-modes .saved-item:last-child{border-bottom:0}
#fy-reading-modes .saved-item>div{min-width:0}
#fy-reading-modes .saved-item .eyebrow{font-size:11px;line-height:1.6;color:var(--fy-muted);margin:0 0 7px}
#fy-reading-modes .saved-item h2{font-size:18px;line-height:1.6;font-weight:500;letter-spacing:-.1px;margin:0 0 8px;overflow-wrap:anywhere}
#fy-reading-modes .saved-item h2 a:hover{color:var(--fy-accent)}
#fy-reading-modes .saved-item p{font-size:13px;line-height:1.85;color:var(--fy-muted);margin:0;max-width:68ch;overflow-wrap:anywhere}
#fy-reading-modes .saved-item>.quiet-button{max-width:145px}
#fy-reading-modes .compact-save,#fy-reading-modes .case-row-side>.quiet-button.compact-save,#fy-reading-modes[data-mode="workbench"] .case-row-side>.quiet-button.compact-save{display:inline-flex;align-items:center;justify-content:center;width:34px;min-width:34px;min-height:34px;padding:4px;border:1px solid transparent;border-radius:3px;background:transparent;color:#696b62;font-size:20px;line-height:1;flex:none}
#fy-reading-modes .compact-save>span{display:block;font-size:20px;line-height:1}
#fy-reading-modes .compact-save[aria-pressed="true"],#fy-reading-modes .case-row-side>.quiet-button.compact-save[aria-pressed="true"],#fy-reading-modes[data-mode="workbench"] .case-row-side>.quiet-button.compact-save[aria-pressed="true"]{color:var(--fy-accent);border-color:transparent;background:transparent}
#fy-reading-modes .case-preview-button{font-size:11px;line-height:1.5;padding:6px 8px;min-height:32px;max-width:100%;white-space:nowrap}
#fy-reading-modes[data-mode="reading"] .case-preview,#fy-reading-modes[data-mode="reading"] .case-preview-button{display:none}
@media(min-width:901px){
  #fy-reading-modes[data-mode="workbench"] .case-row{grid-template-columns:minmax(0,1fr) 58px}
  #fy-reading-modes[data-mode="workbench"] .case-row-side>.case-preview-button{padding:6px 8px;font-size:11px;min-height:32px;white-space:nowrap}
}
@media(max-width:900px){
  #fy-reading-modes .case-preview,#fy-reading-modes .case-preview-button,#fy-reading-modes[data-mode="workbench"] .case-preview,#fy-reading-modes[data-mode="workbench"] .case-preview-button{display:none}
}
@media(max-width:620px){
  #fy-reading-modes .supplement-body{padding-top:17px}
  #fy-reading-modes .supplement-body h3{font-size:15px}
  #fy-reading-modes .supplement-body p{font-size:12px;line-height:1.85;margin-bottom:15px}
  #fy-reading-modes .source-note{margin-top:25px;padding-top:16px}
  #fy-reading-modes .article-end{gap:11px;margin-top:22px;padding-top:17px}
  #fy-reading-modes .resource-download{padding:16px 17px;margin-bottom:23px}
  #fy-reading-modes .saved-list{padding:0 20px}
  #fy-reading-modes .saved-item{grid-template-columns:minmax(0,1fr);gap:15px;padding:23px 0}
  #fy-reading-modes .saved-item>.quiet-button{justify-self:start;max-width:100%}
  #fy-reading-modes .saved-item h2{font-size:17px;line-height:1.6}
  #fy-reading-modes .saved-item p{font-size:12px;line-height:1.9}
}
@media(pointer:coarse){
  #fy-reading-modes .compact-save,#fy-reading-modes .case-row-side>.quiet-button.compact-save,#fy-reading-modes[data-mode="workbench"] .case-row-side>.quiet-button.compact-save{width:44px;min-width:44px;min-height:44px}
}
@media(prefers-reduced-motion:no-preference){
  #fy-reading-modes main.page-enter{animation:fy-route-enter 180ms ease-out both}
  #fy-reading-modes main.page-enter>.page-wrap{animation:none}
}
@media(prefers-reduced-motion:reduce){
  #fy-reading-modes main.page-enter,#fy-reading-modes main.page-enter>.page-wrap{animation:none;transition:none;scroll-behavior:auto}
}

/* Keep navigation reachable during reading without changing the mobile shell. */
#fy-reading-modes .fy-topbar{position:sticky;top:0;z-index:30;background:var(--fy-paper)}
#fy-reading-modes .reading-aside{top:calc(var(--app-header-height,82px) + 24px)}
#fy-reading-modes .article-section{scroll-margin-top:calc(var(--app-header-height,82px) + 24px)}
#fy-reading-modes .article-paper>.metadata-grid+.article-section{border-top:0;padding-top:0;margin-top:0}
@media(min-width:901px){
  #fy-reading-modes[data-mode="workbench"] .case-preview{top:calc(var(--app-header-height,82px) + 24px)}
}
@media(min-width:621px){
  #fy-reading-modes[data-mode="workbench"] .notes-grid{gap:18px}
  #fy-reading-modes[data-mode="workbench"] .note-card{padding:21px 23px}
  #fy-reading-modes[data-mode="workbench"] .note-card .eyebrow{margin-bottom:11px}
  #fy-reading-modes[data-mode="workbench"] .note-card h2{font-size:18px;line-height:1.55;margin-bottom:9px}
  #fy-reading-modes[data-mode="workbench"] .note-card p{line-height:1.8;margin-bottom:15px}
  #fy-reading-modes[data-mode="workbench"] .note-meta{padding-top:14px}
}

#fy-reading-modes .fy-search-area .filter-bar{background:transparent;padding:0;margin:0}
#fy-reading-modes .mobile-related{display:none}
@media(max-width:900px){
  #fy-reading-modes .reading-aside .related-list{display:none}
  #fy-reading-modes .mobile-related{display:block;margin-top:27px;padding-top:22px;border-top:1px solid var(--fy-line)}
  #fy-reading-modes .mobile-related h2,#fy-reading-modes .mobile-related h3{font-size:18px;line-height:1.6;font-weight:500;margin:0 0 13px}
  #fy-reading-modes .mobile-related .related-list{display:block;margin-top:0}
  #fy-reading-modes .mobile-related .related-list a{font-size:13px;line-height:1.8}
  #fy-reading-modes .mobile-related .related-list p,#fy-reading-modes .mobile-related .related-list small{font-size:12px;line-height:1.8}
  #fy-reading-modes .mobile-related .related-list li{padding:12px 0}
  #fy-reading-modes .mobile-related .related-list li:last-child{border-bottom:0;padding-bottom:0}
}

#fy-reading-modes[data-mode="reading"] .case-row.is-selected .case-row-main h2,#fy-reading-modes[data-mode="reading"] .case-row.is-selected .case-row-main h3,#fy-reading-modes[data-mode="reading"] .case-row.is-selected .case-row-main>a,#fy-reading-modes[data-mode="reading"] .case-row.is-selected .case-row-main>button{color:var(--fy-ink)}
@media(min-width:621px){
  #fy-reading-modes[data-mode="workbench"]{--fy-sidebar-width:clamp(176px,15vw,208px)}
  #fy-reading-modes[data-mode="workbench"] .fy-brand{width:var(--fy-sidebar-width)}
  #fy-reading-modes[data-mode="workbench"] .fy-shell{grid-template-columns:var(--fy-sidebar-width) minmax(0,1fr)}
  /* Keep every navigation group together; only short windows need internal scrolling. */
  #fy-reading-modes[data-mode="workbench"] .fy-sidebar{position:sticky;top:var(--app-header-height,82px);align-self:start;height:calc(100vh - var(--app-header-height,82px));height:calc(100dvh - var(--app-header-height,82px));min-height:0;overflow-y:auto;overscroll-behavior-y:contain;padding:24px 16px 22px;scrollbar-width:thin;scrollbar-color:#63645f var(--fy-dark)}
  #fy-reading-modes[data-mode="workbench"] .fy-sidebar>*{flex-shrink:0}
  #fy-reading-modes[data-mode="workbench"] .fy-side-nav{position:static}
  #fy-reading-modes[data-mode="workbench"] .fy-side-nav a[data-route]{min-height:44px}
  #fy-reading-modes[data-mode="workbench"] .fy-side-footer{padding-top:28px}
  #fy-reading-modes[data-mode="workbench"] .fy-shell:has(>.fy-footer) .fy-sidebar{grid-row:1 / span 2}
  #fy-reading-modes[data-mode="workbench"] .fy-shell>.fy-footer{grid-column:2}
}
@media(min-width:621px) and (max-width:900px){
  #fy-reading-modes[data-mode="workbench"]{--fy-sidebar-width:170px}
  #fy-reading-modes[data-mode="workbench"] .fy-sidebar{padding-left:14px;padding-right:14px}
}

/* Standalone preview links stay inside the navigation's scroll boundary. */
#fy-reading-modes .fy-shell>.fy-footer{grid-column:1 / -1;margin:0 5% 24px;padding-top:17px}

/* Balance short editorial headings instead of leaving a single trailing word. */
#fy-reading-modes .fy-main .fy-search-heading h1,#fy-reading-modes .fy-main .page-heading h1,#fy-reading-modes .fy-main .note-card h2,#fy-reading-modes .fy-main .catalog-content h2,#fy-reading-modes .fy-main .catalog-content h3{word-break:normal;overflow-wrap:normal;text-wrap:balance}
#fy-reading-modes .fy-main .catalog-content h2 a,#fy-reading-modes .fy-main .catalog-content h3 a,#fy-reading-modes .fy-main .note-card h2 a{word-break:normal;overflow-wrap:anywhere;text-wrap:balance}

/* Resource actions belong near the purpose, before the long-form reference. */
#fy-reading-modes .page-wrap>.resource-download{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;margin-top:-7px;margin-bottom:25px;border:1px solid var(--fy-line)}
#fy-reading-modes .page-wrap>.resource-download p{flex:1 1 260px;font-size:12px;line-height:1.85;color:var(--fy-muted);margin:0;max-width:none}
#fy-reading-modes .catalog-quick-links{display:flex;align-items:center;gap:14px 24px;flex-wrap:wrap;margin:-14px 0 31px}
#fy-reading-modes .catalog-quick-links .section-link{display:inline-flex;align-items:center;min-height:44px;font-size:13px}
#fy-reading-modes .catalog-content .resource-file-name{font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--fy-muted);overflow-wrap:anywhere;margin:8px 0}
#fy-reading-modes .resource-file-copy{flex:1 1 100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px 18px;border-top:1px solid var(--fy-line);padding-top:13px;margin-top:2px;min-width:0}
#fy-reading-modes .resource-file-copy>span{font-size:11px;color:var(--fy-muted)}
#fy-reading-modes .resource-file-copy code{font:13px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere;min-width:0;user-select:all}
#fy-reading-modes .resource-file-copy .quiet-button{min-height:44px;white-space:normal}
#fy-reading-modes .fy-side-workflows{margin:23px 0 0;border-top:1px solid #50514c;padding-top:20px}
#fy-reading-modes .fy-side-workflows[hidden]{display:none}
#fy-reading-modes .fy-side-workflows p{font-size:10px;letter-spacing:.08em;color:#b3b3ab;margin:0 12px 10px}
#fy-reading-modes .fy-side-workflows a{display:flex;align-items:center;min-height:44px;font-size:12px;color:#d9d9d2;padding:10px 12px;margin:2px 0;border-radius:3px;overflow-wrap:anywhere}
#fy-reading-modes .fy-side-workflows a:hover,#fy-reading-modes .fy-side-workflows a[aria-current="page"]{background:#43443f;color:#fff}
@media(max-width:620px){
  #fy-reading-modes .catalog-quick-links{gap:7px 20px;margin:-12px 0 25px}
  #fy-reading-modes .resource-file-copy{grid-template-columns:minmax(0,1fr) auto;gap:5px 10px}
  #fy-reading-modes .resource-file-copy>span{grid-column:1/-1}
  #fy-reading-modes .resource-file-copy code{font-size:12px}
}
@media(max-width:900px){
  #fy-reading-modes .reading-aside{gap:8px}
  #fy-reading-modes .chapter-nav{padding:0 13px}
  #fy-reading-modes .chapter-nav[open]{padding-bottom:12px}
  #fy-reading-modes details.chapter-nav[open]>summary{margin-bottom:2px}
  #fy-reading-modes .reading-aside .reading-progress{padding:0 13px}
}
@media(max-width:620px){
  #fy-reading-modes .page-wrap>.resource-download{padding:14px 15px;margin-bottom:20px}
  #fy-reading-modes .page-wrap>.resource-download p{flex-basis:100%}
}

@media(max-width:620px){#fy-reading-modes .quiet-button,#fy-reading-modes .primary-button{min-height:44px}}

#fy-reading-modes .catalog-content h2,#fy-reading-modes .page-heading h1,#fy-reading-modes .article-section p{overflow-wrap:anywhere}
#fy-reading-modes .source-note>a{display:inline-block;margin-top:6px;font-size:12px;color:var(--fy-accent);text-underline-offset:3px}

/* Touch areas stay generous without making the visible icons larger. */
@media(max-width:620px){
  #fy-reading-modes .fy-mode button,#fy-reading-modes .fy-language,#fy-reading-modes .fy-account{min-width:44px;min-height:44px}
  #fy-reading-modes .fy-tools{gap:2px}
  #fy-reading-modes .account-dialog .dialog-heading>button{width:44px;min-height:44px}
}
@media(max-width:360px){
  #fy-reading-modes .fy-topbar,#fy-reading-modes[data-mode="workbench"] .fy-topbar{padding-left:12px;padding-right:12px;column-gap:4px}
  #fy-reading-modes .fy-wordmark{font-size:20px}
}
@media(max-width:900px){
  #fy-reading-modes[data-mode="workbench"] .case-row.is-selected{background:transparent;box-shadow:none}
  #fy-reading-modes[data-mode="workbench"] .case-row.is-selected .case-row-main h3,#fy-reading-modes[data-mode="workbench"] .case-row.is-selected .case-row-main h3 a{color:var(--fy-ink)}
}

/* Native options retain platform keyboard and touch behavior; the closed control stays compact. */
#fy-reading-modes .fy-language-control{position:relative;display:inline-grid;place-items:center;width:44px;min-width:44px;height:44px;border-radius:4px;color:var(--fy-muted);flex:none}
#fy-reading-modes .fy-language-display{display:flex;align-items:center;gap:5px;font:12px/1.2 "Segoe UI","Microsoft YaHei",sans-serif;pointer-events:none}
#fy-reading-modes .language-chevron{font-size:14px;transform:translateY(-2px)}
#fy-reading-modes .fy-language-control .fy-language{position:absolute;inset:0;opacity:0;width:100%;height:100%;min-width:0;margin:0;padding:0;cursor:pointer;font-size:16px}
#fy-reading-modes .fy-language-control:focus-within{outline:2px solid var(--fy-accent);outline-offset:2px}
#fy-reading-modes .fy-language-control:hover{background:#eeeee9}
#fy-reading-modes .content-language-note{max-width:76ch;margin:0 0 22px;padding-left:12px;border-left:2px solid var(--fy-line);font-size:12px;line-height:1.75;color:var(--fy-muted)}
#fy-reading-modes .page-heading+.content-language-note{margin-top:-8px}
@media(max-width:620px){
  #fy-reading-modes .fy-topbar,#fy-reading-modes[data-mode="workbench"] .fy-topbar{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;grid-template-rows:auto auto auto;column-gap:8px;row-gap:5px;height:auto;min-height:0;padding:8px 5% 0;align-items:center}
  #fy-reading-modes .fy-tools{display:contents}
  #fy-reading-modes .fy-brand,#fy-reading-modes[data-mode="workbench"] .fy-brand{grid-column:1;grid-row:1;min-width:0;min-height:44px;margin:0;align-self:center}
  #fy-reading-modes .fy-wordmark{font-size:22px}
  #fy-reading-modes .fy-language-control{grid-column:2;grid-row:1}
  #fy-reading-modes .fy-account{grid-column:3;grid-row:1;width:44px;justify-content:center}
  #fy-reading-modes .fy-mode{grid-column:1/-1;grid-row:2;min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;padding:3px;gap:3px}
  #fy-reading-modes .fy-mode button{font-size:12px;line-height:1.4;min-width:0;min-height:44px;padding:7px 9px;white-space:normal;overflow-wrap:anywhere}
  #fy-reading-modes .fy-topnav,#fy-reading-modes[data-mode="workbench"] .fy-topnav{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:100%;height:auto;min-height:44px;margin:0;align-self:stretch}
  #fy-reading-modes .fy-topnav a[data-route]{min-height:44px;justify-content:center;text-align:center;font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;padding:6px 0}
}
@media(forced-colors:active){
  #fy-reading-modes .fy-language-control{color:ButtonText;border:1px solid ButtonText}
  #fy-reading-modes .fy-language-control:focus-within{outline-color:Highlight}
}
