/* FE Boolean logic: dedicated, scoped learning aid */
.fe-logic-demo{max-width:100%;box-sizing:border-box;border:1px solid #94a3b8;border-radius:12px;padding:1rem;margin:1.25rem 0}
.fe-logic-demo *{box-sizing:border-box}
.fe-logic-demo__step{font-weight:700;line-height:1.55;border-bottom:1px solid #cbd5e1;margin:1rem 0 .55rem;padding:.35rem 0}
.fe-logic-demo__controls{display:flex;flex-wrap:wrap;gap:.7rem;align-items:flex-end}
.fe-logic-demo label{display:flex;flex-direction:column;gap:.3rem;flex:1 1 105px;min-width:0}
.fe-logic-demo select{width:100%;max-width:100%;border:1px solid #64748b;border-radius:7px;background:#fff;color:#172033;font:inherit;padding:.6rem}
.fe-logic-demo__expressions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin:.7rem 0}
.fe-logic-demo__card{padding:.8rem;border:1px solid #cbd5e1;border-radius:9px;background:#f8fafc;color:#172033;min-width:0;overflow-wrap:anywhere}
.fe-logic-demo__card strong{display:block;margin-bottom:.4rem}
.fe-logic-demo__formula{font-weight:700;line-height:1.6;overflow-wrap:anywhere}
.fe-logic-demo__value{font-size:1.35rem;font-weight:800;font-variant-numeric:tabular-nums;margin:.4rem 0}
.fe-logic-demo__value[data-value="1"]{color:#047857}
.fe-logic-demo__value[data-value="0"]{color:#1d4ed8}
.fe-logic-demo__actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:.65rem 0}
.fe-logic-demo button{font:inherit;min-height:44px;border:1px solid #64748b;border-radius:7px;background:#e2e8f0;color:#172033;padding:.65rem .85rem;cursor:pointer}
.fe-logic-demo button.fe-logic-demo__primary{background:#1d4ed8;color:#fff;border-color:#1d4ed8}
.fe-logic-demo :focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.fe-logic-demo__result{background:#f1f5f9;color:#172033;border-radius:9px;padding:.75rem;margin:.7rem 0}
.fe-logic-demo__result p{margin:.3rem 0}
.fe-logic-demo__feedback{font-weight:700}
.fe-logic-demo__tablebox{max-width:100%;overflow-x:auto;margin:.7rem 0}
.fe-logic-demo table{width:100%;border-collapse:collapse;min-width:275px;font-size:.92rem;text-align:center}
.fe-logic-demo th,.fe-logic-demo td{border:1px solid #cbd5e1;padding:.35rem .3rem;white-space:nowrap}
.fe-logic-demo th{background:#e2e8f0;color:#172033}
.fe-logic-demo tr[data-selected="true"]{background:#dbeafe;color:#172554;font-weight:700}
.fe-logic-demo__legend{font-size:.87rem;color:#334155}
@media(max-width:520px){.fe-logic-demo{padding:.65rem}.fe-logic-demo__expressions{grid-template-columns:minmax(0,1fr)}.fe-logic-demo label{flex:1 1 calc(33.33% - .7rem)}.fe-logic-demo__actions button{flex:1 1 calc(50% - .5rem)}}

/* Use a real CSS overline instead of U+0305, whose mark can float or disappear
   in Android fonts, inline code, Markdown tables and preformatted examples. */
.fe-logic-overbar{
  display:inline-block;
  text-decoration-line:overline;
  text-decoration-style:solid;
  text-decoration-thickness:1.5px;
  text-decoration-skip-ink:none;
  line-height:1.25;
  vertical-align:baseline;
}
.fe-logic-equation{white-space:pre;overflow-x:auto;max-width:100%}
.fe-logic-equation .fe-logic-overbar{line-height:inherit}
