/* FouadDev Blog V7.11 — public frontend rebuild
   One responsive shell, one navigation, one language control, one theme action.
   Loaded after legacy layers intentionally so the public UI has one final source of truth. */

:root{
  --fd-shell:min(1180px,calc(100vw - 40px));
  --fd-header-h:70px;
  --fd-control-h:42px;
  --fd-radius:18px;
  --fd-radius-sm:12px;
  --fd-section:clamp(56px,7vw,96px);
}
html{scroll-padding-top:calc(var(--fd-header-h) + 28px);text-size-adjust:100%;-webkit-text-size-adjust:100%}
.public-body{overflow-x:clip;min-width:0}
.public-body #content{min-width:0}
.public-body .shell{width:var(--fd-shell);max-width:100%;margin-inline:auto}
.public-body img,.public-body picture,.public-body video,.public-body canvas,.public-body svg{max-width:100%}
.public-body h1,.public-body h2,.public-body h3,.public-body p,.public-body a,.public-body button,.public-body label{overflow-wrap:normal;word-break:normal}
.public-body .section{padding-block:var(--fd-section)}
.public-body .reveal,.public-body.js .reveal{opacity:1;transform:none}
.public-body.js .reveal{transition:opacity .35s ease,transform .35s ease}
.public-body.js .reveal:not(.is-visible){opacity:.001;transform:translateY(8px)}
@media (prefers-reduced-motion:reduce){.public-body.js .reveal{opacity:1!important;transform:none!important}}

/* ---------- Header ---------- */
.public-body .site-header{
  position:sticky!important;top:0!important;left:auto!important;right:auto!important;z-index:120!important;transform:none!important;
  display:block!important;width:100%!important;height:auto!important;min-height:0!important;
  padding:10px 0!important;margin:0!important;border:0!important;border-radius:0!important;
  background:color-mix(in srgb,var(--bg) 88%,transparent)!important;
  backdrop-filter:blur(18px) saturate(135%);-webkit-backdrop-filter:blur(18px) saturate(135%);
  box-shadow:0 1px 0 var(--line)!important;
}
.public-body .site-header-inner{
  min-height:var(--fd-header-h);display:grid!important;
  grid-template-columns:minmax(210px,auto) minmax(0,1fr) auto;
  align-items:center;gap:18px;
}
.public-body .brand{display:inline-flex;align-items:center;gap:11px;min-width:0}
.public-body .brand-mark{width:44px!important;height:44px!important;min-width:44px;display:grid;place-items:center;border-radius:14px!important;font-size:1.3rem;font-weight:900}
.public-body .brand-copy{display:grid;min-width:0;line-height:1.15}
.public-body .brand-copy strong{font-size:1rem;white-space:nowrap}
.public-body .brand-copy small{margin-top:4px;color:var(--muted);font-size:.68rem;white-space:nowrap}
.public-body .site-nav{display:flex!important;align-items:center;justify-content:center;gap:4px;min-width:0;padding:0;margin:0}
.public-body .site-nav a{
  display:inline-flex!important;align-items:center;justify-content:center;
  min-height:var(--fd-control-h)!important;padding:0 12px!important;
  border-radius:10px!important;color:var(--muted)!important;
  font-size:.78rem!important;font-weight:760!important;white-space:nowrap!important;
  background:transparent!important;border:1px solid transparent!important;
}
.public-body .site-nav a:hover,.public-body .site-nav a.active{
  color:var(--ink)!important;background:color-mix(in srgb,var(--accent) 9%,var(--surface-strong))!important;
  border-color:color-mix(in srgb,var(--accent) 20%,var(--line))!important;
}
.public-body .header-actions{display:flex!important;align-items:center;justify-content:flex-end;gap:6px;min-width:0}
.public-body .content-language-switch{
  display:inline-flex!important;align-items:center;gap:3px;padding:3px!important;
  border:1px solid var(--line)!important;border-radius:12px!important;
  background:color-mix(in srgb,var(--surface-strong) 78%,transparent)!important;
}
.public-body .content-language-switch a{
  min-width:38px!important;min-height:34px!important;padding:0 8px!important;border:0!important;border-radius:9px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;
  color:var(--muted)!important;font-size:.68rem!important;font-weight:850!important;white-space:nowrap!important;
}
.public-body .content-language-switch a.active{background:var(--accent)!important;color:var(--accent-ink)!important}
.public-body .language-name{display:none}
.public-body .icon-button,.public-body .nav-member-link,.public-body .header-contact{
  min-height:var(--fd-control-h)!important;height:var(--fd-control-h)!important;border-radius:11px!important;
  border:1px solid var(--line)!important;background:color-mix(in srgb,var(--surface-strong) 76%,transparent)!important;
  box-shadow:none!important;
}
.public-body .icon-button{width:var(--fd-control-h)!important;min-width:var(--fd-control-h)!important;padding:0!important;display:grid!important;place-items:center!important}
.public-body .icon-button:hover,.public-body .nav-member-link:hover{transform:none!important;border-color:color-mix(in srgb,var(--accent) 38%,var(--line))!important;background:color-mix(in srgb,var(--accent) 8%,var(--surface-strong))!important}
.public-body .icon-button .action-label{display:none}
.public-body .command-button kbd{display:none!important}
.public-body .nav-member-link{display:inline-flex!important;align-items:center;padding:0 11px!important;font-size:.72rem!important;font-weight:760!important;color:var(--ink)!important;white-space:nowrap}
.public-body .header-contact{display:inline-flex!important;align-items:center;gap:7px;padding:0 13px!important;background:linear-gradient(135deg,var(--accent),var(--accent-2))!important;color:var(--accent-ink)!important;border-color:transparent!important;white-space:nowrap;font-size:.72rem!important;font-weight:850!important}
.public-body .nav-toggle{display:none!important}
.public-body .theme-menu{display:none!important}

