/* Shared-chrome host: hide only the duplicated brand header inside its iframe.
   Standalone views and all tournament/account controls retain their chrome. */
html[data-vy-host-chrome="site"] :is(.judge-public-header,.organizer-public-header){display:none!important}
/* The same account bar is also used on a secretary's ordinary profile, where
   the protocol-only stylesheet is intentionally not mounted. */
.secretary-account-bar {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:8px max(20px,4vw);border-bottom:1px solid #dce0e4;background:#fff;color:#59616a;font-size:12px;}
.secretary-account-bar>div {display:flex;align-items:center;gap:16px;min-width:0;}
.secretary-account-bar>div>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:34ch;}
.secretary-account-bar form {margin:0;}
@media(max-width:700px) {
 .secretary-account-bar {padding:8px 16px;gap:10px;}
 .secretary-account-bar>span {display:none;}
 .secretary-account-bar>div {width:100%;justify-content:space-between;}
 .secretary-account-bar>div>span {max-width:28ch;}
}
/* Scoped to the inner document: never changes Tilda's page styles. */
/* G58 outer rules are opt-in via the cabinet host marker. Other site pages,
   public tables and native select positioning keep their existing styles. */
/* Browser focus scrolling must not race the host's explicit navigation scroll.
   Explicit scrollTo({behavior:'smooth'}) remains smooth inside this scope. */
