/* Dilbilge V2.5 — stable header / no-horizontal-shift layer */
:root{
  --header-shell:1320px;
  --header-main-h:74px;
  --toolbar-h:48px;
}
html{
  overflow-x:clip;
  scrollbar-gutter:stable;
}
body{
  width:100%;
  max-width:100%;
  overflow-x:clip;
}
body.menu-open{
  overflow:hidden;
}
main,.site-header,.site-footer,.section,.hero,.page-hero{max-width:100%;min-width:0}
.wrap,.narrow,.footer-inner,.stable-header-shell,.stable-toolbar-shell{max-width:100%}
.grid>*,.split>*,.hero-grid>*,.stats-strip>*,.cover-grid>*,.word-result>*,.atlas-intro>*,.admin-shell>*,.analysis-grid>*{min-width:0}
img,svg,video,canvas,iframe{max-width:100%}

/* Completely replace the legacy menu behavior. */
.site-header.stable-header{
  position:sticky;
  top:0;
  z-index:1000;
  width:100%;
  overflow:visible;
  background:#fff;
  border-bottom:0;
  box-shadow:0 5px 18px rgba(11,52,112,.05);
  backdrop-filter:none;
}
.stable-header-main{
  width:100%;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid var(--line);
}
.stable-header-shell{
  width:min(calc(100% - 32px),var(--header-shell));
  min-height:var(--header-main-h);
  margin-inline:auto;
  display:flex;
  align-items:center;
  gap:22px;
}
.stable-header .brand{
  flex:0 0 auto;
  min-width:0;
}
.stable-header .brand img{width:46px;height:46px;flex:0 0 46px}
.stable-header .brand-copy{min-width:0}
.stable-header .brand-name{font-size:23px}

.stable-primary-nav{
  flex:1 1 auto;
  min-width:0;
  height:var(--header-main-h);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:2px;
}
.stable-nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  padding:10px 11px;
  border-radius:12px;
  color:var(--ink);
  font-size:13.5px;
  line-height:1.1;
  font-weight:800;
  white-space:nowrap;
  transition:background .15s ease,color .15s ease;
}
.stable-nav-link:hover,.stable-nav-link:focus-visible{
  background:var(--soft);
  color:var(--navy);
  outline:none;
}
.stable-nav-link.is-active{
  color:var(--navy);
  background:var(--teal-soft);
  box-shadow:inset 0 -2px 0 var(--teal);
}
.stable-header-actions{
  flex:0 0 auto;
  width:auto!important;
  min-width:0;
  margin-left:auto;
}
.stable-header .age{position:relative;min-width:0}
.stable-header .age-btn{
  max-width:190px;
  min-height:42px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:9px 12px;
}
.stable-header .age-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px}
.stable-header .age-menu{
  z-index:1100;
  right:0;
  left:auto;
  top:calc(100% + 9px);
  width:190px;
  max-width:calc(100vw - 24px);
}
.stable-menu-btn{display:none!important}

