#site-editor-launch{
  position:fixed;
  inset-block-end:18px;
  inset-inline-start:18px;
  z-index:90;
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:999px;
  background:#123acf;
  color:#fff;
  padding:10px 16px;
  font:700 13px Tajawal,Tahoma,sans-serif;
  box-shadow:0 10px 28px #123acf55;
}
#site-editor-launch:hover{background:#0e2ea8}
#site-editor-hint{
  position:fixed;
  inset-block-start:12px;
  inset-inline-start:50%;
  transform:translateX(-50%);
  z-index:95;
  display:flex;
  align-items:center;
  gap:12px;
  background:#18213b;
  color:#fff;
  padding:10px 16px;
  border-radius:14px;
  font:600 13px Tajawal,Tahoma,sans-serif;
  box-shadow:0 10px 30px #15234940;
}
#site-editor-hint a{color:#ffc849;font-weight:800}
#site-editor-root{
  position:fixed;
  inset:0;
  z-index:92;
  pointer-events:none;
  font-family:Tajawal,Tahoma,sans-serif;
}
#site-editor-root *{box-sizing:border-box}
#site-editor-bar,
#site-editor-panel{
  pointer-events:auto;
}
#site-editor-hover-chip{pointer-events:none}
#site-editor-bar{
  position:absolute;
  inset-block-start:0;
  inset-inline:0;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  min-height:58px;
  background:#18213b;
  color:#fff;
  padding:8px 14px;
  border-radius:0;
  box-shadow:0 8px 24px #15234940;
}
#site-editor-bar button:disabled{opacity:.45}
#site-editor-bar b{font-size:13px}
#site-editor-bar span{font-size:12px;opacity:.82}
#site-editor-bar .site-editor-actions{display:flex;gap:8px;margin-inline-start:auto;flex-wrap:wrap}
#site-editor-bar .site-editor-mode{
  display:flex;
  background:#ffffff18;
  border-radius:999px;
  padding:3px;
  gap:2px;
}
#site-editor-bar .site-editor-mode button{
  background:transparent;
  color:#fff;
  opacity:.75;
}
#site-editor-bar .site-editor-mode button.active{
  background:#ffc849;
  color:#18213b;
  opacity:1;
}
#site-editor-bar button,
#site-editor-panel button.site-editor-btn{
  border:0;
  border-radius:999px;
  padding:8px 12px;
  font:700 12px Tajawal,Tahoma,sans-serif;
  cursor:pointer;
}
#site-editor-bar .primary,
#site-editor-panel .primary{background:#ffc849;color:#18213b}
#site-editor-bar .ghost{background:#ffffff18;color:#fff}
#site-editor-panel .site-editor-btn{background:#eef2fb;color:#152349}
#site-editor-panel .site-editor-btn.primary{background:#123acf;color:#fff}
.site-editor-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  position:sticky;
  top:0;
  background:#fff;
  z-index:1;
  padding-bottom:6px;
}
.site-editor-close{
  flex:none;
  width:36px;
  height:36px;
  border:0;
  border-radius:12px;
  background:#eef2fb;
  color:#152349;
  font:800 22px/1 Tajawal,Tahoma,sans-serif;
  cursor:pointer;
}
.site-editor-close:hover{background:#dbe4fb}
#site-editor-highlight{
  position:absolute;
  border:2px dashed #123acf;
  border-radius:10px;
  box-shadow:0 0 0 3px #123acf22, inset 0 0 0 1px #fff8;
  pointer-events:none;
  display:none;
}
#site-editor-highlight.selected{
  border-style:solid;
  border-color:#d72d36;
  box-shadow:0 0 0 4px #d72d3622;
}
.site-editor-chip{
  position:absolute;
  transform:translate(-8px,-8px);
  background:#123acf;
  color:#fff;
  border:0;
  border-radius:999px;
  padding:4px 9px;
  font:800 11px Tajawal,Tahoma,sans-serif;
  box-shadow:0 6px 16px #123acf55;
  max-width:220px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.site-editor-chip.section{background:#18213b}
.site-editor-chip.active{background:#d72d36}
#site-editor-panel{
  position:absolute;
  inset-block:70px 12px;
  inset-inline-end:12px;
  inset-inline-start:auto;
  width:min(380px, calc(100vw - 24px));
  background:#fff;
  color:#152349;
  border:1px solid #e1e6f0;
  border-radius:20px;
  box-shadow:0 18px 48px #15234922;
  overflow:auto;
  padding:16px 16px 24px;
}
#site-editor-panel[hidden]{display:none !important}
#site-editor-panel h2{margin:0 0 4px;font-size:18px}
#site-editor-panel .site-editor-id{font-size:11px;color:#5c6881;direction:ltr;text-align:start}
#site-editor-panel h3{
  margin:16px 0 8px;
  font-size:12px;
  letter-spacing:.04em;
  color:#5c6881;
  text-transform:none;
}
#site-editor-panel label{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:0 0 8px;
  font-size:13px;
  font-weight:700;
}
#site-editor-panel label input[type="range"]{width:132px}
#site-editor-panel label input[type="color"]{
  width:42px;
  height:28px;
  border:1px solid #e1e6f0;
  border-radius:8px;
  padding:0;
  background:#fff;
}
#site-editor-panel select,
#site-editor-panel input[type="number"]{
  border:1px solid #e1e6f0;
  border-radius:10px;
  padding:4px 8px;
  min-width:92px;
}
#site-editor-panel textarea{
  width:100%;
  min-height:72px;
  margin-top:6px;
  border:1px solid #e1e6f0;
  border-radius:12px;
  padding:8px 10px;
  font:600 14px Tajawal,Tahoma,sans-serif;
  resize:vertical;
}
#site-editor-panel label:has(textarea){display:block}
.site-editor-tabs{
  display:flex;
  gap:4px;
  background:#f3f6fc;
  padding:4px;
  border-radius:12px;
  margin:12px 0;
}
.site-editor-tabs button{
  flex:1;
  border:0;
  border-radius:10px;
  padding:8px 6px;
  background:transparent;
  color:#5c6881;
  font:800 12px Tajawal,Tahoma,sans-serif;
  cursor:pointer;
}
.site-editor-tabs button.active{background:#123acf;color:#fff}
.site-editor-nav-list{
  max-height:220px;
  overflow:auto;
  border:1px solid #e1e6f0;
  border-radius:12px;
  background:#f8fafc;
}
.site-editor-nav-list button{
  display:block;
  width:100%;
  border:0;
  background:transparent;
  text-align:start;
  padding:7px 10px;
  padding-inline-start:calc(10px + (var(--d,0) * 12px));
  font:650 12px Tajawal,Tahoma,sans-serif;
  color:#152349;
  cursor:pointer;
}
.site-editor-nav-list button:hover{background:#eef2fb}
.site-editor-nav-list button.active{background:#123acf;color:#fff;font-weight:800}
#site-editor-panel [data-apply-similar]{margin:8px 0 0;width:100%;border-radius:12px}
#site-editor-panel .site-editor-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
#site-editor-status{min-height:1.4em;font-size:12px;color:#5c6881;margin-top:10px}
.site-editor-image-preview{
  display:grid;
  place-items:center;
  overflow:hidden;
  height:110px;
  margin:0 0 10px;
  border-radius:12px;
  background:#eef2fb;
}
.site-editor-image-preview img{width:100%;height:100%;object-fit:cover}
.site-editor-media-grid,
.site-editor-icon-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  max-height:220px;
  overflow:auto;
  padding:2px;
  margin:0 0 10px;
}
.site-editor-media-grid button,
.site-editor-icon-grid button{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0;
  padding:6px;
  border:1px solid #dbe3f0;
  border-radius:12px;
  background:#fff;
  text-align:start;
  font:650 11px Tajawal,Tahoma,sans-serif;
  color:#152349;
}
.site-editor-media-grid button img{
  display:block;
  width:100%;
  height:64px;
  object-fit:cover;
  border-radius:8px;
}
.site-editor-icon-grid button svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.site-editor-media-grid button.active,
.site-editor-icon-grid button.active{
  border-color:#123acf;
  box-shadow:0 0 0 2px #123acf33;
}
.site-editor-upload{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0 0 8px;
  font:700 12px Tajawal,Tahoma,sans-serif;
}
.site-editor-upload input{font:500 12px Tajawal,Tahoma,sans-serif}
html[data-edit-mode="on"]{
  --edit-bar-h:58px;
}
html[data-edit-mode="on"] body{padding-top:var(--edit-bar-h)}
html[data-edit-mode="on"] .header{top:var(--edit-bar-h);z-index:40}
html[data-edit-pick="on"] [data-edit]{cursor:pointer}

/* Structural page-builder chrome */
.site-editor-structure-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0 0 14px;
}
.site-editor-structure-item{
  border:1px solid #d7deef;
  border-radius:14px;
  background:#f7f9fd;
  padding:12px;
}
.site-editor-structure-item.is-hidden{
  opacity:.62;
  background:#f3f3f5;
}
.site-editor-structure-head{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-bottom:8px;
}
.site-editor-structure-head strong{
  font:800 14px Tajawal,Tahoma,sans-serif;
  color:#152349;
}
.site-editor-structure-id{
  font:600 11px Montserrat,Tahoma,sans-serif;
  color:#66758f;
  direction:ltr;
}
.site-editor-structure-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:8px;
}
.site-editor-structure-actions button{
  border:1px solid #c9d3e8;
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font:700 12px Tajawal,Tahoma,sans-serif;
  color:#152349;
  cursor:pointer;
}
.site-editor-structure-actions button:disabled{opacity:.4;cursor:default}
.site-editor-structure-item label{
  display:flex;
  flex-direction:column;
  gap:4px;
  font:700 12px Tajawal,Tahoma,sans-serif;
}
.site-editor-structure-item select{
  border:1px solid #c9d3e8;
  border-radius:10px;
  padding:8px 10px;
  font:600 13px Tajawal,Tahoma,sans-serif;
  background:#fff;
}

