/* Qom Hockey 4.27 — polished article interactions, search continuity,
   accessible photo viewer, and neutral charcoal surfaces.
   Presentation-only: no data model, table or content changes. */

/* Keep article interactions within a comfortable reading measure, with breathing room
   inside the article card; do not let border-to-border widgets feel like full-bleed banners. */
body.public-site .qh22-article-main .qh23-engagement{
  box-sizing:border-box!important;min-width:0!important;
  width:calc(100% - clamp(24px,5vw,64px))!important;
  max-width:880px!important;
  margin:clamp(22px,3vw,34px) auto 0!important;
  padding:clamp(15px,2vw,23px) 0 clamp(14px,2vw,24px)!important;
  display:grid!important;gap:clamp(12px,1.8vw,18px)!important;
  border-top:1px solid var(--border,#e2e7e6)!important;
}
body.public-site .qh22-article-main .qh26-feedback,
body.public-site .qh22-article-main .qh26-comments{
  box-sizing:border-box!important;width:100%!important;min-width:0!important;
  padding:clamp(15px,1.8vw,20px)!important;
  border-radius:16px!important;box-shadow:none!important;
}
body.public-site .qh22-article-main .qh26-feedback{
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:clamp(12px,2vw,22px)!important;
}
body.public-site .qh22-article-main .qh26-heading{gap:9px!important;align-items:center!important}
body.public-site .qh22-article-main .qh26-heading-icon{
  width:32px!important;height:32px!important;min-width:32px!important;
  border-radius:10px!important;
}
body.public-site .qh22-article-main .qh26-heading-icon svg,
body.public-site .qh22-article-main .qh26-heading-icon .icon{width:16px!important;height:16px!important}
body.public-site .qh22-article-main .qh26-heading h2{
  font-size:clamp(16px,1.75vw,19px)!important;line-height:1.6!important;letter-spacing:0!important;
}
body.public-site .qh22-article-main .qh26-feedback-copy p{font-size:12.5px!important;line-height:1.85!important;margin:5px 0 1px!important}
body.public-site .qh22-article-main .qh26-feedback-copy small{font-size:11.5px!important;line-height:1.8!important}
body.public-site .qh22-article-main .qh26-vote-actions{gap:8px!important;align-items:center!important;justify-content:flex-start!important}
body.public-site .qh22-article-main .qh26-vote-actions .btn,
body.public-site .qh22-article-main .qh26-comment-submit{
  min-height:39px!important;padding:8px 12px!important;border-radius:10px!important;
  font-size:12.5px!important;line-height:1.45!important;gap:7px!important;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .2s cubic-bezier(.2,.75,.3,1)!important;
}
body.public-site .qh22-article-main .qh26-vote-actions .btn:hover,
body.public-site .qh22-article-main .qh26-comment-submit:hover{transform:translateY(-1px)!important}
body.public-site .qh22-article-main .qh26-vote-actions .icon,
body.public-site .qh22-article-main .qh26-comment-submit .icon{width:16px!important;height:16px!important}
body.public-site .qh22-article-main .qh26-comment-title{
  padding-bottom:12px!important;margin-bottom:10px!important;
  align-items:center!important;gap:10px!important;
}
body.public-site .qh22-article-main .qh26-comment-title p{font-size:12px!important;margin:2px 0 0!important}
body.public-site .qh22-article-main .qh26-comments-empty{
  padding:10px 0!important;gap:7px!important;font-size:12.5px!important;
}
body.public-site .qh22-article-main .qh26-comments-empty .icon{width:17px!important;height:17px!important}
body.public-site .qh22-article-main .qh23-comment-form{gap:10px!important;margin-top:12px!important}
body.public-site .qh22-article-main .qh23-comment-form label{font-size:12.5px!important;line-height:1.75!important;gap:5px!important}
body.public-site .qh22-article-main .qh23-comment-form input:not([type=hidden]),
body.public-site .qh22-article-main .qh23-comment-form textarea{
  font-size:14px!important;min-height:42px!important;padding:10px 13px!important;border-radius:10px!important;
}
body.public-site .qh22-article-main .qh23-comment-form textarea{min-height:100px!important}
body.public-site .qh22-article-main .qh26-comment-note{font-size:11.5px!important;line-height:1.8!important}
body.public-site .qh22-article-main .qh26-comment-submit{min-height:40px!important;justify-self:start!important;align-self:start!important}
/* Connected search header: eliminate the legacy blank area between title and search form. */
body.public-site:not(.public-home) section.page-hero.search-page-hero{
  min-height:0!important;height:auto!important;
  padding:clamp(20px,2.6vw,34px) 0 clamp(16px,2vw,24px)!important;
  margin:0!important;box-shadow:none!important;
}
body.public-site .search-page-hero .site-search-shell{max-width:960px!important;margin-inline:auto!important}
body.public-site .search-page-hero h1{
  font-size:clamp(26px,3.4vw,42px)!important;margin:5px 0 0!important;line-height:1.4!important;
}
body.public-site .search-page-hero p{margin:5px 0 0!important;font-size:13px!important}
body.public-site section.page-hero.search-page-hero + section.section{
  margin:0!important;padding-top:clamp(15px,2vw,23px)!important;
}
body.public-site .search-page-hero + .section>.container{max-width:960px!important}
body.public-site .site-search-form{margin-block:0 12px!important}
/* No accidental mismatched dark surfaces in the admin topbar/account widget. */
html[data-theme="dark"] body.admin-body,
html[data-theme="dark"] body.admin-body :is(.admin-shell,.admin-workspace,.admin-content,#adminMain){
  background-color:#1D1F20!important;background-image:none!important;color:#eef3ef!important;
}
html[data-theme="dark"] body.admin-body header.admin-topbar.admin-topbar,
html[data-theme="dark"] body.admin-body .admin-topbar-start,
html[data-theme="dark"] body.admin-body .admin-topbar-actions{
  background:#202425!important;background-image:none!important;box-shadow:none!important;
}
html[data-theme="dark"] body.admin-body header.admin-topbar.admin-topbar{
  border:0!important;border-bottom:1px solid #3b4240!important;
}
html[data-theme="dark"] body.admin-body .admin-user{
  background:transparent!important;background-image:none!important;box-shadow:none!important;
  color:#eff3ef!important;border-color:#3b4240!important;
}
html[data-theme="dark"] body.admin-body .admin-user :is(strong,small,span){color:#d6dfd9!important}
html[data-theme="dark"] body.admin-body .admin-topbar .avatar-mini{
  background:#292f2c!important;background-image:none!important;color:#eef3ef!important;
  border:1px solid #505c53!important;box-shadow:none!important;
}
html[data-theme="dark"] body.admin-body .admin-topbar :is(.btn-ghost,.icon-btn,.admin-demo-toggle){
  background:#292f2c!important;background-image:none!important;border-color:#46524a!important;color:#e7eee9!important;
}
html[data-theme="dark"] body.admin-body .admin-topbar :is(.btn-ghost,.icon-btn,.admin-demo-toggle):hover{
  background:#353e38!important;border-color:#68816e!important;color:#fff!important;
}
html[data-theme="dark"] body.public-site .search-page-hero,
html[data-theme="dark"] body.public-site section.page-hero.search-page-hero + section.section{
  background:#1D1F20!important;background-image:none!important;border-color:#3b4540!important;
}
html[data-theme="dark"] body.public-site .search-page-hero{background:#202425!important}
html[data-theme="dark"] body.public-site .site-search-form,
html[data-theme="dark"] body.public-site .site-search-form input{
  background:#292f2c!important;border-color:#455149!important;color:#eef3ef!important;
}

/* v4.27 image viewer — light/dark color matched to the actual active site theme.
   Native dialog handles focus trapping, Escape and inert page background. */
body.public-site .qh27-viewer {
  --viewer-bg:#fff;--viewer-raised:#f4f6f6;--viewer-stage:#f0f2f2;
  --viewer-border:#d9e0dd;--viewer-ink:#17221d;--viewer-muted:#65746b;
  display:none;position:fixed!important;inset:0!important;
  width:min(1060px,calc(100vw - 32px))!important;
  height:min(760px,calc(100dvh - 32px))!important;
  max-width:none!important;max-height:none!important;box-sizing:border-box!important;
  padding:0!important;margin:auto!important;border:1px solid var(--viewer-border)!important;
  border-radius:18px!important;background:var(--viewer-bg)!important;color:var(--viewer-ink)!important;
  box-shadow:0 24px 90px rgba(0,0,0,.23)!important;overflow:hidden!important;
}
body.public-site .qh27-viewer[open]{display:flex!important;flex-direction:column!important}
body.public-site .qh27-viewer::backdrop{background:rgba(11,18,16,.74)!important;backdrop-filter:blur(5px)!important}
body.public-site .qh27-viewer-header{
  flex:none!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
  min-height:58px!important;gap:12px!important;padding:9px 14px!important;
  background:var(--viewer-bg)!important;border-bottom:1px solid var(--viewer-border)!important;
}
body.public-site .qh27-viewer-description{min-width:0;display:grid;gap:3px;align-content:center}
body.public-site .qh27-viewer-title{
  color:var(--viewer-ink)!important;font-size:13px!important;font-weight:750!important;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:36vw;
}
body.public-site .qh27-viewer-count{color:var(--viewer-muted)!important;font-size:11px!important}
body.public-site .qh27-viewer-controls{display:flex!important;gap:5px!important;align-items:center!important;flex:none!important}
body.public-site .qh27-viewer-controls :is(button,a),
body.public-site .qh27-viewer-nav {
  width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
  display:grid!important;place-items:center!important;box-sizing:border-box!important;
  padding:0!important;background:var(--viewer-raised)!important;color:var(--viewer-ink)!important;
  border:1px solid var(--viewer-border)!important;border-radius:10px!important;
  font:inherit!important;text-decoration:none!important;cursor:pointer!important;
  transition:background-color .17s ease,border-color .17s ease,transform .17s ease!important;
}
body.public-site .qh27-viewer-controls :is(button,a):hover,
body.public-site .qh27-viewer-nav:hover{
  background:var(--viewer-stage)!important;border-color:#a1b4a7!important;transform:translateY(-1px)!important;
}
body.public-site .qh27-viewer-controls :is(button,a):focus-visible,
body.public-site .qh27-viewer-nav:focus-visible{outline:2px solid #4a9b6f!important;outline-offset:2px!important}
body.public-site .qh27-viewer-controls button:disabled{opacity:.35!important;cursor:default!important;transform:none!important}
body.public-site .qh27-viewer-scale{
  color:var(--viewer-muted)!important;font-size:11px!important;font-variant-numeric:tabular-nums!important;
  min-width:40px!important;text-align:center!important;direction:ltr;
}
body.public-site .qh27-viewer-controls .qh27-viewer-close{
  background:transparent!important;margin-inline-start:5px!important;
}
body.public-site .qh27-viewer-body{
  flex:1!important;min-height:0!important;min-width:0!important;
  display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;
  align-items:stretch!important;gap:0!important;padding:10px!important;
  background:var(--viewer-stage)!important;
}
body.public-site .qh27-viewer-nav{
  align-self:center!important;justify-self:center!important;
  width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
  border-radius:50%!important;background:var(--viewer-bg)!important;
}
body.public-site .qh27-viewer-nav[hidden]{visibility:hidden!important;pointer-events:none!important}
body.public-site .qh27-viewer-stage{
  min-width:0!important;min-height:0!important;overflow:hidden!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  border-radius:12px!important;background:var(--viewer-stage)!important;
  touch-action:pan-y!important;user-select:none;-webkit-user-select:none;
}
body.public-site .qh27-viewer-stage.is-zoomed{cursor:grab!important;touch-action:none!important}
body.public-site .qh27-viewer-stage.is-dragging{cursor:grabbing!important}
body.public-site .qh27-viewer-stage img{
  display:block!important;object-fit:contain!important;
  width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;
  margin:0!important;border-radius:8px!important;
  transform-origin:center center!important;will-change:transform!important;
  transition:transform .14s ease!important;box-shadow:0 6px 24px rgba(0,0,0,.09)!important;
}
body.public-site .qh27-viewer-stage.is-dragging img{transition:none!important}
body.public-site .qh27-viewer-error{color:var(--viewer-muted)!important;padding:16px;font-size:14px}
body.public-site .qh27-viewer-footer{
  min-height:41px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:15px!important;padding:7px 17px!important;background:var(--viewer-bg)!important;
  border-top:1px solid var(--viewer-border)!important;
}
body.public-site .qh27-viewer-footer span{
  color:var(--viewer-muted)!important;font-size:11px!important;line-height:1.7!important;
}
body.public-site .qh27-viewer-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;text-align:left}
html[data-theme="dark"] body.public-site .qh27-viewer{
  --viewer-bg:#202425;--viewer-raised:#292f2c;--viewer-stage:#1D1F20;
  --viewer-border:#414b46;--viewer-ink:#eef3ef;--viewer-muted:#bdcbc1;
  color-scheme:dark;
}
html[data-theme="dark"] body.public-site .qh27-viewer-controls :is(button,a):hover,
html[data-theme="dark"] body.public-site .qh27-viewer-nav:hover{
  background:#353e38!important;border-color:#708274!important;
}
@media(max-width:760px){
 body.public-site .qh22-article-main .qh26-feedback{grid-template-columns:1fr!important;gap:12px!important}
 body.public-site .qh22-article-main .qh26-vote-actions{justify-content:flex-start!important;width:100%!important}
 body.public-site .qh22-article-main .qh26-vote-actions .btn{flex:0 1 auto!important;white-space:nowrap!important}
 body.public-site .qh27-viewer{width:calc(100vw - 12px)!important;height:calc(100dvh - 12px)!important;border-radius:14px!important}
 body.public-site .qh27-viewer-header{padding:8px!important;gap:5px!important;flex-wrap:wrap!important}
 body.public-site .qh27-viewer-title{max-width:calc(100vw - 85px)!important;font-size:12px!important}
 body.public-site .qh27-viewer-controls{margin-inline-start:auto!important}
 body.public-site .qh27-viewer-controls :is(button,a){width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important}
 body.public-site .qh27-viewer-body{grid-template-columns:30px minmax(0,1fr) 30px!important;padding:5px!important}
 body.public-site .qh27-viewer-nav{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important}
 body.public-site .qh27-viewer-footer{padding:7px 10px!important}
 body.public-site .qh27-viewer-footer .qh27-viewer-hint{display:none!important}
 body.public-site .qh27-viewer-caption{width:100%;text-align:center}
}
@media(max-width:440px){
 body.public-site .qh22-article-main .qh23-engagement{width:calc(100% - 24px)!important}
 body.public-site .qh22-article-main .qh26-feedback,body.public-site .qh22-article-main .qh26-comments{padding:14px!important;border-radius:14px!important}
 body.public-site .qh22-article-main .qh26-vote-actions{gap:7px!important}
 body.public-site .qh22-article-main .qh26-vote-actions .btn{font-size:11px!important;padding:8px 9px!important;flex:1 1 auto!important}
 body.public-site .qh27-viewer-description{width:100%;max-width:100%}
 body.public-site .qh27-viewer-header{justify-content:center!important}
 body.public-site .qh27-viewer-title{max-width:calc(100vw - 45px)!important}
 body.public-site .qh27-viewer-controls{margin:0 auto!important}
 body.public-site .search-page-hero h1{font-size:28px!important}
}
@media(prefers-reduced-motion:reduce){
 body.public-site .qh27-viewer :is(button,a,img),body.public-site .qh22-article-main .qh26-vote-actions .btn{transition:none!important;animation:none!important;transform:none!important}
}
/* An older theme rule targets section.page-hero, so use the complete element/class
   combination to prevent the blue archive background from leaking into dark search. */
html[data-theme="dark"] body.public-site section.page-hero.search-page-hero{
  background-color:#202425!important;background-image:none!important;
  color:#eef3ef!important;border-bottom:1px solid #404b45!important;
}
html[data-theme="dark"] body.public-site section.page-hero.search-page-hero :is(h1,.section-kicker){color:#eef3ef!important}
html[data-theme="dark"] body.public-site section.page-hero.search-page-hero p{color:#bdcbc1!important}
