/* Logic-only table and truth-grid controls. No changes to existing answer modes. */
.logic-visual { margin: 16px 0; padding: 16px; color: #263b3b; background: #f5fbf8; border: 1px solid #bedad2; border-radius: 16px; text-align: left; min-width: 0; }
.logic-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-radius: 10px; }
.logic-truth-table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.55; text-align: center; }
.logic-truth-table caption { text-align: left; color: #344b48; font-size: 15px; padding: 0 0 10px; }
.logic-truth-table th, .logic-truth-table td { padding: 11px 14px; border: 1px solid #c9dcd7; min-width: 42px; }
.logic-truth-table thead th { background: #e1f1eb; font-weight: 650; }
.logic-truth-table tbody th { font-weight: 550; background: #fffdf5; }
.logic-target-cell { background: #fff9ed; font-weight: 700; }
.logic-blank { display: inline-block; min-width: 1.2em; color: #6a5740; }
.logic-row-highlight th, .logic-row-highlight td { box-shadow: inset 0 3px #2b7068, inset 0 -3px #2b7068; }
.logic-row-marker { display: block; font-size: 13px; font-weight: 600; }
.logic-definitions { margin: 10px 0; }
.logic-definitions > div { display: grid; grid-template-columns: minmax(32px, auto) minmax(0, 1fr); gap: 12px; margin: 10px 0; }
.logic-definitions dt { font-weight: 700; }
.logic-definitions dd { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.logic-formula-lines p { margin: 9px 0; font-size: 18px; line-height: 1.75; overflow-wrap: anywhere; }
.logic-domain-members { display: flex; gap: 10px; flex-wrap: wrap; padding: 0; list-style: none; }
.logic-domain-members li { border: 1px solid #8fbcb0; padding: 6px 12px; border-radius: 8px; background: #fff; }
.logic-visual figcaption { font-size: 14px; line-height: 1.65; margin-top: 12px; }
.logic-cell-list { padding: 0; margin: 16px 0 10px; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.logic-cell-list legend { padding: 0; margin-bottom: 12px; font-size: 17px; font-weight: 650; text-align: left; }
.logic-cell-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid #c2d6d0; border-radius: 12px; background: #fffdf7; min-width: 0; }
.logic-cell-card label { display: block; font-size: 16px; line-height: 1.65; font-weight: 550; color: #273d38; overflow-wrap: anywhere; text-align: left; }
.logic-cell-card select { box-sizing: border-box; width: 100%; min-height: 50px; padding: 10px 32px 10px 12px; font: inherit; font-size: 17px; color: #243e38; background: #fff; border: 1.5px solid #72998e; border-radius: 8px; }
.logic-cell-card select:focus-visible, .logic-table-scroll:focus-visible { outline: 3px solid #c33e70; outline-offset: 3px; }
.logic-cell-card select:disabled { opacity: 1; color: #40574f; background: #edf2ef; border-color: #9fb8ae; }
.logic-draft-summary { font-size: 14px; color: #40574f; margin: 10px 0; text-align: left; }
@media(max-width:600px) { .logic-cell-list { grid-template-columns: minmax(0,1fr); } .logic-visual { padding: 12px; } .logic-truth-table th,.logic-truth-table td { padding: 10px 9px; } .logic-formula-lines p { font-size: 17px; } }
