/* V406 — Everyday FAQ card rhythm. Scoped; no clinical/layout/global typography mutation.
   Role-based type: 18px question titles and answers, 16px controls, 14px metadata.
   Keep exactly the same typography on touch, tablet, desktop, and at 200% zoom. */
#edfaq{
  --ed-card-title-size:var(--w-text-h4);
  --ed-card-body-size:var(--w-text-h4);
  --ed-card-control-size:var(--w-text-body);
  --ed-card-meta-size:var(--w-text-small);
  --ed-card-interaction-ink:#173f3a;
  --ed-card-border:#c4ddd5;
  --ed-card-hover-border:#79b7a9;
  --ed-card-hover-surface:#f0faf6;
  --ed-card-open-surface:#e3f4ed;
  --ed-card-focus:#177c6b;
}
#edfaq :is(.ed-head,.ed-stage-guide,.ed-search-panel,.ed-practical,.ed-topic-panel,.ed-results,.ed-food-link,.ed-footer,.ed-safety,.ed-suggest-panel,.ed-stage-question,.ed-stage-question>summary,.ed-stage-answer,.ed-stage-controls label,.ed-stage-controls select,.ed-stage-jump,.ed-direct-btn,.ed-direct-btn strong,.ed-direct-btn small,.ed-pill,.ed-topic,.ed-suggest-item,.ed-related>button,details.ed-card,details.ed-card>summary,.ed-card-body,.ed-card-body .ed-answer,.wariatric-eras-entry,.wariatric-myths-entry,.wariatric-myths-panel,.wariatric-myths-item,.wariatric-myths-item__question,.wariatric-myths-item__answer){
  font-family:var(--w-font-family);
}
/* Each visual role uses one font size across all breakpoints; no compact mobile type. */
body[data-w-ui="faq-frame"][data-w-shell="public"] #edfaq details.ed-card>summary,
#edfaq .ed-stage-question>summary,
#edfaq .wariatric-myths-list .wariatric-myths-item__question{
  font-size:var(--w-text-h4);
  font-weight:var(--w-weight-bold);
  line-height:1.85;
  color:var(--ed-card-interaction-ink);
  text-align:right;
}
body[data-w-ui="faq-frame"][data-w-shell="public"] #edfaq details.ed-card>.ed-card-body .ed-answer,
#edfaq .ed-stage-answer>p,
#edfaq .wariatric-myths-list .wariatric-myths-item__answer{
  font-size:var(--w-text-h4);
  font-weight:var(--w-weight-regular);
  line-height:1.95;
  color:#234640;
  overflow-wrap:break-word;
}
#edfaq .ed-stage-header h2,
#edfaq .ed-practical-head h2,
#edfaq .ed-topic-panel>h2,
#edfaq .ed-results-head h2{
  font-family:var(--w-font-family);
  font-size:var(--w-text-h2);
  font-weight:var(--w-weight-bold);
  line-height:1.6;
}
/* Navigation controls and selection labels use 16px; visual card titles use 18px. */
#edfaq .ed-stage-controls label,
#edfaq .ed-stage-controls select[data-native-select="true"],
#edfaq .ed-stage-jump,
#edfaq .ed-search-panel label,
#edfaq .ed-search input,
#edfaq .ed-topic,
#edfaq .ed-pill{
  font-family:var(--w-font-family);
  font-size:var(--w-text-body);
  font-weight:var(--w-weight-bold);
  line-height:1.8;
}
#edfaq .ed-stage-controls select[data-native-select="true"],
#edfaq .ed-search input{
  font-weight:var(--w-weight-medium);
  font-size:var(--w-text-body);
}
/* Headline-type text is 18px in every clickable question and guide card. */
#edfaq .ed-direct-btn strong,
#edfaq .ed-suggest-item,
#edfaq .ed-related>button,
#edfaq .wariatric-eras-entry__title,
#edfaq .wariatric-myths-entry__title,
#edfaq .ed-food-link b,
#edfaq .ed-footer strong{
  font-family:var(--w-font-family);
  font-size:var(--w-text-h4);
  font-weight:var(--w-weight-bold);
  line-height:1.85;
}
#edfaq .ed-stage-header p,
#edfaq .ed-practical-head p,
#edfaq .ed-results-head p,
#edfaq .ed-stage-note,
#edfaq .ed-stage-selection-hint{
  font-size:var(--w-text-body);
  line-height:1.9;
}
#edfaq .ed-stage-question-kind,
#edfaq .ed-direct-btn small,
#edfaq .ed-stage-references>summary,
#edfaq .ed-stage-season>p,
#edfaq .ed-card-body .ed-review-note,
#edfaq .wariatric-myths-item__sources{
  font-family:var(--w-font-family);
  font-size:var(--w-text-small);
  font-weight:var(--w-weight-medium);
  line-height:1.85;
}
/* Identical card edges and unobtrusive transitions: no layout shifts or jumping. */
#edfaq :is(.ed-stage-question,details.ed-card,.wariatric-myths-list>details.wariatric-myths-item){
  border:1px solid var(--ed-card-border);
  border-radius:14px;
  background-color:#fff;
  box-shadow:0 2px 6px rgba(20,83,71,.045);
  transform:none;
  transition:background-color .22s ease,border-color .22s ease,box-shadow .22s ease;
}
#edfaq .ed-stage-question>summary,
body[data-w-ui="faq-frame"][data-w-shell="public"] #edfaq details.ed-card>summary,
#edfaq .wariatric-myths-list>details.wariatric-myths-item>summary.wariatric-myths-item__summary{
  min-height:70px;
  padding:15px 18px;
  transition:background-color .22s ease,color .22s ease;
}
#edfaq .ed-stage-question>summary{padding-inline-end:54px}
#edfaq .ed-stage-question[open],
#edfaq details.ed-card[open],
#edfaq .wariatric-myths-list>details.wariatric-myths-item[open]{
  border-color:var(--ed-card-hover-border);
  background-color:var(--ed-card-open-surface);
  box-shadow:0 3px 12px rgba(20,83,71,.075);
}
#edfaq .ed-stage-question[open]>summary,
body[data-w-ui="faq-frame"][data-w-shell="public"] #edfaq details.ed-card[open]>summary,
#edfaq .wariatric-myths-list>details.wariatric-myths-item[open]>summary{
  background-color:var(--ed-card-open-surface);
  color:#114e43;
}
#edfaq .ed-stage-question>summary:focus-visible,
body[data-w-ui="faq-frame"][data-w-shell="public"] #edfaq details.ed-card>summary:focus-visible,
#edfaq .wariatric-myths-list>details.wariatric-myths-item>summary:focus-visible{
  outline:3px solid var(--ed-card-focus);
  outline-offset:-3px;
}
/* Uniform gentle feedback for interactive cards, not misleading static content panels. */
#edfaq :is(.ed-direct-btn,.ed-topic,.ed-pill,.ed-suggest-item,.ed-related>button,.ed-stage-jump,.wariatric-eras-entry,.wariatric-myths-entry,.ed-footer-actions a,.ed-food-link a){
  font-family:var(--w-font-family);
  transform:none;
  transition:background-color .22s ease,border-color .22s ease,box-shadow .22s ease;
}
#edfaq .ed-stage-controls select[data-native-select="true"]{
  border:1px solid var(--ed-card-border);
  background-color:#fff;
  color:var(--ed-card-interaction-ink);
  transition:background-color .22s ease,border-color .22s ease,box-shadow .22s ease;
}
#edfaq .ed-stage-controls label::after{
  transition:background-color .22s ease,border-color .22s ease,transform .22s ease;
}
#edfaq .ed-stage-controls label:focus-within::after{
  transform:rotate(180deg);
}
#edfaq .ed-stage-controls select[data-native-select="true"]:focus-visible,
#edfaq :is(.ed-direct-btn,.ed-topic,.ed-pill,.ed-suggest-item,.ed-related>button,.ed-stage-jump,.wariatric-eras-entry,.wariatric-myths-entry):focus-visible{
  outline:3px solid var(--ed-card-focus);
  outline-offset:2px;
}
/* Hover exists only with an actual mouse; touch selection remains native. */
@media(hover:hover) and (pointer:fine){
  #edfaq :is(.ed-stage-question,details.ed-card,.wariatric-myths-list>details.wariatric-myths-item):hover{
    border-color:var(--ed-card-hover-border);
    background-color:var(--ed-card-hover-surface);
    box-shadow:0 4px 13px rgba(20,83,71,.09);
    transform:none;
  }
  #edfaq .ed-stage-question:not([open]):hover>summary,
  body[data-w-ui="faq-frame"][data-w-shell="public"] #edfaq details.ed-card:not([open]):hover>summary,
  #edfaq .wariatric-myths-list>details.wariatric-myths-item:not([open]):hover>summary{
    background-color:var(--ed-card-hover-surface);
  }
  #edfaq :is(.ed-stage-question,details.ed-card,.wariatric-myths-list>details.wariatric-myths-item)[open]:hover>summary{
    background-color:var(--ed-card-open-surface);
  }
  #edfaq :is(.ed-direct-btn,.ed-topic,.ed-pill,.ed-suggest-item,.ed-related>button,.ed-stage-jump,.wariatric-eras-entry,.wariatric-myths-entry,.ed-footer-actions a,.ed-food-link a):hover{
    border-color:var(--ed-card-hover-border);
    background-color:var(--ed-card-hover-surface);
    box-shadow:0 3px 10px rgba(20,83,71,.07);
    transform:none;
  }
  #edfaq .ed-topic[aria-pressed="true"]:hover{
    background-color:#d9f0e7;
    border-color:var(--ed-card-focus);
    transform:none;
  }
  #edfaq .ed-stage-controls select[data-native-select="true"]:hover{
    background-color:var(--ed-card-hover-surface);
    border-color:var(--ed-card-hover-border);
  }
}
/* Answer reveals use the same restrained fade for every accordion family. */
@keyframes ed-v406-answer-appear{
  from{opacity:.5}
  to{opacity:1}
}
#edfaq details.ed-card[open]>.ed-card-body,
#edfaq .ed-stage-question[open]>.ed-stage-answer,
#edfaq .wariatric-myths-list>details.wariatric-myths-item[open] .wariatric-myths-item__content{
  animation:ed-v406-answer-appear .22s ease-out both;
}
/* In supporting browsers, stage content also expands/collapses smoothly. */
@supports(interpolate-size:allow-keywords){
  #edfaq .ed-stage-question{interpolate-size:allow-keywords}
  #edfaq .ed-stage-question::details-content{
    height:0;
    overflow:clip;
    transition:height .26s ease,content-visibility .26s allow-discrete;
  }
  #edfaq .ed-stage-question[open]::details-content{height:auto}
}
/* Preserve spacing on all viewports without compressing text on mobile. */
@media(max-width:650px){
  #edfaq .ed-stage-question>summary,
  body[data-w-ui="faq-frame"][data-w-shell="public"] #edfaq details.ed-card>summary,
  #edfaq .wariatric-myths-list>details.wariatric-myths-item>summary.wariatric-myths-item__summary{
    min-height:64px;
    padding:14px 16px;
  }
  #edfaq .ed-stage-question>summary{padding-inline-end:50px}
}
@media(prefers-reduced-motion:reduce){
  #edfaq :is(.ed-stage-question,details.ed-card,.wariatric-myths-list>details.wariatric-myths-item,.ed-direct-btn,.ed-topic,.ed-pill,.ed-suggest-item,.ed-related>button,.ed-stage-jump,.wariatric-eras-entry,.wariatric-myths-entry,.ed-footer-actions a,.ed-food-link a),
  #edfaq :is(.ed-stage-question>summary,details.ed-card>summary,.wariatric-myths-item__summary,.ed-stage-controls select),
  #edfaq .ed-stage-controls label::after,
  #edfaq :is(.ed-card-body,.ed-stage-answer,.wariatric-myths-item__content){
    transition:none!important;
    animation:none!important;
    transform:none!important;
  }
  #edfaq .ed-stage-question::details-content{
    transition:none!important;
  }
}