html:has(.participant-frame[data-frame-state]),
body:has(.participant-frame[data-frame-state]){scroll-behavior:auto}
.participant-frame[data-frame-state]{box-sizing:border-box;position:relative;overflow-anchor:none}
.participant-frame[data-frame-state] iframe{box-sizing:border-box;display:block;width:100%;min-width:0;overflow-anchor:none}
body.g58-frame-initial-loading .participant-frame[data-frame-state]{min-height:calc(100svh - 140px);background:#fff}
body.g58-frame-initial-loading .participant-frame[data-frame-state] iframe{visibility:hidden}
body.g58-frame-initial-loading footer{visibility:hidden}
.participant-frame[data-frame-state] [data-vy-loading]{position:absolute;inset:0 0 auto;margin:0;padding:24px;color:#555f68;font:400 14px/1.6 Roboto,Arial,sans-serif}
.g58-frame-fallback,.g58-noscript{box-sizing:border-box;margin:0;padding:16px 20px;background:#f1f3f5;color:#333d46;font:400 14px/1.6 Roboto,Arial,sans-serif}
.g58-frame-fallback a,.g58-noscript a{color:#71380f;text-decoration:underline;text-underline-offset:3px}
body.g58-frame-initial-loading:has(.g58-noscript) .participant-frame iframe,
body.g58-frame-initial-loading:has(.g58-noscript) footer{visibility:visible}
body:has(.g58-noscript) .participant-frame [data-vy-loading]{display:none}
@media(prefers-reduced-motion:reduce){.participant-frame[data-frame-state] iframe{transition:none}}
.site-staff-list{list-style:none;padding:0;margin:20px 0;display:grid;gap:10px}.site-staff-list li{padding:12px 14px;background:#f5f5f2;border:1px solid #e0e1da;display:flex;flex-wrap:wrap;gap:8px 20px;justify-content:space-between}.site-staff-list strong small{display:block;margin-top:3px;color:#676b63;font-size:12px;font-weight:500;overflow-wrap:anywhere}.site-staff-list span{font-size:14px;color:#53584e}.individual-builder{border:1px solid #dcded6;padding:18px;margin:18px 0}.individual-builder legend{font-weight:700;padding:0 8px}
body[data-site-cabinet]{background:#f5f5f2;color:#171817;margin:0;min-width:0}
body[data-site-cabinet] .page{max-width:1220px;margin:0 auto;padding:24px 28px 40px}
.site-cabinet-bar,.site-tabs{max-width:1220px;margin:auto;padding:16px 28px;display:flex;gap:16px;align-items:center}
.site-cabinet-bar{justify-content:space-between;border-bottom:1px solid #d9d9d3}
.site-role{font-size:14px;font-weight:700}.site-account{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.site-account form{margin:0}.site-profile{color:#272925;font-size:14px}
.site-tabs{flex-wrap:wrap;gap:8px;padding-top:14px;padding-bottom:14px}.site-tab{padding:10px 14px;min-height:44px;box-sizing:border-box;display:inline-flex;align-items:center;border:1px solid #d2d3cc;border-radius:4px;text-decoration:none;font-size:14px;font-weight:600;color:#30322d;background:#fff}.site-tab:hover,.site-tab.is-current{color:#151713;background:#ff8019;border-color:#ff8019}
.site-command{position:sticky;top:0;z-index:1000;background:#111;color:#fff;border-bottom:3px solid #ef6b24;box-shadow:0 5px 18px #0002}.site-command-inner{max-width:1320px;min-height:72px;margin:auto;padding:0 28px;display:grid;grid-template-columns:minmax(190px,.8fr) minmax(500px,1.8fr) minmax(250px,.9fr);align-items:stretch}.site-command-context{display:flex;flex-direction:column;justify-content:center;gap:3px;padding-right:22px;border-right:1px solid #353535;color:#fff;text-decoration:none;min-width:0}.site-command-context span{font-size:9px;font-weight:800;letter-spacing:.15em;color:#ef6b24}.site-command-context strong{font-family:'Roboto Condensed',Arial,sans-serif;font-size:18px;line-height:1.1;text-transform:uppercase;letter-spacing:.01em}.site-command-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}.site-command-nav .site-tab{position:relative;justify-content:center;gap:9px;min-height:72px;padding:13px 16px;border:0;border-right:1px solid #353535;border-radius:0;background:transparent;color:#d8d8d5;font-size:13px;font-weight:700;text-align:center}.site-command-nav .site-tab span{font-size:9px;letter-spacing:.08em;color:#777}.site-command-nav .site-tab:hover{background:#1c1c1c;color:#fff}.site-command-nav .site-tab.is-current{background:#242424;color:#fff;box-shadow:inset 0 -4px 0 #ef6b24}.site-command-nav .site-tab.is-current span{color:#ef6b24}.site-command-account{display:flex;align-items:center;justify-content:flex-end;gap:14px;padding-left:20px;min-width:0}.site-command-role{font-size:10px;line-height:1.35;color:#999;text-align:right}.site-command-account .site-account{gap:10px;flex-wrap:nowrap;min-width:0}.site-command-account .site-profile{color:#fff;font-size:12px;font-weight:700;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.site-command-account .quiet-button{border-color:#555;color:#eee;background:transparent;min-height:40px;padding:9px 11px}.site-command-account .quiet-button:hover{background:#282828}.site-command a:focus-visible,.site-command button:focus-visible{outline:3px solid #ef6b24;outline-offset:-3px}
body[data-site-manager] .page{padding-top:14px}body[data-site-manager] .program-navigation{gap:10px;margin:0 0 10px;padding:0 0 12px}body[data-site-manager] .stage-context{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}body[data-site-manager] .stage-tabs{padding:3px}body[data-site-manager] .stage-tab{min-height:40px;padding:9px 16px;font-size:13px}body[data-site-manager][data-board-workspace] .hero-inner{padding-top:20px;padding-bottom:18px}body[data-site-manager][data-board-workspace] .leaderboard-hero h1{margin:8px 0 14px}
.site-welcome{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:8px 0 24px}.site-welcome h1{font-size:clamp(30px,4vw,46px);line-height:1.1;margin:8px 0 14px}.site-welcome p{max-width:680px;line-height:1.6}.site-eyebrow{font-size:11px;font-weight:800;letter-spacing:.09em;color:#595d55}.site-status{padding:10px 12px;background:#e9ebe4;border:1px solid #d4d7cc;font-size:12px;white-space:nowrap;border-radius:4px}
.site-owner-note{padding:18px 22px;border-left:4px solid #f47b16;background:#fff;margin-bottom:24px}.site-owner-note p{margin:8px 0 0;line-height:1.6;max-width:900px}
.site-stage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.site-stage{padding:24px;background:#fff;border:1px solid #dcded6;border-radius:6px}.site-stage h2{margin:10px 0 14px;font-size:28px}.site-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}.site-actions a{margin:0;display:inline-flex;align-items:center;justify-content:center;min-height:44px}
.site-team{padding:24px;background:#fff;border:1px solid #dcded6;border-radius:6px;margin-top:24px}.site-team h2{font-size:26px;margin:0 0 10px}.site-team>p{line-height:1.6}.site-team form{max-width:760px;margin-top:20px}.site-help{margin:26px 0 0;color:#60645b;line-height:1.6}
body[data-site-cabinet] .page-heading:has(+.site-welcome){display:none}body[data-site-cabinet] .page>header.page-heading{margin-bottom:20px}
@media(max-width:700px){body[data-site-cabinet] .page{padding:18px 16px 32px}.site-cabinet-bar,.site-tabs{padding:14px 16px}.site-cabinet-bar{align-items:flex-start;gap:12px}.site-account{justify-content:flex-end;gap:8px;max-width:62%}.site-profile{overflow-wrap:anywhere}.site-role{font-size:12px}.site-tab{font-size:12px;padding:10px}.site-welcome{display:block}.site-welcome h1{font-size:32px}.site-status{display:inline-block;margin-top:4px;white-space:normal}.site-stage-grid{grid-template-columns:1fr}.site-stage,.site-team{padding:20px}.site-actions{gap:10px}.site-actions a{width:100%;box-sizing:border-box}.site-owner-note{padding:16px 18px}.site-team input,.site-team select{max-width:100%;box-sizing:border-box}}
@media(max-width:860px){.site-command{position:sticky}.site-command-inner{min-height:0;padding:0 14px;grid-template-columns:minmax(0,1fr) auto;align-items:center}.site-command-context{min-height:54px;padding-right:12px;border-right:0}.site-command-context span{font-size:8px}.site-command-context strong{font-size:15px}.site-command-account{min-height:54px;padding-left:8px;gap:8px}.site-command-role{display:none}.site-command-account .site-account{max-width:none}.site-command-account .site-profile{max-width:96px;font-size:11px}.site-command-account .quiet-button{min-height:36px;padding:7px 9px;font-size:10px}.site-command-nav{grid-column:1/-1;border-top:1px solid #353535}.site-command-nav .site-tab{min-height:52px;padding:8px 6px;border-right:1px solid #353535;font-size:10px;line-height:1.25;white-space:normal}.site-command-nav .site-tab:last-child{border-right:0}.site-command-nav .site-tab span{display:none}body[data-site-manager] .page{padding-top:10px}body[data-site-manager] .program-navigation{align-items:flex-start;gap:7px;margin-bottom:8px;padding-bottom:9px}body[data-site-manager] .stage-context{width:100%;font-size:9px}body[data-site-manager] .stage-tabs{width:100%}body[data-site-manager] .stage-tab{flex:1;padding:8px 10px;min-height:38px;font-size:12px}}
body[data-site-manager] .site-command-nav .site-tab.is-current{background:#242424;color:#fff}
@media(max-width:860px){body[data-site-manager] .site-command-nav .site-tab{font-size:11px;line-height:1.22}}
/* Organizer command surface: compact and explicit at every breakpoint. */
body[data-site-manager] .site-command{border-bottom-color:#f07a24}
body[data-site-manager] .site-command-context span,
body[data-site-manager] .site-command-nav .site-tab.is-current span{color:#f07a24}
body[data-site-manager] .site-command-nav .site-tab.is-current{box-shadow:inset 0 -4px 0 #f07a24}
body[data-site-manager] .site-command a:focus-visible,
body[data-site-manager] .site-command button:focus-visible{outline-color:#f07a24}
body[data-site-manager][data-board-workspace] .leaderboard-hero{padding-top:36px}
@media(max-width:860px){
body[data-site-manager] .site-command-context{grid-column:1;grid-row:1}
body[data-site-manager] .site-command-account{grid-column:2;grid-row:1}
body[data-site-manager] .site-command-nav{grid-column:1/-1;grid-row:2}
body[data-site-manager] .site-command-account .quiet-button{min-height:44px}
body[data-site-manager][data-board-workspace] .leaderboard-hero{padding-top:20px}
}
@media(max-width:360px){
body[data-site-manager] .site-command-account .site-profile{display:none}
body[data-site-manager] .page-heading{display:block}
body[data-site-manager] .page-heading>div:first-child{width:100%;min-width:0}
body[data-site-manager] .page-heading h1{word-break:normal;overflow-wrap:normal;max-width:100%}
body[data-site-manager] .page-heading .page-context{width:100%;margin-top:12px;justify-content:flex-start}
}

/* G38: one clear organizer command surface and a complete team editor. */
body[data-site-manager] .site-welcome{margin-top:0}
body[data-site-manager] .site-team{margin-top:0;border-radius:0;border-top:4px solid #f07a24;padding:clamp(20px,3vw,34px)}
body[data-site-manager] .site-team-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:28px;padding-bottom:24px;border-bottom:1px solid #dcded6}
body[data-site-manager] .site-team-heading>div{max-width:720px}
body[data-site-manager] .site-team-heading h2{font-size:clamp(28px,3vw,40px);margin:6px 0 10px}
body[data-site-manager] .site-team-heading p{line-height:1.6;margin:0}
body[data-site-manager] .site-team-heading>.quiet-button{flex:0 0 auto;min-height:46px;display:inline-flex;align-items:center;justify-content:center}
body[data-site-manager] .site-team>h3{font-size:18px;margin:28px 0 14px}
body[data-site-manager] .site-staff-list{margin:0}
body[data-site-manager] .site-staff-list li{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px;background:#f7f7f4}
body[data-site-manager] .site-staff-list li>div{display:grid;grid-template-columns:minmax(180px,1fr) minmax(190px,auto);align-items:center;gap:16px 28px;flex:1;min-width:0}
body[data-site-manager] .site-staff-list strong,body[data-site-manager] .site-staff-list span{min-width:0}
body[data-site-manager] .site-staff-list strong small{font-weight:500}
body[data-site-manager] .site-staff-revoke{margin:0;flex:0 0 auto}
body[data-site-manager] .site-staff-revoke .quiet-button{min-height:40px;color:#852f08;border-color:#d9b8a7;background:#fff}
body[data-site-manager] .site-staff-empty{padding:20px;background:#f7f7f4;border:1px dashed #bfc1ba}
body[data-site-manager] .site-staff-empty p{margin:7px 0 0;color:#61655d}
body[data-site-manager] .site-staff-add{margin-top:28px;padding:22px;background:#f7f7f4;border:1px solid #dcded6}
body[data-site-manager] .site-staff-add h3{margin:0 0 16px;font-size:20px}
body[data-site-manager] .site-staff-add form{max-width:none;margin:0;display:grid;grid-template-columns:minmax(210px,1.25fr) minmax(170px,.8fr) minmax(230px,1fr) auto;align-items:end;gap:16px}
body[data-site-manager] .site-staff-add form>.field-note{grid-column:1/-1;margin:0}
body[data-site-manager] .site-staff-add form>button{min-height:46px}
body[data-site-manager][data-board-workspace] .leaderboard-hero{border-bottom:3px solid #f07a24}
body[data-site-manager][data-board-workspace] .leaderboard-hero h1{font-size:clamp(30px,3.4vw,46px);margin:6px 0 12px}
@media(max-width:900px){body[data-site-manager] .site-staff-add form{grid-template-columns:1fr 1fr}body[data-site-manager] .site-staff-add form>button{width:100%}}
@media(max-width:700px){body[data-site-manager] .site-team-heading{display:block}body[data-site-manager] .site-team-heading>.quiet-button{width:100%;box-sizing:border-box;margin-top:18px}body[data-site-manager] .site-staff-list li{align-items:stretch;flex-direction:column}body[data-site-manager] .site-staff-list li>div{display:block}body[data-site-manager] .site-staff-list span{display:block;margin-top:10px}body[data-site-manager] .site-staff-revoke .quiet-button{width:100%}body[data-site-manager] .site-staff-add form{grid-template-columns:1fr}}
@media(max-width:1280px) and (min-width:861px){
body[data-site-manager] .site-command-inner{grid-template-columns:minmax(260px,1fr) auto;padding:0 22px}
body[data-site-manager] .site-command-context{grid-column:1;grid-row:1;min-height:58px;border-right:0}
body[data-site-manager] .site-command-account{grid-column:2;grid-row:1;min-height:58px}
body[data-site-manager] .site-command-nav{grid-column:1/-1;grid-row:2;border-top:1px solid #353535}
body[data-site-manager] .site-command-nav .site-tab{min-height:50px}
body[data-site-manager] .site-command-account .site-profile{max-width:160px}
}

/* G41 — equal stage geometry and one selected-state language. */
body[data-site-manager] .stage-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;width:min(100%,360px);padding:0;border:1px solid #c9c6c0;border-radius:0;background:#fff}
body[data-site-manager] .stage-tab{box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-width:0;border-radius:0;background:#fff;color:#5c5953;box-shadow:none}
body[data-site-manager] .stage-tab+.stage-tab{border-left:1px solid #c9c6c0}
body[data-site-manager] .stage-tab.is-current{color:#30271f;background:#f4f1ec;box-shadow:inset 0 -3px 0 #f07a24}
body[data-site-manager] .site-tabs:not(.site-command-nav){gap:0;border:1px solid #c9c6c0;background:#fff}
body[data-site-manager] .site-tabs:not(.site-command-nav) .site-tab{border:0;border-right:1px solid #c9c6c0;border-radius:0;background:#fff;color:#4d4943}
body[data-site-manager] .site-tabs:not(.site-command-nav) .site-tab.is-current{color:#201d1a;background:#f4f1ec;box-shadow:inset 0 -3px 0 #f07a24}
@media(max-width:860px){body[data-site-manager] .stage-tabs{width:100%}}

/* G46 — judges and secretaries keep their role and navigation in view. */
body[data-board-workspace][data-staff-role="judge"] .site-cabinet-bar,
body[data-board-workspace][data-staff-role="secretary"] .site-cabinet-bar{position:sticky;top:0;z-index:1200;box-sizing:border-box;background:#f5f5f2;box-shadow:0 1px 0 #d9d9d3}
body[data-board-workspace][data-staff-role="judge"] .site-tabs,
body[data-board-workspace][data-staff-role="secretary"] .site-tabs{position:sticky;top:var(--staff-bar-height,76px);z-index:1190;box-sizing:border-box;background:#f5f5f2;border-bottom:1px solid #d9d9d3;box-shadow:0 5px 16px #1111}
body[data-board-workspace][data-staff-role="judge"] .leaderboard-hero,
body[data-board-workspace][data-staff-role="secretary"] .leaderboard-hero{scroll-margin-top:calc(var(--staff-shell-height,132px) + 12px)}
@media(max-width:700px){
  body[data-board-workspace][data-staff-role="judge"] .site-cabinet-bar,
  body[data-board-workspace][data-staff-role="secretary"] .site-cabinet-bar{align-items:center;min-height:60px}
  body[data-board-workspace][data-staff-role="judge"] .site-tabs,
  body[data-board-workspace][data-staff-role="secretary"] .site-tabs{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}
  body[data-board-workspace][data-staff-role="judge"] .site-tabs .site-tab,
  body[data-board-workspace][data-staff-role="secretary"] .site-tabs .site-tab{flex:0 0 auto;white-space:nowrap}
}

/* G49 — the organizer shell has a stable height; judge/secretary heights are
   measured by the existing ResizeObserver and used by the table headings. */
body[data-site-manager][data-board-workspace]{--staff-table-offset:75px}
body[data-site-manager][data-board-workspace] .site-command{box-sizing:border-box;position:sticky;top:0;z-index:1200}
body[data-site-manager][data-board-workspace] .site-command-inner{box-sizing:border-box;min-height:72px;height:72px;grid-template-rows:72px}
body[data-site-manager][data-board-workspace] .site-command-nav .site-tab{box-sizing:border-box;min-height:72px;height:72px;line-height:1.35}
body[data-board-workspace] :is(.site-command,.site-cabinet-bar,.site-tabs) :is(a,button){box-sizing:border-box}
body[data-board-workspace][data-staff-role="judge"] .site-cabinet-bar,
body[data-board-workspace][data-staff-role="secretary"] .site-cabinet-bar{min-width:0;gap:12px}
body[data-board-workspace][data-staff-role="judge"] .site-tabs .site-tab,
body[data-board-workspace][data-staff-role="secretary"] .site-tabs .site-tab{min-height:44px}
body[data-board-workspace] .site-cabinet-bar .site-profile{display:inline-flex;align-items:center;min-height:44px;min-width:0;overflow-wrap:anywhere}
body[data-board-workspace] .site-cabinet-bar .quiet-button{min-height:44px}
@media(max-width:1280px){
  body[data-site-manager][data-board-workspace]{--staff-table-offset:111px}
  body[data-site-manager][data-board-workspace] .site-command-inner{height:108px;min-height:108px;grid-template-rows:58px 50px}
  body[data-site-manager][data-board-workspace] .site-command-context,
  body[data-site-manager][data-board-workspace] .site-command-account{min-height:0}
  body[data-site-manager][data-board-workspace] .site-command-nav{box-sizing:border-box;height:50px}
  body[data-site-manager][data-board-workspace] .site-command-nav .site-tab{height:49px;min-height:49px}
}
@media(max-width:860px){
  body[data-site-manager][data-board-workspace] .site-command-inner{padding-inline:12px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:60px 48px}
  body[data-site-manager][data-board-workspace] .site-command-context{padding-right:8px}
  body[data-site-manager][data-board-workspace] .site-command-context strong{font-size:14px;line-height:1.2}
  body[data-site-manager][data-board-workspace] .site-command-account{padding-left:0;gap:6px}
  body[data-site-manager][data-board-workspace] .site-command-account .site-account{gap:6px}
  body[data-site-manager][data-board-workspace] .site-command-account .site-profile{display:inline-flex;align-items:center;min-height:44px;max-width:82px;font-size:11px}
  body[data-site-manager][data-board-workspace] .site-command-account .quiet-button{min-height:44px;padding:8px;font-size:11px}
  body[data-site-manager][data-board-workspace] .site-command-nav{height:48px}
  body[data-site-manager][data-board-workspace] .site-command-nav .site-tab{height:47px;min-height:47px;padding:6px;font-size:11px;line-height:1.25}
}
@media(max-width:700px){
  body[data-board-workspace][data-staff-role="judge"] .site-cabinet-bar,
  body[data-board-workspace][data-staff-role="secretary"] .site-cabinet-bar{padding:8px 12px;align-items:center;min-height:60px}
  body[data-board-workspace] .site-cabinet-bar .site-account{flex-wrap:nowrap;min-width:0;max-width:72%;gap:8px}
  body[data-board-workspace] .site-cabinet-bar .site-profile{max-width:132px;font-size:12px;line-height:1.35}
  body[data-board-workspace] .site-tabs{padding:8px 12px;gap:6px}
  body[data-board-workspace] .site-tabs .site-tab{font-size:12px;padding:8px 10px}
}
