/* Wariatric V356 - patient ERAS guide. A separate, static, privacy-safe public article. */
:root{--eras-text:#173b3e;--eras-muted:#476865;--eras-border:#c8e0d9;--eras-bg:#f5fbf8;--eras-strong:#0b6760;--eras-mint:#e6f5ee}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:88px}
body{direction:rtl;margin:0;background:#f7fbf9;color:var(--eras-text);font-family:var(--w-font-family);line-height:1.95}
a{color:var(--eras-strong);text-underline-offset:3px}
a:focus-visible,summary:focus-visible{outline:3px solid #328d81;outline-offset:4px}
.eras-shell{max-width:1190px;margin:auto;padding:0 22px 72px}
.eras-topbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:18px;min-height:92px;border-bottom:1px solid var(--eras-border)}
.eras-brand{display:flex;align-items:center;gap:12px;color:var(--eras-text);text-decoration:none;font-weight:800}
.eras-brand img{width:120px;max-width:28vw;height:auto;object-fit:contain}
.eras-links{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.eras-links a{display:inline-block;padding:7px 13px;border:1px solid var(--eras-border);border-radius:12px;text-decoration:none;background:white;font-size:var(--w-text-body)}
.eras-links a:hover{background:#e4f4ec}
.eras-hero{padding:38px 30px;margin:28px 0 22px;border:1px solid #a9d1c5;border-radius:25px;background:linear-gradient(125deg,#edfaf4,#fff);box-shadow:0 8px 30px rgba(24,87,76,.07)}
.eras-tag{display:inline-block;padding:5px 14px;border-radius:999px;background:#d8f0e7;color:#17695f;font-weight:700}
.eras-hero h1{font-size:var(--w-text-h1);line-height:1.6;max-width:880px;margin:14px 0}
.eras-hero p{max-width:960px;font-size:var(--w-text-body);color:#315955;margin:10px 0}
.eras-nav{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 26px}
.eras-nav a{background:#fff;padding:7px 15px;border-radius:14px;text-decoration:none;border:1px solid var(--eras-border);font-weight:700}
.eras-nav a:hover{background:#e3f5ed}
.eras-section{scroll-margin-top:95px;margin:24px 0;padding:28px 30px;background:#fff;border:1px solid var(--eras-border);border-radius:22px;box-shadow:0 4px 15px rgba(24,87,76,.035)}
.eras-section h2{margin:0 0 10px;color:#164d46;font-size:var(--w-text-h2);line-height:1.7}
.eras-section h3{font-size:var(--w-text-h3);color:#25544c;margin:8px 0}
.eras-section p{margin:8px 0 14px;overflow-wrap:anywhere}
.eras-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.eras-card{min-width:0;padding:18px 20px;background:#f7fcf9;border:1px solid #c8e5d9;border-radius:17px}
.eras-card h3{margin-top:0}
.eras-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:22px 0}
.eras-step{min-width:0;padding:19px;background:var(--eras-bg);border:1px solid var(--eras-border);border-radius:16px}
.eras-step span{font-weight:800;color:var(--eras-strong)}
.eras-step h3{margin:7px 0}
.eras-step p{margin:0}
.eras-table-wrap{max-width:100%;overflow-x:auto;border:1px solid var(--eras-border);border-radius:16px}
.eras-table{border-collapse:collapse;width:100%;min-width:610px;text-align:right}
.eras-table th,.eras-table td{padding:14px 16px;border-bottom:1px solid #dceae4;vertical-align:top}
.eras-table th{background:#eff8f4;color:#20544d}
.eras-table tr:last-child td{border-bottom:0}
.eras-note{margin:18px 0;padding:15px 19px;border-right:4px solid #28897b;background:#edf8f3;border-radius:12px}
.eras-note strong{color:#175b52}
.eras-list{margin:14px 0;padding-right:25px}
.eras-list li{margin:8px 0}
.eras-faq{display:grid;grid-template-columns:1fr;gap:11px}
.eras-faq details{min-width:0;border:1px solid var(--eras-border);border-radius:14px;background:#fff;overflow:hidden;transition:border-color .22s,background-color .22s,box-shadow .22s}
.eras-faq details:hover{background:#e9f7f0;border-color:#6bae9e;box-shadow:0 4px 15px rgba(16,90,78,.08)}
.eras-faq details[open]{border-color:#7ab7a9;background:#f6fbf8}
.eras-faq summary{padding:15px 18px;cursor:pointer;font-weight:800;line-height:1.85}
.eras-faq details p{margin:0;padding:15px 18px 18px;background:white;border-top:1px solid #dceae4}
.eras-sources li{overflow-wrap:anywhere;margin:10px 0}
.eras-bottom{padding:22px 0;color:var(--eras-muted);border-top:1px solid var(--eras-border)}
@media(max-width:850px){.eras-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.eras-shell{padding:0 16px 50px}.eras-section{padding:21px}.eras-hero{padding:28px}}
@media(max-width:600px){html{scroll-padding-top:55px}.eras-grid,.eras-steps{grid-template-columns:minmax(0,1fr)}.eras-topbar{padding:12px 0}.eras-brand img{width:102px}.eras-links{gap:7px}.eras-links a{padding:6px 10px}.eras-shell{padding:0 12px 45px}.eras-hero,.eras-section{padding:18px 15px;border-radius:17px;margin:14px 0}.eras-nav{gap:7px}.eras-nav a{padding:5px 10px}.eras-card,.eras-step{padding:14px}.eras-section{scroll-margin-top:60px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.eras-faq details{transition:none}}


/* V358 — citations live at the foot of the ERAS article, collapsed by default. */
.eras-references{border:1px solid var(--eras-border);border-radius:16px;overflow:hidden;background:#fbfefd}
.eras-references>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;cursor:pointer;list-style:none;color:var(--eras-strong);font-weight:700;line-height:1.8}
.eras-references>summary::-webkit-details-marker{display:none}
.eras-references>summary::after{content:"⌄";display:block;flex:0 0 auto;font-weight:800;transition:transform .2s ease}
.eras-references[open]>summary::after{transform:rotate(180deg)}
.eras-references>summary:focus-visible{outline:3px solid #328d81;outline-offset:-3px}
.eras-references__hint{color:var(--eras-muted);font-size:var(--w-text-small);font-weight:400}
.eras-references__body{padding:0 20px 18px;border-top:1px solid var(--eras-border)}
.eras-references .eras-sources{padding-right:24px;margin:14px 0}
.eras-references .eras-sources a{overflow-wrap:anywhere}
@media(max-width:600px){.eras-references>summary{flex-wrap:wrap;padding:13px 14px}.eras-references__body{padding:0 14px 14px}}
@media(prefers-reduced-motion:reduce){.eras-references>summary::after{transition:none}}

/* V359 — Evidence-based ERAS patient article: scoped outcomes and benefits/barriers. */
.eras-evidence-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}
.eras-evidence-metric{min-width:0;padding:20px;border:1px solid #b8dad0;border-radius:17px;background:#f1faf5;display:flex;flex-direction:column;gap:6px}
.eras-evidence-metric__value{font-size:var(--w-text-h1);font-weight:800;line-height:1.5;color:var(--eras-strong);font-variant-numeric:tabular-nums;direction:rtl}
.eras-evidence-metric>span{font-size:var(--w-text-body);font-weight:700;line-height:1.8}
.eras-evidence-metric>small{font-size:var(--w-text-small);color:var(--eras-muted);line-height:1.8}
.eras-evidence-explainer{background:#f8fbfa;border-right:3px solid #6aaa9c;border-radius:10px;padding:13px 17px;line-height:1.9}
.eras-section .eras-table td,.eras-section .eras-table th{overflow-wrap:break-word;line-height:1.9}
.eras-section .eras-table td{min-width:150px}
.eras-section .eras-card>.eras-list{padding-right:20px;margin:5px 0}
.eras-section .eras-card>.eras-list li{margin:6px 0}
.eras-section [lang="en"]{unicode-bidi:isolate}
@media(max-width:700px){.eras-evidence-metrics{grid-template-columns:minmax(0,1fr);gap:12px}.eras-evidence-metric{padding:16px}}
@media(prefers-reduced-motion:reduce){.eras-evidence-metrics{scroll-behavior:auto}}


/* V375 — approved homepage header, card scale and public guide link hit areas. */
body[data-w-shell="public"] .eras-site-header{width:100%;max-width:100%;margin:0;background:rgba(255,255,255,.96);container:eras-public-head / inline-size}
body[data-w-shell="public"] .eras-site-header .wh-header-inner{min-width:0}
body[data-w-shell="public"] .eras-site-header .wh-brand img{display:block;width:154px;max-width:100%;height:44px;object-fit:contain}
body[data-w-shell="public"] .eras-site-header .wh-nav{min-width:0}
body[data-w-shell="public"] .eras-site-header .wh-nav a:focus-visible,
body[data-w-shell="public"] .eras-site-header .wh-btn:focus-visible{outline:3px solid #07836e;outline-offset:3px}
body[data-w-shell="public"] .eras-home-style-hero{
 position:relative;isolation:isolate;overflow:hidden;
 border:1px solid #c6e2d9;border-radius:24px;
 background:linear-gradient(108deg,#e7f6f1 0%,#f6fcfa 45%,#fff 100%);
 padding:clamp(22px,3vw,42px);
 box-shadow:0 8px 26px rgba(20,67,62,.055)
}
body[data-w-shell="public"] .eras-home-style-hero .eras-tag{
 border:1px solid #b8ded2;background:#e9f7f0;color:#0b7770;
 font-size:var(--w-text-small);line-height:1.8
}
body[data-w-shell="public"] .eras-home-style-hero h1{
 font-size:var(--w-text-h1);font-weight:var(--w-weight-bold)!important;
 line-height:1.55;letter-spacing:normal;color:#102f3c;
 max-width:900px;margin:16px 0 14px
}
body[data-w-shell="public"] .eras-home-style-hero p{
 color:#516b73;font-size:var(--w-text-body);line-height:2;max-width:900px
}
body[data-w-shell="public"] .eras-section{
 border-color:#dbe9e5;border-radius:22px;
 box-shadow:0 8px 28px rgba(20,67,62,.045)
}
body[data-w-shell="public"] .eras-section>h2{
 font-size:var(--w-text-h2);font-weight:var(--w-weight-bold)!important;
 color:#133641;line-height:1.75
}
body[data-w-shell="public"] .eras-section>h3{
 font-size:var(--w-text-h3);font-weight:var(--w-weight-bold)!important;color:#173a46
}
body[data-w-shell="public"] .eras-section .eras-card{
 border-color:#dfeae7;background:linear-gradient(180deg,#fff,#fbfdfd);border-radius:17px
}
body[data-w-shell="public"] .eras-section .eras-card h3{color:#173a46}
body[data-w-shell="public"] .eras-nav a:focus-visible{outline:3px solid #128778;outline-offset:3px}
/* Icon, glyph, and label clicks land on the enclosing native sidebar anchor. */
body[data-w-shell="public"] .baria-global-sidebar__item :is(.baria-global-sidebar__icon,.baria-global-sidebar__label,.baria-global-sidebar__chevron),
body[data-w-shell="public"] .baria-global-sidebar__support :is(.baria-global-sidebar__support-icon,.baria-global-sidebar__support-copy,.baria-global-sidebar__chevron),
body[data-w-shell="public"] .baria-mobile-shell-drawer .baria-global-sidebar__item :is(.baria-global-sidebar__icon,.baria-global-sidebar__label,.baria-global-sidebar__chevron){pointer-events:none!important}
@container eras-public-head (max-width:1220px){
 .eras-site-header .wh-header-inner{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px 16px}
 .eras-site-header .wh-header-actions{grid-column:2;grid-row:1;justify-self:end}
 .eras-site-header .wh-nav{grid-column:1/-1;grid-row:2;justify-content:flex-start;overflow-x:auto;max-width:100%;padding-bottom:8px}
}
@container eras-public-head (max-width:650px){
 .eras-site-header .wh-header-inner{display:flex;flex-wrap:wrap;align-items:center}
 .eras-site-header .wh-nav{order:3;flex:1 0 100%;min-width:0}
 .eras-site-header .wh-brand{order:1}
 .eras-site-header .wh-header-actions{order:2;margin-inline-start:auto}
}
@media(max-width:650px){
 body[data-w-shell="public"] .eras-home-style-hero{border-radius:18px;padding:20px 15px}
 body[data-w-shell="public"] .eras-home-style-hero h1{line-height:1.65}
}
@media(max-width:430px){
 body[data-w-shell="public"] .eras-site-header .wh-brand img{width:120px;height:auto}
 body[data-w-shell="public"] .eras-site-header .wh-header-actions{width:100%}
}


/* V378 — two public education guides share ONE fluid content rail, not a
   centered 1190px article separated from the 236px / 76px sidebar.
   Scope prevents any change to staff, patient or other public modules. */
body.wariatric-guide-page.baria-app-shell > .baria-page-frame{
  padding:10px clamp(12px,1.2vw,20px) 24px!important;
}
body.wariatric-guide-page[data-w-shell="public"] > .baria-page-frame > .eras-shell{
  display:block;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:0 0 clamp(28px,4vw,56px)!important;
}
body.wariatric-guide-page[data-w-shell="public"] > .baria-page-frame > :is(.eras-site-header,.wp-site-header){
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  border:1px solid #dbe9e5;
  border-radius:18px;
  box-shadow:0 6px 22px rgba(20,67,62,.045);
}
body.wariatric-guide-page[data-w-shell="public"] > .baria-page-frame > :is(.eras-site-header,.wp-site-header) .wh-header-inner.wh-shell{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-inline:0!important;
  padding-inline:clamp(14px,1.6vw,24px)!important;
}
body.wariatric-guide-page[data-w-shell="public"] > .baria-page-frame > .eras-shell > main{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-hero{
  margin:16px 0 18px;
}
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-nav{
  margin:0 0 20px;
}
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-section{
  margin:18px 0;
}
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-section > p{
  max-width:104ch;
}
@media(max-width:900px){
  body.wariatric-guide-page.baria-app-shell > .baria-page-frame{
    padding:10px!important;
  }
}
@media(max-width:650px){
  body.wariatric-guide-page[data-w-shell="public"] > .baria-page-frame > :is(.eras-site-header,.wp-site-header){
    border-radius:14px;
  }
  body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-hero{
    margin:12px 0 14px;
  }
  body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-section{
    margin:14px 0;
  }
}

/* Keep the article chapter visible below the two-row sticky desktop header. */
@container baria-main (max-width:1220px){
  body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-section{
    scroll-margin-top:145px;
  }
}
@media(max-width:1100px){
  body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-section{
    scroll-margin-top:30px;
  }
}
@media(max-width:650px){
  body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-nav{
    display:flex;
    flex-wrap:nowrap;
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
    padding:4px 2px 10px;
  }
  body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-nav a{
    white-space:nowrap;
    flex:0 0 auto;
  }
}


/* V382: shared educational article readability (ERAS and plateau).
   Uses approved type tokens; preserves maps, charts, forms and shell. */
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-hero > p,
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-section > p,
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-card > p,
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-faq details > p{
  width:100%;max-width:100%;font-size:var(--w-text-body);
  font-weight:400;line-height:1.95;text-align:right;overflow-wrap:break-word;
}
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-nav a{
  font-size:var(--w-text-h4);font-weight:700;line-height:1.7;
  padding:10px 15px;text-align:center;
}
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-faq summary{
  font-size:var(--w-text-h3);font-weight:800;line-height:1.75;
  text-align:right;overflow-wrap:break-word;
}
body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-section > h2{
  font-size:var(--w-text-h2);line-height:1.55;
}
@media(max-width:650px){
  body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-nav a{
    font-size:var(--w-text-body);padding:9px 12px;
  }
  body.wariatric-guide-page[data-w-shell="public"] .eras-shell .eras-faq summary{
    font-size:var(--w-text-h4);
  }
}
