/* Foundation Design r8: focused geometry, toolbar, typesetting and header polish.
   The original site theme, user vote counts, dates and calculation behavior remain unchanged. */
/* Show blue popularity and adjacent amber details INSIDE the image, upper right. */
#models .work {height:332px;overflow:visible;isolation:auto;z-index:1;}
#models .work:hover,#models .work:focus-within{z-index:50;}
#models .work > img.responsive {margin:0;width:100%;height:100%;object-fit:contain;object-position:center;background:#f7fafb;}
#models .work .overlay {border-radius:3px;}
.r7-card-toolbar {
  left:auto;right:8px;top:8px;bottom:auto;width:auto;height:auto;min-height:0;
  background:transparent;border:0;padding:0;gap:5px;box-shadow:0 2px 6px rgba(12,47,64,.13);
}
.r7-popularity,.r7-about-button{min-height:32px;border-radius:3px;font-size:15px;padding:6px 11px}
.r7-about-popover{top:39px;right:0;z-index:110;}
/* In the title bar: title and category left; actual member Like action right. */
.r6-app-main > .card .card-body.row{
  display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:start;
  column-gap:18px;row-gap:9px;margin:0;padding:17px 18px 14px;width:100%;
}
.r6-app-main > .card .card-body > .pull-left {float:none!important;min-width:0;text-align:left;margin:0;flex:none;}
.r6-app-main > .card .card-body > .pull-right{float:none!important;min-width:0;display:flex;align-items:flex-start;gap:7px;flex-wrap:wrap;justify-content:flex-end;margin:0;}
.r6-app-main #model-title{margin:0 0 8px;line-height:1.25;text-align:left;}
.r6-app-main #model-category,.r6-app-main #model-author{margin:0;text-align:left;}
.r6-app-main > .card p{margin:7px 0 0;text-align:left;}
.r6-app-main #vote {float:none!important;display:inline-flex;align-items:center;justify-content:center;gap:3px;margin:0;min-height:34px;line-height:24px;}
.r6-app-main #vote #votes-text,.r6-app-main #vote #votes-num{display:inline-block;float:none;vertical-align:middle;}
/* In the workspace every control is one height with no inflated surrounding capsule. */
.r6-layout-bar{align-items:center;min-height:49px;gap:10px;padding:6px 11px;}
.r6-quick-access summary,.r7-download-button,.r6-view-button{
  min-height:35px;height:35px;box-sizing:border-box;border-radius:5px;
  font-size:13px;line-height:1.1;padding:6px 11px;
  background:#fff;border:1px solid #c2d4df;color:#245a74;
}
.r6-quick-access summary:hover,.r7-download-button:hover,.r6-view-button:hover{background:#e4f0f5;border-color:#8aabba}
.r6-quick-access[open] summary{border-radius:5px;background:#e4f0f5}
.r6-view-switcher{border:0!important;background:transparent!important;padding:0!important;margin:0!important;gap:5px;height:35px;border-radius:0;box-shadow:none!important;}
.r6-view-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;width:36px;padding:5px;box-shadow:none!important;}
.r6-view-button.is-active{border-color:#4f92b5;background:#e1eff6;box-shadow:none!important;}
.r6-view-button svg{width:21px;height:21px}
.r7-workspace-identity,.r7-workspace-actions,.r7-download-group{align-items:center;gap:7px;}
/* The original TeX typography was scaled up by overlapping r5/r6 rules.
   Normalize text and MathJax separately; keep long equations horizontally scrollable. */
.r6-theory-pane .latex-container{font:400 14.5px/1.53 Georgia,'Times New Roman',serif!important;padding:15px 17px;}
.r6-theory-pane .r5-theory-rendered p,.r6-theory-pane .r5-theory-list li{font-size:14.5px;line-height:1.57;}
.r6-theory-pane .r5-theory-rendered h3{font-size:19px;line-height:1.35;}
.r6-theory-pane .r5-theory-rendered h4{font-size:16.5px;line-height:1.35;}
.r6-theory-pane .r5-theory-rendered h5{font-size:15px;line-height:1.4;}
.r6-theory-pane .r5-math-display{font-size:14.5px!important;padding:7px 9px;margin:11px 0;overflow-x:auto;}
.r6-theory-pane .MathJax_Display,.r6-theory-pane .MathJax_SVG_Display {font-size:.88em!important;overflow-x:auto!important;overflow-y:hidden!important;}
.r6-theory-pane .MathJax,.r6-theory-pane .mjx-chtml{font-size:.94em!important;}
/* Navigation text slightly larger, without altering fixed header height. */
@media (min-width:768px){#nav .main-nav > li > a{font-size:14.7px;}}
/* Center the logo against the adjacent navigation text baseline. */
#nav .navbar-brand{height:50px;display:flex;align-items:center;justify-content:flex-start;}
#nav .navbar-brand > a{height:50px;display:flex;align-items:center;}
#nav .navbar-brand img{width:auto;max-height:45px;object-fit:contain;}
@media(max-width:767px){
 .r6-app-main > .card .card-body.row{grid-template-columns:1fr;padding:13px;}
 .r6-app-main > .card .card-body > .pull-right{justify-content:flex-start;}
 .r6-layout-bar{flex-wrap:wrap;}
 .r7-workspace-actions{margin-left:0;}
 .r7-card-toolbar{top:7px;right:7px;}
}
/* Old copy action used absolute offsets; restore normal button alignment in the title row. */
.r6-app-main .copy-model1,.r6-app-main .copy-model2{
 position:static!important;top:auto!important;right:auto!important;
 margin:0!important;padding:7px 12px!important;white-space:nowrap;
}