/* Constrained homepage structure variants */
#home-landing[data-layout-ready="1"]{
  display:flex;
  flex-direction:column;
}
#home-landing > [data-layout-section][data-layout-hidden="1"],
#home-landing > [data-layout-section][hidden]{
  display:none !important;
}
html body #home-landing .home-hero[data-layout-variant="stacked"],
html body #home-landing .home-hero[data-layout-variant="media-first"]{
  display:flex;
  flex-direction:column;
  height:auto;
  min-height:0;
  max-height:none;
}
html body #home-landing .home-hero[data-layout-variant="stacked"] .home-hero-media,
html body #home-landing .home-hero[data-layout-variant="media-first"] .home-hero-media{
  position:relative;
  inset:auto;
  width:100%;
  height:auto;
  max-width:none;
  aspect-ratio:16 / 10;
}
html body #home-landing .home-hero[data-layout-variant="stacked"] .home-hero-media::after,
html body #home-landing .home-hero[data-layout-variant="media-first"] .home-hero-media::after{
  width:100%;
  background:linear-gradient(180deg,rgba(247,243,234,0) 55%,rgba(247,243,234,.9) 100%);
}
html body #home-landing .home-hero[data-layout-variant="stacked"] .home-hero-copy,
html body #home-landing .home-hero[data-layout-variant="media-first"] .home-hero-copy{
  position:relative;
  inset:auto;
  left:auto;
  width:100%;
  background:#f7f3ea;
  text-shadow:none;
}
html body #home-landing .home-hero[data-layout-variant="stacked"] :is(.home-kicker,.home-hero h1,.home-hero-copy>p,.home-hero-note),
html body #home-landing .home-hero[data-layout-variant="media-first"] :is(.home-kicker,.home-hero h1,.home-hero-copy>p,.home-hero-note){
  text-shadow:none;
}
html body #home-landing .home-stats[data-layout-variant="wrap"]{
  flex-wrap:wrap;
}
html body #home-landing .home-stats[data-layout-variant="compact"]{
  gap:10px;
  padding-block:10px;
}
html body #home-landing [data-layout-section][data-layout-variant="list"] :is(.home-path-grid,.home-situation-grid,.home-levels,.home-feature-grid){
  display:grid;
  grid-template-columns:1fr;
}
html body #home-landing [data-layout-section][data-layout-variant="compact"] :is(.home-path-grid,.home-situation-grid,.home-levels,.home-feature-grid){
  gap:12px;
}

@media (max-width:720px){
  #site-editor-panel{
    inset-block:auto 0;
    inset-inline:0;
    width:100%;
    height:46vh;
    border-radius:20px 20px 0 0;
  }
  #site-editor-bar{inset-inline:8px}
}

/* A surface owned by the appearance studio: styling it here changes nothing live. */
.site-editor-owned{
  margin:0 0 10px;
  padding:8px 10px;
  border:1px solid #f0d8a8;
  border-radius:10px;
  background:#fff8ec;
  color:#8a5a12;
}
.site-editor-owned a{color:#17398a}
