/* Moraph for Good: session feedback sheets and the feedback guide's tally helper (build/pages/feedback.py). */
html:not(.js-on) .fb-js{display:none!important}
.fb-guide-link{margin:1.2rem 0 0;color:var(--on-night-2);font-size:.95rem}
.fb-guide-link a{color:var(--on-night);text-underline-offset:3px}

/* The sheet */
.fb-anon{border:1.5px solid #16201c;border-radius:8px;padding:.6rem .9rem;font-size:.95rem;margin:0 0 1rem}
.fb-part{margin-top:1.2rem}
.fb-part h3{margin:0 0 .3rem}
.fb-part h3 .mono{display:inline-block;margin-right:.5rem;color:#8a5a00;font-size:.8em;letter-spacing:.06em;text-transform:uppercase}
.fb-how{margin:0 0 .5rem;font-size:.95rem}
.fb-table{width:100%;border-collapse:collapse;font-size:.92rem}
.fb-table thead th{font-weight:600;font-size:.78rem;line-height:1.25;text-align:center;vertical-align:bottom;padding:0 .3rem .4rem;border-bottom:2px solid #16201c;width:4.9rem}
.fb-table thead th:first-child{width:auto}
.fb-table tbody th{text-align:left;font-weight:400;padding:.45rem .6rem .45rem 0;border-bottom:1px solid #9aa29e;line-height:1.35}
.fb-table td{text-align:center;vertical-align:middle;border-bottom:1px solid #9aa29e}
.fb-n{display:inline-block;min-width:1.4rem;font:500 .8rem/1 var(--f-mono);color:#8a5a00}
.fb-box{display:inline-block;width:1.05rem;height:1.05rem;border:1.5px solid #16201c;border-radius:3px;vertical-align:middle}
.fb-fold{margin:1.1rem 0 0;border-top:1.5px dashed #16201c;text-align:center;line-height:1}
.fb-fold span{position:relative;top:-.6em;display:inline-block;max-width:85%;background:#fff;padding:0 .6rem;font:500 .72rem/1.2 var(--f-mono);letter-spacing:.06em;text-transform:uppercase;color:#16201c}
.fb-qs{margin:.9rem 0 0;padding-left:1.6rem}
.fb-qs li{margin:.5rem 0;break-inside:avoid}
.fb-q{display:block;font-weight:600}
.fb-choices{display:flex;flex-wrap:wrap;gap:.3rem 1.6rem;margin-top:.3rem}
.fb-choice{display:inline-flex;align-items:center;gap:.45rem}
.fb-line{display:block;height:1.9rem;border-bottom:1px solid #9aa29e}
.fb-line+.fb-line{height:1.9rem}
.fb-err{font-size:.8rem;color:var(--err-ink);font-weight:500}
.fb-err[hidden]{display:none}

/* On a phone, each statement's four boxes stack under it, labelled (screen only; paper keeps the grid) */
@media screen and (max-width:640px){
  .fb-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .fb-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:.35rem .8rem;padding:.6rem 0;border-bottom:1px solid #9aa29e}
  .fb-table tbody th{grid-column:1/-1;border:0;padding:0 0 .2rem}
  .fb-table td{border:0;text-align:left;display:flex;align-items:center;gap:.45rem;font-size:.85rem}
  .fb-table td::after{content:attr(data-label)}
}

/* The guide: links to every sheet */
.fb-sheets{list-style:none;padding:0}
.fb-sheets li{margin:.6rem 0;line-height:1.8}

/* Tally helper */
.fb-tally{margin-top:1.4rem}
.fb-tally .field{margin:0 0 1.2rem}
.fb-st,.fb-general{border:1px solid var(--line);border-radius:14px;padding:1rem 1.1rem 1.1rem;margin:0 0 1rem;background:var(--paper-3);min-width:0}
.fb-st legend,.fb-general legend{font-weight:600;padding:0 .3rem;max-width:100%;white-space:normal}
.fb-st legend .fb-n{color:var(--sun-ink)}
.fb-when{margin-top:.6rem}
.fb-when-h{margin:0 0 .3rem;font:500 .72rem/1.4 var(--f-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.fb-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem .8rem}
@media (min-width:560px){.fb-counts{grid-template-columns:repeat(4,minmax(0,1fr))}.fb-general .fb-counts{grid-template-columns:repeat(3,minmax(0,1fr))}}
.fb-count{display:flex;flex-direction:column;gap:.25rem;font-size:.85rem;min-width:0}
.fb-count input{width:100%;font:inherit;font-size:1rem;color:var(--text);background:var(--field);border:1px solid var(--field-line);border-radius:10px;padding:.55rem .7rem;min-height:44px}
.fb-count input:focus{outline:none;border-color:var(--text);box-shadow:0 0 0 3px rgba(242,163,58,.45)}
.fb-count input[aria-invalid="true"]{border-color:var(--err-ink)}
.fb-status{margin:.4rem 0 1rem;font-size:.92rem;color:var(--muted)}
.fb-result{margin-top:1.8rem;border-top:2px solid var(--text);padding-top:1rem}
.fb-result-note{font-size:.92rem;color:var(--muted)}
.fb-scroll{overflow-x:auto}
.fb-res-table{width:100%;border-collapse:collapse;font-size:.92rem}
.fb-res-table th,.fb-res-table td{text-align:left;vertical-align:top;padding:.55rem .6rem .55rem 0;border-bottom:1px solid var(--line)}
.fb-res-table thead th{font:500 .72rem/1.4 var(--f-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.fb-res-table tbody th{font-weight:400;overflow-wrap:anywhere;min-width:9rem}
.fb-res-table td{white-space:nowrap}
.fb-res-general{margin-top:1rem}
@media screen and (max-width:560px){
  .fb-res-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .fb-res-table tr{display:block;border-bottom:1px solid var(--line);padding:.5rem 0}
  .fb-res-table tbody th,.fb-res-table td{display:flex;justify-content:space-between;gap:1rem;border:0;padding:.15rem 0;white-space:normal}
  .fb-res-table tbody th{font-weight:600;min-width:0}
  .fb-res-table td::before{content:attr(data-label);color:var(--muted)}
}

@media print{
  /* One page: the sheet in small, even type (large print grows with the root, as worksheets do) */
  html:not(.print-large) .fb-sheet{font-size:9.5pt;line-height:1.35}
  html:not(.print-large) .fb-sheet .ws-head{margin-bottom:.6rem;padding-bottom:.5rem}
  html:not(.print-large) .fb-sheet .ws-head .h2{font-size:15pt;margin:.2rem 0}
  html:not(.print-large) .fb-sheet .h4{font-size:11pt}
  html:not(.print-large) .fb-sheet .ws-foot{margin-top:.8rem}
  .fb-sheet .fb-table thead th{font-size:.9em}
  html:not(.print-large) .fb-part{break-inside:avoid}
  /* Large print: Part A on the first page, Part B and the questions on the second */
  html.print-large .fb-part+.fb-part{break-before:page}
  html.print-large .fb-sheet .ws-head{margin-bottom:.6rem}
  .fb-table{table-layout:fixed}
  .fb-table thead th:not(:first-child){width:4.4rem}
  html.print-large .fb-table thead th:not(:first-child){width:3.6rem;font-size:.72em;padding:0 .15rem .3rem}
  html.print-large .fb-table tbody th{padding:.3rem .5rem .3rem 0}
  html.print-large .fb-table tbody tr,html.print-large .fb-qs li{break-inside:avoid}
  html.print-large .fb-box{width:1.2rem;height:1.2rem}
  /* Large print keeps two writing lines, so Part B still fits its page */
  html.print-large .fb-line{height:1.7rem}
  html.print-large .fb-line:nth-child(n+3){display:none}
  html.print-large .fb-sheet .ws-foot{margin-top:.8rem}
  .fb-fold span{background:#fff}
  /* The guide's "Print the counts": only the tally result (feedback.js adds .print-tally while printing) */
  html.print-tally main > *:not(.section),html.print-tally .gd-aside,html.print-tally .guide-item:not(.fb-tally-sec),html.print-tally .fb-tally,html.print-tally #tally-intro,html.print-tally .fb-tally-sec > h2,html.print-tally .fb-tally-sec > .why{display:none!important}
  .fb-tally{display:none!important}
  .fb-result{border-top-color:#000}
  .fb-scroll{overflow:visible}
  .fb-res-table th,.fb-res-table td{border-bottom-color:#999;color:#000}
}