/* ---------- Hero / typography ---------- */
.public-body .hero{
  min-height:0!important;padding-top:clamp(62px,7vw,92px)!important;padding-bottom:clamp(54px,6vw,84px)!important;
  grid-template-columns:minmax(0,1.05fr) minmax(380px,.95fr)!important;gap:clamp(34px,5vw,70px)!important;align-items:center!important;
}
.public-body .hero-copy h1{font-size:clamp(3.7rem,6.4vw,6.8rem)!important;line-height:.92!important;letter-spacing:-.055em!important;margin:24px 0 26px!important}
.public-body .hero-lead{font-size:clamp(1.05rem,1.4vw,1.28rem)!important;line-height:1.68!important;max-width:760px!important;color:var(--muted)!important}
.public-body .signal-pill{max-width:max-content;border-radius:999px!important;padding:9px 14px!important;font-size:.67rem!important;line-height:1.2!important;letter-spacing:.07em!important}
.public-body .hero-actions{display:flex!important;flex-wrap:wrap;gap:10px!important;margin:28px 0 24px!important}
.public-body .hero-actions .cta{min-height:52px!important;padding-inline:20px!important;font-size:.88rem!important}
.public-body .tech-ribbon{display:flex!important;flex-wrap:wrap;gap:7px!important}
.public-body .tech-ribbon span{font-size:.64rem!important;padding:6px 9px!important;border-radius:999px!important}
.public-body .hero-system{min-height:520px!important;border-radius:28px!important}
.public-body .intent-deck{margin-top:0!important;border-radius:24px!important;padding:clamp(22px,3vw,36px)!important;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;gap:28px!important}
.public-body .intent-buttons{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.public-body .intent-buttons button{min-height:48px!important;padding:10px 13px!important;border-radius:12px!important;font-size:.78rem!important;line-height:1.3!important}
.public-body .section-head h2,.public-body .page-hero h1{font-size:clamp(2.2rem,4vw,4.4rem)!important;line-height:1.02!important;letter-spacing:-.04em!important}
.public-body .page-hero{padding-top:clamp(64px,8vw,104px)!important;padding-bottom:clamp(32px,4vw,58px)!important}
.public-body .page-hero p,.public-body .section-head p{max-width:760px!important;color:var(--muted)!important;font-size:1rem!important;line-height:1.7!important}

/* ---------- Cards ---------- */
.public-body .project-bento{gap:16px!important}
.public-body .project-tile,.public-body .article-list-card,.public-body .article-gallery,.public-body .article-stream,.public-body .content-panel,.public-body .form-card,.public-body .filter-bar,.public-body .language-translator,.public-body .project-trust-grid a{
  border-radius:22px!important;border:1px solid var(--line)!important;box-shadow:0 14px 40px color-mix(in srgb,var(--bg) 18%,transparent)!important;
}
.public-body .project-tile{min-height:430px!important}
.public-body .project-tile[data-size="xl"]{min-height:540px!important}
.public-body .project-content{padding:20px!important;gap:11px!important}
.public-body .project-content h2,.public-body .project-content h3{line-height:1.17!important;letter-spacing:-.025em!important}
.public-body .project-content p{line-height:1.58!important}
.public-body .project-action{min-height:44px!important;border-radius:11px!important}
.public-body .visual-mosaic{gap:12px!important}
.public-body .visual-mosaic figure{border-radius:20px!important;overflow:hidden!important}
.public-body .visual-mosaic img{width:100%!important;height:100%!important;object-fit:cover!important}
.public-body .article-list-grid{gap:16px!important}
.public-body .article-list-card{overflow:hidden!important}
.public-body .article-list-card h2{line-height:1.18!important}
.public-body .category-browser{display:flex!important;gap:7px!important;overflow-x:auto!important;overscroll-behavior-inline:contain;padding-bottom:4px!important;scrollbar-width:thin}
.public-body .category-chip{flex:0 0 auto!important;min-height:42px!important;padding:8px 12px!important;border-radius:12px!important;white-space:nowrap!important}
.public-body .filter-bar{padding:14px!important}
.public-body .filter-bar form{gap:10px!important}
.public-body input,.public-body textarea,.public-body select{max-width:100%;min-width:0}

/* ---------- Article / project reading ---------- */
.public-body .article-page,.public-body .case-study{min-width:0}
.public-body .article-hero,.public-body .case-hero{padding-top:clamp(60px,7vw,94px)!important;gap:clamp(24px,4vw,54px)!important}
.public-body .article-hero h1,.public-body .case-hero h1{font-size:clamp(2.7rem,5.2vw,5.7rem)!important;line-height:1!important;letter-spacing:-.045em!important}
.public-body .article-excerpt,.public-body .case-hero p{font-size:clamp(1rem,1.3vw,1.2rem)!important;line-height:1.7!important;color:var(--muted)!important}
.public-body .article-layout{gap:clamp(24px,4vw,48px)!important}
.public-body .article-body,.public-body .prose{font-size:clamp(1rem,1.05vw,1.12rem)!important;line-height:1.82!important;min-width:0}
.public-body .article-body pre,.public-body .prose pre{max-width:100%;overflow:auto}
.public-body .article-body table,.public-body .prose table{display:block;max-width:100%;overflow-x:auto}
.public-body .language-translator{padding:14px!important;gap:12px!important}
.public-body .translator-actions{gap:6px!important}
.public-body .translator-language{min-width:0!important}

/* ---------- Ads: never cover editorial content ---------- */
.public-body .ad-slot[data-ad-zone="mobile_sticky"]:has(.ad-creative),
.public-body .ad-slot[data-ad-zone="mobile_sticky"]{
  position:static!important;inset:auto!important;width:var(--fd-shell)!important;max-width:100%!important;
  margin:20px auto!important;padding:6px!important;max-height:none!important;min-height:0!important;
  border-radius:18px!important;transform:none!important;
}
.public-body .ad-slot[data-ad-zone="mobile_sticky"] .ad-creative,
.public-body .ad-slot[data-ad-zone="mobile_sticky"] .ad-creative img{max-height:120px!important;width:100%!important;object-fit:cover!important}
.public-body .mobile-ad-dismiss{display:none!important}
.public-body.has-mobile-sticky-ad{padding-bottom:0!important}

/* ---------- Footer ---------- */
.public-body .newsletter-band{gap:24px!important;border-radius:26px!important;padding:clamp(24px,4vw,42px)!important}
.public-body .newsletter-band form{min-width:0}
.public-body .site-footer{padding-top:56px!important;padding-bottom:max(40px,env(safe-area-inset-bottom))!important;gap:28px!important}

/* ---------- Embedded Android shell ---------- */
.public-body .embedded-toolbar{
  position:sticky;top:0;z-index:130;
  width:var(--fd-shell);max-width:100%;min-height:56px;
  display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;align-items:center;gap:7px;
  padding:7px 0;margin-inline:auto;
  background:color-mix(in srgb,var(--bg) 92%,transparent);
  backdrop-filter:blur(18px) saturate(135%);-webkit-backdrop-filter:blur(18px) saturate(135%);
}
.public-body .embedded-toolbar::after{content:"";position:absolute;inset-inline:0;bottom:0;height:1px;background:var(--line)}
.public-body .embedded-toolbar .content-language-switch{width:100%;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
.public-body .embedded-toolbar .content-language-switch a{width:100%!important;min-height:40px!important}
.public-body .embedded-toolbar .icon-button{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}
.public-body.embedded-app .site-header{display:none!important}
.public-body.embedded-app #ambientSnow,.public-body.embedded-app .aurora,.public-body.embedded-app .cursor-refraction{display:none!important}
.public-body.embedded-app .hero{padding-top:34px!important}
.public-body.embedded-app .page-hero,.public-body.embedded-app .article-hero,.public-body.embedded-app .case-hero{padding-top:38px!important}
.public-body.embedded-app .newsletter-band,.public-body.embedded-app .site-footer{display:none!important}
.public-body.embedded-app .command-palette{z-index:200!important}
.public-body.embedded-app.js .reveal,.public-body.embedded-app.js .reveal:not(.is-visible){opacity:1!important;transform:none!important}
.public-body.embedded-app .ad-slot[data-ad-zone="footer_banner"],.public-body.embedded-app .ad-slot[data-ad-zone="google_footer"]{display:none!important}

/* ---------- Tablet ---------- */
@media (max-width:1120px){
  :root{--fd-shell:min(100% - 28px,980px)}
  .public-body .site-header-inner{grid-template-columns:minmax(190px,1fr) auto}
  .public-body .site-nav{display:none!important;grid-column:1/-1;order:3;width:100%;padding-top:10px;border-top:1px solid var(--line);justify-content:flex-start;flex-wrap:wrap}
  .public-body .header-actions{justify-self:end}
  .public-body .header-contact,.public-body .nav-member-link{display:none!important}
  .public-body .nav-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:4px;width:48px;height:42px;padding:0;border:1px solid var(--line);border-radius:11px;background:color-mix(in srgb,var(--surface-strong) 76%,transparent);color:var(--ink)}
  .public-body .nav-toggle>span{display:block;width:3px;height:3px;border-radius:50%;background:currentColor}
  .public-body .nav-toggle>b{display:none}
  .public-body .site-header.nav-open .site-header-inner{grid-template-columns:minmax(0,1fr) auto}
  .public-body .site-header.nav-open .site-nav{display:flex!important}
  .public-body .site-header.nav-open .header-actions{grid-column:1/-1;order:4;width:100%;justify-content:flex-start;padding-top:10px;border-top:1px solid var(--line);flex-wrap:wrap}
  .public-body .site-header.nav-open .nav-member-link,.public-body .site-header.nav-open .header-contact{display:inline-flex!important}
  .public-body .hero{grid-template-columns:1fr!important}
  .public-body .hero-system{min-height:460px!important}
  .public-body .intent-deck{grid-template-columns:1fr!important}
}

/* ---------- Phones ---------- */
@media (max-width:700px){
  :root{--fd-shell:calc(100% - 24px);--fd-header-h:58px;--fd-section:52px}
  .public-body{font-size:16px}
  .public-body #ambientSnow,.public-body .cursor-refraction{display:none!important}
  .public-body .aurora{opacity:.55}
  .public-body .site-header{padding:7px 0!important}
  .public-body .site-header-inner{min-height:58px;gap:8px;grid-template-columns:minmax(0,1fr) auto!important}
  .public-body .brand-mark{width:40px!important;height:40px!important;min-width:40px;border-radius:12px!important}
  .public-body .brand-copy strong{font-size:.94rem}
  .public-body .brand-copy small{display:none!important}
  .public-body .header-actions{display:none!important;grid-column:1/-1!important;order:4!important;width:100%;padding:10px 0 2px!important;border-top:1px solid var(--line);gap:7px;align-items:stretch!important}
  .public-body .site-header.nav-open .header-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .public-body .content-language-switch{grid-column:1/-1;display:grid!important;grid-template-columns:repeat(3,1fr)!important;width:100%!important}
  .public-body .content-language-switch a{width:100%!important;min-height:40px!important}
  .public-body .language-name{display:inline!important;font-size:.64rem!important;font-weight:650!important}
  .public-body .icon-button{width:100%!important;min-width:0!important;display:flex!important;gap:8px!important;padding-inline:12px!important;justify-content:center!important}
  .public-body .icon-button .action-label{display:inline!important;font-size:.7rem!important;font-weight:760!important}
  .public-body .nav-member-link,.public-body .header-contact{width:100%!important;justify-content:center!important;display:inline-flex!important}
  .public-body .site-nav{display:none!important;grid-column:1/-1!important;order:3!important;width:100%!important;padding:9px 0!important;border-top:1px solid var(--line);grid-template-columns:repeat(2,minmax(0,1fr));gap:6px!important}
  .public-body .site-header.nav-open .site-nav{display:grid!important}
  .public-body .site-nav a{width:100%!important;min-height:44px!important;padding:0 10px!important;font-size:.76rem!important}
  .public-body .nav-toggle{width:46px!important;height:42px!important;display:inline-flex!important}

  .public-body .hero{display:block!important;padding-top:48px!important;padding-bottom:44px!important}
  .public-body .hero-copy h1{font-size:clamp(2.65rem,12vw,4rem)!important;line-height:.96!important;letter-spacing:-.05em!important;margin:18px 0 20px!important}
  .public-body .hero-lead{font-size:1rem!important;line-height:1.62!important}
  .public-body .signal-pill{font-size:.58rem!important;line-height:1.35!important;padding:8px 11px!important;max-width:100%!important}
  .public-body .hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin:22px 0 19px!important}
  .public-body .hero-actions .cta{width:100%!important;min-height:50px!important}
  .public-body .tech-ribbon{gap:5px!important}
  .public-body .tech-ribbon span{font-size:.58rem!important;padding:5px 8px!important}
  .public-body .hero-system{display:none!important}
  .public-body .intent-deck{padding:20px!important;border-radius:20px!important;gap:18px!important}
  .public-body .intent-deck h2{font-size:1.55rem!important;line-height:1.15!important}
  .public-body .intent-buttons{grid-template-columns:1fr!important}
  .public-body .intent-buttons button{min-height:48px!important}
  .public-body .section-head{gap:12px!important;margin-bottom:22px!important}
  .public-body .section-head h2,.public-body .page-hero h1{font-size:clamp(2rem,9.5vw,3rem)!important;line-height:1.04!important}
  .public-body .page-hero{padding-top:50px!important;padding-bottom:28px!important}

  .public-body .project-bento{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .public-body .project-tile,.public-body .project-tile[data-size="xl"],.public-body .project-tile[data-size="wide"]{
    display:grid!important;grid-template-columns:110px minmax(0,1fr)!important;grid-template-rows:auto!important;
    min-height:0!important;height:auto!important;border-radius:18px!important;overflow:hidden!important;
  }
  .public-body .project-visual{width:110px!important;height:100%!important;min-height:150px!important;aspect-ratio:auto!important;border-bottom:0!important;border-inline-end:1px solid var(--line)!important}
  .public-body .project-visual picture,.public-body .project-visual img{width:100%!important;height:100%!important;object-fit:cover!important}
  .public-body .project-content{padding:13px!important;gap:7px!important;min-width:0}
  .public-body .project-content h2,.public-body .project-content h3{font-size:1rem!important;line-height:1.22!important}
  .public-body .project-content p{font-size:.76rem!important;line-height:1.45!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .public-body .project-content .tech-list{display:flex!important;gap:4px!important;overflow:hidden!important;flex-wrap:nowrap!important}
  .public-body .project-content .tech-list span{font-size:.5rem!important;padding:4px 6px!important;white-space:nowrap!important}
  .public-body .project-action{min-height:38px!important;padding:8px 9px!important;font-size:.68rem!important}

  .public-body .visual-mosaic{grid-template-columns:1fr 1fr!important;grid-auto-rows:auto!important;gap:8px!important}
  .public-body .visual-mosaic figure,.public-body .visual-mosaic figure:nth-child(1),.public-body .visual-mosaic figure:nth-child(3),.public-body .visual-mosaic figure:nth-child(6){grid-column:auto!important;grid-row:auto!important;aspect-ratio:4/3!important}
  .public-body .visual-mosaic figcaption{padding:9px!important}
  .public-body .visual-mosaic figcaption b{font-size:.72rem!important}

  .public-body .article-gallery-stage{min-height:480px!important}
  .public-body .article-gallery-slide{grid-template-columns:1fr!important}
  .public-body .article-gallery-media{min-height:260px!important}
  .public-body .article-gallery-copy{padding:18px!important}
  .public-body .article-streams{grid-template-columns:1fr!important;gap:10px!important}
  .public-body .article-stream-item{grid-template-columns:22px 68px minmax(0,1fr)!important;gap:8px!important;padding:9px 10px!important;min-height:94px!important}
  .public-body .stream-thumb{width:68px!important;height:68px!important}
  .public-body .stream-arrow{display:none!important}

  .public-body .filter-bar{padding:10px!important;border-radius:16px!important}
  .public-body .filter-bar form{grid-template-columns:1fr!important}
  .public-body .filter-bar .cta{width:100%!important}
  .public-body .article-list-card{grid-template-columns:88px minmax(0,1fr)!important;gap:10px!important;padding:10px!important;border-radius:17px!important}
  .public-body .article-list-media{width:88px!important;height:108px!important;aspect-ratio:auto!important;border-radius:12px!important;overflow:hidden!important}
  .public-body .article-list-card h2{font-size:1rem!important;margin:5px 0!important;line-height:1.24!important}
  .public-body .article-list-card p{display:none!important}
  .public-body .article-list-card .project-action{display:none!important}
  .public-body .article-meta{gap:5px!important;font-size:.55rem!important}

  .public-body .article-hero,.public-body .case-hero{padding-top:46px!important;grid-template-columns:1fr!important;gap:20px!important}
  .public-body .article-hero h1,.public-body .case-hero h1{font-size:clamp(2.2rem,10.8vw,3.5rem)!important;line-height:1.02!important}
  .public-body .article-layout{grid-template-columns:1fr!important;gap:20px!important}
  .public-body .article-rail{order:0!important}
  .public-body .toc{position:relative!important;top:auto!important}
  .public-body .article-body,.public-body .prose{font-size:1rem!important;line-height:1.78!important}
  .public-body .article-body h2,.public-body .prose h2{font-size:1.7rem!important;line-height:1.2!important;margin-top:2.1em!important}
  .public-body .article-body h3,.public-body .prose h3{font-size:1.28rem!important;line-height:1.3!important}
  .public-body .article-byline,.public-body .content-dates{display:flex!important;flex-wrap:wrap!important;gap:6px 10px!important;font-size:.68rem!important}
  .public-body .language-translator{grid-template-columns:1fr!important;padding:12px!important}
  .public-body .translator-actions{display:grid!important;grid-template-columns:repeat(3,1fr)!important;width:100%!important}
  .public-body .translator-language{width:100%!important;min-width:0!important;padding:9px 7px!important}
  .public-body .translator-name{display:none!important}
  .public-body .project-trust-grid{grid-template-columns:1fr!important}
  .public-body .related-grid{grid-template-columns:1fr!important}
  .public-body .contact-grid,.public-body .about-grid{grid-template-columns:1fr!important}

  .public-body .newsletter-band{grid-template-columns:1fr!important;padding:22px!important;border-radius:20px!important}
  .public-body .newsletter-band form{grid-template-columns:1fr!important}
  .public-body .site-footer{grid-template-columns:1fr!important;padding-top:42px!important}
  .public-body .command-panel{width:calc(100vw - 18px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important}
  .public-body .consent-banner-card{grid-template-columns:1fr!important;gap:14px!important}
}

@media (max-width:390px){
  :root{--fd-shell:calc(100% - 18px)}
  .public-body .brand-copy strong{font-size:.86rem}
  .public-body .project-tile,.public-body .project-tile[data-size="xl"],.public-body .project-tile[data-size="wide"]{grid-template-columns:96px minmax(0,1fr)!important}
  .public-body .project-visual{width:96px!important}
  .public-body .hero-copy h1{font-size:2.55rem!important}
}

/* RTL tuning */
html[dir="rtl"] .public-body .site-nav,html[dir="rtl"] .public-body .header-actions{direction:rtl}
html[dir="rtl"] .public-body .project-action b,html[dir="rtl"] .public-body .header-contact b{transform:scaleX(-1)}

/* Member/account pages share the public design system, never admin geometry. */
.public-body .member-shell{padding-top:clamp(48px,7vw,90px);padding-bottom:var(--fd-section)}
.public-body .member-card{width:min(680px,100%);margin-inline:auto;padding:clamp(22px,4vw,38px);border-radius:24px!important;border:1px solid var(--line);background:color-mix(in srgb,var(--surface-strong) 88%,transparent);box-shadow:0 18px 54px color-mix(in srgb,var(--bg) 24%,transparent)}
.public-body .member-card-wide{width:min(900px,100%)}
.public-body .member-card h1{font-size:clamp(2rem,5vw,3.4rem);line-height:1.05;letter-spacing:-.04em;margin:12px 0 20px}
.public-body .member-form{display:grid;gap:14px;margin-top:22px}
.public-body .member-form label{display:grid;gap:6px;color:var(--muted);font-size:.76rem;font-weight:700}
.public-body .member-form input,.public-body .member-form select{width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg2);color:var(--ink)}
.public-body .member-form .checkrow{display:flex!important;align-items:flex-start;gap:9px;line-height:1.45}
.public-body .member-form .checkrow input{width:18px;min-height:18px;height:18px;flex:0 0 auto;margin-top:1px}
.public-body .member-card-foot{margin-top:18px;color:var(--muted)}
.public-body .member-card-foot a{color:var(--accent);font-weight:750}
.public-body .oauth-separator{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;margin:18px 0;color:var(--muted)}
.public-body .oauth-separator::before,.public-body .oauth-separator::after{content:"";height:1px;background:var(--line)}
.public-body .google-oauth-button{width:100%;justify-content:center}
.public-body .member-metrics{margin:24px 0;grid-template-columns:repeat(3,1fr)!important}
@media(max-width:700px){.public-body .member-shell{padding-top:34px}.public-body .member-card{padding:20px;border-radius:19px!important}.public-body .member-metrics{grid-template-columns:1fr!important}}

/* Theme control: show the destination mode instead of a generic palette icon. */
.public-body .theme-direct-toggle .theme-glyph{display:grid;place-items:center}
html[data-mode="dark"] .public-body .theme-direct-toggle .theme-glyph-moon{display:none}
html[data-mode="light"] .public-body .theme-direct-toggle .theme-glyph-sun{display:none}

/* Embedded mobile toolbar must stay one compact row; generic phone header rules do not apply here. */
@media (max-width:700px){
  .public-body .embedded-toolbar{min-height:58px!important;grid-template-columns:minmax(0,1fr) 44px 44px!important;gap:7px!important;padding:7px 0!important}
  .public-body .embedded-toolbar .content-language-switch{grid-column:auto!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important}
  .public-body .embedded-toolbar .content-language-switch a{min-height:40px!important;padding:0 5px!important}
  .public-body .embedded-toolbar .language-name{display:none!important}
  .public-body .embedded-toolbar .icon-button{grid-column:auto!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;display:grid!important}
  .public-body .embedded-toolbar .icon-button .action-label{display:none!important}
}

/* Legacy CSS hid every span inside language links below 1280px. Codes must always remain visible. */
.public-body .content-language-switch .language-code{display:inline!important}

/* Tablet header: brand + compact actions + menu trigger stay on one row. */
@media (min-width:701px) and (max-width:1120px){
  .public-body .site-header-inner{grid-template-columns:minmax(180px,1fr) auto auto!important;gap:10px!important}
  .public-body .site-header.nav-open .site-header-inner{grid-template-columns:minmax(180px,1fr) auto auto!important}
  .public-body .site-header.nav-open .header-actions{grid-column:auto!important;order:initial!important;width:auto!important;padding-top:0!important;border-top:0!important;justify-content:flex-end!important;flex-wrap:nowrap!important}
  .public-body .site-header.nav-open .nav-member-link,.public-body .site-header.nav-open .header-contact{display:none!important}
  .public-body .site-header.nav-open .site-nav{grid-column:1/-1!important;order:4!important}
}
