/* Exact-stage Forum refinement: compact discovery, restrained post actions. */
@media screen {
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar.sf-frame{padding:20px 24px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar>.inner{display:block;position:static}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-branding{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;width:100%;padding:0;min-width:0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar:has(.fc-header-search) .mf-branding{padding-inline-end:var(--fc-search-space,112px)}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-branding #logo{flex:0 1 285px;max-width:100%;min-width:0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-site-copy{flex:1 1 max-content;max-width:100%;min-width:0;margin:0;text-align:right}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-site-copy h1{overflow-wrap:normal;word-break:normal}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .skiplink{position:absolute;inset-inline-start:20px;inset-block-start:8px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search{margin:0;padding:0;border:0;background:none;position:static}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search>summary{position:absolute;inset-block-start:20px;inset-inline-end:24px;z-index:6;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;min-width:44px;padding:8px 12px;box-sizing:border-box;list-style:none;cursor:pointer;border:1px solid #6c8e9e;background:#0c2633;color:#eaf8ff;font:600 16px/1.3 Barlow,sans-serif}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search>summary::-webkit-details-marker{display:none}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search[open]>summary{background:#1a4050;border-color:#9bdff0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search #search-box{float:none;width:100%;max-width:100%;margin:14px 0 0;padding:12px 0 0;border-top:1px solid #43616f}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search[open] #search-box{display:block!important}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search fieldset{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:stretch;gap:0;width:100%;margin:0;padding:0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search input.inputbox{width:100%;min-width:0;margin:0;border-radius:0;min-height:44px;font-size:16px;line-height:1.4;padding:9px 12px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search :is(button.button,a.button){display:inline-flex;align-items:center;justify-content:center;float:none;box-sizing:border-box;min-width:44px;min-height:44px;height:auto;line-height:1;margin:0;padding:10px;background:#0c2633;color:#eaf8ff;border:1px solid #6c8e9e;border-radius:0;text-shadow:none}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search .icon{display:inline-block;line-height:1;margin:0;vertical-align:middle}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .postbody .post-buttons{position:static;float:none;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;inline-size:100%!important;max-inline-size:100%;padding:12px 0 0;margin:18px 0 0;border-top:1px solid #43616f;box-sizing:border-box}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .postbody .post-buttons>li{float:none;max-width:100%;margin:0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .postbody .post-buttons .button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;box-sizing:border-box;padding:8px 12px;line-height:1.4;background:#0c2633;color:#eaf8ff;border:1px solid #6c8e9e;border-radius:0;box-shadow:none;text-shadow:none}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) :is(.fc-header-search>summary,.fc-header-search .button,.postbody .post-buttons .button):hover{background:#173e50;color:#d8f7ff;border-color:#a5e9fa}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) :is(.fc-header-search>summary,.fc-header-search .button,.postbody .post-buttons .button):active{background:#245267;color:#fff}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) :is(.fc-header-search>summary,.fc-header-search .button,.fc-header-search input,.postbody .post-buttons a):focus-visible{outline:2px solid #9beaff;outline-offset:3px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-quote-label{font:600 15px/1.4 Barlow,sans-serif}
}
@media screen and (max-width:700px){
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar.sf-frame{padding:18px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar:has(.fc-header-search) .mf-branding{padding-inline-end:0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-branding{display:block}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-branding #logo{max-width:calc(100% - 56px)}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-lockup{width:216px;max-width:100%}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-site-copy{margin-top:8px;text-align:left}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar .mf-site-copy h1{margin-bottom:4px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-header-search>summary{inset-block-start:18px;inset-inline-end:18px;padding:8px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .fc-search-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media print{.fc-header-search{display:none}}

/* Content-driven enlarged-label fallback; same field order as existing responsive rows. */
@media screen {

  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.row dl.row-item {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 16px;}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.row dl.row-item>dt {grid-column:1/-1;}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.header dd:is(.topics,.posts,.views,.lastpost) {display:none;}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.header dl.row-item {display:block;}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.row dl.row-item>dd {margin-left:40px;}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.row dl.row-item>dd:is(.topics,.posts,.views) {display:flex;flex-wrap:wrap;align-items:baseline;gap:.3em;padding-top:0!important;}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.row dl.row-item>dd dfn {display:inline;position:static;clip:auto;clip-path:none;overflow:visible;width:auto;height:auto;margin:0;font-style:normal;}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.row dl.row-item>dd:is(.lastpost,.redirect) {grid-column:1/-1;display:block!important;margin-left:40px;}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-group.fc-rows-reflow .topiclist li.row dl.row-item>dd.lastpost dfn {display:block;}
 
}

/* Fill follows the same chamfer as its metal paint; never clip the content or menus. */
@media screen {
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-frame{--fc-frame-fill:rgba(5,18,28,.91);background-color:transparent!important}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .headerbar.sf-frame{--fc-frame-fill:rgba(5,18,28,.88)}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .mf-topic-preview.sf-frame{--fc-frame-fill:rgba(5,18,28,.9)}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-frame::before{content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;background:var(--fc-frame-fill);clip-path:polygon(var(--fc-frame-cut,14px) 0,calc(100% - var(--fc-frame-cut,14px)) 0,100% var(--fc-frame-cut,14px),100% calc(100% - var(--fc-frame-cut,14px)),calc(100% - var(--fc-frame-cut,14px)) 100%,var(--fc-frame-cut,14px) 100%,0 calc(100% - var(--fc-frame-cut,14px)),0 var(--fc-frame-cut,14px))}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .sf-frame>.cs-ambient-canvas{clip-path:polygon(var(--fc-frame-cut,14px) 0,calc(100% - var(--fc-frame-cut,14px)) 0,100% var(--fc-frame-cut,14px),100% calc(100% - var(--fc-frame-cut,14px)),calc(100% - var(--fc-frame-cut,14px)) 100%,var(--fc-frame-cut,14px) 100%,0 calc(100% - var(--fc-frame-cut,14px)),0 var(--fc-frame-cut,14px))}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .postbody .post-buttons .dropdown .fc-quote-label{display:none}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .postbody .post-buttons .dropdown-contents>li>a{min-height:44px;display:flex;align-items:center;justify-content:flex-end;gap:7px;box-sizing:border-box}
}

@media screen {
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .post:has(.post-buttons .dropdown-container.dropdown-visible){z-index:10}
}

/* Forum-stage narrow utility alignment and native board-index quick login. */
@media screen{body#phpbb.forum-circuit-stage:not(.forum-print-view) .mf-utility{margin-inline:0}}
@media screen and (max-width:650px){
 body#phpbb.forum-circuit-stage:not(.forum-print-view) form.headerspace:has(>fieldset.quick-login){container:fc-quick-login / inline-size}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) form.headerspace:has(>fieldset.quick-login)>h3{display:flex;flex-wrap:wrap;align-items:center;column-gap:4px;margin:0 0 8px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) form.headerspace:has(>fieldset.quick-login)>h3>a{display:inline-flex;align-items:center;min-height:44px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) form.headerspace>fieldset.quick-login{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:12px 8px;align-items:center;min-width:0;margin:0;font-size:1rem;line-height:1.4}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>label:is([for=username],[for=password]){display:grid;grid-template-columns:6rem minmax(0,1fr);align-items:center;gap:8px;grid-column:1/-1;width:auto;min-width:0;margin:0;padding:0;white-space:normal}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>label>span{min-width:0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login input.inputbox{display:block;width:100%;max-width:100%;min-width:0;min-height:44px;height:auto;margin:0;padding:8px 10px;font-size:1rem;line-height:1.5;box-sizing:border-box}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>label[for=autologin]{display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:8px;min-height:44px;min-width:0;width:auto;margin:0;padding:0;text-align:left;white-space:normal}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login input[type=checkbox]{flex:none;width:18px;height:18px;margin:0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>input[type=submit]{grid-column:2;min-height:44px;margin:0}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>a{grid-column:1/-1;display:flex;align-items:center;min-height:44px;white-space:normal}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>label[for=autologin]:has(input:focus-visible){outline:2px solid var(--mf-cyan);outline-offset:2px}
 @container fc-quick-login (max-width:calc(14rem + 8px)){
  body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>label:is([for=username],[for=password]){grid-template-columns:minmax(0,1fr);gap:4px}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>label[for=autologin]{grid-column:1/-1}
  body#phpbb.forum-circuit-stage:not(.forum-print-view) fieldset.quick-login>input[type=submit]{grid-column:1;justify-self:start}
 }
}

/* One native search form in the Forum-stage utility bar; no duplicated controls. */
@media screen {
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar:has(>.fc-nav-search){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar:has(>.fc-nav-search)>.inner{min-width:0;flex-wrap:wrap}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar:has(>.fc-nav-search) #nav-breadcrumbs{flex-basis:6rem}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar>.fc-nav-search{display:block;position:static;align-self:start;min-width:44px;margin:0;padding:0;border:0;background:none}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar>.fc-nav-search>summary{position:static;min-width:44px;min-height:44px;box-sizing:border-box;margin:0;padding:8px 10px;font:600 1rem/1.3 Barlow,sans-serif}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar>.fc-nav-search #search-box{position:absolute;inset-inline:0;top:calc(100% + 5px);z-index:30;width:auto;max-width:none;margin:0;padding:12px;border:1px solid #6c8e9e;background:#071823;box-shadow:0 12px 28px #0009;max-height:var(--mf-sticky-menu-space,60dvh);overflow:auto;overscroll-behavior:contain}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar>.fc-nav-search input.inputbox{font-size:1rem}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar:has(>.fc-nav-search).mf-nav-compact .mf-utility-toggle{padding-inline:8px;gap:6px;min-width:88px}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar:has(>.fc-nav-search) .breadcrumbs:not(.mf-has-trail) .crumb{min-width:0;flex:1}
 body#phpbb.forum-circuit-stage:not(.forum-print-view) .navbar:has(>.fc-nav-search) .breadcrumbs:not(.mf-has-trail) .crumb a{white-space:normal;min-width:0}
}

@media screen{body#phpbb.forum-circuit-stage.nojs .navbar:has(>.fc-nav-search){position:relative}}

/* Run57: native search metadata must fill the Circuit grid track, not 30% of it. */
body.forum-circuit-stage .search.post > .inner > .postprofile {
 width: auto;
 min-width: 0;
 box-sizing: border-box;
}
/* Component-width threshold grows with root text size; preserve normal desktop grid. */
body.forum-circuit-stage .search.post { container-type: inline-size; container-name: fc-search-result; }
@container fc-search-result (max-width: 42rem) {
 body.forum-circuit-stage .search.post > .inner { display: block; }
 body.forum-circuit-stage .search.post > .inner > .postprofile {
  display: block;
  border-inline-end: 0;
  border-block-end: 1px solid var(--mf-line);
 }
}

body.forum-circuit-stage .search.post > .inner > .postbody { width: auto; min-width: 0; box-sizing: border-box; }
/* Native prosilver <=700px zeroes .search .postbody padding after Circuit CSS.
   Restore its intended reading inset without altering other post bodies/desktop. */
@media (max-width: 700px) {
 body.forum-circuit-stage .search.post > .inner > .postbody { padding: 18px 16px; }
}
body.forum-circuit-stage .search.post > .inner > .postbody :is(h3, .content) { overflow-wrap: anywhere; }