/* V407 — balanced card frames: no orphan card pinned to a row edge.
   Applies only to the practical answers and quick-question chips. */
#edfaq .ed-practical,
#edfaq .ed-search-panel{
  min-width:0;
  width:100%;
  box-sizing:border-box;
}
#edfaq .ed-direct{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;
  gap:12px;
  width:100%;
  min-width:0;
}
#edfaq .ed-direct>.ed-direct-btn{
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:86px;
  height:100%;
  box-sizing:border-box;
  margin:0;
  border-radius:14px;
  text-align:right;
}
/* If an odd number of guide cards exists, center the last card at column width. */
#edfaq .ed-direct>.ed-direct-btn:last-child:nth-child(odd){
  grid-column:1/-1;
  width:calc((100% - 12px)/2);
  max-width:100%;
  justify-self:center;
}
/* V408: Preserve the original SMALL quick chips; only center wrapped rows.
   These are search keywords, not large action cards. */
#edfaq .ed-quick{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  align-content:start;
  gap:7px;
  margin-top:12px;
  width:100%;
  min-width:0;
}
#edfaq .ed-quick>.ed-pill{
  flex:0 0 auto;
  width:auto;
  min-width:0;
  max-width:100%;
  min-height:0;
  padding:5px 12px;
  margin:0;
  border-radius:999px;
  font-family:var(--w-font-family);
  font-size:var(--w-text-small);
  font-weight:var(--w-weight-medium);
  line-height:1.8;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
  box-sizing:border-box;
  transform:none;
  transition:background-color .22s ease,border-color .22s ease,box-shadow .22s ease;
}
@media(max-width:650px){
  #edfaq .ed-direct{gap:10px}
  #edfaq .ed-direct>.ed-direct-btn{
    min-height:78px;
    padding:12px;
  }
  #edfaq .ed-direct>.ed-direct-btn:last-child:nth-child(odd){
    width:calc((100% - 10px)/2);
  }
  #edfaq .ed-quick{gap:7px}
  #edfaq .ed-quick>.ed-pill{
    flex:0 0 auto;
    width:auto;
    min-height:0;
    padding:5px 10px;
    border-radius:999px;
    font-size:var(--w-text-small);
  }
}
/* More results may be inserted dynamically: do not animate row geometry. */
@media(prefers-reduced-motion:reduce){
  #edfaq .ed-direct>.ed-direct-btn,
  #edfaq .ed-quick>.ed-pill{
    transition:none!important;
    animation:none!important;
    transform:none!important;
  }
}
