/* Moraph for Good: warm-up word matches (build/pages/warmups.py). Sheet, header and footer styles are in sessions.css. */

/* Index */
.wu-cards{display:grid;grid-template-columns:minmax(0,1fr);gap:1.2rem}
@media (min-width:860px){.wu-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
.wu-card{border:1px solid var(--line);border-radius:14px;padding:1.4rem;background:var(--paper)}
.wu-card .h3{margin:.4rem 0 .6rem}
.wu-card-words{color:var(--muted);font-size:.95rem;margin:0}
.wu-card-link{margin:1rem 0 0}
.wu-about{margin-top:3rem}
.wu-hero-note{margin:1rem 0 0;color:var(--on-night-2);font-size:.95rem}
.wu-hero-note a{color:var(--on-night);text-underline-offset:3px}
.wu-hero-note a:hover{color:var(--sun-2)}

/* The match: words left, meanings right; stacked on narrow screens (numbers and letters keep them apart) */
.wu-how{margin:0 0 1rem}
.wu-match{display:grid;grid-template-columns:minmax(0,1fr);gap:1.4rem}
@media (min-width:640px){.wu-match{grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:2rem}}
.wu-col-h{margin:0 0 .4rem;font-size:.8rem;letter-spacing:.1em;text-transform:uppercase}
.wu-terms,.wu-meanings{list-style:none;margin:0;padding:0}
.wu-terms li{display:flex;align-items:center;gap:.7rem;padding:.55rem 0;border-bottom:1px solid #d9dcd8;font-weight:600}
.wu-meanings li{display:flex;gap:.7rem;padding:.55rem 0;border-bottom:1px solid #d9dcd8;font-size:.95rem;line-height:1.45}
.wu-num,.wu-letter{flex:none;min-width:1.4rem;font-family:var(--f-mono);font-weight:500;color:#8a5a00}
.wu-box{flex:none;width:2rem;height:2rem;border:1.5px solid #16201c;border-radius:4px}
.wu-term{color:#16201c;text-underline-offset:3px;text-decoration-color:#8a5a00;overflow-wrap:anywhere}
.wu-mean{min-width:0}

/* Answer key */
.wu-keypage{margin-top:2rem}
.wu-notes{padding-left:1.1rem;margin:.4rem 0 1.2rem}
.wu-notes li{margin:.35rem 0}
.wu-key{width:100%;border-collapse:collapse;font-size:.92rem;margin-top:.4rem}
.wu-key th,.wu-key td{text-align:left;vertical-align:top;padding:.45rem .6rem .45rem 0;border-bottom:1px solid #d9dcd8}
.wu-key thead th{font:500 .72rem/1.4 var(--f-mono);letter-spacing:.1em;text-transform:uppercase;color:#5a625e;border-bottom:2px solid #16201c}
.wu-key tbody th{font-weight:600;width:30%}
.wu-key-letter{font-family:var(--f-mono);font-weight:600;width:3.5rem}
.wu-note{margin-top:1.6rem}
@media (max-width:480px){.wu-key td:last-child{display:none}.wu-key thead th:last-child{display:none}.wu-key tbody th{width:auto}}

@media print{
  /* One printed page for the match, one for the host (Letter and A4, normal print) */
  html:not(.print-large) body:has(.wu-sheet)::before{display:none}
  .wu-keypage{break-before:page;margin-top:0}
  .wu-match{grid-template-columns:minmax(0,2fr) minmax(0,3fr)!important;gap:1.4rem}
  html:not(.print-large) .wu-sheet .ws-head{padding-bottom:.5rem;margin-bottom:.8rem}
  html:not(.print-large) .wu-terms li{padding:.75rem 0}
  html:not(.print-large) .wu-meanings li{padding:.4rem 0;font-size:10pt;line-height:1.35}
  html:not(.print-large) .wu-key{font-size:9.5pt}
  html:not(.print-large) .wu-key th,html:not(.print-large) .wu-key td{padding:.3rem .5rem .3rem 0}
  html:not(.print-large) .wu-sheet .ws-foot{margin-top:1rem}
  .wu-term{color:#000!important;text-decoration:none}
  .wu-num,.wu-letter{color:#000}
  .wu-terms li,.wu-meanings li,.wu-key tr{break-inside:avoid}
  .wu-key td:last-child,.wu-key thead th:last-child{display:table-cell!important}
  /* Large print: one column, so the meanings keep a readable line length */
  html.print-large .wu-match{grid-template-columns:minmax(0,1fr)!important}
  html.print-large .wu-box{width:1.6rem;height:1.6rem}
}