/* Secondary tools row: contained, never wider than viewport. */
.stable-toolbar{
  width:100%;
  background:#fbfdff;
  border-bottom:1px solid var(--line);
}
.stable-toolbar-shell{
  width:min(calc(100% - 32px),var(--header-shell));
  min-height:var(--toolbar-h);
  margin-inline:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  overflow:hidden;
}
.stable-tool-link{
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 11px;
  border-radius:999px;
  color:var(--navy);
  font-size:12.5px;
  font-weight:780;
  white-space:nowrap;
  transition:background .15s ease,color .15s ease;
}
.stable-tool-link img{width:18px;height:18px;flex:0 0 18px}
.stable-tool-link:hover,.stable-tool-link:focus-visible{background:#fff;color:var(--teal-2);outline:none}
.stable-tool-link.is-active{background:#fff;border:1px solid #cfeeed;color:var(--teal-2)}

/* Kill every legacy mega-menu behaviour, even if old CSS remains in app.css. */
.mega-menu,.nav-has-menu{display:none!important}
.desktop-nav{display:none!important}

/* Mobile drawer: overlay only, it does not take part in page layout. */
.mobile-backdrop{
  position:fixed;
  inset:0;
  z-index:1190;
  background:rgba(9,35,69,.34);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;
}
.mobile-backdrop.open{opacity:1;visibility:visible;pointer-events:auto}
.mobile-menu.stable-mobile-menu{
  display:block!important;
  position:fixed!important;
  z-index:1200!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:auto!important;
  width:min(430px,92vw)!important;
  max-width:100%!important;
  height:100dvh;
  padding:0!important;
  background:#f8fbfd!important;
  border:0!important;
  border-left:1px solid var(--line)!important;
  box-shadow:-20px 0 60px rgba(11,52,112,.18)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  transform:translateX(105%);
  opacity:1!important;
  visibility:visible!important;
  pointer-events:none;
  transition:transform .2s ease!important;
}
.mobile-menu.stable-mobile-menu.open{transform:translateX(0);pointer-events:auto}
.stable-mobile-inner{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:18px 18px 32px!important;
}
.stable-mobile-menu .mobile-menu-head{
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:2px 0 14px;
  margin:0;
  border-bottom:1px solid var(--line);
}
.stable-mobile-menu .mobile-menu-head>div{display:grid;gap:2px}
.stable-mobile-menu .mobile-menu-head strong{font-size:23px;color:var(--navy)}
.stable-mobile-menu .mobile-menu-head small{font-size:11px;color:var(--muted);letter-spacing:.08em;text-transform:uppercase}
.stable-mobile-menu .mobile-close{
  flex:0 0 42px;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--navy);
  font-size:27px;
  line-height:1;
  cursor:pointer;
}
.stable-mobile-menu .mobile-group{padding:17px 0;border-top:0;border-bottom:1px solid var(--line)}
.stable-mobile-menu .mobile-group:last-child{border-bottom:0}
.stable-mobile-menu .mobile-group h3{margin:0 0 10px;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.09em}
.stable-mobile-menu .mobile-links{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.stable-mobile-menu .mobile-links a{
  min-width:0;
  display:flex;
  align-items:center;
  min-height:46px;
  padding:10px 12px!important;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff!important;
  color:var(--navy);
  font-size:12.5px!important;
  font-weight:790!important;
  overflow-wrap:anywhere;
}
.stable-mobile-menu .mobile-links a:hover{background:var(--teal-soft)!important;border-color:#bfe7e4}

/* Extra no-overflow guards for content blocks known to get wide. */
.table-wrap,.board-shell,.game-shell,.calendar-sheet{max-width:100%}
.table-wrap{overflow-x:auto;overscroll-behavior-inline:contain}
.proposal-form>*{min-width:0}
.search-box>*{min-width:0}
.rack{max-width:100%}

@media(max-width:1240px){
  .stable-header-shell,.stable-toolbar-shell{width:min(calc(100% - 24px),var(--header-shell))}
  .stable-header-shell{gap:14px}
  .stable-nav-link{padding-inline:8px;font-size:12.5px}
  .stable-tool-link{padding-inline:8px;font-size:12px}
  .stable-header .age-btn{max-width:158px}
}

@media(max-width:1100px){
  :root{--header-main-h:70px}
  .stable-primary-nav,.stable-toolbar{display:none!important}
  .stable-menu-btn{display:inline-flex!important}
  .stable-header-shell{width:min(calc(100% - 22px),var(--header-shell));gap:10px}
  .stable-header-actions{gap:7px!important}
  .stable-header .age-btn{max-width:160px}
  .site-header.stable-header{box-shadow:0 5px 18px rgba(11,52,112,.07)}
}

@media(max-width:620px){
  html{scrollbar-gutter:auto}
  .stable-header-shell{width:calc(100% - 18px);min-height:66px}
  .stable-header .brand img{width:43px;height:43px;flex-basis:43px}
  .stable-header .brand-copy{display:flex!important}
  .stable-header .brand-name{font-size:19px}
  .stable-header .brand-tag{display:none}
  .stable-header .age-btn{max-width:114px;padding:8px 9px}
  .stable-header .age-label{font-size:0!important}
  .stable-header .age-label:after{content:"Anlatım";font-size:11.5px}
  .stable-header .age-menu{right:0;width:174px}
  .stable-menu-btn{width:41px!important;height:40px!important}
  .stable-mobile-menu .mobile-links{grid-template-columns:1fr 1fr!important}
}

@media(max-width:390px){
  .stable-header .brand-copy{display:none!important}
  .stable-header .age-btn{max-width:105px}
  .stable-mobile-inner{padding-inline:13px!important}
  .stable-mobile-menu .mobile-links{grid-template-columns:1fr!important}
}

/* Visible editorial identity */
.editor-spotlight{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);
  gap:22px;
  padding:28px;
  border:1px solid var(--line);
  border-radius:30px;
  background:linear-gradient(135deg,#f8fbff 0,#eefbfa 100%);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.editor-spotlight-profile{display:flex;align-items:flex-start;gap:20px;min-width:0}
.avatar-xl{width:84px;height:84px;flex:0 0 84px;font-size:25px;box-shadow:0 10px 25px rgba(11,52,112,.15)}
.editor-spotlight h2,.culture-editor-card h2{margin:8px 0 4px;font-size:clamp(28px,3.3vw,42px);letter-spacing:-.04em;color:var(--navy)}
.editor-title{margin:0 0 10px!important;color:var(--teal-2)!important;font-weight:850}
.editor-area-tags,.editor-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.editor-spotlight-works{min-width:0;display:grid;align-content:start;gap:9px}
.editor-work-link{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;row-gap:3px;padding:12px 13px;border:1px solid var(--line);border-radius:14px;background:#fff;min-width:0}
.editor-work-link .tag{grid-row:1/3;align-self:start}
.editor-work-link strong,.editor-work-link small{min-width:0;overflow-wrap:anywhere}
.editor-work-link strong{font-size:13.5px;color:var(--navy)}
.editor-work-link small{font-size:11px;color:var(--muted);line-height:1.35}
.editor-work-link:hover{border-color:#a9deda;transform:translateY(-1px)}
.culture-editor-band{padding-top:34px;padding-bottom:0}
.culture-editor-card{display:flex;align-items:center;gap:18px;padding:22px 24px;border:1px solid #cfeeed;border-radius:24px;background:linear-gradient(135deg,#fff,#effbfa);box-shadow:var(--shadow-sm);min-width:0}
.culture-editor-card>div:last-child{min-width:0}
.culture-editor-card p{margin:4px 0 6px;color:var(--muted)}
.culture-editor-card small{color:var(--teal-2);font-weight:800}
@media(max-width:900px){.editor-spotlight{grid-template-columns:1fr}.editor-spotlight-works{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-work-link{grid-template-columns:1fr}.editor-work-link .tag{grid-row:auto;justify-self:start}}
@media(max-width:620px){.editor-spotlight{padding:20px;border-radius:22px}.editor-spotlight-profile,.culture-editor-card{align-items:flex-start;flex-direction:column}.avatar-xl{width:68px;height:68px;flex-basis:68px;font-size:21px}.editor-spotlight-works{grid-template-columns:1fr}.editor-actions .btn{width:100%}.culture-editor-card{padding:18px}}
html.menu-open{overflow-y:hidden;scrollbar-gutter:stable}
