/* A single measurement for every mobile header control. */
@media(max-width:760px){
 body.learning-workspace .portal-header{height:auto;min-height:0;margin:6px 7px 0;padding:5px;flex:0 0 auto}
 body.learning-workspace .portal-header .portal-header-inner{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:4px;width:100%;height:auto;padding:0}
 body.learning-workspace .portal-header :is(.workspace-nav,.top-actions){display:contents}
 body.learning-workspace .portal-header :is(.brand,.workspace-nav button,.header-premium,.theme-toggle,#prototype-signin){display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;width:100%;height:41px;min-height:41px;margin:0;padding:2px 3px;border-radius:9px;font-size:clamp(10px,2.8vw,13px);line-height:1.1;text-align:center;white-space:normal;overflow-wrap:anywhere;gap:2px}
 body.learning-workspace .portal-header .brand{font-size:15px}
 body.learning-workspace .portal-header .brand small{font-size:5px;letter-spacing:.8px;margin:0}
 body.learning-workspace .portal-header .workspace-nav button>span{display:none}
 body.learning-workspace .portal-header :is(.header-user,.preview){display:none}
}
/* Desktop keeps the same header layout through the disclosure wrapper. */
.landing-actions { display: contents; }
.mobile-nav-toggle { display: none; }

@media (max-width: 760px) {
  body.centered-globe-home .portal-header {
    margin: 8px 10px 0;
    padding: 6px 8px;
    border: 1px solid #a1d8b144;
    border-radius: 16px;
    background: linear-gradient(155deg, #244d40fa, #102c25fa) !important;
  }
  body.centered-globe-home .portal-header-inner:has(.mobile-nav-toggle:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  body.centered-globe-home .portal-header .brand {
    width: fit-content;
    align-items: flex-start;
    padding-inline: 5px;
    gap: 4px;
    font: 600 15px/1 'TawanaFuturistic', sans-serif;
    letter-spacing: .08em;
  }
  body.centered-globe-home .portal-header .brand small {
    color: #bee2cc;
    font: 600 8px/1.1 'Space Grotesk', 'Segoe UI', sans-serif;
    letter-spacing: .12em;
  }
  .mobile-nav-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #a9db9e4d;
    border-radius: 12px;
    background: #93c9a319;
    color: #e8efaa;
  }
  .mobile-nav-toggle[aria-expanded="true"] {
    background: #deed981c;
    border-color: #e4eca68a;
  }
  .mobile-nav-toggle svg { width: 20px; height: 20px; fill: currentColor; }
  .mobile-nav-toggle:not([hidden]) + .landing-actions { display: none; }
  .mobile-nav-toggle[aria-expanded="true"] + .landing-actions {
    position: absolute;
    inset: calc(100% + 7px) 0 auto auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: min(100%, 340px);
    padding: 7px;
    border: 1px solid #a1d8b155;
    border-radius: 14px;
    background: #183b31fa;
    box-shadow: 0 14px 28px #061b16a6;
  }
  body.centered-globe-home .portal-header :is(#nav-warzone, #home-premium, #prototype-signin) {
    gap: 3px;
    height: 42px;
    min-height: 42px;
    font-size: 11px;
    border: 1px solid #98cea645;
    border-radius: 10px;
  }
  body.centered-globe-home #nav-warzone { background: #6dba8f24; box-shadow: inset 0 0 0 1px #90e6ac36; }
  body.centered-globe-home #prototype-signin { background: #9edcca10; }
  .centered-globe-home :is(#nav-warzone, #home-premium, #prototype-signin)::before {
    content: '';
    width: 14px;
    height: 14px;
    background: currentColor;
    mask: var(--mobile-nav-icon) center / contain no-repeat;
  }
  .centered-globe-home #nav-warzone { --mobile-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E"); }
  .centered-globe-home #home-premium { --mobile-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='m12 2 3 6 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1z'/%3E%3C/svg%3E"); }
  .centered-globe-home #prototype-signin { --mobile-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 4h7v16h-7M3 12h12m-4-4 4 4-4 4'/%3E%3C/svg%3E"); }
}
.useful-commands{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:7px 0}.useful-commands strong{font-size:11px;color:var(--tt-muted);margin-right:3px}.useful-commands code{padding:2px 6px;background:var(--tt-soft);border:1px solid var(--tt-border);border-radius:5px;color:var(--tt-accent);font:12px Consolas,monospace}#open-admin{color:var(--tt-accent);text-decoration:underline}
.warzone-signature{max-width:95vw}.ctf-inline-evidence pre{overflow-wrap:anywhere}
#premium-page :is([data-price-card],[data-plan]) { --plan-ink:var(--configured-plan-color,hsl(var(--plan-hue) 78% 76%)); }
[data-theme="light"] #premium-page :is([data-price-card],[data-plan]) { --plan-ink:color-mix(in srgb,var(--configured-plan-color,hsl(var(--plan-hue) 78% 76%)) 48%,#16291f); }
.leaderboard-empty{grid-column:1/-1;padding:15px;color:var(--tt-muted);font-size:13px;text-align:center}
